Train YOLOv3 Custom Object Detector with Darknet | Aimbot and Security Camera | Fast and Easy

Поделиться
HTML-код
  • Опубликовано: 21 окт 2024

Комментарии • 433

  • @TheAIGuy
    @TheAIGuy  4 года назад +30

    Let me know if you guys have any issues that I can help with! YOLOv3 is awesome!

    • @eustathiosandr8090
      @eustathiosandr8090 4 года назад +4

      Hello, i would like to ask you two thinks.
      1. is there any way to run this command inside of a python script for a singe image?
      2. is there any way to get back the highlighted box(it's bounds) so we can cut it from the original image?
      Thank you in advance, great job!!

    • @TheAIGuy
      @TheAIGuy  4 года назад

      Eustathios Andr hey my most recent video does just this! Check out my “Object detection API” video and it will help you solve these

    • @manutyagi8019
      @manutyagi8019 4 года назад +2

      @@TheAIGuy hello sir I really enjoy watching your videos on object detection. I have a suggestion, make a video on how to use reinforcement learning on mobile/computer gaming apps

    • @TheAIGuy
      @TheAIGuy  4 года назад +1

      Manu Tyagi thanks! I will try and do this.

    • @woosal-kc7tr
      @woosal-kc7tr 4 года назад +1

      We do not have darknet.exe file?

  • @dangul5204
    @dangul5204 4 года назад +8

    This course is very detailed and helps me a lot. Thank you for sharing and looking forward to your update.

  • @mjaworsky2010
    @mjaworsky2010 4 года назад +2

    Thanks for publishing this. Very hard but valuable information to find.

  • @KannadaLofi
    @KannadaLofi 4 года назад

    Hi,
    I have trained a custom dataset of 10 classes and
    Once my training is done when I run map command, most of my class scores are zero. Could you please help me out

  • @Mvobrito
    @Mvobrito 4 года назад +5

    Thank you very much for this tutorial!
    I think a video about data augmentation(using imgaug python library) would be awesome. You could show the difference on the results of the yolo detector between the normal dataset and the augmented dataset.

  • @anupshrestha8362
    @anupshrestha8362 4 года назад

    Thanks this helped me for my project..
    Took me like 10 hrs to finish training the model..
    Looking forward to your YoloV4 Tutorial..
    Thanks again.. :)

  • @robwhall8907
    @robwhall8907 4 года назад +1

    Love the videos, thank you! I have run the training, twice. When I run the test, I get a photo but with no image detection. I've run the training on the Aircraft and Weapon dataset, and on my own dataset. Same result both times. When I run the test from your "YOLOv3 Object Detection with Darknet for Windows/Linux | Install and Run with GPU and OPENCV" video, everything works. I successfully compiled OpenCV with GPU support. I've double checked all my settings and files, and tried to run the test with thresh set to 0.2, as you mentioned in another comment. Still nothing. My training session ran about 5 hours on my RTX 2080 Super GPU. The final line from my training session is "4000: 0.000000, 0.000000 avg loss, 0.000010 rate, 4.989000 seconds, 256000 images, 0.099551 hours left". If you have any insights as to why my training doesn't seem to work I would really appreciate hearing them. Thanks!

  • @akshayjaryal8930
    @akshayjaryal8930 4 года назад

    Awesome explaination......Please post video of custom object training using YOLOv4.........much needed!

  • @ruthwikreddy1218
    @ruthwikreddy1218 3 года назад +1

    while I was running the model for training the weights got loaded but after that I got this errorr:
    608 x 608
    Create 6 permanent cpu-threads
    used slow CUDNN algo without Workspace! Need memory: 23293408, available: 7208960
    Error: cuDNN isn't found FWD algo for convolution.
    can anybody help me with this, please.
    [ i tried changing batch size and sub-divisions but didn't work ]

  • @aniketshinde9063
    @aniketshinde9063 4 года назад +1

    Thank you so much. I really appreciate your hard work.
    Just FYI, people who are struggling GPU enabled training (CUDA compiler not detected in Cmake), I finally found the solution.
    You need to add to path : OpenCV/build/release

    • @TheAIGuy
      @TheAIGuy  4 года назад

      Aniket Shinde thanks for this tip!!

    • @hecate3360
      @hecate3360 4 года назад

      What should I do if I dont' have a release folder in the build folder?

  • @bhagyashreekoragi
    @bhagyashreekoragi 3 года назад +1

    After I had run the model for training I could see the class_loss, iou_loss, total_loss on float values. After few minutes that values are -nan. What does this mean?

  • @rahuldass4882
    @rahuldass4882 4 года назад +2

    I'm really enjoying your object detection series! Question: is there any way to leverage multiple GPUs for training (larger) custom datasets?

    • @rahuldass4882
      @rahuldass4882 4 года назад +1

      Nvm, it's on Joseph's website: pjreddie.com/darknet/yolo/
      $ ./darknet detector train cfg/coco.data cfg/yolov3.cfg darknet53.conv.74 -gpus 0,1,2,3

  • @akshayjaryal8930
    @akshayjaryal8930 4 года назад

    Thanks for the tutorial easy and crisp tutorial! Looking for more updates using the YOLOv4 version.

  • @robertjimenez5513
    @robertjimenez5513 Год назад

    when updating cfg file for training, is the number of classes equal to the new classes I want the model to learn (1 new class in my case) or all classes the model should detect post-training (80 pre-trained coco classes + 1 new class I want to add/train)?
    After training, would the model still be able to detect previously trained objects (all 80 object plus the 1 new one)? After training is complete, do i use the cfg file i used for training to detect objects (80 coco classes + the 1 new one I added)?

  • @Lasheen419
    @Lasheen419 4 года назад

    Great video once again. I coded along even though my mac doesn't have a GPU, will use this to run this in colab.
    What laptop are you running this on?

  • @matthewlee1742
    @matthewlee1742 4 года назад +3

    Thanks for the video, but for some reason, after I ran the detector after following all the steps, my test images did not detect anything. Could you please help me out, my test images are (1920x1080)

  • @marctrabado8996
    @marctrabado8996 3 года назад

    This is so cool. Thanks for the video!

  • @samflynn6004
    @samflynn6004 4 года назад +1

    Why do we need to specify the data set when running the test when we have already trained the model? Shouldn't the weights and config file be enough? Example: ./darknet detector test cfg/coco.data cfg/yolov3.cfg yolov3.weights data/dog.jpg

  • @achyutmorbekar189
    @achyutmorbekar189 4 года назад +2

    How to interface/GUI yolo object detection using Django? please help...thanks.

  • @janmarttenedora6829
    @janmarttenedora6829 4 года назад +2

    Hey AI Guy, if I wanted to train the model using a new set of images, whilst still trying to detect the same classes, is it possible to use the final weights from a previous run? E.g. ./darknet.exe detector train data/obj.data cfg/yolov3-custom.cfg yolov3-custom_final.weights ?

  • @ytbplay2
    @ytbplay2 4 года назад +1

    I want to train 10 classes. On each image I create some box of 2,3 or 4 classes (it can be the same or different class). But when I train, yolo show error like this:
    Wrong annotation: class_id = 1. But class_id should be [from 0 to 0]
    Wrong annotation: class_id = 2. But class_id should be [from 0 to 0]
    ...
    Please tell me what am I wrong.

  • @woodandwonders
    @woodandwonders 4 года назад +2

    Hey Ai Guy, Thanks so much for your tutorials, during this lockdown I have gone from never coding in my life, never even thinking about how computers work, to now having a pretty good grasp on object detection, trained my own model, played around with tiny yolo and setting it up on my raspberry pi, so a big thank you. But one question- How would you use the detection to trigger some sort of event. Like if dog detected print woof. I had a play with it, but any guidance appreciated.
    Keep doing what you're doing!

    • @nedelcucosmin9770
      @nedelcucosmin9770 3 года назад

      Can you please tell me how you run this on a raspberry pi? Please, please, please

    • @kamleshmore1cr
      @kamleshmore1cr Год назад

      Weapon detection YoloV4 please

  • @dennisasamoah2213
    @dennisasamoah2213 4 года назад

    really clear , thanks for your awesome work

  • @runawayforeskin431
    @runawayforeskin431 3 года назад

    Hey man, if I were to change the width and height of the images in the config file to 608 by 608 or something like that, will it screw up some other configurations or can i just train it with that.

  • @lqv3223
    @lqv3223 4 года назад

    I want only a subset of classes present on the default coco.names list. I keep getting a lot of wrong predictions (most bottles = toothbrush) . Is there a way I can blacklist/remove certain classes from the list?

  • @Troliste
    @Troliste 4 года назад

    what if i have many classes ? it should be data/*/*.jpg right ? and i change number of classes=mynumber for example

  • @pavancheyutha3228
    @pavancheyutha3228 2 года назад

    hey I am running with 1 class. I got this error. Error: l.outputs == params.inputs
    filters= in the [convolutional]-layer doesn't correspond to classes= or mask= in [yolo]-layer

  • @ayansmile
    @ayansmile 3 года назад

    Hi Thank you for the video...one quick question. Can we use this method in Production as work ? Specially the downloading and training yolo weights from darknet ?

  • @badcode8037
    @badcode8037 4 года назад +1

    I annotated 80% train images and 20% test images and stored in 2 folders named- train and test. I ran the code and generated train.txt and test.txt . There is no use of test images and their annotation files, only train images are being taken and used. What do I do with the test images?

  • @ternjiachie9167
    @ternjiachie9167 Год назад

    may i know how do i add the confidence score at the predicted image ? because i saw it appear in the video prediction only. as well how to do cross validation on the yolov3 and show the result through graph like the precision, recall rate and the average precision in the program. thanks in advanced

  • @aysebeyzaunal3472
    @aysebeyzaunal3472 2 года назад

    why for the filters we have to do (classes +5)*3 ? where did come from this formule?

  • @mangkhongsai9029
    @mangkhongsai9029 2 года назад

    My computer doesn't support or have gpu support graphic card , can i still install darknet in the computer for working with yolov3?

  • @rishabkhantwal7193
    @rishabkhantwal7193 4 года назад +1

    when i wrote the lat command of train,it is showing couldn't open data/train.txt. help me

  • @mumtazprima2959
    @mumtazprima2959 3 года назад

    hey excuse me but please help me if i got eror like this
    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'
    what should i do ? please i need it for my final task at university thankyou very much

  • @xxxdarksasukexxx3221
    @xxxdarksasukexxx3221 4 года назад +1

    Hey for some reason everything goes well until 19:20 I don't have the chart popping on my screen. Nothing happens for a few minutes on the powershell and I get a "calloc error". I've tried to put subdivision to 126 but it still give me the error... (and no chart).
    Got 8Gb on Ram

    • @TheAIGuy
      @TheAIGuy  4 года назад +2

      I have never seen that error before. I would double check your .cfg file because 126 should not be a number you use for subdivisions. You can always check out my "Yolov3 in the cloud" video as it will always work for training a custom yolov3

  • @swatijagtap2192
    @swatijagtap2192 3 года назад

    Thank you so much for excellent tutorial. Please upload the tutorials of object detection with SSD and DETR.

  • @michaelroditis1952
    @michaelroditis1952 4 года назад +1

    I'm not sure if this question will be answered further in to the video.. But when you say number of classes do you mean each picture/txt file? And if yes do we include pictures that are in the file and do not have a txt file or should I delete those?

    • @TheAIGuy
      @TheAIGuy  4 года назад

      Number of classes refers to how many different objects your model will be able to detect. Example if I'm creating a model to detect cats and dogs then I have two classes. Does this make sense?

  • @001_afshanmassarat9
    @001_afshanmassarat9 3 года назад

    Hii Al Guy... I am facing an error at the following lines:
    model_filename = 'model_data/mars-small128.pb'
    encoder = gdet.create_box_encoder(model_filename, batch_size=1)
    the error is :
    NotFoundError: model_data/mars-small128.pb; No such file or directory
    I tried to change the directory(cd) to 'deep_sort' as well, but still got the same error.
    May u please help me

  • @valeriiakulakova7852
    @valeriiakulakova7852 3 года назад

    Is it possible to use pycharm for implementation? Seems like I don’t have darknet.exe . Can be the reason for this? Thanks for answer

  • @papabudzz
    @papabudzz 4 года назад

    I do have my custom dataset already labeled and so i didn't download the OIDv4 toolkit, I just placed my custom dataset in the data/obj folder and then followed every step until I got an error in the training part. The chart popped out and it shows "not responding". Can you help me with this?

  • @saicharan9701
    @saicharan9701 4 года назад

    @The AI Guy
    please help me out. I am facing an error when I run the command to train my model.
    it says:
    This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
    I've installed the latest QT. Still, it is throwing the error. please help mee

  • @pankajkushwaha3793
    @pankajkushwaha3793 3 года назад

    Hi Ai Guy,
    Thanks for wonderful tutorial , it was really helpful I followed it and previous one also to collect custom data , now its training :).
    I had a doubt if you can clarify , here we are taking pretrain yolo weight and updating as per our new class . will it be a good idea to freez yolo weight , add our own layer on top and train those layer only ? and is this facility available in darknet to add our own convolution layer ?

  • @scenesailor9186
    @scenesailor9186 4 года назад

    Hey can you tell me how to incorporate the code for a warning message if a detected object is static for more than suppose 5min, in the existing code. Please let me know . Have already done detection of baggage for custom data set in a video. Thanks for that.....

  • @ebubekirgoney4253
    @ebubekirgoney4253 2 года назад

    Please help me! I have one problem:
    ./darknet.exe : The term './darknet.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Ch
    eck the spelling of the name, or if a path was included, verify that the path is correct and try again.

  • @siddhantshete1744
    @siddhantshete1744 3 года назад

    I"m unable to run the darknet command. As darknet.exe file is not available in my folder. So what command hsould i follow in linux to run the command.

  • @alberthe5184
    @alberthe5184 4 года назад +1

    thank you man for sharing this tutorial

  • @beomseokpark1500
    @beomseokpark1500 4 года назад

    On window prompt, when I run
    "darknet.exe detector train data/obj.data cfg/yolov3-custom.cfg darknet53.conv.74"
    It says
    "GPU isn't used
    opencv isn't used -data augmentation will be slow"
    then it runs nothing.
    To be honest, I haven't installed cuda because my laptop has intel uhd.
    Without cuda, can't I train yolov3?
    And speaking of opencv, I tried install opencv source following The AI Guy's other video but I failed to install.
    Does it have to do with training yolo

    • @sarahch8878
      @sarahch8878 3 года назад

      I'm actually train without CUDA, it is ok for the moment but it is sloooooooww !

  • @SFORSANDEEP
    @SFORSANDEEP 3 года назад

    Actually my requirement is little strange.. I have a requirement of counting all walnuts placed on a table along with some other dry fruits.. COuld you please help me if my object is not in existng dataset. For example if I am trying to find a special snack from other snacks, is it possible for me to train the system to find that custom item?

  • @aysebeyzaunal3472
    @aysebeyzaunal3472 2 года назад

    hello, i want to train my model in kaggle is it the same command that you are using in this video?

  • @TK-ke3nv
    @TK-ke3nv 4 года назад +1

    @ The AI Guy When I try to test image it is working fine. But I try video I am getting error --> Done! Loaded 107 layers from weights-file
    Cannot load image videoplayback.mp4
    Detection layer: 82 - type = 27
    Detection layer: 94 - type = 27
    Detection layer: 106 - type = 27
    videoplayback.mp4: Predicted in 12.513000 milli-seconds.
    ^C
    Do you have any idea about this?
    OS: Ubuntu 18.04
    CUDA: 10.2
    CuDnn: 7.6

    • @TheAIGuy
      @TheAIGuy  4 года назад +1

      Thejesh kumar are you making sure that your are running the proper command for video? It is not the same command as images.

    • @TK-ke3nv
      @TK-ke3nv 4 года назад +1

      The AI Guy Yes. Thank you! It’s working now :)

  • @onyinyechichukwuma689
    @onyinyechichukwuma689 3 года назад

    You have really helped me, thank you :)

  • @tonypendletoniii3209
    @tonypendletoniii3209 3 года назад

    Does anyone know a way to quantify the accuracy of the model using Darknet commands? I am interested in producing a ROC curve to focus on limiting the amount of false negatives of a particular class

  • @ogedaykhan9909
    @ogedaykhan9909 4 года назад

    Hi thanks for the video. I have two questions
    - The chart gave not responding error and showed nothing but an empty chart. How can I fix that?
    - My shell is not refreshing so fast like yours. It takes ~15 seconds to print the next loss. Is it normal ?
    Thanks in advance

  • @natashakulkarni5613
    @natashakulkarni5613 4 года назад

    Hey i want to build a hand gesture detection model using yolov3. Is it possible ? I also want to convert the model to .h5 format as i'll be using it in an ios app. How do i approach ? If i train the train the model using the approach used in this video, will i be able to convert it to .h5 format later? Do you have any suggestions ?

  • @vikassubhsashkait9997
    @vikassubhsashkait9997 4 года назад

    I am able to get the coordinate in the ubuntu terminal using flag "-ext_output".
    Is there any python script to get the bounding box coordinate of detected object and crop them?

  • @ishuman
    @ishuman 4 года назад +1

    I am running command and error is occurring :
    pthreadVC2.dll: cannot open shared object file: No such file or directory

    • @TheAIGuy
      @TheAIGuy  4 года назад

      copy the dll file from darknet/3rdparty/pthreads into the darknet folder and that should fix it!

  • @snehitvaddi
    @snehitvaddi 4 года назад +3

    Getting this error " ObjectNotFound: (.\darknet.exe:String) [], CommandNotFoundExc
    eption ". I think this mean darknet.exe is not there.

    • @kr1spybac0n
      @kr1spybac0n 4 года назад +1

      I have the same problem. darknet.exe is not in the repository

    • @maziarkasaeiroodsari6473
      @maziarkasaeiroodsari6473 4 года назад

      @@kr1spybac0n You need to install it first. He has another video on it.

  • @yongyiksheng684
    @yongyiksheng684 4 года назад

    I'm getting this error when i tried to train my model:
    cannot load image" "
    STB reason: can't fopen
    I followed the tutorial exactly, just that i'm using a different dataset. Plz help!! Thanks

  • @vikassubhsashkait9997
    @vikassubhsashkait9997 4 года назад

    sir i got new issue while testing:
    1> Insted of image i have image bytes (base 64 encoded) with me is there any way to deal with this.
    2> How to crop detected objects.
    Thanks in advance

  • @tunaakyol2579
    @tunaakyol2579 4 года назад +1

    Great tutorial!! Which GPU did u use for the train? How much fps are u getting while playing a video? And how can I increase the fps ?

    • @TheAIGuy
      @TheAIGuy  4 года назад

      the GPU on my computer is an Nvidia GTX 1650, which isn't very strong. I was able to manage about 12 FPS on live video, I know of stronger GPUs who can get up to 30 FPS.

    • @tunaakyol2579
      @tunaakyol2579 4 года назад +1

      @@TheAIGuy Did u try Nvidia Deep stream for increasing the fps? or TensorRT model instead of normal Tensorflow model

    • @TheAIGuy
      @TheAIGuy  4 года назад +1

      Tuna Akyol no i havent, if you try it and it works well let me know! Thanks.

    • @nicoleiva5498
      @nicoleiva5498 4 года назад +1

      @@TheAIGuy This is a great approach for object detection but not so good for object tracking in real time because you are predicting in each frame. You could make a video using Kalman Filter for example to increase fps. Thanks for the video

    • @TheAIGuy
      @TheAIGuy  4 года назад +2

      @@nicoleiva5498 I have a video on using yolo and deepsort for object tracking! Deepsort already has kalman filters built in!. Thanks for the suggestions and check it out.

  • @nikhilagarwal_dna
    @nikhilagarwal_dna 4 года назад

    While going through the original website, I saw that 'make' command which didn't run in my Windows 10, So can you please help me with that Sir.

  • @fabioinspires
    @fabioinspires 4 года назад +1

    I'm getting wrong annotations for the yolo labels. example Class Pig "212" instead of 0 to 1 range

    • @fabioinspires
      @fabioinspires 4 года назад +1

      I figure it out. I'm using anaconda as python env and many of the packages didn't get downloaded properly, so I looked inside the requirement.txt and manual installed the packages. Now my labels are showing up with values between 0 and 1.

    • @TheAIGuy
      @TheAIGuy  4 года назад +1

      @@fabioinspires Glad you figured it out and thanks for sharing how you solved it!

  • @aaravpatel4478
    @aaravpatel4478 3 года назад

    How can I pause training, change the batch size, and resume training using the same loss curve?

  • @gauravsharma_5217
    @gauravsharma_5217 3 месяца назад

    I am getting ./darknet the term is not recognized as internal or external command error

  • @sarahch8878
    @sarahch8878 3 года назад

    Hello, thank you for these tuto !!! I had a big problem with cmake and build, install the darknet, so i desactivate CUDA, and it works, I'm actually training the darknet with my custom yolo datasets, but it takes a loooot of time, it is 25*GPU ! But no choise because I had a one week strugling to have darnet.exe.. my question is, if I take the weight file obtained after days of training on CPU, and put them in the yolo DeepSORT code, will it work without problem ??? someone had testing this ? thanks in advance.

  • @lukeblanche6096
    @lukeblanche6096 4 года назад +1

    Hey, my network has been trained but when I try test it on an image it runs fine and tells me that a prediction has been made but no values appear, the prediction.jpg pops up but is just the image normal image(no bounding box or prediction) any ideas on what the problem may be ?

  • @solomonnimrud9627
    @solomonnimrud9627 4 года назад +1

    When you run 28:42, it loads the weights then shows a new window called predictions with the image in it, is there a way to straightly detect the image without making the "predictions" window pop up?

    • @TheAIGuy
      @TheAIGuy  4 года назад +2

      Yes you can run the detection command with the flag "-dont_show" added to the end. This will not pop up the image.

    • @solomonnimrud9627
      @solomonnimrud9627 4 года назад

      Thanks!

  • @lucasb6517
    @lucasb6517 4 года назад +3

    when i performed the final testing with a random image from google, I got an error saying:
    Cannot load image "data/obj.data"
    has anyone encountered this problem?

    • @TheAIGuy
      @TheAIGuy  4 года назад +2

      Lucas B what command were you usung for testing?

    • @lucasb6517
      @lucasb6517 4 года назад +2

      @@TheAIGuy just the command listed: ./darknet.exe test data/obj.data cfg/yolov3.cfg backup/yolov3-custom.weights test1.jpg

    • @TheAIGuy
      @TheAIGuy  4 года назад +2

      @@lucasb6517 the proper command is "./darknet.exe detector test..." don't forget the detector part

    • @lucasb6517
      @lucasb6517 4 года назад +3

      @@TheAIGuy thanks man, I'm as blind as a bat haha I can't believe I missed that but it works now!

    • @TheAIGuy
      @TheAIGuy  4 года назад +2

      @@lucasb6517 haha no worries. Glad you got it working!

  • @muhammadharoon3336
    @muhammadharoon3336 4 года назад +1

    when i start training i get segmentation fault and training process stops. what should i do?

    • @TheAIGuy
      @TheAIGuy  4 года назад +1

      Probably an error with memory. Try reducing batch size and increasing subdivision size in your .cfg

    • @TheAIGuy
      @TheAIGuy  4 года назад +1

      reduce or increase batch and subdivisions by multiples by halving or doubling

    • @muhammadharoon3336
      @muhammadharoon3336 4 года назад

      The AI Guy thanks for replying i will let you know after trying again

  • @cyd9469
    @cyd9469 2 года назад

    Is there any difference in the process if we want to train a yolov4 model?

  • @vladlica1440
    @vladlica1440 4 года назад +1

    Thanks for the great video! I have one question: I trained my custom object detector for two classes: koala and tiger. If I want to add a new class (lion) can I use the weights from the already trained object detector? If yes, I'll have to change the number of classes to 3, the max_batches to 6000 and all the other changes to fit 3 classes or can I set only to the new class to not run 6000 iterations ?

    • @TheAIGuy
      @TheAIGuy  4 года назад +1

      As of right now I don't believe there is a way to add on a class to an already trained model. Since all the configurations in the cfg are different for both models. I know it is annoying but you might have to retrain with the new class from scratch.

    • @vladlica1440
      @vladlica1440 4 года назад

      @@TheAIGuy Thanks for The answer! I have another question: when i use my obiect detector for an image is there a way to save the result ( image with bounding boxes) as it happens for a video?

  • @sameerahmed1570
    @sameerahmed1570 4 года назад

    Sir i use google colab for training but i face this kind of issue kindly Resolve it . First section must be [net] or [network]: Invalid argument
    darknet: ./src/utils.c:256: error: Assertion `0' failed.

  • @nourhanelaraby8295
    @nourhanelaraby8295 4 года назад +1

    I followed the same steps but a msg appeared in cmd couldnt open file :data/obj.data
    Second question i had a gpu tesla k40 (my computer works on windows not linux)i am working on my cpu till now

    • @TheAIGuy
      @TheAIGuy  4 года назад

      Nourhan Elaraby did you create the obj.data file and make sure its in the data folder? It can’t seem to find it. You should be able to gpu enable this training.

  • @joelmathew7998
    @joelmathew7998 4 года назад +1

    Firstly, thanks a ton for these videos.
    when does calculating anchors become necessary? I wish to train a model to detect potholes and previously i had to calculate anchors and also didn't use previously trained weights. Are these two things essential before i start training?

    • @TheAIGuy
      @TheAIGuy  4 года назад +1

      @c j Generating anchors is not essential, you can do it if you are super familiar with neural detection networks but I usually recommend using the default anchors. As for training with pretrained weights this helps to speed up convergence of you model(proper predictions) and provides better accuracy usually. Let me know if you have more questions!

    • @joelmathew7998
      @joelmathew7998 4 года назад +1

      @@TheAIGuy thank you for the quick response.

    • @joelmathew7998
      @joelmathew7998 4 года назад +1

      Should i be training a yolo tiny model if i actually want to run the model in a mobile device ??

    • @TheAIGuy
      @TheAIGuy  4 года назад

      @@joelmathew7998 Yes if you are aiming to have it on mobile then tiny yolo is recommended since it is significantly smaller in size! Let me know if you have questions on configuration for tiny yolo and I can help.

    • @joelmathew7998
      @joelmathew7998 4 года назад +1

      @@TheAIGuy can i use the same pre-trained weights used for yolo ( .conv.74 file)?

  • @kyreekm
    @kyreekm 2 года назад

    Hi I’m just assuming I can but if I follow these steps I can also do this in Ubuntu? I will try wish me luck

  • @Relltay
    @Relltay 4 года назад +2

    I think I might have to download Darknet

  • @CrazyCodeLaughs
    @CrazyCodeLaughs 4 года назад

    I have trained yolov4 weights by instructions provided in your videos and github repository. how can we use yolov4 weights instead of yolov3 in object detection api? hoping for response. thanks in advance

  • @CoolshrimpModz
    @CoolshrimpModz Год назад

    Im stuck at CMake for past few days.
    i get an error :
    "CUDA_PATH: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1
    CUDACXX:
    CMake Error at CMakeLists.txt:156 (message):
    CUDA not found, please build explicitly with -DENABLE_CUDA=OFF if you do not want CUDA."
    I have both CUDA Toolkit 10.1 and 11.1 installed and System variables set.
    CUDA_PATH: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1
    CUDA_PATH_V10_1: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1
    if i remove CUDA and Open CV it will build it just runs slowly on cpu.
    any suggestions or can you share a compiled exe with CUDA and openCV enabled that i could download?

    • @CoolshrimpModz
      @CoolshrimpModz Год назад

      i fixed it by removing all cuda and reinstalling 10.8

  • @dawnlight_
    @dawnlight_ 4 года назад +2

    How would you go about testing/validating your custom detector's accuracy and/or performance?
    Edit: Wording

    • @TheAIGuy
      @TheAIGuy  4 года назад

      you can create a small testing dataset of images and then have a file similar to train.txt but called test.txt or valid.txt. Then when you run your training add the flag "-map" to the end of your "darknet detector train..." command. The chart image showing loss will now also show average precision.

  • @nedelcucosmin9770
    @nedelcucosmin9770 3 года назад

    Hello, I do not have a GPU, just a CPU and I want to train more than 20 classes of objects but for every iteration it took me 27 minutes avg :( .. How can I do to have my classes trained ? :(

  • @tejasnareshsuvarna7948
    @tejasnareshsuvarna7948 4 года назад +1

    I am training on a dataset of 400 images of only 1 class. I am using an Intel i5 6th generation 3.3GHz quad core CPU. It's been a day since I am training and it has only reached only 126 iterations and didn't seem to end. It also has a very high total loss of 150. Please help 😕

    • @TheAIGuy
      @TheAIGuy  4 года назад +1

      Tejas Naresh Suvarna this is probably due to a CPU limitation, check out my “Yolov3 in the cloud...” video in order to do this exact same tutorial on a free cloud GPU. It will train much much faster!

  • @tedp9146
    @tedp9146 4 года назад +1

    Hey, nice video. Do you also get the information how many objects where detected in one image/frame?

    • @TheAIGuy
      @TheAIGuy  4 года назад +1

      You can get some information about the detections by adding the flag "-ext_output" to the end of the detection test command.

  • @onyinyechichukwuma689
    @onyinyechichukwuma689 3 года назад +1

    Super duper helpful :D

  • @ankurverma1631
    @ankurverma1631 4 года назад

    Hey AI Guy, Thanks so much for the exhaustive and elaborate video. I am new to Image Processing and AI and your video helped me very much to kickstart. I have been working on a POC for object detection where one of the model types is Threat detection as you captured that in your video. Also for setting up darknet without graphics what different steps i need to perfor. Also I am wondering if you can help me with the model classes for threat detection. I am working on the other models. It's a bit urgent so asked you for that. Would be grateful for your help.

  • @piqieme
    @piqieme 4 года назад

    Sorry, im new to deep learning although my final project is about deep learning 😭 . Btw, i would like to ask. Can darknet distinguish between jumping and walking etc. I mean, can it distinguish between different behavior when trained?

  • @jing7253
    @jing7253 4 года назад +2

    after running the darknet command, when reached trying to save the weight file, i got the following error message
    Saving weights to /backup//yolov3-custom_last.weights
    Couldn't open file: /backup//up;pv3-custom_last.weights
    running it as administrator, the backup folder is empty
    the only different i can find is your video is showing 'backup//' but mine is showing '/backup//', not sure where did i setup wrongly. i had try to redo several time, still the same
    anyone can help??

    • @TheAIGuy
      @TheAIGuy  4 года назад

      in your train.txt folder what does your backup line look like? Make sure you have the backup folder created and is in root folder . I have gotten this before when I didn't have backup folder or it was in wrong place.

    • @jing7253
      @jing7253 4 года назад +1

      Created the backup folder inside darknet folder. Is this OK?

    • @TheAIGuy
      @TheAIGuy  4 года назад

      @@jing7253 yup that is what i meant. In your train.txt make the backup line "backup=backup" and see if that works

    • @TheAIGuy
      @TheAIGuy  4 года назад

      @@jing7253 that should stop the doubles slashes from appearing and hopefully work

    • @jing7253
      @jing7253 4 года назад +1

      I tried remove the /, still the same. But didn't try remove the space beside the =, will try it later, thanks

  • @JoelPrabhod
    @JoelPrabhod 4 года назад

    Your videos are a great help and information to learn. Would you do a pruning yolov3 video? How to prune a yolov3 model?

  • @michaelroditis1952
    @michaelroditis1952 4 года назад +3

    The following message is showing up:
    "GPU isn't used
    OpenCV isn't used - data increase will run slowly"
    Does anybody know why?
    I do have GPU

    • @TheAIGuy
      @TheAIGuy  4 года назад

      What type of GPU do you have?

    • @michaelroditis1952
      @michaelroditis1952 4 года назад

      @@TheAIGuy It's geforce gtx 1080.
      What should I do?

    • @hrishikeshsatarkar4266
      @hrishikeshsatarkar4266 4 года назад +2

      first : make sure u have cuda installed
      second :make sure u have cudnn installed
      third :make changes in makefile i.e do GPU=1 and cudnn=1
      foruth :Recompile it ie re build the darknet ie make it
      fifth : sit back relaxed and watch ur GPU working

    • @michaelroditis1952
      @michaelroditis1952 4 года назад

      @@hrishikeshsatarkar4266 I did all that but for some reason I still have the same problem :'(

    • @hrishikeshsatarkar4266
      @hrishikeshsatarkar4266 4 года назад +1

      Iu u r using linux platform check which gpu is been used whether the integrated one or nvidia one by nvidia-smi

  • @matkoschlebikom3630
    @matkoschlebikom3630 4 года назад +1

    hello i need help, i successfully installed darknet and everything works well.
    And I need to get this detection into my own code where there will be other parts than voice recognition, as there should be such object recognition using darknet

    • @TheAIGuy
      @TheAIGuy  4 года назад

      Martin Gelo check out my most recent video! It shows you how to run detections in your own code as APIs.

  • @rakshitht6941
    @rakshitht6941 4 года назад

    it says Not compiled with OpenCV when run the output command plz help me

  • @brandyjerezquijano2361
    @brandyjerezquijano2361 4 года назад +1

    i am training 5 classes on cpu(intel core i7-5500 2.4Ghz) 8gb ram. how many pictures should i train per classes to have good result? and how long will it take to finish?

    • @TheAIGuy
      @TheAIGuy  4 года назад +1

      Brandy Quijano i would recommend having atleast 300 images per class, the more the better though. It will probably take around 8 hours to train. I recommend watching my “Yolov3 in the cloud” video to see how to train in the cloud with a free gpu and its faster.

  • @mooncakezzzzz
    @mooncakezzzzz 4 года назад +1

    @The AI Guy Hello there, thank you for this awesome video, I really appreciate it. After checking out this video I was able to create few YOLOv3 custom object detectors. I am quite new to object detection. There is something that I have been struggling with. After creating two or more YOLOv3 custom object detectors, how do you compare which one is better? Like how to make evaluation (mAP results) between two custom object detectors?
    Also, when running a test, how do you test your whole dataset, and not just a single image? I have created 'valid = data/test.txt' in 'obj.data' and I have my 'test.txt' file with all the image paths ('data/obj/00088f27177a598c.jpg' and so on) under 'data' folder (just as shown in the video) but whenever I run: './darknet.exe detector test data/obj.data cfg/yolov3-custom.cfg backup/yolov3-custom_last.weights' i keep getting the same msg: 'specify image path'. If I copy paste image path ('data/obj/00088f27177a598c.jpg') from 'test.txt' when asked to 'specify image path' it works normally, but then again it is just for one image. Tried pasting all paths but it did not work.
    When doing the same for training it works perfectly, when doing testing it seems that it can not find the image path even though I do the steps I mentioned above. I need it for a research so help would be greatly appreciated.

  • @khadijatulkobra189
    @khadijatulkobra189 4 года назад +1

    train.txt file is created but there is no labels included in it. Can you please help me with it?

    • @TheAIGuy
      @TheAIGuy  4 года назад

      There should not be any labels in train.txt. It should only have the paths to image files.

  • @binlu1981
    @binlu1981 4 года назад

    Thanks for your video, and I have question here. I trained my model with 10 categories, and now I want to add the 11th category in my model, if there any method I can do?

  • @tusharnitharwal
    @tusharnitharwal 3 года назад

    How do I manipulate the layers using this? I mean how do I freeze certain layers?

  • @achyutmorbekar189
    @achyutmorbekar189 4 года назад +1

    I'm getting error while running convert_annotations.py
    please help
    Currently in subdirectory: train
    Converting annotations for class: Tomato
    Traceback (most recent call last):
    File "convert_annotations.py", line 60, in
    os.chdir("Label")
    FileNotFoundError: [Errno 2] No such file or directory: 'Label'

    • @TheAIGuy
      @TheAIGuy  4 года назад

      achyut morbekar this means the generating the dataset probably didnt work if the original annotations werent made, is there a label folder that has txt files in it?

    • @TheAIGuy
      @TheAIGuy  4 года назад

      achyut morbekar and can you see the images downloaded from the toolkit?

    • @achyutmorbekar189
      @achyutmorbekar189 4 года назад +1

      @@TheAIGuy thanks for replying. I got that error. Actually I've got my leaf disease dataset and I used LabelImg tool for annotation, but .xml file are generated not .txt. can you please help me how to generate Label folder and .txt file

    • @TheAIGuy
      @TheAIGuy  4 года назад +1

      achyut morbekar in labelmg you can click on where it says “voc” and this will now save them as yolo txt files

    • @TheAIGuy
      @TheAIGuy  4 года назад +1

      achyut morbekar you will want to go into labelimg and resave the annotations as yolo style, you wont need convert_annotations.py if you do thid

  • @tommytalesmagic
    @tommytalesmagic 4 года назад

    what if the diagram average los wont open but it still trains?

  • @nicoleiva5498
    @nicoleiva5498 4 года назад +1

    Is there a way to plot validation too? So I can see of the model overfited. Thanks

    • @TheAIGuy
      @TheAIGuy  4 года назад +1

      Yes you can create a test.txt of similar format to train.txt but with fewer images. There is a special map command you can run to see validation. Refer to the official alexeyab/darknet repository to see the exact command!

  • @jrg3213
    @jrg3213 4 года назад

    the plot is not appearing under linux, assuming it's not an issue?

  • @faezemm5157
    @faezemm5157 3 года назад

    thank you for your tutorials, could you please help me in drawing loss and mAP chart, I can't find chart.png path for showing!!