Thank you so much! Your setup video with 1 line command and this tutorial on training yolo worked perfectly 1st try for me 🎉 I used LabelImg for annotations instead tho. Best teacher out there for YOLO :)
Mam you said that After running the precess.py file we wil get train.py and text.py file.But I am not getting those file after run process.py..... I follow all the procedure that you given ... But HereI am getting error ..please help
Mam you said that After running the precess.py file we wil get train.py and text.py file.But I am not getting those file after run process.py..... I follow all the procedure that you given ... But HereI am getting error ..please help
Hii mam .We tried as same as your way but at last while prediction imshow it just giving same image as output without any bounding box and prediction class..Can you pls help on this
If you are not getting any bounding boxes that means you model is not yet trained for recognizing the objects. You need to run more more epochs for training. You can also try to increase the number of images if your dataset is small.
@@CodeWithAarohi Thank you. Can you please implementation from scratch of YOLOv4 using PyTorch if possible? I guess what you did is data augmentation for the dataset and then you used a YOLOv4 implementation from darknet?
Hello sir Good work , i have a question the labels of yolov5 is it the same in yolo v4 and yolov3 italk about annotation ( the file.txt) i hope to answer me Thanks.
Hi Aarohi, thank you for the video. Wondering I used Git clone to download bbox-label-tool package, but inside it I could not see the three files you said "bbox tool""convert""and proces", wondering if they have been removed? thank you.
Hi Aarohi, It's an excellent effort to share your knowledge. Nice Video. I was working on the same. I could not able to train my model. I am using windows 10 Operating system. i got this error.: ./darknet: error while loading shared libraries: libcuda.so.1: cannot open shared object file: No such file or directory. Can you please help me to sort out this problem
Hi Aarohi, is it okay that have an image for laptop called 1.jpg and an image for phone called 1.jpg or is this an issue because both classes images will be combined in the multiple images folder. Should the names of the images not overlap? For example is 1_phone.jpg and 1_laptop.jpg a better way to go? Thank you and great video!
Thanks for the video! I have a question here, as we know YOLO pre-trained weights are trained on the COCO dataset right, but in my case I am only interested in a few classes only from the COCO dataset and I have a few custom object dataset. During custom object detector training, do I need to include images of those few classes (from the COCO dataset) as well? Thanks!
if you want to perform object detection on the objects which are present in coco dataset and you have pretrained weights on full coco dataset.Then there is no need to have training dataset because you already have weights and you can add code while detection that you want to detect specific classes only.
@@CodeWithAarohi just to clarify, once we train YOLO on our own custom dataset with pre-trained weights, we can specify which classes to detect using code including those classes in the coco dataset? is that right? Thanks!
Mam I am doing fake or real logo detection project with the help of yolo4 algorithm. Can u please suggest me which yolo version is better? for my project
Thanks Mam for this detailed video. I am working on an object detection problem where it is required to detect objects at two levels. At the first level, it has classes and at the second level, it has subclasses. For example, classes are birds or animals or flowers. And subclasses for animals are e.g., dog, cat or lion. For subclass level detection, it is required to add extra CNN and Dense layers to the subclass level detection. In the present YOLOv4, I am not able to update the neural network layer architecture. Kindly guide in implementation. Thanks in advance.
Thank you madam for this tutorial, its very useful I have question about prediction using video as input When i put the path of the video, it display this message ( cannot load image) How can i resolve this problem please
Thanks for the video. Great content!.. I have a question... what if I’m interested on performing object detection on both object classes in the same picture, that is, phone and laptop? What would’ve changed from data prep to model setup? Thanks!
@@CodeWithAarohi Thanks for your reply! I still have trouble on trying to set up the files directories for such task.. Let's say I have a tree structure like this: train: -class 1 --study A --- picture_1.png --- picture_2.png ... --study B --- picture_1.png ---picture_2.png -class 2 -- study C --- picture_n.png - class 3 -- study --- pictures.png the task would be to classify a study in one of the classes based on multiple images input. Each study in this case is a sample. The output should be class 1, 2 or class 3, based on the n images I used as input for a specific Study. Do you know what I mean?
Thank you ma'am.. useful video it help me alot, I appreciate your efforts There are two types of images: 1- One image with one object 2- One image with multiple objects. In this video you deal with the first type. Is it same for the second type? Or how to train images using yolov4 that contained multiple objects? Please, I need your help
When you want to use yolo algorithm, your algorithm should be in the format which yolo accepts. You need 1 txt file for 1 image. This txt file will have the annotation detail of that particular image. you can use labelImg tool for annotations
Hi Aarohi, I am new in Data Science. I am working on a object detection project where I need to detect the container numbers. Could you please tell me which steps I need to follow to do this. Thanks
Wrong annotation: x = 0, y = 0, < 0 or > 1, file: data/piford/14.txt Wrong annotation: x = 0, y = 0, < 0 or > 1, file: data/piford/8.txt Wrong annotation: x = 0, y = 0, < 0 or > 1, file: data/piford/267.txt Wrong annotation: x = 0, y = 0, < 0 or > 1, file: data/piford/48.txt Wrong annotation: x = 0, y = 0, < 0 or > 1, file: data/piford/243.txt
mam i am training my model on 150 images (80% train) for one class only, i ran for 4 hours with these configuration values, now i am not getting any output, no predictions are made. if i do thresh -0, many 0% are detected filling up all the predicted image with pink boxes, during training i keep on getting 100% in map value, i am running on google colab width=320 height=320 channels=3 momentum=0.949 decay=0.0005 angle=0 saturation = 1.5 exposure = 1.5 hue=.1 learning_rate=0.001 burn_in=1000 max_batches = 6000 policy=steps steps=4800,5400
thank you so much, but i have one question .. where should i upload process.py ? in piford folder or in darknet? i tried uploading it in both but it doesn't work
HI Aarohi, I was wondering if its possible to store the already trained model, like the one in your video, into a python object model so that it can be pickled? I tried to find multiple ways to save the architecture, state and weights of the model but had no success.
When selecting a picture containing folder for annotation ,it will showing no items match your search though it is in the same folder in files. what should I do? Mam
Hi mam, thank you for details explanation of the whole process. Do you have any specific script for converting XML format to YOLO format for the annotation file? It would be really helpful. Thank you
Mam I'm this getting error "" [Errno 2] No such file or directory: '/mydrive/yolov4"" when I execute this command ➡%cd /mydrive/yolov4. I have created folder with name "yolov4". but the command is not executing. what should I do now?
mam after creating dataset while mounting to drive at timeline 32:54 i am getting the following error for the command ln-s/content/gdrive/my/Drive/mydrive /bin/bash: ln-s/content/gdrive/my/Drive/mydrive: No such file or directory or ln: invalid option -- 'c' Try 'ln --help' for more information. please help me proceed further thanks in advance
Hi professor, I need your help in my project, the work consists in the manual annotation of all the nuclei positions and extensions (via a classical bounding box) in a series of images scanned with 40x magnitude. This work will help us in the development of a novel algorithm for nuclei detection via YOLO neural network model, I’m waiting for your answer
mam thank you so much its very clear and easy to understand. but i have one doubt . if I want to train thousands of images then do we have to use the annotation tool manually for every image ? its time consuming know mam any solution for that?
as per following the steps there are two darknet folder, one inside the other. the second darknet folder is where process.py should be pasted. But after doing that, running it on collab shows, cant open , no such directory exists, i.e , its not detecting process.py Also current_dir and other dir are to be changed , what location address should be put in there? also please share the roadmap pdf of this whole process, as it becomes lot easier to process what all is going on
you can put the process.py file anywhere but check if the paths are correct of you your dataset folder and also set the path where you want to have your train.txt and test.txt file.
Thankyou soo much for this video ma'am and While executing training code I am getting this error "Couldn't open file: data/names.list" can you please help me with this.
You are using wrong file names. There are 2 files, 1 with the extension .data and other file with the extension .names . There is no file with the extension .list
@@CodeWithAarohi Thankyou soo much for your reply Ma'am and I checked everything again but I am still getting this error "names: Using default 'data/names.list' Couldn't open file: data/names.list" Which default value this error is talking about.
Nice explanation 👌 maam can you please tell me how to run yolov4 for 300 epochs actually i am comparing yolov5 with yolov4 and i ran yolov5 for 300 epochs so how can i compare map of both
Hello Aarohi, I am working on customizing YOLOv4, but I have encountered an issue. Some of my images are not independent and must be grouped together in either the training or testing set. In order to address this, I would like to modify the 'split_data' function in data.c. However, I am unable to determine which images should be grouped together without accessing their file paths, but I am unsure where to locate this information in the code. Additionally, I am curious as to how the images are associated with their respective filenames. Thank you for your assistance.
In YOLOv4, the image file paths are typically stored in a text file that is used as input to the training process. The split_data function in data.c is responsible for splitting the image file paths into training and testing sets, so modifying this function is a good approach to address your requirement to group certain images together. To access the file paths of the images, you can modify the get_paths function in data.c. This function reads the image file paths from a text file and returns them as an array of strings. You can modify this function to also read in additional information, such as a grouping identifier, from the text file and store it in a separate array. For example, you can modify the text file to include a second column with a grouping identifier for each image, and then modify the get_paths function to read in this column and store it in a separate array. Once you have the grouping information for each image, you can modify the split_data function to ensure that images with the same grouping identifier are grouped together in either the training or testing set. One approach is to modify the function to split the images into groups based on their grouping identifier before performing the random split into training and testing sets. You can then merge the groups together to form the final training and testing sets. As for how the images are associated with their respective filenames, this is typically done by including the file path of each image in the text file used as input to the training process. The load_data function in data.c reads in this text file and uses the file paths to load the images into memory for training. The data struct in data.c contains an array of image structs, each of which contains a char *filename member that stores the file path of the image. This allows the training process to associate each image with its respective filename.
Thanks Ma'am, unable to execute after process.py, will you plz guide me on that. Error: There is no data/test.txt file for mAP calculation! Don't use -map flag. Or set valid=data/train.txt in your data/Multiple_images.data file.
When you will execute process.py. After that you will get train.txt and test.txt. Check the path which you have defined in process.py file. You will get tyou rtrain.txt file and test.txt file there
Hello, with which command can I detect object on all photos in a particular folder in yolov4? I want it to be done one by one in all the photos one after the other.
I ran the code with your pictures of laptops and phones. As a result, there is no frame on the test picture. Your video at the end in predictions.jpg also lacks a frame. Is it because there are very few images for training? Or the coordinates are written randomly?
Coordinates are written randomly. Sorry for that. I just created this small dataset for teaching Mask RCNN. Main intent here in this video is to make my Subscribers understand how Mask RCNN works.
when i run this code in colab it gives me empty file as train.txt having no paths to the images images_list = glob.glob("data/obj/*[jpg|png|jpeg]") print(images_list) # Create train.txt file file = open("data/train.txt", "w") file.write(" ".join(images_list)) file.close()
@@CodeWithAarohi okay thank you I did it for all the images. Having an error from !./darknet detector train data/piford.data cfg/yolov4-custom.cfg yolov4.conv.137 -dont_show -map...as loading weights failed because it can't open file yolov4.conv.137 can u share this ?
It started trainning, I have 1100 images and converted all them into .txt file. It is showing 395 hours in trainning and executing... how much time will it take ?
@@CodeWithAarohi Thanks for the code ma'am I was able to train the model on the ExDark dataset with only 2 classes but the results were incredible. The only thing was that my default annotations had some problem in it so I created the annotations again on roboflow but other than that the model was able to predict very well
Mam the error coming for me is " 122 Darknet error location: ./src/parser.c, parse_convolutional, line #208 Layer before convolutional layer must output image.: Success"
The error message "Layer before convolutional layer must output image" typically means that the layer before the convolutional layer is not producing an image or feature map that can be used as input to the convolutional layer. One possible reason for this error is that there may be a mismatch between the size of the output of the previous layer and the size of the input expected by the convolutional layer. You should check the configuration of your layers and ensure that the output of the previous layer matches the input shape of the convolutional layer. Another possible reason could be that the input image size is not compatible with the network architecture. You may need to adjust the size of the input image or the network architecture to ensure compatibility. It is also possible that the error is due to a bug or a typo in your code. You should carefully review your code and ensure that all the layer configurations are correct and that there are no syntax errors or typos.
madam ek hi folder me kaam kar lena chahiye usse aapko bhi confusion na ho, half video me to aap apna hi confusion solve kar rahe ho or complete model can train using that one folder.
Thanks for the video.. I want apply YOLOv4 on open source datasets, but these datasets are in different formats, like: ICDAR 2015, CTW-1500.... does there is or converter which allow us to convert each dataset format to yolo format
Thank you so much!
Your setup video with 1 line command and this tutorial on training yolo worked perfectly 1st try for me 🎉
I used LabelImg for annotations instead tho.
Best teacher out there for YOLO :)
Glad it helped!
Hey Aroshi, I want to thank you.
you saved me in the final year project❤
My pleasure 😊
mam, your way of teaching is Exellent, Ossm
Glad to hear that
You can use LabelIMG tool for Annotation. It is easier to annotate images in yolo format with it.
How to use?
Mam you said that After running the precess.py file we wil get train.py and text.py file.But I am not getting those file after run process.py.....
I follow all the procedure that you given ... But HereI am getting error ..please help
Mam you said that After running the precess.py file we wil get train.py and text.py file.But I am not getting those file after run process.py.....
I follow all the procedure that you given ... But HereI am getting error ..please help
@@hasibulislamsquads513 aarohisingla1987@gmail.com
How many classes do we need to give while using LabellImg
Most awaited video ...thanks so much mam for the video ...
welcome
best explanation on internet on yolo model thank u so much.
Glad my video is helpful!
Superb video maam
Thanks!
Kudos for this content
Thank you!
Thank you very much Aarohi for making up this video. Very useful.
Glad my video helped you
thanks it's great tutorial
but i wanted to ask if there's a way to work with yolov4 locally in vscode or in jupyter?
Not that I know of
Thank you for the amazing tutorial, you left nothing uncovered! I wish I could have subscribed and liked more than once!
Glad it was helpful 😊
Hii mam .We tried as same as your way but at last while prediction imshow it just giving same image as output without any bounding box and prediction class..Can you pls help on this
If you are not getting any bounding boxes that means you model is not yet trained for recognizing the objects. You need to run more more epochs for training. You can also try to increase the number of images if your dataset is small.
Thanks for your efforts and for sharing your knowledge
Welcome
Thank you so much.. Explain clearly..
glad my video is helpful
Thak you very much! Is this implementation similar to yolov4 in darknet please? Or your implementation is different?
This implementation is yolov4 in darknet framework only
@@CodeWithAarohi Thank you. Can you please implementation from scratch of YOLOv4 using PyTorch if possible?
I guess what you did is data augmentation for the dataset and then you used a YOLOv4 implementation from darknet?
Hello sir
Good work , i have a question the labels of yolov5 is it the same in yolo v4 and yolov3 italk about annotation ( the file.txt)
i hope to answer me
Thanks.
Yes, its same
@@CodeWithAarohi Thanks madam
Hi Aarohi, thank you for the video.
Wondering I used Git clone to download bbox-label-tool package, but inside it I could not see the three files you said "bbox tool""convert""and proces", wondering if they have been removed? thank you.
Maybe. I haven't used this tool after this video. So no idea.
Hi Aarohi, It's an excellent effort to share your knowledge. Nice Video. I was working on the same. I could not able to train my model. I am using windows 10 Operating system. i got this error.: ./darknet: error while loading shared libraries: libcuda.so.1: cannot open shared object file: No such file or directory. Can you please help me to sort out this problem
Please check this video for darknet installation: ruclips.net/video/MEB0SEgmtKg/видео.html
I am getting the same error. Could you please tell me what you did to rectify it ?
it's urgent for me. could you please tell me?
Hi Aarohi, is it okay that have an image for laptop called 1.jpg and an image for phone called 1.jpg or is this an issue because both classes images will be combined in the multiple images folder. Should the names of the images not overlap? For example is 1_phone.jpg and 1_laptop.jpg a better way to go? Thank you and great video!
1_phone.jpg and 1_laptop.jpg is a better way
Thank you for the wonderful video.I have a a question... How to get the bounding box coordinate in predicted image ?
When selecting folder for annotation, it was not displaying picture for bounding boxes.Then how should i get the coordinates of my picture mam
Thank you Ms aarohi for your efforts
Welcome!!
Thanks for the video! I have a question here, as we know YOLO pre-trained weights are trained on the COCO dataset right, but in my case I am only interested in a few classes only from the COCO dataset and I have a few custom object dataset. During custom object detector training, do I need to include images of those few classes (from the COCO dataset) as well? Thanks!
if you want to perform object detection on the objects which are present in coco dataset and you have pretrained weights on full coco dataset.Then there is no need to have training dataset because you already have weights and you can add code while detection that you want to detect specific classes only.
@@CodeWithAarohi just to clarify, once we train YOLO on our own custom dataset with pre-trained weights, we can specify which classes to detect using code including those classes in the coco dataset? is that right? Thanks!
@@yeongjong9395 right
this actually should be possible, I mean downloading for example 1000 image for given costume classes such as 'car bus tree ....'
Dear I have the same question, so if u have the solution plz can u share....
Mam I am doing fake or real logo detection project with the help of yolo4 algorithm. Can u please suggest me which yolo version is better? for my project
Try to work with yolov8 or yolov9 or YOLO-NAS. YOLOv9 is good for small object detection and for the objects which are farther from camera.
Thanx, for this wonderful video, Do we have option to get coordinates of the detected objects in yolov4 or yolov5.
Never tried that so don't know right now
@@CodeWithAarohi Thanks for your prompt reply.
Ma'am, How to evalute YOLOV4 after training with multilables?
Thanks Mam for this detailed video.
I am working on an object detection problem where it is required to detect objects at two levels. At the first level, it has classes and at the second level, it has subclasses. For example, classes are birds or animals or flowers. And subclasses for animals are e.g., dog, cat or lion. For subclass level detection, it is required to add extra CNN and Dense layers to the subclass level detection. In the present YOLOv4, I am not able to update the neural network layer architecture.
Kindly guide in implementation. Thanks in advance.
hi mam,
how can i increase the font size of the label? because they are not readable, so want to increase
Thank you great explanation 🤡
You're welcome!
Hi ma'am while training the model I am getting the wrong annotation error. Plz, help me out here. thanks!
Thanks for this best guide ma'am. Do you know where I may find coco dataset with txt-files like in piford in the video? (mean files with info like )?
You can check the official site of coco dataset. There you will get it but not sure
Thank you madam for this tutorial, its very useful
I have question about prediction using video as input
When i put the path of the video, it display this message ( cannot load image)
How can i resolve this problem please
try to give absolute path of video
Weights are not setting up in backup folder. Not getting weights anywhere. ,How to resolve
Hi mam I tried to train my model but its showing the error as darknet error location. Is there any way to resolve it mam
Nice tutorial..
I want to run object detection in raspberry pi .what will be changes
Glad my video is helpful and I never executed this on raspberry so no idea.
God bless you
Thankyou
so how does it works with the live detection when Using the CCTV with this ? do we need to create the files for that too
Provide the path(url) of your cctv in source
Thanks for the video. Great content!.. I have a question... what if I’m interested on performing object detection on both object classes in the same picture, that is, phone and laptop? What would’ve changed from data prep to model setup? Thanks!
Process will be same.
@@CodeWithAarohi Thanks for your reply! I still have trouble on trying to set up the files directories for such task.. Let's say I have a tree structure like this:
train:
-class 1
--study A
--- picture_1.png
--- picture_2.png
...
--study B
--- picture_1.png
---picture_2.png
-class 2
-- study C
--- picture_n.png
- class 3
-- study
--- pictures.png
the task would be to classify a study in one of the classes based on multiple images input. Each study in this case is a sample. The output should be class 1, 2 or class 3, based on the n images I used as input for a specific Study. Do you know what I mean?
@@evandrocardozo62 Did you got your problem solved if yes I have same project and I am confused like hell can you drop your github reposetry for same
Thank you ma'am.. useful video it help me alot, I appreciate your efforts
There are two types of images:
1- One image with one object
2- One image with multiple objects.
In this video you deal with the first type. Is it same for the second type? Or how to train images using yolov4 that contained multiple objects? Please, I need your help
Process is same for the second type also
How to evaluate the multiple classes per image..please I need your reply
Hey
Thanks for the vídeo, But What should i do if my dataset isnt in coco classes? I need to train a yolo model to detect helipads
When you want to use yolo algorithm, your algorithm should be in the format which yolo accepts. You need 1 txt file for 1 image. This txt file will have the annotation detail of that particular image. you can use labelImg tool for annotations
why the label folder in data folder is not being deleted.
while training it generates a warning that label cannot load it may be for ms coco
Hi Ms #Aarohi thankyou for you're tutorials, it worked for me. but how can we use the yolov4 weights obtained in python tensorflow and keras.
You need to load the weights. Call the model and then upload the weights
how i could use yolo4, yolo5 in two stages detection and classification person accesserois?
Hi Aarohi, I am new in Data Science. I am working on a object detection project where I need to detect the container numbers. Could you please tell me which steps I need to follow to do this. Thanks
Train your algorithm for different numbers. First collect the data for different numbers. Then annotate the dataset. After that train your model.
@@CodeWithAarohi Thank you so much for your response.
Hello mam, after 55.54 I didn't get train and test files, can we connect through something because this project is really important to me.
Copy the code of process.py in your colab notebook and then execute it
Wrong annotation: x = 0, y = 0, < 0 or > 1, file: data/piford/14.txt
Wrong annotation: x = 0, y = 0, < 0 or > 1, file: data/piford/8.txt
Wrong annotation: x = 0, y = 0, < 0 or > 1, file: data/piford/267.txt
Wrong annotation: x = 0, y = 0, < 0 or > 1, file: data/piford/48.txt
Wrong annotation: x = 0, y = 0, < 0 or > 1, file: data/piford/243.txt
mam i am training my model on 150 images (80% train) for one class only, i ran for 4 hours with these configuration values, now i am not getting any output, no predictions are made. if i do thresh -0, many 0% are detected filling up all the predicted image with pink boxes, during training i keep on getting 100% in map value, i am running on google colab
width=320
height=320
channels=3
momentum=0.949
decay=0.0005
angle=0
saturation = 1.5
exposure = 1.5
hue=.1
learning_rate=0.001
burn_in=1000
max_batches = 6000
policy=steps
steps=4800,5400
thank you so much, but i have one question .. where should i upload process.py ? in piford folder or in darknet? i tried uploading it in both but it doesn't work
In darknet folder. Also change the path of current_dir, file_train , file_test variable in process.py file
@@CodeWithAarohi Hello Ma'am, can I keep anywhere inside the darknet folder? And where and how to change the current_dir and all?
HI Aarohi, I was wondering if its possible to store the already trained model, like the one in your video, into a python object model so that it can be pickled?
I tried to find multiple ways to save the architecture, state and weights of the model but had no success.
you can save them into tensorflow model, or mini tensorflow
you can save them into tensorflow model, or mini tensorflow
When selecting a picture containing folder for annotation ,it will showing no items match your search though it is in the same folder in files. what should I do? Mam
You just press ok and images will open
Instead of this three files can we use labelimg software for annotation i think it's easy and time saving process.
Yes you can use labelimg tool.
Hi mam, thank you for details explanation of the whole process. Do you have any specific script for converting XML format to YOLO format for the annotation file? It would be really helpful. Thank you
Mam why low resolution images are not working on this method??
Mam I'm this getting error "" [Errno 2] No such file or directory: '/mydrive/yolov4"" when I execute this command ➡%cd /mydrive/yolov4.
I have created folder with name "yolov4". but the command is not executing. what should I do now?
predicted image shows same as the input test image..i think number of epochs should be increased....how can we do that??please help
In Which Folder Do I Have to upload Process.py File or folder Please let me know
Put it in darknet folder
mam i use jupyter notebook pls guide me to how to train my algorithm
mam after creating dataset while mounting to drive at timeline 32:54 i am getting the following error for the command ln-s/content/gdrive/my/Drive/mydrive
/bin/bash: ln-s/content/gdrive/my/Drive/mydrive: No such file or directory or ln: invalid option -- 'c'
Try 'ln --help' for more information. please help me proceed further thanks in advance
Hi professor, I need your help in my project,
the work consists in the manual annotation of all the nuclei positions and extensions (via a classical bounding box) in a series of images scanned with 40x magnitude. This work will help us in the development of a novel algorithm for nuclei detection via YOLO neural network model, I’m waiting for your answer
Hi, Please mail me your exact requirement at aarohisingla1987@gmail.com
i do not know why i can not save the weights in the backup folder....whole code is running fine bt the issue is that i do not get the weights
mam thank you so much its very clear and easy to understand. but i have one doubt . if I want to train thousands of images then do we have to use the annotation tool manually for every image ? its time consuming know mam any solution for that?
You have to annotate all the images manually.
Just work on public datasets provided by Kaggle and etc.
Thanks for the video..Can you pls make a video about model evaluation part(IoU & mAP) for this project or for previous YoloV3 project.
Sure will do soon
@@CodeWithAarohi hi aarohi can I get the files for all the versions of yolo that you have implemented please
as per following the steps there are two darknet folder, one inside the other. the second darknet folder is where process.py should be pasted. But after doing that, running it on collab shows, cant open , no such directory exists,
i.e , its not detecting process.py
Also current_dir and other dir are to be changed , what location address should be put in there?
also please share the roadmap pdf of this whole process, as it becomes lot easier to process what all is going on
you can put the process.py file anywhere but check if the paths are correct of you your dataset folder and also set the path where you want to have your train.txt and test.txt file.
@@CodeWithAarohi where to set the path in the process file ? thoda specefic plz i am beginner
@@CodeWithAarohi Can you please say where to change the path?
hi! thanks for the video! i have a question btw, how do i prepare a image dataset that have lots of different resolutions?
You can resize them to one size using opencv.
@@CodeWithAarohi i have to do that before labeling?
Excellent tutorial. Can you share the presentation also for reference ?
Thankyou soo much for this video ma'am and While executing training code I am getting this error "Couldn't open file: data/names.list" can you please help me with this.
You are using wrong file names. There are 2 files, 1 with the extension .data and other file with the extension .names . There is no file with the extension .list
@@CodeWithAarohi Thankyou soo much for your reply Ma'am and I checked everything again but I am still getting this error
"names: Using default 'data/names.list'
Couldn't open file: data/names.list"
Which default value this error is talking about.
While training and testing data I'm having the error couldn't open file: data/names.list even the path is correct.. please help
how will the process file run
and create weight file
Hi Aarohi, need to detect logo from different different invoices and want train model for that. plz help me out ow I can achieve that.
Create a dataset (Images of Invoices with Logo) in the format which yolov4 accepts. And then train the algorithm as I have shown in this video.
Can you share the presentation will us ? It will help to follow the steps your explaination is wonderful
Nice explanation 👌 maam can you please tell me how to run yolov4 for 300 epochs actually i am comparing yolov5 with yolov4 and i ran yolov5 for 300 epochs so how can i compare map of both
Hi mam, Training in google colab takes too much time. Is there any easy method by the system gpu
Yes you can setup the darknet framework on your PC and can run the algorithm on System GPU
Please is YOLOV4 not working in PNG ? until i change every pictures to JPG before i can get my convert.jp
Hello Aarohi,
I am working on customizing YOLOv4, but I have encountered an issue. Some of my images are not independent and must be grouped together in either the training or testing set. In order to address this, I would like to modify the 'split_data' function in data.c. However, I am unable to determine which images should be grouped together without accessing their file paths, but I am unsure where to locate this information in the code. Additionally, I am curious as to how the images are associated with their respective filenames.
Thank you for your assistance.
In YOLOv4, the image file paths are typically stored in a text file that is used as input to the training process. The split_data function in data.c is responsible for splitting the image file paths into training and testing sets, so modifying this function is a good approach to address your requirement to group certain images together.
To access the file paths of the images, you can modify the get_paths function in data.c. This function reads the image file paths from a text file and returns them as an array of strings. You can modify this function to also read in additional information, such as a grouping identifier, from the text file and store it in a separate array. For example, you can modify the text file to include a second column with a grouping identifier for each image, and then modify the get_paths function to read in this column and store it in a separate array.
Once you have the grouping information for each image, you can modify the split_data function to ensure that images with the same grouping identifier are grouped together in either the training or testing set. One approach is to modify the function to split the images into groups based on their grouping identifier before performing the random split into training and testing sets. You can then merge the groups together to form the final training and testing sets.
As for how the images are associated with their respective filenames, this is typically done by including the file path of each image in the text file used as input to the training process. The load_data function in data.c reads in this text file and uses the file paths to load the images into memory for training. The data struct in data.c contains an array of image structs, each of which contains a char *filename member that stores the file path of the image. This allows the training process to associate each image with its respective filename.
@@CodeWithAarohi Thank you very much for your answer , it's working !
mam image is not displayed I used absolute path but image is not display
Why didn't we use Labelimg tool, I feel it's way easier than bbox since it comes with an option to save annotations in yolo format.
No Specific reasons :) And yes labelIMG is easier to use.
Thanks Ma'am, unable to execute after process.py, will you plz guide me on that.
Error: There is no data/test.txt file for mAP calculation!
Don't use -map flag.
Or set valid=data/train.txt in your data/Multiple_images.data file.
When you will execute process.py. After that you will get train.txt and test.txt. Check the path which you have defined in process.py file. You will get tyou rtrain.txt file and test.txt file there
@@CodeWithAarohi thank you so much for this tutorial , i am also suffring from the same problem when i execute this commande
please how to solve this problem
i am soo need the answer plz
does all annotation values need to be within (0 and 1)
Mam is it mandatory to install jupitar notebook to do this task? Can i just use colab for this?
Yes you can use colab
Hello, with which command can I detect object on all photos in a particular folder in yolov4? I want it to be done one by one in all the photos one after the other.
I ran the code with your pictures of laptops and phones. As a result, there is no frame on the test picture. Your video at the end in predictions.jpg also lacks a frame. Is it because there are very few images for training? Or the coordinates are written randomly?
Coordinates are written randomly. Sorry for that. I just created this small dataset for teaching Mask RCNN. Main intent here in this video is to make my Subscribers understand how Mask RCNN works.
@@CodeWithAarohi i didn't understand "Coordinates are written randomly."
can you explain
when i run this code in colab it gives me empty file as train.txt having no paths to the images
images_list = glob.glob("data/obj/*[jpg|png|jpeg]")
print(images_list)
# Create train.txt file
file = open("data/train.txt", "w")
file.write("
".join(images_list))
file.close()
Upload 'process.py' in data folder and make sure 'process.py' has correct path setup
mam this GitHub link is not working for the bbox tool!
use labelImg tool. You ca install it with : pip install labelImg
thanks madam. Can you tell me which file contain main code ? Like complete model training?
the one with the .ipynb extension
Heyyy Mam. Thankyou soo much for this amzing tutorial. I m not able 2 recieve train.txt nd test.txt files by running !python process.py
my annotated data is in .xml file type instead of being .text file.. what should I do maam?
Look up convert PascalVOC to Yolo
we need to annonate every single image through labellmg, it there any way we could directly get .txt for all images ?
You need to annotate all the images
@@CodeWithAarohi okay thank you I did it for all the images. Having an error from !./darknet detector train data/piford.data cfg/yolov4-custom.cfg yolov4.conv.137 -dont_show -map...as
loading weights failed because it can't open file yolov4.conv.137
can u share this ?
It started trainning, I have 1100 images and converted all them into .txt file. It is showing 395 hours in trainning and executing... how much time will it take ?
Mam, how I can find accuracy of the model?
madam,
is there any problem if i use another cfg file;yolov4_new.cfg
it contains 3 yolo layers.
it was modified 5 months ago.
Yes, you can use that.
@@CodeWithAarohi thank-you madam
Cctv camera ko yolov7 se kese connect kre
can I use this on the ExDark dataset because it has the same format of annotations used for yolo
Yes, If the format is similar then you can use
@@CodeWithAarohi Thanks for the code ma'am I was able to train the model on the ExDark dataset with only 2 classes but the results were incredible. The only thing was that my default annotations had some problem in it so I created the annotations again on roboflow but other than that the model was able to predict very well
@@adityachache great 👍
Mam the error coming for me is " 122 Darknet error location: ./src/parser.c, parse_convolutional, line #208
Layer before convolutional layer must output image.: Success"
The error message "Layer before convolutional layer must output image" typically means that the layer before the convolutional layer is not producing an image or feature map that can be used as input to the convolutional layer.
One possible reason for this error is that there may be a mismatch between the size of the output of the previous layer and the size of the input expected by the convolutional layer. You should check the configuration of your layers and ensure that the output of the previous layer matches the input shape of the convolutional layer.
Another possible reason could be that the input image size is not compatible with the network architecture. You may need to adjust the size of the input image or the network architecture to ensure compatibility.
It is also possible that the error is due to a bug or a typo in your code. You should carefully review your code and ensure that all the layer configurations are correct and that there are no syntax errors or typos.
How I know the accuracy model after testing?
I am getting wrong annotation for some images while executing train.txt. what shld I do mam?
train.txt is just listing out the image names which are going to be used for trainings. There is nothing related to annotations.
how to test my algorithm in jupyter notebook mam ...... pls help and guide me mam......
You need to install the darknet framework first. You can follow github.com/AlexeyAB/darknet to run Yolo on local computer
madam ek hi folder me kaam kar lena chahiye usse aapko bhi confusion na ho, half video me to aap apna hi confusion solve kar rahe ho or complete model can train using that one folder.
what if I want to train a model in which a single image contains objects of multiple categories how do I decide which category folder to keep it in
You need only 1 folder. Put all your images and related annotation files in it.
I execute the process. py file but it doesn't create train & test text files. Can anyone help me? What will be the reason for it? 🤔
Check the location which you have mentioned in process.py file for creating train and test.txt file
@@CodeWithAarohi what is the current_dir in process.py?
hi what is the minimum and maximum number of images for a single class
and can we do recognition using yolo ?
atleast 500 images per class
@@CodeWithAarohi and ma'am can we do recognition using yolo ?
@@sumanmenon741 Object detection and object recognition is same (Identifying objects in Images). So yes you can do recognition task with YOLO
Thanks for the video.. I want apply YOLOv4 on open source datasets, but these datasets are in different formats, like: ICDAR 2015, CTW-1500.... does there is or converter which allow us to convert each dataset format to yolo format
I never used ICDAR 2015 or CTW-1500. What's the format of these dataset. Then only can help you to choose the right converter
so every open dataset format should have its own converter,