Crop and Save YOLOv4 Object Detections | Custom YOLOv4 Functions with TensorFlow

The AI Guy · Beginner ·📄 Research Papers Explained ·5y ago

Key Takeaways

This video demonstrates how to create custom functions for YOLOv4 object detections using TensorFlow, specifically a function to crop and save detections as new images.

Original Description

Learn how to code your very own Custom Functions to work with YOLOv4 Object Detections! In this video I will walk-through a custom function I have created to crop and save YOLOv4 object detections as new images. This tutorial can be implemented using YOLOv4, YOLOv4-tiny, YOLOv3, or YOLOv3-tiny. The commands can be run using TensorFlow 2.0, TensorFlow Lite or TensorRT models on images, video and webcam! #yolov4 #objectdetection #tensorflow This video covers the implementation of YOLOv4 using TensorFlow and how to add a command line argument in order to activate the custom function for cropping of detections. GET THE CODE HERE: https://github.com/theAIGuysCode/yolov4-custom-functions Video Breakdown: 1. Cloning or Downloading the Code for the Tutorial 2. Running YOLOv4 Object Detector on Images using the custom crop flag 3. Show where the cropped new images are saved within the repository. 4. Running YOLOv4 Object Detector on Video using the custom crop flag 5. Explaining the code for the custom cropping function and how to edit it --------------------------Resources--------------------------- Setting Up Custom Functions Repository and Running Object Counting Function: https://youtu.be/jDwC5m7c7BU Train Your Own YOLOv4 Custom Object Detector in the Cloud: https://youtu.be/mmj3nxGT2YQ Running Pre-trained YOLOv4 model with TensorFlow, TFLite, TensorRT: https://youtu.be/iPwepy-SVCQ running Custom YOLOv4 License Plate Detector Model with TensorFlow, TFLite, TensorRT: https://www.youtube.com/watch?v=nOIVxi5yurE The Official YOLOv4 paper: https://arxiv.org/abs/2004.10934 If you enjoyed the video, toss it a like! 👍 To Subscribe: https://www.youtube.com/channel/UCrydcKaojc44XnuXrfhlV8Q?sub_confirmation=1 Thanks so much for watching! - The AI Guy
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from The AI Guy · The AI Guy · 23 of 28

1 How to Setup a Machine Learning and AI Environment
How to Setup a Machine Learning and AI Environment
The AI Guy
2 Introduction to Machine Learning | | Learning ML with Scikit | Iris Dataset
Introduction to Machine Learning | | Learning ML with Scikit | Iris Dataset
The AI Guy
3 Introduction to Machine Learning | Learning ML with Scikit | Iris Dataset | Part 2
Introduction to Machine Learning | Learning ML with Scikit | Iris Dataset | Part 2
The AI Guy
4 How to Install OpenCV on Windows | OpenCV Python Tutorial | Setting up Computer Vision
How to Install OpenCV on Windows | OpenCV Python Tutorial | Setting up Computer Vision
The AI Guy
5 How to Build and Install OpenCV from Source | Using Visual Studio and CMake | Computer Vision
How to Build and Install OpenCV from Source | Using Visual Studio and CMake | Computer Vision
The AI Guy
6 YOLOv3 Object Detection with Darknet for Windows/Linux | Install and Run with GPU and OPENCV
YOLOv3 Object Detection with Darknet for Windows/Linux | Install and Run with GPU and OPENCV
The AI Guy
7 Creating a YOLOv3 Custom Dataset | Quick and Easy | 9,000,000+ Images
Creating a YOLOv3 Custom Dataset | Quick and Easy | 9,000,000+ Images
The AI Guy
8 Train YOLOv3 Custom Object Detector with Darknet | Aimbot and Security Camera | Fast and Easy
Train YOLOv3 Custom Object Detector with Darknet | Aimbot and Security Camera | Fast and Easy
The AI Guy
9 Create Labels and Annotations for Custom YOLOv3 Google Images Dataset | LabelImg Tutorial
Create Labels and Annotations for Custom YOLOv3 Google Images Dataset | LabelImg Tutorial
The AI Guy
10 How to Build an Object Detection Classifier with TensorFlow 2.0 on Windows/Linux
How to Build an Object Detection Classifier with TensorFlow 2.0 on Windows/Linux
The AI Guy
11 YOLOv3 in the CLOUD : Install and Train Custom Object Detector (FREE GPU)
YOLOv3 in the CLOUD : Install and Train Custom Object Detector (FREE GPU)
The AI Guy
12 A.I. Learns to Play World's Hardest Game (QWOP)
A.I. Learns to Play World's Hardest Game (QWOP)
The AI Guy
13 How to Build Object Detection APIs Using TensorFlow and Flask
How to Build Object Detection APIs Using TensorFlow and Flask
The AI Guy
14 Getting Started with Azure Machine Learning Studio
Getting Started with Azure Machine Learning Studio
The AI Guy
15 Real-time Yolov3 Object Detection for Webcam and Video (using Tensorflow)
Real-time Yolov3 Object Detection for Webcam and Video (using Tensorflow)
The AI Guy
16 How to Build an Object Tracker Using YOLOv3, Deep SORT and TensorFlow
How to Build an Object Tracker Using YOLOv3, Deep SORT and TensorFlow
The AI Guy
17 YOLOv4 in the CLOUD: Install and Run Object Detector (FREE GPU)
YOLOv4 in the CLOUD: Install and Run Object Detector (FREE GPU)
The AI Guy
18 YOLOv4 in the CLOUD: Build and Train Custom Object Detector (FREE GPU)
YOLOv4 in the CLOUD: Build and Train Custom Object Detector (FREE GPU)
The AI Guy
19 YOLOv4 Object Detection with TensorFlow, TensorFlow Lite and TensorRT Models (images, video, webcam)
YOLOv4 Object Detection with TensorFlow, TensorFlow Lite and TensorRT Models (images, video, webcam)
The AI Guy
20 How to Build a Custom YOLOv4 Object Detector using TensorFlow (License Plate Detector)
How to Build a Custom YOLOv4 Object Detector using TensorFlow (License Plate Detector)
The AI Guy
21 Counting Objects Using YOLOv4 Object Detection | Custom YOLOv4 Functions with TensorFlow
Counting Objects Using YOLOv4 Object Detection | Custom YOLOv4 Functions with TensorFlow
The AI Guy
22 Object Tracking Using YOLOv4, Deep SORT, and TensorFlow
Object Tracking Using YOLOv4, Deep SORT, and TensorFlow
The AI Guy
Crop and Save YOLOv4 Object Detections | Custom YOLOv4 Functions with TensorFlow
Crop and Save YOLOv4 Object Detections | Custom YOLOv4 Functions with TensorFlow
The AI Guy
24 License Plate Recognition Using YOLOv4 Object Detection, OpenCV, and Tesseract OCR
License Plate Recognition Using YOLOv4 Object Detection, OpenCV, and Tesseract OCR
The AI Guy
25 YOLOv4 in the CLOUD: Build Object Tracking Using DeepSORT in Google Colab (FREE GPU)
YOLOv4 in the CLOUD: Build Object Tracking Using DeepSORT in Google Colab (FREE GPU)
The AI Guy
26 How to Use Webcam In Google Colab for Images and Video (FACE DETECTION)
How to Use Webcam In Google Colab for Images and Video (FACE DETECTION)
The AI Guy
27 Real-time YOLOv4 Object Detection on Webcam in Google Colab | Images and Video
Real-time YOLOv4 Object Detection on Webcam in Google Colab | Images and Video
The AI Guy
28 Getting Started with Agent Development Kit Tools (MCP, Google Search, LangChain, etc.)
Getting Started with Agent Development Kit Tools (MCP, Google Search, LangChain, etc.)
The AI Guy

This video teaches how to create a custom function to crop and save YOLOv4 object detections as new images using TensorFlow. It covers cloning the code, running the object detector, and explaining the custom cropping function.

Key Takeaways
  1. Clone or download the code for the tutorial
  2. Run YOLOv4 object detector on images using the custom crop flag
  3. Verify where the cropped new images are saved
  4. Run YOLOv4 object detector on video using the custom crop flag
  5. Edit the custom cropping function
💡 The custom function can be used to crop and save object detections as new images, which can be useful for further analysis or processing.

Related AI Lessons

I Spent Weeks Looking for a Research Gap Before I Realized I Was Searching the Wrong Way
Learn how to effectively find research gaps by changing your approach, a crucial skill for AI researchers and academics
Medium · AI
ICMI 2026 Reviews [D]
Learn how to interpret ICMI 2026 reviews and improve your paper's acceptance chances
Reddit r/MachineLearning
Workshop submission for main conference paper under review [D]
Learn how to navigate submitting a paper to a non-archival workshop before the final decision of a main conference like ECCV
Reddit r/MachineLearning
Kept context-switching between arxiv, OpenReview, GitHub, and HuggingFace for every paper, so I built this. Chrome extension + website with everything inline, plus citation graph + SPECTER2 neighbors. 3M papers, free, feedback welcome [P]
Streamline your research with a new Chrome extension and website that integrates 3M papers from arxiv, OpenReview, GitHub, and HuggingFace, including citation graphs and SPECTER2 neighbors, and provide feedback to improve it
Reddit r/MachineLearning
Up next
Beyond Big Vendors: ERP Systems Explained #shorts
Digital Transformation with Eric Kimberling
Watch →