YOLOv3 in the CLOUD : Install and Train Custom Object Detector (FREE GPU)

  Рет қаралды 158,726

The AI Guy

The AI Guy

Күн бұрын

Пікірлер: 1 000
@TheAIGuy
@TheAIGuy 4 жыл бұрын
Let me know what classes you are making your custom detector detect! Also comment if you have any issues!
@mubinmodi7529
@mubinmodi7529 4 жыл бұрын
thanks man great video . But I have issues in installing the gpu version in my laptop . While using cmake configuration, cmake won't detect my cuda drivers . I have installed cuda 10.2 Also i didn't install cudnn
@TheAIGuy
@TheAIGuy 4 жыл бұрын
@@mubinmodi7529 for this video you don't need cmake and cuda will come predownloaded on the cloud VM. Did you mean to comment on one of my different videos?
@sahiluppal3093
@sahiluppal3093 4 жыл бұрын
it's saving weights after every 100 epoch. how can we override this default behavior and save weights after let's say 1000 epochs.??
@manutyagi8019
@manutyagi8019 4 жыл бұрын
Good afternon sir, I have one more suggestion kindly make a video on how to install and use detectron
@TheAIGuy
@TheAIGuy 4 жыл бұрын
Manu Tyagi awesome will do!
@jyothsnap3138
@jyothsnap3138 4 жыл бұрын
Your in depth explanation solved so many problems! Thanks AI Guy! I wish this video had more views!
@TheAIGuy
@TheAIGuy 4 жыл бұрын
Appreciate the kind words and glad you liked the video! Thanks so much!
@Dheeraj-ed6rr
@Dheeraj-ed6rr 4 жыл бұрын
Exactly
@tejasnareshsuvarna7948
@tejasnareshsuvarna7948 4 жыл бұрын
Thank you so much for this beautiful written Google Colab notebook. It is very helpful. This channel should get a lot of subscribers. Keep it up :)
@TheAIGuy
@TheAIGuy 4 жыл бұрын
Thanks so much!
@zakariaabderrahmanesadelao3048
@zakariaabderrahmanesadelao3048 4 жыл бұрын
you're a fucking legend. I spent a week compiling darknet on my laptop, built my own labelmaker with python and when i got to train my model on cpu it estimated 1600 hours. nearly had a mental breakdown. my first reflex was to look into AWS EC2. spent a day with that headache. then youtube suggests your video and god man you have saved my life. subbed and forever your follower. thank you a thousand
@mlnjsh1
@mlnjsh1 7 ай бұрын
This kinds of abusive words if you praise someone are not good....praise in good words
@aaditkolar5521
@aaditkolar5521 4 жыл бұрын
10:57 was so creative that you earned my subscription
@TheAIGuy
@TheAIGuy 4 жыл бұрын
Appreciate it. Thanks a lot! :)
@aravindabilash151
@aravindabilash151 4 жыл бұрын
I followed all your tutorial on YOLOv3 and within 2 days i was able to setup YOLOv3, detect object with pre-trained model, create datasets, train them and i was able to detect custom object. Thank you for you tutorials.
@leafteaneko
@leafteaneko 4 жыл бұрын
For all those encountering the following error in STEP 3 line 44 " Traceback (most recent call last): File "generate_train.py", line 4, in os.chdir(os.path.join("data", "obj")) FileNotFoundError: [Errno 2] No such file or directory: 'data/obj' " go to the generate_train.py and change the line4 from os.chdir(os.path.join("data", "obj")) to os.chdir("data") and image_files.append("data/obj/" + filename) to image_files.append("data/" + filename) . It seems the images are saved in a data folder directly instead of data/obj even when you follow the steps correctly
@N-e0N
@N-e0N 4 жыл бұрын
I'm getting this error even though my images are inside darknet/data/obj
@leafteaneko
@leafteaneko 4 жыл бұрын
@@N-e0N Post your errors here and maybe we can help
@N-e0N
@N-e0N 4 жыл бұрын
@@leafteaneko Its okay, I tinkered around and made do. For some reason, the code really misbehaves at times for me. I added "darkflow" to os.path.join and also made it darknet/data/obj+filename in the image_files.append. That worked for a bit but then I got an error in the training phase when it said "Can't load images from darknet/data/obj" . At this point I went back and changed everything to original and loaded it...then it worked fine!
@N-e0N
@N-e0N 4 жыл бұрын
@@leafteaneko Ok I'll take you up on your offer because the minor tweaking no longer works. Here's the error message : Traceback (most recent call last): File "generate_train.py", line 4, in os.chdir(os.path.join("data","obj")) FileNotFoundError: [Errno 2] No such file or directory: 'data/obj' But there is a data folder inside darknet, and it does contain obj inside of which are all the images and annotations.
@leafteaneko
@leafteaneko 4 жыл бұрын
@@N-e0N that is really weird, the same thing happened to me once before but I did a factory reset runtime and started fresh and it worked. I know it works because I successfully trained my model and I have the config files too. Drop me a email so I can send over my code, maybe that'll help your case(?)
@kshitijnair7758
@kshitijnair7758 4 жыл бұрын
Hey, great tutorial dude! I spent hours figuring all of this out and got it running back in Nov 2019, this video is a lifesaver for anyone who's new to YOLO! Appreciate the efforts man, cheers!
@woosal-kc7tr
@woosal-kc7tr 4 жыл бұрын
Done everything from scratch with the help of you, really informative and god tier tutorial :D. Thanks!
@thatoyaonebogopa9483
@thatoyaonebogopa9483 2 жыл бұрын
god tier indeed.
@peregrinussolutionsllc6010
@peregrinussolutionsllc6010 4 жыл бұрын
Wow! I have my fingers crossed, but so far this is much easier than running YOLOv3 with Darknet and OpenCV on Windows 10 for me :-) Thank you for the great tutorials!
@TheAIGuy
@TheAIGuy 4 жыл бұрын
Peregrinus Solutions LLC Thanks for the support! Glad you enjoy.
@arunselvabio
@arunselvabio 4 жыл бұрын
Thank you for your hard work to frame format the content beautifully and to make it work :)
@argoz1636
@argoz1636 4 жыл бұрын
Thanks a lot for the video, I was having a lot of trouble installing DarkNet and cuda in my computer and all that stuff, so this was really usefull. Great video, dude, keep it up!
@TheAIGuy
@TheAIGuy 4 жыл бұрын
Glad it worked for you! Thanks!
@satyapratik
@satyapratik 4 жыл бұрын
Traceback (most recent call last): File "generate_train.py", line 4, in os.chdir(os.path.join("data", "obj")) FileNotFoundError: [Errno 2] No such file or directory: 'data/obj' I have also done %cd content darknet as just %cd darknet gives no directory named darknet. I have obj.names and obj.data in my data folder. I have tried everything. Can someone help me out? Do I need to change something in the code?
@이진우
@이진우 4 жыл бұрын
I have a same issue here
@isaactnt
@isaactnt 4 жыл бұрын
I found the problem, you have uploaded the obj.zip and extracted it outside darknet/data and in another folder named data. Make sure that you extract it in darknet/data otherwise it will not work
@kalleheinz758
@kalleheinz758 4 жыл бұрын
# unzip the zip file and its contents should now be in /darknet/data/obj !unzip ../obj.zip d darknet/data/obj
@argishtib
@argishtib 4 жыл бұрын
Hey man, love this tutorial on the cloud. I struggled so much getting it work on the local GPU, so glad to see a much better way!
@TheAIGuy
@TheAIGuy 4 жыл бұрын
Glad you enjoyed it! I really appreciate the kind words.
@argishtib
@argishtib 4 жыл бұрын
@@TheAIGuy Dude, you're killing it with great content. It's truly a great time to be alive and seeing how you can custom label objects, build a detector, and run it in real time. All for free! Would love to know you're background in tech and aspirations besides growing the channel, and openness to possible collaboration down the line.
@TheAIGuy
@TheAIGuy 4 жыл бұрын
@@argishtib Feel free to reach out to me at my email as I'd love to chat more. You can find it in my About tab of this channel.
@argishtib
@argishtib 4 жыл бұрын
@@TheAIGuy Sorry just saw this now. Just sent you an email.
@makeoutloud
@makeoutloud 4 жыл бұрын
Bro make video on predicting yolov3 on video and exporting the video in windows
@zakariaabderrahmanesadelao3048
@zakariaabderrahmanesadelao3048 4 жыл бұрын
my task is to detect a paper being help up. it's a bit tricky because most of the test pictures have a white wall background resembling the paper but the network is doing a pretty good job so far, thank you
@hamzalatif115
@hamzalatif115 4 жыл бұрын
I followed every steps of your tutorial but at the when i start custom training it gives me the error "/bin/bash: ./darknet: Is a directory" .Please help me in this
@keshavkantsharma1946
@keshavkantsharma1946 4 жыл бұрын
Were u able to solve this?
@andrekestler8256
@andrekestler8256 4 жыл бұрын
I have the same issue
@hamzalatif115
@hamzalatif115 4 жыл бұрын
some how after trying many solution i get one go to darknet directory by "cd darknet" and after that run this command "!chmod +x darknet" this will give you permissions to execute the darknet files after that run your custom detector hopefully it works
@iantairea859
@iantairea859 4 жыл бұрын
I'm having same problem. "!chmod +x darknet" doesn't solve for me. AI Guy, can you help us?
@iantairea859
@iantairea859 4 жыл бұрын
hey guys i solved this problem. at some point i was in the wrong directory so my data/obj was is /content/ instead of content/darknet/data/obj. my yolov3_custom.cfg was also not appearing in the correct location. i ended up factory reseting the runtime (in the runtime menu) and then started again taking more care to make sure everything was popping up in the corrent folders and checking up current directory with %pwd if i wasnt sure. AI Guy thanks heaps for these tutorials. keep them coming!
@hansgabrieldaduya2565
@hansgabrieldaduya2565 4 жыл бұрын
I always wanted to do deep learning but the resources on the internet were really difficult to understand. Thank you since you really explained it well!
@TheAIGuy
@TheAIGuy 4 жыл бұрын
Appreciate it! Thanks for the support.
@akhilgkrishnan4469
@akhilgkrishnan4469 4 жыл бұрын
After running the JavaScript code in console it's showing error...
@TheAIGuy
@TheAIGuy 4 жыл бұрын
Akhil G Krishnan whats the error
@GKMUSICINDIAVIDEOS
@GKMUSICINDIAVIDEOS 4 жыл бұрын
@@TheAIGuy Uncaught TypeError: Cannot read property 'click' of null at ClickConnect (:3:55) Uncaught error: ErrorEvent {isTrusted: true, message: "Script error.", filename: "", lineno: 0, colno: 0, …}
@akhilgkrishnan4469
@akhilgkrishnan4469 4 жыл бұрын
@@TheAIGuy Uncaught TypeError: Cannot read property 'click' of null at ClickConnect (:3:55) Uncaught error: ErrorEvent {isTrusted: true, message: "Script error.", filename: "", lineno: 0, colno: 0, …}
@akhilgkrishnan4469
@akhilgkrishnan4469 4 жыл бұрын
@@TheAIGuy Uncaught TypeError: Cannot read property 'click' of null at ClickConnect (:3:55) Uncaught error: ErrorEvent {isTrusted: true, message: "Script error.", filename: "", lineno: 0, colno: 0, …}
@TheAIGuy
@TheAIGuy 4 жыл бұрын
GK MUSIC INDIA try changing the “colab-toolbar-button#connect” to “paper-icon-button” inside the queryselector
@satyabratsharma486
@satyabratsharma486 4 жыл бұрын
i am getting this error...what should i do?? File "generate_train.py", line 4, in os.chdir(os.path.join("data", "obj")) FileNotFoundError: [Errno 2] No such file or directory: 'data/obj'
@ravirajsinhdabhi9255
@ravirajsinhdabhi9255 4 жыл бұрын
when i run this cell # train your custom detector !./darknet detector train data/obj.data cfg/yolov3_custom.cfg darknet53.conv.74 -dont_show i am getting this type of error /bin/bash: ./darknet: Is a directory please help
@TheAIGuy
@TheAIGuy 4 жыл бұрын
Ravirajsinh Dabhi you need to run “%cd darknet” command before, you must be in the root directory and you need to be in the darknet folder to run the detection.
@ravirajsinhdabhi9255
@ravirajsinhdabhi9255 4 жыл бұрын
@@TheAIGuy sorry for to trouble you after i am getting Couldn't open file: data/obj.data
@ravirajsinhdabhi9255
@ravirajsinhdabhi9255 4 жыл бұрын
@The AI Guy ok it's solved thank you for this lovely content.If i want to contribute something and support this content for you what can i do?where can i do?
@TheAIGuy
@TheAIGuy 4 жыл бұрын
Ravirajsinh Dabhi just liking this video and subscribing to the channel means a lot to me. Thanks!
@ravirajsinhdabhi9255
@ravirajsinhdabhi9255 4 жыл бұрын
@The AI Guy this is my dataset for custom model,this is whole dataset collected by me and my friend from casting foundry www.kaggle.com/ravirajsinh45/real-life-industrial-dataset-of-casting-product This is we doing for identify defective product and ok product!! For reducing tedious process of manual inspection of all product. We already made binary classifier from this dataset now we working for detection of it. We already made working model of that with help of arduino and stepper motor which can push defective from inspection line.
@rob26r
@rob26r 4 жыл бұрын
Hi Mr AI Guy. Just wanted to say a million thanks for your help working through issues I had and for creating such a great tutorial. I have my object detection via jpeg and now I can move on to getting object detection working on a live webcam. Like and subscribed. Thanks again.
@TheAIGuy
@TheAIGuy 4 жыл бұрын
Glad you got it all working!
@alokranjansanga6759
@alokranjansanga6759 4 жыл бұрын
I was hoping you will say "welcome back aliens"
@magelauditore333
@magelauditore333 4 жыл бұрын
Thats reserved for telusko
@justinpatel8751
@justinpatel8751 4 жыл бұрын
I am making my custom detector on particular traffic sign classes such as stop sign, right-hand side curve etc. As of now to check that how does it work out for only 4 classes, if it works well i will try to train it for more signs around 40 no of classes😅 I hope that won't be an issue in case of that much classes. This tutorial helped a lot. Thanks.🙌
@ismail_..
@ismail_.. 3 жыл бұрын
Did you do that does this work
@snehitvaddi
@snehitvaddi 4 жыл бұрын
May I know how download trained model and implement that model on realtime camera and further image processing stuff...Any reference will be appreciated 👏👏
@TheAIGuy
@TheAIGuy 4 жыл бұрын
check out the readme for my "Object Detection API" video or my "How to Build an Object Detection Classifier" video, both will do the trick
@johanbekker2
@johanbekker2 4 жыл бұрын
This is awesome, thanks a lot! Couldn't get darknet to work on my own PC (cuda and opencv troubles) for 2 days, and this solved my suffering. Took a bit of puzzling to get it to work for Yolov4, but totally worth it.
@hristinabiserinska2407
@hristinabiserinska2407 4 жыл бұрын
The video was really helpful! Thank you so much for your effort! Could you please give me an idea how to apply the model on multiple test images (I have test.txt file analogue to the train.txt file, containing the path to the image) and create a csv file (or pandas dataframe) with the bounding box coordinates, the center (x,y) and the class probability?
@TheAIGuy
@TheAIGuy 4 жыл бұрын
You can check out the readme for alexeyab/darknet github repository, he has amazing documentation and shows how to test on multiple images at once!
@hristinabiserinska2407
@hristinabiserinska2407 4 жыл бұрын
@@TheAIGuy I tried multiple things that alexeyab suggests. The following one is running without an error !./darknet detector test data/obj.data cfg/yolo-obj.cfg yolo-obj_final.weights -dont_show -ext_output /mydrive/yolo/images/imgname.jpg result.txt but the result.txt is not saved in darknet repository and I cannot find it. Did you had the same issue?
@TheAIGuy
@TheAIGuy 4 жыл бұрын
@@hristinabiserinska2407 That will mostly likely save the results.txt into the colab VM. Try making it /mydrive/yolo/results.txt or something similar!
@arslansiddique32
@arslansiddique32 4 жыл бұрын
You are the legend. I used to hate colab because of disconnection with internet. Thanks for your hack and all other tutorial. Liked and Subscribed !
@TheAIGuy
@TheAIGuy 4 жыл бұрын
Thanks so much! Glad you found it useful.
@channaperera2978
@channaperera2978 4 жыл бұрын
We need video about yolo detection in webcam realtime feed.. Thanks in advance :)
@TheAIGuy
@TheAIGuy 4 жыл бұрын
Will do!
@iamayeshanoor
@iamayeshanoor 4 жыл бұрын
@@TheAIGuy yeah i really need to do this on webcam realtime
@TheAIGuy
@TheAIGuy 4 жыл бұрын
@@iamayeshanoor check out my latest video. Its all about running yolov3 on webcam or video in real-time! It will walk you through how to do it with GPU or CPU.
@TheAIGuy
@TheAIGuy 4 жыл бұрын
@abdessamad makdad yes I will try and figure that out! In the meantime you can train your model in the cloud and then use my latest video to see how to run it on video and webcam!
@TheAIGuy
@TheAIGuy 4 жыл бұрын
@abdessamad makdad you can still run video detections on CPU! You wont get as many frames per second but it still works!
@nept4ne
@nept4ne 4 жыл бұрын
Hi, I just discovered your channel and loved the content about computer vision. I'll study your videos and many thanks for sharing.
@TheAIGuy
@TheAIGuy 4 жыл бұрын
Harry glad you enjoy! Thanks for the kind words. All the best
@dannyboynoynay6170
@dannyboynoynay6170 4 жыл бұрын
Thank you so much! you saved my life! hehhehehe
@gabrielegranello3239
@gabrielegranello3239 4 жыл бұрын
Awesome job!! I was struggling so much to just install TensorFlow with GPU on my local machine, and this solves everything! Thank you so much, keep iy up!
@구라니은
@구라니은 4 жыл бұрын
when i want to test with a video, instead of this cord: !./darknet detector test data/obj.data cfg/yolov3_custom.cfg /mydrive/yolov3/backup/yolov3_custom_last.weights /mydrive/images/safari.jpg -thresh 0.3 which command do i have to use?? and do i need another weight file download??
@jadalee4278
@jadalee4278 4 жыл бұрын
wondering this too
@sharlenelee-jendili8408
@sharlenelee-jendili8408 4 жыл бұрын
me too!
@jayaharshang5454
@jayaharshang5454 4 жыл бұрын
Yes, please help.
@faqihhusaen8186
@faqihhusaen8186 4 жыл бұрын
I try to train my dataset but i always get this problem Saving weights to /backup//yolov3_custom_last.weights Couldn't open file: /backup//yolov3_custom_last.weights How can i fix this problem?
@joancvcd
@joancvcd 4 жыл бұрын
I had the same problem. Now it's working for me. My mistake was to write the animals class name in lowercase in obj.names file.
@gaurangpatel9968
@gaurangpatel9968 4 жыл бұрын
I have one question here. How can we use preprinted model and add our newly trained model with that. For example i have 80 classes in coco names but now i trained model with 2 new classes and i want that 80 and also 2 new classes. So in result my model is able to detect total 82 object. Please Help me for this...
@saishriram2064
@saishriram2064 4 жыл бұрын
For those facing issues with the output causing crashes - use the following code in the console: function ClearOutput(){ console.log("Cleared Output"); document.querySelector("iron-icon[command = 'clear-focused-or-selected-outputs']").click() } setInterval(ClearOutput,60000) The updated version for the ClickConnect function is: function ClickConnect(){ console.log("Clicked on connect button"); document.querySelector("colab-connect-button").click() } setInterval(ClickConnect,300000)
@jayshah9697
@jayshah9697 4 жыл бұрын
One of the best channel for computer vision beginners!!!!
@arindammondal9364
@arindammondal9364 4 жыл бұрын
nice video. please make related projects like counting custom objects, vehicle speed predictions etc. your way of teaching and code explanation is absolutely understandable. that is why i'm asking for. thank you.
@student-op1jt
@student-op1jt 3 жыл бұрын
i am training for hand detection. My dataset is folder obj. which has all the images and texts. But during training it is showing Wrong annotation: x = 0, y = 0, < 0 or > 1" Is it because there is no class.txt file in the obj folder.
@sourdurian2839
@sourdurian2839 3 жыл бұрын
you da man! i literally struggled to do this but your tutorial helped me a shit lot. Liked and subbed!
@hans317
@hans317 4 жыл бұрын
Hello bro. I got into final step and tried to use my trained module. but it said like CUDA-version: 10010 (10010), cuDNN: 7.6.5, GPU count: 1 OpenCV version: 3.2.0 names: Using default 'data/names.list' Couldn't open file: data/names.list What Should I in this case? I clearly declared the path of the file
@reyden008
@reyden008 3 жыл бұрын
help!!! i get the error CUDA-version: 11000 (11020), cuDNN: 7.6.5, GPU count: 1 OpenCV version: 3.2.0 names: Using default 'data/names.list' Couldn't open file: data/names.list when i try to run the last code run your custom detector with this command (upload an image to your google drive to test, thresh flag sets accuracy that detection must be in order to show it) !./darknet detector test data/obj.data cfg/yolov3_custom.cfg /mydrive/yolov3/backup/yolov3_custom_last.weights /mydrive/images/safari.jpg -thresh 0.3 imShow('predictions.jpg') }
@gsshsvvdjdjd4236
@gsshsvvdjdjd4236 4 жыл бұрын
Saving weights to /mydrive/yolo3/backup//yolov3_custom_last.weights Couldn't open file: /mydrive/yolo3/backup//yolov3_custom_last.weights It is not saving and not working... Any help?
@TheAIGuy
@TheAIGuy 4 жыл бұрын
make sure your path is proper in obj.data file for backup, try removing the / after backup at the end of the line and see if that works!
@josedavidmonterourena3378
@josedavidmonterourena3378 4 жыл бұрын
What can I say? You're the best! All your videos are freaking awesome!
@amarnathg4537
@amarnathg4537 4 жыл бұрын
I have an doubt sir! Is it possible to yolo pretrained weight to detect only specific object! For example yolo tiny weight consist of 80 class but I want the detector to detect only bicycle car motor bike ! Not to detect others... If it is possible please tell me how...!
@TheAIGuy
@TheAIGuy 4 жыл бұрын
Yes this is certainly possible. I would recommend using the code repository from my most recent video called "Realtime Yolov3 Object Detection..." You will want to customize the detect.py or detect_video.py file (depends if you want to run on images or video). You will just want to add a line or two somewhere saying something along the lines of "if class == car, motorbike..." then run detections.
@vandanashekhar4474
@vandanashekhar4474 4 жыл бұрын
hey I needed a help when I am trying to run this cell " python generate_train.py" it gives me an error: Traceback (most recent call last): File "generate_train.py", line 4, in os.chdir(os.path.join("data", "obj")) NotADirectoryError: [Errno 20] Not a directory: 'data/obj' Can you please help me out with this?
@aymanahmed9631
@aymanahmed9631 4 жыл бұрын
Hello, is it possible to use 360° videos and photos or panoramic images as an input-dataset for Yolo? would the object detection be distorted?
@ilse2040
@ilse2040 4 жыл бұрын
I am following your toturials for days now and find them extremely clear, thank you for making rgeat content! Question: When running a custom training model for one class on my own laptop, for a batch of 4000 it will take 67 hours. How much time do you reckon it will take on this cloud VM? Might give it a try this weekend, thanks!
@michaelroditis1952
@michaelroditis1952 4 жыл бұрын
You sir are one amazing man. This video deserves more views.
@이한규-r5t
@이한규-r5t 4 жыл бұрын
Hi sir! How can i test multiple images? I searched for this on google. But it didn’t work. The error is : cannot load image:a.jpg It works only one file.. Help me ..
@ash24042
@ash24042 4 жыл бұрын
Hi, sorry I got a problem when I try to run the generate_train.py Got an error say NotADirectoryError: [Errno 20] Not a directory: 'data/obj/'. It was line 4 that gives this error. Edit: solve it by %cd content/darknet
@noirRozelle
@noirRozelle 4 жыл бұрын
where did you put %cd content/darknet?
@manojrajsr6001
@manojrajsr6001 4 жыл бұрын
Traceback (most recent call last): File "generate_train.py", line 4, in os.chdir(os.path.join("data", "obj")) FileNotFoundError: [Errno 2] No such file or directory: 'data/obj' I get this error when i run generate_train.py at 20th cell, pls help me to fix this out...
@howtodrawit2978
@howtodrawit2978 4 жыл бұрын
Thank you very much...can you continue making a video about test and validate process image?
@blackunicorn_tm
@blackunicorn_tm 3 жыл бұрын
hi, CUDA-version: 11000 (11020), cuDNN: 7.6.5, GPU count: 1 OpenCV version: 3.2.0 Couldn't open file: cfg/yolov3_custom_drowning.cfg/mydrive/yolov3/backup/yolov3_custom_last.weights this messages appears, What went wrong?
@vinayakmikkal
@vinayakmikkal 4 жыл бұрын
I'm getting a problem. After I run !./darknet detector train data/obj.data cfg/yolov3-custom.cfg darknet53.conv.74 -dont_show I'm getting CUDA-version: 10010 (10010), cuDNN: 7.6.5, GPU count: 1 OpenCV version: 3.2.0 valid: Using default 'data/train.txt' yolov3-custom compute_capability = 750, cudnn_half = 0 How do I solve this issue? I have downloaded the darknet directly into my drive, then i navigated into the darknet file then ran the above command with !chmod u+x darknet because the permission was getting denied.
@TheAIGuy
@TheAIGuy 4 жыл бұрын
hmm is anything outputting other than those lines? That is the beginning of what should be outputted.
@GuzelYadigarova
@GuzelYadigarova 3 жыл бұрын
I got an error that says Error: You set incorrect value batch=1 for Training! You should set batch=64 subdivision=64 ... How can I solve it? [net] # Testing #batch=1 #subdivisions=1 # Training batch=64 subdivisions=64 width=416 height=416 channels=3 momentum=0.9 decay=0.0005 angle=0 saturation = 1.5 exposure = 1.5 hue=.1
@prashanthmangipudi7160
@prashanthmangipudi7160 4 жыл бұрын
Hi, I m not getting any predictions even after training for 4000 steps.... I have done everything as you said. I m not understanding why is it happening ? Can you help me?
@aqiff123
@aqiff123 4 жыл бұрын
I have this error, what's wrong? Saving weights to /mydrive/yolov3/backup/yolov3_custom_last.weights Couldn't open file: /mydrive/yolov3/backup/yolov3_custom_last.weights
@jayaharshang5454
@jayaharshang5454 4 жыл бұрын
I have the following error: Even though it says, Saving weights to /content/drive/My\Drive/yolov3/backup//yolov3_custom_last.weights It neither saves it that location and can't open the saved weights after 100th iteration and shows this: Couldn't open file: /content/drive/My\Drive/yolov3/backup//yolov3_custom_last.weights Please help
@TheAIGuy
@TheAIGuy 4 жыл бұрын
In your google drive did you make sure to create a yolov3 and backup folder? The folder structure has to be in your google drive already in order for it to work.
@bhavyaahir9833
@bhavyaahir9833 4 жыл бұрын
@@TheAIGuy I am facing the same issue even the folder is in the right place
@jayaharshang5454
@jayaharshang5454 4 жыл бұрын
@@TheAIGuy I have created both yolov3 and backup folder
@TheAIGuy
@TheAIGuy 4 жыл бұрын
@@jayaharshang5454 are you using the mydrive symbolic link?
@rblansxx3444
@rblansxx3444 4 жыл бұрын
@@TheAIGuy I have exactly the same problem. I have done every step and this is the only error
@fabianvieri1907
@fabianvieri1907 3 жыл бұрын
Great videos and tutorial, I'm curious about the max_batches, batch, and sub_division is it always to be 64,16 and classes * 2000 ?
@ilkeraykut7064
@ilkeraykut7064 3 жыл бұрын
Could you find any solutions? Yes,I tihnk there is a formula max_batches= classes * 2000 ,but I am not sure other two.
@preetharavindran4174
@preetharavindran4174 3 жыл бұрын
Thankyou very much for the wonderful video ! It just helped me to sort out all kinda doubts I had related to this topic.
@sureshramanujam
@sureshramanujam 3 жыл бұрын
Hello, I could start the training but weights file is not creating in backup folder. What could be the reason? It just shows this after the training is completed and I am unable to find these files in the root of darknet. /yolov3-custom.backup /yolov3-custom.backup
@TheAIGuy
@TheAIGuy 3 жыл бұрын
Are you using google drive?
@sureshramanujam
@sureshramanujam 3 жыл бұрын
@@TheAIGuy Yes, I am using Google Drive. However, I found the issue. The issue was with the pjreddie repository that I cloned. Instead, I cloned the Darknet from AlexyAB repository and all worked fine. Not sure why the custom weights file wasn't created when I used Darknet repository that I cloned from pjreddie
@pavancheyutha3228
@pavancheyutha3228 4 жыл бұрын
I am getting this error while training yolov3 model in colab... Error: l.outputs == params.inputs filters= in the [convolutional]-layer doesn't correspond to classes= or mask= in [yolo]-layer Could you help me out?
@daanvanheusden9641
@daanvanheusden9641 3 жыл бұрын
Hi! I've done your tutorial and five others but my output is always the same. Google colab stops immediately. It used to work but now that i'm trying to train tiny weights nothing works anymore. I tried to add -clear 1 at the train command but that doesn't work. Do you maybe have any idea on what to do?
@damirmukametkarim8835
@damirmukametkarim8835 4 жыл бұрын
Thank you man for great tutorial! I have a question though. I was training model for vehicle detection and classification. Recently I found out that vehicles from particular location are not being detected (cuz of some obstacle). I decided to collect more data from that particular location. Thing is that I have already trained on old dataset and got final weights. Do I have to retrain model on whole dataset again (old dataset + new data) or I can just make dataset on new data and begin training from last weights?
@khawlasghir6586
@khawlasghir6586 4 жыл бұрын
Interesting question. I think that the answer for this is transfer learning. You freeze training weights of the old dataset and you retrain with the newer one to update the model.
@damirmukametkarim8835
@damirmukametkarim8835 4 жыл бұрын
@@khawlasghir6586 thank you for reply. Yes I've already came up with solution and did what you've just wrtitten. 😁👌
@sagarsinha6561
@sagarsinha6561 3 жыл бұрын
I am trying to run the convert_annotations.py file on my custom dataset. It's showing an error as: File "convert_annotations.py", line 64, in coords = convert(filename_str, coords) File "convert_annotations.py", line 18, in convert coords[0] /= int(image.shape[1]) AttributeError: 'NoneType' object has no attribute 'shape' How to solve this issue? Also in what way can I reach out to you for insights and project ideas? I have recently initiated learning deep learning.
@kapkap29
@kapkap29 4 жыл бұрын
i get that error :( Traceback (most recent call last): File "generate_train.py", line 4, in os.chdir(os.path.join("data", "obj")) FileNotFoundError: [Errno 2] No such file or directory: 'data/obj'
@tanishqtambe7408
@tanishqtambe7408 4 жыл бұрын
I had the same issue.... so before extracting all the images from obj.zip , change your directory to /darknet/... this will solve the problem... you run this following code to change the directory import os os.chdir('/content/darknet') and then extract the zip... this will solve your problem
@wenshuolin5165
@wenshuolin5165 3 жыл бұрын
@@tanishqtambe7408 run this command before unzip the obj.zip?
@logesh9141
@logesh9141 4 жыл бұрын
Should need use the images with .jpg format only??? Because I used .jpeg format image i got 'Error: load_data_detection() - Opencv' .Please help me..
@khainguyen5663
@khainguyen5663 4 жыл бұрын
Hello admin, Can i ask you a question about dataset ? Now i have 4 folder which consist of image and file txt to descript every image in folder but i am very confused in every txt file of 4 folders the class object is 0, Can i fix class object in every folder from 0 to 3 or not ? For example: in txt file of folder 1 is 0, next folder is 1 and etc.
@saikrishnachalavadi
@saikrishnachalavadi 3 жыл бұрын
hey. i tried this code and everything worked fine but the training part. i checked what is the problem and found that the train.txt was empty. i had like 100 labelled images but its empty. can you help me with this issue.
@sametyilmaz8106
@sametyilmaz8106 2 жыл бұрын
Hi. While training the model, I get the error "Can't open label file.(This can be normal only if you use MSCOCO)", how can I solve it?
@m.mustafayildiz614
@m.mustafayildiz614 Жыл бұрын
Hello, I did the training as you said and it completed without any problems. I want to try it with a video I posted on google cloud during the testing phase, but I'm getting an error, can you help me?
@ilkeraykut7064
@ilkeraykut7064 3 жыл бұрын
Thanks for the video.How many photos I should upload for 1 class? And for more classes,What it should be the values for batch,subdivision and step?Please help.
@samflynn6004
@samflynn6004 4 жыл бұрын
My custom detector is currently runnning! Just a question- I only tried uploading 50 images. Where is this number coming from? 132: 680.273926, 495.005737 avg loss, 0.000000 rate, 20.118069 seconds, 8448 images, 79.817513 hours left (8448 images)
@TheAIGuy
@TheAIGuy 4 жыл бұрын
That number is the total amount of images it has trained over. In your cfg you have a batch value and a max iterations value. Your batch is how many images of your training set you train on per iteration. So if your batch is 32 and your iterations is 4000, it will look at 32 of your images at once and train, then grab a different combo of 32 images and train some more. It does this 4000 times so by the end it has looked at 32 * 4000 = 128,000 images. It will train on each of your 50 images a large amount of times.
@yavuzgulesen9012
@yavuzgulesen9012 4 жыл бұрын
You said it will take few hours but I have 5 classes and 50 images per class but it takes 9-10 hours to train. Is there a problem I cannot see?
@akankshyabhattacharyaa7008
@akankshyabhattacharyaa7008 4 жыл бұрын
While training I am constantly getting an error which says "1.outputs == params.inputs , filters =in the [convolution]- layer doesn't correspond to classes = or mask =in [yolo] layer Please help
@kaushikjadhav1367
@kaushikjadhav1367 4 жыл бұрын
Awesome video sir! I am new to your channel and I am already impressed by the videos you make. Thanks for sharing everything!!! 💛💛💛
@nottp3090
@nottp3090 4 жыл бұрын
I have some problem when 13:45 That show output ln: failed to create symbolic link '/mydrive/My Drive': Operation not supported Classroom 'Colab Notebooks' image and 15:19 my out put show me that cp: cannot create regular file '/mydrive/images/detection1.jpg': No such file or directory what should I do?
@chaitrakulkarni7704
@chaitrakulkarni7704 3 жыл бұрын
I am working on trash detection, my academic project plastic bottle, plastic cover, paper, and trash. I am soo confused not getting how to upload my dataset I downloaded from GitHub to yolo. I don't even know if my dataset is compatible with yolo.
@elijahturatsinze1576
@elijahturatsinze1576 4 жыл бұрын
Thank you so much for this informative tutorial but I got error Traceback (most recent call last): File "generate_train.py", line 4, in os.chdir(os.path.join("data", "obj")) NotADirectoryError: [Errno 20] Not a directory: 'data/obj' May you please help me solve this issue?
@abrahammathew9783
@abrahammathew9783 4 жыл бұрын
Hi, I am getting following error while connecting to Google drive. It would be kind of you if you can help. error : ln: failed to create symbolic link '/mydrive/My\ Drive': Operation not supported
@angelortiz3564
@angelortiz3564 2 жыл бұрын
This is an absoulutly awesome video!! Do you think it the process has changed that much since 2020?
@W0lfbaneShikaisc00l
@W0lfbaneShikaisc00l 2 жыл бұрын
I find the hacks no longer work... looks like you'll need to fix this so it actually makes the model as now whenever I run the commands it says: uncaught SyntaxError: Unexpected token '.' and whenever I run your notebook it then says: /bin/bash: ./darknet: Is a directory I think your code is broken or Google grew wise to your hacks.
@achyutmorbekar189
@achyutmorbekar189 4 жыл бұрын
Will it save the weight files after training is over? Or after every 100 iterations. My model is training and it completed about 260 steps but I can't see weight files in the backup folder.
@TheAIGuy
@TheAIGuy 4 жыл бұрын
achyut morbekar should save weights every 100 iterations, make sure you created a backup folder on your google drive
@Lucas-hobbies
@Lucas-hobbies 4 жыл бұрын
Very Nice Tutorial! Thanks for sharing!
@jhonjamiltonmajinerazo7894
@jhonjamiltonmajinerazo7894 4 жыл бұрын
hello again, i have a question, i am using custom images, and i am using the "labellmg" tool version windows_v1.8 to label the images. what is the difference of using the .txt (yolo) and xml (pascalVOC) tag files. In this video, which one was used, or which one do you recommend is better?
@TheAIGuy
@TheAIGuy 4 жыл бұрын
JHON JAMILTON MAJIN ERAZO i use the yolo (.txt) format. It was made to use with yolo as is so you dont need to convert anything. I definitely recommend using yolo format.
@musicmagic1013
@musicmagic1013 4 жыл бұрын
man I really appreciate it ,this really make trainnig custom object model simple and it helps me a lot.
@TheAIGuy
@TheAIGuy 4 жыл бұрын
Appreciate it! Thanks for the kind words. All the best.
@anadimondal2632
@anadimondal2632 4 жыл бұрын
I have tried to get the loss graph after training but got this error. Would you tell me how can I solve this? NameError Traceback (most recent call last) in () ----> 1 imShow('chart.png') NameError: name 'imShow' is not defined
@TheAIGuy
@TheAIGuy 4 жыл бұрын
you have to run the cell above that defines imShow before you can call it!
@kushagrak4903
@kushagrak4903 4 жыл бұрын
I'm using Google Colab. Saving weights to /content/drive/MyDrive/yolov3/backup/yolov3-custom_last.weights Couldn't open file: /content/drive/MyDrive/yolov3/backup/yolov3-custom_last.weights In my darknet/data/obj.data I have saved; backup = /content/drive/My Drive/yolov3/backup Please help. P.S it is saving to MyDrive whereas I'm saving it to My Drive. Does this space affects?
@sheikhwajeeh9753
@sheikhwajeeh9753 4 жыл бұрын
Hello can I have some help how to edit this path cause my path have space between 'My Drive' while ( Saving weights to /content/drive/'MyDrive'/yolov3/backup/yolov3_custom_last.weights Couldn't open file: /content/drive/'MyDrive'/yolov3/backup/yolov3_custom_last.weights) does not I hope this is the issue. Thanks
@newdreamza1-z038
@newdreamza1-z038 3 жыл бұрын
If we have trained the model on grayscale images with channels = 1 in yolov3custom.cfg file, During inference it is not working.Any other parameters we have to change during inference on test dataset?
@imanhassan1628
@imanhassan1628 4 жыл бұрын
Hello! I have an error trying to run generate_train.py that says Traceback (most recent call last): File "generate_train.py", line 4, in os.chdir(os.path.join("data", "obj")) FileNotFoundError: [Errno 2] No such file or directory: 'data/obj' generate_train.py is already in my yolov3 file. Does anyone know what could be the problem?
@WeAllLoveMarlene
@WeAllLoveMarlene 4 жыл бұрын
Hey AI Guy! Thanks for this super clear tutorial! I am just running the training and I’m wondering, is it supposed to take THIS long? I’m using 1000 training images from 1 class, I did leave “random=1” in the yolo config file, and it is currently on the iteration 132 with 17.5 hours left still.... is that normal or did I do sth wrong?
@WeAllLoveMarlene
@WeAllLoveMarlene 4 жыл бұрын
And my avg loss is already 139 (went down from 1300 approx)
@saifullahbhutta
@saifullahbhutta 3 жыл бұрын
i am always getting this error, i have trained three times can you, please help me. RuntimeError: shape '[256, 128, 3, 3]' is invalid for input of size 264248
@tensor7252
@tensor7252 4 жыл бұрын
A great tutorial. This really helped me to clear all the doubts regarding YOLOV3 implementation. I have another question.Do you know how to get the coordinates of the bounding box?
@TheAIGuy
@TheAIGuy 4 жыл бұрын
ten sor to get bounding boxes just add the flag -ext_output to your detection command
@hibazafar1815
@hibazafar1815 4 жыл бұрын
hey your tutorial is super good, I really learned a lot. Can you please tell me how I can store output of each detection in a file along with the coordinates. Thanks
@TheAIGuy
@TheAIGuy 4 жыл бұрын
@@hibazafar1815 Hi there and thanks for the kind words! Refer to the official readme of alexeyab/darknet on github as he shows how to do it with detail. A way that works for me is adding this to the end of your darknet detection command '-ext_output >> results.txt'. This will save the detections in a text file. Make sure to then save the results file to your machine or google drive.
@strangershani
@strangershani 4 жыл бұрын
Hi , I am getting following error please help me out: CUDA Status Error: file: ./src/dark_cuda.c : () : line : 39 : build time : Aug 7 2020 -04:59:39 CUDA Error : no CUDA- capable device is detected CUDA Error: no CUDA-capable device is detected : success darknet: ./src/utils.c: 326 : error : Assertion '0' failed.
@schneizel935
@schneizel935 3 жыл бұрын
Hey! When I tried to copy the configuration file, I got the following error: cp: cannot stat '/cfg/yolov3.cfg': No such file or directory Even though I've cloned the entire github repo perfectly. Appreciate it if you could help
@rebeccacook40
@rebeccacook40 4 жыл бұрын
Hi, I would like to test the model with my 20% test data after training. I noticed in the video that when creating the obj.data file you mentioned that we wouldn't be using the test.txt. If I would like to test the model I assume I need to generate the test.txt file. Is there anything else I need to change or do? Will it then provide me with the accuracy of the model after training?
@林冠智-r3s
@林冠智-r3s 4 жыл бұрын
Saving weights to /mydrive/yolov3/backup/yolov3_custom_last.weights Couldn't open file: /mydrive/yolov3/backup/yolov3_custom_last.weights I still get this error after changing my obj.data last line "backup = mydrive/yolov3/backup" and I'm sure I creat a bakcup folder in yolov3 , how can I fix it?
@syedumaidahmed6295
@syedumaidahmed6295 4 жыл бұрын
Can you please guide. How many iterations I have to do for three classes. I have taken 3000 steps and got the loss to 0.59678
@TheAIGuy
@TheAIGuy 4 жыл бұрын
There is no right answer to determine how many iterations is enough. Totally depends on your model and your training data. However, the recommended iterations is 2000 per class. So your case would be 6000. This could be too many for your case but if you train longer there will be a weights file saved every 1000 iterations so you can test them all.
Крутой фокус + секрет! #shorts
00:10
Роман Magic
Рет қаралды 41 МЛН
How to do Object Detection using ESP32-CAM and Edge Impulse YOLO Model
16:50
how to train YOLO v3, v4 for custom objects detection | using colab free GPU
35:34
When Maths Meet Coding
Рет қаралды 172 М.
Introduction into YOLO v3
26:56
Валентин Сичкар
Рет қаралды 99 М.
YOLOv8 | Object Detection on a Custom Dataset using YOLOv8
17:41
Code With Aarohi
Рет қаралды 137 М.
YOLOv3 Training on Custom Data Using Google Colab With Free GPU.
12:57
Artificially Intelligent
Рет қаралды 10 М.