How to Train YOLOv4 on a Custom Dataset in Darknet

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

ความคิดเห็น • 66

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

    I have to admit, when I first started watching this I thought to myself "ugh, another AWS overpriced solution". But no, this is actually awesome. You've saved me a ton of hours in getting the data ready for our own models - new subscriber AND customer!

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

    i have taked erorr: "/bin/bash: ./darknet: No such file or directory"

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

      Please create an issue at github.com/roboflow-ai/notebooks and describe your problem. We will try to help you out :)

    • @rusugabriel2554
      @rusugabriel2554 ปีที่แล้ว

      have you fixed the error ?

    • @dribletdrop7959
      @dribletdrop7959 ปีที่แล้ว

      @@rusugabriel2554, unfortunately no, i stopped using roboflow, here is my solution :)

  • @muhamadsyaepulhuda2735
    @muhamadsyaepulhuda2735 ปีที่แล้ว

    i got issue on 10:14
    compilation terminated due to -Wfatal-errors.
    make: *** [Makefile:144: obj/convolutional_layer.o] Error 1

  • @sevenscapes
    @sevenscapes 3 หลายเดือนก่อน

    Hi there,
    Can Yolo model v4 be trained on mac with m2 chips?

  • @farahkhan1128
    @farahkhan1128 ปีที่แล้ว

    can you do age prediction by facial feature recognition using yolo v4

  • @ナタファス
    @ナタファス ปีที่แล้ว +1

    Hi I have some problems I use custom data on roboflow when I'm training it have errors path directory not have ,how i can fix this problem

  • @alastrareymart6394
    @alastrareymart6394 ปีที่แล้ว

    Goof afternoon sir...sir I would like to ask on how you installed your pip requirements using google colab,,because I followed your tutorial but I have encounter some error in converting yolo to tflite model

  • @BrunoMartins-qv7vo
    @BrunoMartins-qv7vo 2 ปีที่แล้ว +3

    i got this error "error: ‘CUDNN_CONVOLUTION_FWD_PREFER_FASTEST’ undeclared (first use in this function); did you mean ‘CUDNN_CONVOLUTION_BWD_FILTER_ALGO_3’?" when i run "!make". Someone knows how to solve this?

  • @永豐高中教務劉信傑
    @永豐高中教務劉信傑 3 ปีที่แล้ว

    Thanks you share the procedure,.
    I've the question is that could I use the weights on video?

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

    Thanks a lot for allowing so many to get their feet wet with visuals.
    Just starting of with integrating it into our existing solutions.
    QUESTION:
    How do I change/reduce the file size of the generated .weigths file?
    Which factores do control it and where can I change them?

  • @bintangrahardjoputra1525
    @bintangrahardjoputra1525 ปีที่แล้ว

    Hi, thanks for the great explanation. Is there any chance that we can see the accuracy of the model (YOLO v4) after the training process done? thank you

  • @blueming2049
    @blueming2049 2 ปีที่แล้ว +1

    now the colab has changed, the code inside the colab notebook provided unable to run completely already. Is there anyone is currently doing yolov4 with this colab notebook but can run completely ?

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

    /bin/bash: line 1: ./darknet: No such file or directory

    • @ghostwalid1534
      @ghostwalid1534 7 หลายเดือนก่อน

      i have the same problem, did you found the solution?

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

    Thanks for the great videos.
    you Rock!!!

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

    How to upload the data directly without using your Roboflow app. Because in Roboflow, I cannot split my train, Val, and test sets category-wise if the data is imbalanced. Not sure how your build custom model did not take that into consideration.

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

    Once we've got our (trained) best weights, how can we use them on unseen data of the same kind just for testing? And can inference be tested on multiple images simultaneously?

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

    @Roboflow Should I training the model again if I make augmentation on the dataset, Where the model has been trained on an original dataset before?

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

      Yes. Consider starting training from the checkpoint of the model trained on your original images.

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

    thanks for the great video
    how did u change the image @19:23 ?

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

    hello bro, can we use tensorboard for yolov4?

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

    Thank you for your easy to follow videos:). Please I have a question. Why do we have to pre-structure the train and validation images before running the training? Can't we implement k-fold cross validation on yolo during the training?
    Most of the tutorials that i have found in yolo whether v3, v4 or v5 has the train and validation folders already setup. Thanks for your response. Am really curious about this.

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

      Yes, you should have a validation set already split apart! In the video you can see how Roboflow will automatically split your data for you.

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

      @@Roboflow Yes i saw in the video, that the split was done by Roboflow.
      Is it possible to do the split using k-fold Cross validation during training rather than using Roboflow for the split?

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

      @@iposipos9342 k-fold cross validation may indeed be possible - though it is not in the scope of this tutorial.

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

    @Robotflow Great video! How can i get the coordinates of the predicted boundboxes?

  • @Adroitbit
    @Adroitbit 2 ปีที่แล้ว +1

    during 16:24 steps. You need to go outside and touch the grass. Because this step take so ducking long.

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

    When performing inference should I resize the input to match the training size, or does darknet do that automatically? Does it resize training input images if they’re not already the correct size?

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

      Yes the images will be automatically resized. However, you may see slightly faster inference if you resize ahead of time.

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

    Hi! Question, I have exported my weights if I want to predict using this notebook still how can I do that, I already imported the weights but it does not predict sadly.

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

    how to change the number of epochs and then create checkpoints to save those trained weights

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

    Hi! Thank you for the explanation. I have a few questions. When you download the pre-trained weights, is this called a transfer learning? What's the difference between transfer learning and fine-tuning? Is there a way to show the mAP or loss in graph format? Sorry I'm still new to this..

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

    how to save files with .labels and .cfg extensions in collab ?

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

    Hi! Thank you for this tutorial. Can you tell me how can I view/download my annotation labels in txt format? I used roboflow to generate my dataset and it created txt files for every image in the test directory but they remain empty even after testing my detector. I need the generated darknet format labels for my test set.

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

    Thank you so much

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

    very helpful sir for my project. upload more cool videos

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

    I'm training the yolov4 to identify small objects, these objects are one into another... Im identifying cells and nuclei.... When i finished the process, the name of the bounding boz were to big and they were above the other ones... it became impossible to read. Is there any chance the make the letters smaller to see the others predictions?

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

    I am getting the below error when I have to perform the prediction
    Unable to init server: Could not connect: Connection refused

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

    can we detect the accident dent using yolov4 in darknet? if yes then how & if no then please provide option!

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

    Isn't it too slow for training? Because only 50 photos for train, validation and test. How can I do faster?

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

    Can I ask
    what is the number of gpu tesla V-100 on colab? :)

  • @Huds-ux1xb
    @Huds-ux1xb ปีที่แล้ว

    Its still work on 2023 ?

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

    Thank you very much!

  • @3picblader64
    @3picblader64 2 ปีที่แล้ว

    need the best file in py. How can I do that .

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

    thanks you are the best

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

    @Roboflow, I am unable to run the below part, getting an error stating cannot find _darknet.labels even though I followed your entire code. Could you please help me with this?
    #Set up training file directories for custom dataset
    %cd /content/darknet/
    %cp train/_darknet.labels data/obj.names
    %mkdir data/obj
    #copy image and labels
    %cp train/*.jpg data/obj/
    %cp valid/*.jpg data/obj/
    %cp train/*.txt data/obj/
    %cp valid/*.txt data/obj/
    with open('data/obj.data', 'w') as out:
    out.write('classes = 2
    ')
    out.write('train = data/train.txt
    ')
    out.write('valid = data/valid.txt
    ')
    out.write('names = data/obj.names
    ')
    out.write('backup = /mydrive/yolov4/backup')
    #write train file (just the image list)
    import os
    with open('data/train.txt', 'w') as out:
    for img in [f for f in os.listdir('train') if f.endswith('jpg')]:
    out.write('data/obj/' + img + '
    ')
    #write the valid file (just the image list)
    import os
    with open('data/valid.txt', 'w') as out:
    for img in [f for f in os.listdir('valid') if f.endswith('jpg')]:
    out.write('data/obj/' + img + '
    ')

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

      Make sure to export in the "YOLO Darknet" format!

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

      @@Roboflow , yes I did...exported.

  • @nina_________________
    @nina_________________ 2 ปีที่แล้ว +1

    It doesn't function anymore.

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

    Hi Thanks for the video. I got this error.
    CUDA Error Prev: an illegal memory access was encountered
    CUDA Error Prev: an illegal memory access was encountered: Success
    darknet: ./src/utils.c:325: error: Assertion `0' failed.

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

    I have done all the steps but when I am trying to test the images I amgettiing "test" folder is not there. Has anyone faced similar issue?
    FileNotFoundError Traceback (most recent call last)
    in
    1 import os
    2 #/test has images that we can test our detector on
    ----> 3 test_images = [f for f in os.listdir('test') if f.endswith('.jpg')]
    4 import random
    5 img_path = "test/" + random.choice(test_images);
    FileNotFoundError: [Errno 2] No such file or directory: 'test'

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

      In my case I created a completly new dir for the test images but I think the issue was that the directory in the code did not match mine so I changed mine to /content/drive/MyDrive/ColabNotebooks/test

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

    It will be really helpful if you add code for testing .mp4 or video , hope you will add this in your collab repo

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

      !./darknet detector demo data/obj.data cfg/custom-yolov4-detector.cfg backup/custom-yolov4-detector_last.weights -dont_show /content/traffic.mp4 -thresh 0.4 -i 0 -out_filename /content/traffic_1.mp4
      add this line instead of the one provided for image inference and replace all the cfg and weights with yours in this command including the video path.

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

    I've got 80 images, whys it say it's gonna take 10 hours? :O

  • @樱-i9r
    @樱-i9r 3 ปีที่แล้ว

    how to do it? checkpoint,yolov4.data-00000-of-00001,yolov4.index ----> saved_model.pb

  • @gguy156
    @gguy156 2 ปีที่แล้ว +1

    Yeah... the title was about training in darknet. Dislike

  • @AMINFIRDAUS-hg7dv
    @AMINFIRDAUS-hg7dv ปีที่แล้ว +1

    why i get this error when compile darknet using Cmake : compilation terminated due to -Wfatal-errors.
    make: *** [Makefile:162: obj/convolutional_layer.o] Error 1

    • @Roboflow
      @Roboflow  ปีที่แล้ว

      Hi 👋🏻! It is a known bug that we are trying to solve for quite a long time. You can take a look at the issue here: github.com/roboflow/notebooks/issues/28

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

    Thank you so much