YOLOV5: How to Train a Custom YOLOv5 Object Detector | Official YOLOv5

preview_player
Показать описание
YOLOv5 Object Detector - This video will teach how to train a Custom YOLOv5 Object Detector.
Plus:
+ Learn the basic ideas of Transfer Learning and Fine Tuning for Object Detection.
+ Train YOLOv5s (small) and YOLOv5m (medium) models on a custom dataset.
+ Check how freezing some of the layers of a model can lead to faster iteration time per epoch and what impacts it can have on the final result.
+ Compare the performance of the models, which include the mAP, FPS, and the inference time on CPU and GPU.

We have covered the following topics:

✅What is YOLOv5?
✅Models Available in YOLOv5
✅Features Provided by YOLOv5
✅Custom Object Detection Training using YOLOv5
✅Approach for Custom Training
✅The Custom Training Code
✅Preparing the Dataset
✅Clone the YOLOv5 Repository
✅Training the Small Model (yolov5s)
✅Training a YOLOv5 Medium Model
✅Training Medium YOLOv5 Model by Freezing Layers
✅Performance Comparison

❓FAQ

How can I improve my YOLOv5 accuracy?
How many pictures do you need to train YOLOv5?
How do you train models for object detection?
How do I train my own yolov4 custom object detector?
How do you use YOLOv5 for object detection?
Does YOLOv5 use CNN?
Can YOLOv5 detect small objects?
What is YOLOv5?

If you still need help, then learn more about the official YOLOv5 here:

🎵 YOLO Master Class Playlist:

☢️ GitHub Code Link

⭐️ Time Stamps:⭐️
0:00-00:20: Introduction
00:20-00:29: YOLOv5n (Nano)
00:29-00:38: YOLOv5s (Small)
00:38-00:52: YOLOv5m (Medium)
00:52-01:02: YOLOv5l (Large)
01:02-01:50: YOLOv5x (Extra Large)
1:50-02:45: Code Explanation
02:45-04:19: Imports
04:19-05:39: Epochs
05:39-08:39: Download and Prepare Dataset
08:39-09:55: Dataset Structure of YOLOv5
09:55-13:59: Helper Function for Logging results
13:59-17:57: Clone YOLOv5 Repo
17:57-26:24: Train the model
26:24-33:20: Training Process
33:20-36:06: Training Summary and results
36:06-48:09: Inference

About Us:

🤖 Learn from the experts on AI: Computer Vision and AI Courses
YOU have an opportunity to join the over 5300+ (and counting) researchers, engineers, and students that have benefited from these courses and take your knowledge of computer vision, AI, and deep learning to the next level.

#️⃣ Social Media #️⃣

Do you have any questions, tips, or ideas about YOLOV5?
Have other questions not covered in this video?
Let us know in the comments section below!

🔖Hashtags🔖
#AI #yolov5 #customtraining #training #datasets #yolov3 #machinelearning #objectdetection #deeplearning #computervision
Рекомендации по теме
Комментарии
Автор

Glad to get this from you directly. Closing in on the expert bundle, CV has me.

goodtechdoor
Автор

I meant. You are absolutely fantastic at explaining. Very instructive. Big fan already

henriklauridsen
Автор

Thanks, consistently high quality advice and guidance

mikegardner
Автор

Clearly explained the concepts practically

AngusLou
Автор

well how to recognize yolov5 training when overfits? is that from Precission when it reach values : 1 ?

kalifardiansyah
Автор

In the earlier video explaining the dataset structure, you mentioned to put the [train, test, val] folder in the images and labels folder respectively. However, in this examples at 9:15, there are train, test and val folders containing images and labels. which one to use?

atmadeeparya
Автор

Thanks for the video. How is the best way to prepare dataset of multiple classes passing conveyor belt ? static Ip camera

zy.r.
Автор

I think the code section after where you download the zip file, is there to make sure that only one image exists, actually, there are two images of a sample, so we remove one image and the label as well.

rajkkapadia
Автор

For transfer learning, how many layers are there in total, so if the you froze the first 15, how many are being trained ?

ghassenjridi
Автор

Hey, how can we use live video from webcam to test the model?

AhmedFarhan-jgbr
Автор

This function is added to download the dataset from the provided URL and duplication check.
Once the dataset is downloaded the for loop iterate the whole folder and displays the images and labels name.
So it means that the directory is created successfully and the files are added. This code is added to show that files are extracted and we can see the image's names and label names. The inner loop (j%==2) is showing that if the image is repetitive then remove them.

iramarshad
Автор

7:40 We use that code block to go into each directory (train, valid, test) and remove images and labels at the even number places. The reason is to remove all duplicated files from the dataset.

kvnptl
Автор

Very good explanation. Hi Sir. I have been following your tutorial on how to train a custom Yolov5 object detector as I am doing a school project on vehicle detection. I am having an error on training my model. Is it ok if you can help on this please.

murcuschimaawaloyi
Автор

can YOLO detect smal objects? like taken from the plane or something like google earth? Or is there a model that id better suited for this role?

eduardmart
Автор

Hi there, you deserved your like for the introduction alone. Good overview and detailed explanation. Liked and subbed

QuarktaschemitSenf
Автор

I'm running this notebook through VSCode and I'm on the section where the model trains. I'm on the first epoch and around 11 minutes in. Is this the expected behavior? You said in your video that training 25 epochs took 0.096 hours (which equals around 6 minutes). I'm using an m1 macbook, so performance shouldn't be an issue. Do you know what the issue may be?

sedonghwang
Автор

Hi sir, the yolov5 confusion matrix does not match the precision rate and recall rate

venkatahungurge
Автор

The code Added after downloading the data is there to check for duplicates and remove them.

kmashal
Автор

Time Stamps:
0:00-00:20: Introduction
00:20-00:29: YOLOv5n (Nano)
00:29-00:38: YOLOv5s (Small)
00:38-00:52: YOLOv5m (Medium)
00:52-01:02: YOLOv5l (Large)
01:02-01:50: YOLOv5x (Extra Large)
1:50-02:45: Code Explanation
02:45-04:19: Imports
04:19-05:39: Epochs
05:39-08:39: Download and Prepare Dataset
08:39-09:55: Dataset Structure of YOLOv5
09:55-13:59: Helper Function for Logging results
13:59-17:57: Clone YOLOv5 Repo
17:57-26:24: Train the model
26:24-33:20: Training Process
33:20-36:06: Training Summary and results
36:06-48:09: Inference

LearnOpenCV
Автор

[Q&A-8:00] Because the dataset contains duplicate files of the images and labels, the referred code removes the doubles (images and labels)

israelraultininialvarez