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

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ธ.ค. 2024

ความคิดเห็น • 1K

  • @TheAIGuy
    @TheAIGuy  4 ปีที่แล้ว +42

    Let me know what classes you are making your custom detector detect! Also comment if you have any issues!

    • @mubinmodi7529
      @mubinmodi7529 4 ปีที่แล้ว +1

      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 ปีที่แล้ว +1

      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 ปีที่แล้ว +1

      Good afternon sir, I have one more suggestion kindly make a video on how to install and use detectron

    • @TheAIGuy
      @TheAIGuy  4 ปีที่แล้ว +2

      Manu Tyagi awesome will do!

  • @jyothsnap3138
    @jyothsnap3138 4 ปีที่แล้ว +12

    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

  • @zakariaabderrahmanesadelao3048
    @zakariaabderrahmanesadelao3048 4 ปีที่แล้ว +1

    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 9 หลายเดือนก่อน

      This kinds of abusive words if you praise someone are not good....praise in good words

  • @aaditkolar5521
    @aaditkolar5521 4 ปีที่แล้ว +21

    10:57 was so creative that you earned my subscription

    • @TheAIGuy
      @TheAIGuy  4 ปีที่แล้ว

      Appreciate it. Thanks a lot! :)

  • @kshitijnair7758
    @kshitijnair7758 4 ปีที่แล้ว +2

    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!

  • @tejasnareshsuvarna7948
    @tejasnareshsuvarna7948 4 ปีที่แล้ว +3

    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 ปีที่แล้ว +1

      Thanks so much!

  • @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 ปีที่แล้ว +15

    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 ปีที่แล้ว +1

      I'm getting this error even though my images are inside darknet/data/obj

    • @leafteaneko
      @leafteaneko 4 ปีที่แล้ว +1

      @@N-e0N Post your errors here and maybe we can help

    • @N-e0N
      @N-e0N 4 ปีที่แล้ว +1

      @@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 ปีที่แล้ว +1

      @@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(?)

  • @peregrinussolutionsllc6010
    @peregrinussolutionsllc6010 4 ปีที่แล้ว +1

    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.

  • @woosal-kc7tr
    @woosal-kc7tr 4 ปีที่แล้ว +3

    Done everything from scratch with the help of you, really informative and god tier tutorial :D. Thanks!

  • @rob26r
    @rob26r 4 ปีที่แล้ว +1

    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!

  • @arunselvabio
    @arunselvabio 4 ปีที่แล้ว +9

    Thank you for your hard work to frame format the content beautifully and to make it work :)

  • @arslansiddique32
    @arslansiddique32 4 ปีที่แล้ว +2

    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.

  • @argishtib
    @argishtib 4 ปีที่แล้ว +2

    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 ปีที่แล้ว +1

      @@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.

  • @satyapratik
    @satyapratik 4 ปีที่แล้ว +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 ปีที่แล้ว +1

      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

  • @argoz1636
    @argoz1636 4 ปีที่แล้ว +3

    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!

  • @hamzalatif115
    @hamzalatif115 4 ปีที่แล้ว +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 ปีที่แล้ว +2

      Were u able to solve this?

    • @andrekestler8256
      @andrekestler8256 4 ปีที่แล้ว +2

      I have the same issue

    • @hamzalatif115
      @hamzalatif115 4 ปีที่แล้ว +1

      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 ปีที่แล้ว +1

      I'm having same problem. "!chmod +x darknet" doesn't solve for me. AI Guy, can you help us?

    • @iantairea859
      @iantairea859 4 ปีที่แล้ว +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!

  • @johanbekker2
    @johanbekker2 4 ปีที่แล้ว +1

    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.

  • @makeoutloud
    @makeoutloud 4 ปีที่แล้ว +15

    Bro make video on predicting yolov3 on video and exporting the video in windows

  • @hansgabrieldaduya2565
    @hansgabrieldaduya2565 4 ปีที่แล้ว +1

    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 ปีที่แล้ว +3

    After running the JavaScript code in console it's showing error...

    • @TheAIGuy
      @TheAIGuy  4 ปีที่แล้ว

      Akhil G Krishnan whats the error

    • @GKMUSICINDIAVIDEOS
      @GKMUSICINDIAVIDEOS 4 ปีที่แล้ว +2

      @@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 ปีที่แล้ว +1

      @@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 ปีที่แล้ว +1

      @@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 ปีที่แล้ว +1

      GK MUSIC INDIA try changing the “colab-toolbar-button#connect” to “paper-icon-button” inside the queryselector

  • @nept4ne
    @nept4ne 4 ปีที่แล้ว +1

    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

  • @channaperera2978
    @channaperera2978 4 ปีที่แล้ว +4

    We need video about yolo detection in webcam realtime feed.. Thanks in advance :)

    • @TheAIGuy
      @TheAIGuy  4 ปีที่แล้ว +1

      Will do!

    • @iamayeshanoor
      @iamayeshanoor 4 ปีที่แล้ว +1

      @@TheAIGuy yeah i really need to do this on webcam realtime

    • @TheAIGuy
      @TheAIGuy  4 ปีที่แล้ว +1

      @@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!

  • @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!

  • @dannyboynoynay6170
    @dannyboynoynay6170 4 ปีที่แล้ว +6

    Thank you so much! you saved my life! hehhehehe

  • @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

  • @ravirajsinhdabhi9255
    @ravirajsinhdabhi9255 4 ปีที่แล้ว +3

    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 ปีที่แล้ว +1

      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 ปีที่แล้ว +1

      @@TheAIGuy sorry for to trouble you after
      i am getting
      Couldn't open file: data/obj.data

    • @ravirajsinhdabhi9255
      @ravirajsinhdabhi9255 4 ปีที่แล้ว +2

      @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 ปีที่แล้ว +2

      Ravirajsinh Dabhi just liking this video and subscribing to the channel means a lot to me. Thanks!

    • @ravirajsinhdabhi9255
      @ravirajsinhdabhi9255 4 ปีที่แล้ว +1

      @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.

  • @sourdurian2839
    @sourdurian2839 3 ปีที่แล้ว

    you da man! i literally struggled to do this but your tutorial helped me a shit lot. Liked and subbed!

  • @alokranjansanga6759
    @alokranjansanga6759 4 ปีที่แล้ว +5

    I was hoping you will say "welcome back aliens"

  • @josedavidmonterourena3378
    @josedavidmonterourena3378 4 ปีที่แล้ว

    What can I say? You're the best! All your videos are freaking awesome!

  • @hristinabiserinska2407
    @hristinabiserinska2407 4 ปีที่แล้ว +3

    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 ปีที่แล้ว +1

      @@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!

  • @jayshah9697
    @jayshah9697 4 ปีที่แล้ว

    One of the best channel for computer vision beginners!!!!

  • @snehitvaddi
    @snehitvaddi 4 ปีที่แล้ว +5

    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 ปีที่แล้ว +2

      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

  • @justinpatel8751
    @justinpatel8751 4 ปีที่แล้ว +1

    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 ปีที่แล้ว +2

      Did you do that does this work

  • @구라니은
    @구라니은 4 ปีที่แล้ว +3

    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??

  • @michaelroditis1952
    @michaelroditis1952 4 ปีที่แล้ว +1

    You sir are one amazing man. This video deserves more views.

  • @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.

  • @developerhabits
    @developerhabits 3 ปีที่แล้ว

    LOL! Love the "OH! WHAT'S THAT? I'D DEFINITELY HIT THAT BUTTON". Great video, subscribed.

  • @satyabratsharma486
    @satyabratsharma486 4 ปีที่แล้ว +1

    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'

  • @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.

  • @Lucas-hobbies
    @Lucas-hobbies 4 ปีที่แล้ว +1

    Very Nice Tutorial! Thanks for sharing!

  • @angelortiz3564
    @angelortiz3564 2 ปีที่แล้ว

    This is an absoulutly awesome video!! Do you think it the process has changed that much since 2020?

  • @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!

  • @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?

  • @ignacioswboada660
    @ignacioswboada660 4 ปีที่แล้ว +1

    Error: l.outputs == params.inputs
    filters= in the [convolutional]-layer doesn't correspond to classes= or mask= in [yolo]-layer
    If you get this error while training, check that the number of classes in the yolov3_custom.cfg is correct in ALL 3 [yolo] parts, as explained in 22:10

    • @TheAIGuy
      @TheAIGuy  4 ปีที่แล้ว +1

      IgnacioSW Boada thats correct! Hope you were able to get it working!

    • @ignacioswboada660
      @ignacioswboada660 4 ปีที่แล้ว +1

      @@TheAIGuy Yeah!! Thanks a million for this tutorial, I don't have a GPU, this is the best!!

    • @TheAIGuy
      @TheAIGuy  4 ปีที่แล้ว

      @@ignacioswboada660 Glad you liked it!

  • @sebastianortmann4728
    @sebastianortmann4728 3 ปีที่แล้ว

    you frcking legend, im using this for my master thesis, this just took me several weeks with software with your skript i was able to do in a couple hrs

    • @TheAIGuy
      @TheAIGuy  3 ปีที่แล้ว

      Haha glad to help. Thanks!

    • @researched982
      @researched982 3 ปีที่แล้ว

      Sitze auch gerade an der MA, kann ich dich irgendwie kontaktieren? :D

  • @saishriram2064
    @saishriram2064 4 ปีที่แล้ว +1

    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)

  • @nidaashrin1113
    @nidaashrin1113 4 ปีที่แล้ว

    This was an exact video I was looking for..thank u for making it.. saved my time..

  • @musicmagic1013
    @musicmagic1013 4 ปีที่แล้ว +1

    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.

  • @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.

  • @brunoromao7172
    @brunoromao7172 3 ปีที่แล้ว

    Hello from Brazil, very great tutorial! Congratulations! I am training on BDD100K dataset, it helped a lot! Thank you.

  • @maatflores2376
    @maatflores2376 4 ปีที่แล้ว

    Grande bro. Im from Chihuahua, Mexico and this really help me

  • @preciousbatta9576
    @preciousbatta9576 4 ปีที่แล้ว

    Thank you so much. Very easy to understand and follow-up
    The AI Guy

  • @annamilewska3946
    @annamilewska3946 4 ปีที่แล้ว

    Thank You so much!!! Creating custom detector was challenging but it works! Not perfectly but still ;) (It detects malaria cells)

  • @abuzarshaikh9217
    @abuzarshaikh9217 4 ปีที่แล้ว +1

    Great video, truly a piece of art, just out of curiosity for how many iterations usually does the training goes?

    • @TheAIGuy
      @TheAIGuy  4 ปีที่แล้ว +1

      the standard for high accuracy is usually 2000*(# of classes), so if you are creating a detector for 3 classes you would train for 6000 iterations

    • @abuzarshaikh9217
      @abuzarshaikh9217 4 ปีที่แล้ว +1

      It's giving me an error while training, can't open label file(this can be Normal if your MSCOCO)
      Is this error normal or should I do some changes for it

    • @TheAIGuy
      @TheAIGuy  4 ปีที่แล้ว

      @@abuzarshaikh9217 this probably means your obj.names isnt in the right folder or isnt being reference properly in the obj.data folder. I would double check both

  • @howtodrawit2978
    @howtodrawit2978 4 ปีที่แล้ว +2

    Thank you very much...can you continue making a video about test and validate process image?

  • @gaurangpatel9968
    @gaurangpatel9968 4 ปีที่แล้ว +1

    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...

  • @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.

  • @damirmukametkarim8835
    @damirmukametkarim8835 4 ปีที่แล้ว +2

    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 ปีที่แล้ว +1

      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 ปีที่แล้ว +1

      @@khawlasghir6586 thank you for reply. Yes I've already came up with solution and did what you've just wrtitten. 😁👌

  • @vijayc3904
    @vijayc3904 4 ปีที่แล้ว

    CUDA status Error: file: ./src/dark_cuda.c : () : line: 39 : build time: Dec 6 2020 - 12:20:09
    CUDA Error: no CUDA-capable device is detected
    CUDA Error: no CUDA-capable device is detected: Bad file descriptor
    darknet: ./src/utils.c:331: error: Assertion `0' failed.
    any idea how to fix this?

  • @aymanahmed9631
    @aymanahmed9631 4 ปีที่แล้ว +1

    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?

  • @reyden008
    @reyden008 3 ปีที่แล้ว +1

    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')
    }

  • @ash24042
    @ash24042 4 ปีที่แล้ว +1

    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?

  • @fabianvieri1907
    @fabianvieri1907 4 ปีที่แล้ว +1

    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 4 ปีที่แล้ว

      Could you find any solutions? Yes,I tihnk there is a formula max_batches= classes * 2000 ,but I am not sure other two.

  • @faqihhusaen8186
    @faqihhusaen8186 4 ปีที่แล้ว +2

    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.

  • @jayaharshang5454
    @jayaharshang5454 4 ปีที่แล้ว +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 ปีที่แล้ว +1

      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 ปีที่แล้ว +2

      @@TheAIGuy I am facing the same issue even the folder is in the right place

    • @jayaharshang5454
      @jayaharshang5454 4 ปีที่แล้ว +1

      @@TheAIGuy I have created both yolov3 and backup folder

    • @TheAIGuy
      @TheAIGuy  4 ปีที่แล้ว +1

      @@jayaharshang5454 are you using the mydrive symbolic link?

    • @rblansxx3444
      @rblansxx3444 4 ปีที่แล้ว +2

      @@TheAIGuy I have exactly the same problem. I have done every step and this is the only error

  • @deshanivimukthika6926
    @deshanivimukthika6926 4 ปีที่แล้ว +2

    Hi Al Guy, thank you very much for this amazing video.
    I need some clarifications on trained weights.

    • @deshanivimukthika6926
      @deshanivimukthika6926 4 ปีที่แล้ว

      Aftet the training, weights will be saved into the drive as u explained. By any chance, those are those weights downloadable and able to use inside an android application for objects detection?

  • @ritubansal3087
    @ritubansal3087 4 ปีที่แล้ว

    you're amazing i successfully made my own custom model thank you! :)

  • @sanfinity_
    @sanfinity_ 4 ปีที่แล้ว

    Thanks a lot for your beautiful content sir that helped me build my own custom yolov3 model 🤟🏻

  • @amarnathg4537
    @amarnathg4537 4 ปีที่แล้ว +1

    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 ปีที่แล้ว +1

      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.

  • @tensor7252
    @tensor7252 4 ปีที่แล้ว +2

    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 ปีที่แล้ว +2

      ten sor to get bounding boxes just add the flag -ext_output to your detection command

    • @hibazafar1815
      @hibazafar1815 4 ปีที่แล้ว +1

      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.

  • @gsshsvvdjdjd4236
    @gsshsvvdjdjd4236 4 ปีที่แล้ว +2

    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!

  • @sureshramanujam
    @sureshramanujam 3 ปีที่แล้ว +1

    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 ปีที่แล้ว +1

      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

  • @mahmoudbasunimansour7504
    @mahmoudbasunimansour7504 4 ปีที่แล้ว +1

    thanks for your support. it is really useful video. but what best solution if we want to test the model with large number of images instead of one image test after finishing the training?

    • @TheAIGuy
      @TheAIGuy  4 ปีที่แล้ว +1

      You can create a test set similar to how train.txt is set up and refer to it in your obj.data. Then you can run a map command. Refer to alexeyab/darknet github readme for more on this!

    • @mahmoudbasunimansour7504
      @mahmoudbasunimansour7504 4 ปีที่แล้ว

      @@TheAIGuy thanks for your support and answer i read as much as i can from alexeyab/darknet readme it's very useful with video .i make test set as train.txt steps as you mentioned and try two commands to get result of testing from readme.
      !./darknet detector test data/obj.data cfg/yolov3_custom.cfg /mydrive/yolov3/backup/yolov3_custom_final.weights -dont_show -ext_output < data/train.txt > result.txt
      !./darknet detector test data/obj.data cfg/yolov3_custom.cfg /mydrive/yolov3/backup/yolov3_custom_final.weights -ext_output -dont_show -out result.json < data/train.txt
      each one return result with result.txt or result.json for all images.

    • @mahmoudbasunimansour7504
      @mahmoudbasunimansour7504 4 ปีที่แล้ว

      @@TheAIGuy the result is very good if we want to check if the model classify the object or not in each image as result.txt and result.json provide me these information .but if i need to see each image with bounding box around the object that was detected ? any solutions for this ?

  • @kapkap29
    @kapkap29 4 ปีที่แล้ว +1

    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?

  • @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...

  • @hans317
    @hans317 4 ปีที่แล้ว +1

    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

  • @TheBaffoonShow
    @TheBaffoonShow 23 วันที่ผ่านมา

    Is the code only contained within the vim or can I use this later for another visual studio project I have? Also the project I’m working on is in cpp, so I need to embed python for this to function together?

  • @khawarshehzad487
    @khawarshehzad487 4 ปีที่แล้ว +1

    hey great tut! can you please explain where and how you are saving the weights after 100 epochs? Im training custom dataset on a different implementation of YOLO3 and that implementation doesn't save model it self after a given number of iterations.
    edit : does the line "backup = path" in obj.data automatically starts backing up (i.e. thats how the yolo is designed or we specify this backup behavior somewhere)

    • @TheAIGuy
      @TheAIGuy  4 ปีที่แล้ว +1

      The line for backup in obj.data is the path of what folder you want the weights to save in. That is why I recommend setting it to your Google Drive in a folder you have already created.

    • @khawarshehzad487
      @khawarshehzad487 4 ปีที่แล้ว

      The AI Guy tysm also i worked on the network to perform detections on videos - however this specific implementation was quite slow so i moved to another implementation and it works great on videos (on colab ~ 30ish fps)

  • @keremnayman8410
    @keremnayman8410 4 ปีที่แล้ว +1

    Thank you very much for this awesome tutorial. But I have a stupid question: How can I save the model that I've just trained?
    Thanks a bunch, please keep up the good work, I've subscribed already!

    • @TheAIGuy
      @TheAIGuy  4 ปีที่แล้ว +2

      Kerem NAYMAN all you need is the .weights file. If you set your backup folder to be in your google drive then it will save into your google drive. Otherwise you must download the .weights from the backup folder in the Colab VM workspace!

    • @keremnayman8410
      @keremnayman8410 4 ปีที่แล้ว

      @@TheAIGuy Thank you very much!!!

  • @vinayakmikkal
    @vinayakmikkal 4 ปีที่แล้ว +1

    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.

  • @이한규-r5t
    @이한규-r5t 4 ปีที่แล้ว +1

    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 ..

  • @adityasinha4158
    @adityasinha4158 4 ปีที่แล้ว +1

    Great video!! Extremely helpful.

  • @FitnessTechAk
    @FitnessTechAk 4 ปีที่แล้ว +1

    Amazing bro something that i was actually looking for because my PC is old ! :) Subscribed..
    One more question
    Have you tried WebRTC or Other way to access native devices????
    I was thinking to replicate project did on my PC for real time object detection via Web Came
    Have you tried that ? :)

    • @FitnessTechAk
      @FitnessTechAk 4 ปีที่แล้ว +1

      Found code on google collab snippet ... Great job buddy! :)

    • @TheAIGuy
      @TheAIGuy  4 ปีที่แล้ว

      @@FitnessTechAk You found code to access your own webcam through Google colab? Do you mind sharing as I'd love to add this in a future video! Thanks for the kind words.

    • @FitnessTechAk
      @FitnessTechAk 4 ปีที่แล้ว

      @@TheAIGuycntrl+alt+p on colab or go to Google colab> insert > code snippets
      there's this section where they have used code to snip a photo but I think we can use it as VideoCapture(0) and send it to predict..
      Have you ever tried web cam on darknet python ?
      If you have please share steps
      If I do it before you I'll share you the steps as gratitude for your earlier help ;)

    • @FitnessTechAk
      @FitnessTechAk 4 ปีที่แล้ว

      @@TheAIGuy
      github.com/akshaydesai1993/datascience/raw/master/Google_Colab_YoloV2_Darkflow_Installation_and_Web_Cam_Object_Detection.ipynb
      i did it for darkFlow taking help of your notebook , kept credit for you in the bottom.
      also i couldnt figure out videoCapture continuously polling and running like in our PC.. I tried with while loop,writing and reading files is not that real time. Let me know if you figure that out, Thanks again!

  • @wellml5838
    @wellml5838 4 ปีที่แล้ว +1

    Hey great video! Just wondering why you have not explained how to create test.txt. Do I just need to drag 20% of the lines in train.txt created by your python code into test.txt?

    • @TheAIGuy
      @TheAIGuy  4 ปีที่แล้ว +1

      I honestly just forgot I think, Yes you can just drag lines from train.txt into test.txt and that should work! Smart!

    • @wellml5838
      @wellml5838 4 ปีที่แล้ว +1

      @@TheAIGuy Alright thanks!
      If it is ok for you, I rebuilt your colab notebook which is already great. I made some changes that makes it even more convenient for beginners. Do you want me to share it with you?

    • @TheAIGuy
      @TheAIGuy  4 ปีที่แล้ว

      WellML That’s amazing, I’d appreciate it greatly if you’d share it with me via email. My email is in my channel’s About page. Thanks!

  • @ronakgajera6126
    @ronakgajera6126 3 ปีที่แล้ว

    This video content helped me a lot... thanks for sharing your knowledge...

  • @sagarprasad8720
    @sagarprasad8720 3 ปีที่แล้ว

    Thanks a lot man. you should make more and more videos i am hoping to learn tensorflow from you.

  • @sriakhil
    @sriakhil 4 ปีที่แล้ว

    Unable to init server: Could not connect: Connection refused
    (predictions:5275): Gtk-WARNING **: 08:53:04.185: cannot open display:
    Can you help me understand this? I see that you got the same thing after detection but you have a bounding box but for me, the image is showing up without bounding box

    • @TheAIGuy
      @TheAIGuy  4 ปีที่แล้ว

      yes this warning happens because darknet is trying to open the image with detections during the test command but google colab doesnt allow it. Are you trying this on the pretrained model or on a custom model?

  • @yanahongla5354
    @yanahongla5354 3 ปีที่แล้ว

    Great stuff. Thank you for your hard work. This is very helpful

  • @prakharkumar7368
    @prakharkumar7368 4 ปีที่แล้ว +1

    Awesome buddy but just one humble request try to upload regularly 2 times per week or maybe 1

  • @jhonjamiltonmajinerazo7894
    @jhonjamiltonmajinerazo7894 4 ปีที่แล้ว +1

    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 ปีที่แล้ว +1

      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.

  • @hammadimran6539
    @hammadimran6539 4 ปีที่แล้ว +1

    Hi, how do we resume a colab project because after training I closed my tabs and when I opened again my darknet folder was no longer there and I had to start from scratch

  • @tabriziran1
    @tabriziran1 4 ปีที่แล้ว

    Thank you for this great explanation. I am just wondering in Yolo with custom data and train, at the end when we give a test image how I can get box location? same as .txt I provided for training.
    Thanks

  • @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?

  • @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..

  • @zekicnar7151
    @zekicnar7151 3 ปีที่แล้ว

    first of all, Thank you... all of your videos are great and easy to understand and apply.. But i have question. about one year ago, i use this video and notebook ,there was no problem... Now after each1000 iteration it doesn't save weights... it just upload '.last_weights'(i think after each 100) . Not '1000.weight,2000.weight' etc. Does darknet change something or am i missing something?? Please help me to understand and solve the problem

  • @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?

  • @joelmathew7998
    @joelmathew7998 4 ปีที่แล้ว +1

    While detecting potholes using a dataset made using images of roads from my locality... I used Collab previously and the issue I faced was that that model starts to train but after a few iterations like 10-12 Collab stops training itself.

    • @joelmathew7998
      @joelmathew7998 4 ปีที่แล้ว +1

      Without showing any errors. I couldn't figure out what the error was ! Can you help me out ?

    • @TheAIGuy
      @TheAIGuy  4 ปีที่แล้ว +1

      c j if you leave colab idle for too long it will kick you off, is that what you mean?

    • @TheAIGuy
      @TheAIGuy  4 ปีที่แล้ว +1

      c j in this tutorial colab notebook i demonstrate some code you can inject into your browser to prevent colab from stopping itself! You should give it a try!

    • @joelmathew7998
      @joelmathew7998 4 ปีที่แล้ว +1

      @@TheAIGuy No... Just 2-3 mins after the model runs the cell stops running. Without any error f some sort. I tried it using different accounts but it still remains. I presumed the outputs of the training made the browser slow and hence used the command %%capture to suppress the outputs but still in vain.

    • @TheAIGuy
      @TheAIGuy  4 ปีที่แล้ว +1

      @@joelmathew7998 I would recommend running the cells again and having your task manager open so you can see what is happening with your CPU and MEMORY as it runs. Based off what you see I can probably give you a detailed suggestion of how to proceed!

  • @Still_i_Rise96
    @Still_i_Rise96 3 ปีที่แล้ว +1

    12:16 min its showing No such file or directory "darknet"