Search code examples
google-colaboratoryobject-detectionhpcdarknetyolov4

YOLOv4-tiny Darknet: cannot generate results for video detection


I am trying to deploy the YOLOv4 tiny Darknet object detection model on an HPC.

I have trained and tested the YOLOv4-tiny model on Google Colab with no issues. Now I am trying to move the model to an HPC platform. The model trains well on a custom dataset on the HPC and can detect objects in images when tested. However, whenever I try detection for videos, the model freezes after displaying model architecture information. Nothing happens

The command I am using is:

./darknet detector demo data/obj.data cfg/custom-yolov4-tiny-detector.cfg backup/custom-yolov4-tiny-detector_final.weights -ext_output vidtest.mp4 -i 0 -out_filename results/outvids.mp4 -dont_show

I have no clue why this might be happening. I have tried renaming the videos, using the .avi extension for the output as suggested in related posts but could not get it fixed.

I would appreciate some help with this.


Solution

  • From the relative paths you are using in your example command, I'm going to guess you are using the abandoned AlexeyAB repo of Darknet. Note that AlexeyAB left the project in July 2021, nearly 3 years ago, leaving his repo abandoned.

    See the Darknet/YOLO FAQ: https://www.ccoderun.ca/programming/yolo_faq/#which_repos_to_use_and_avoid

    The new Darknet repo is this one: https://github.com/hank-ai/darknet#table-of-contents which is also linked from the very top of the README in AlexeyAB's repo.

    I'd be particularly interested in knowing if the current Darknet/YOLO repo has the same "freeze" behaviour. Another option worth trying is seeing if the DarkHelp CLI behaves better for you.

    Also note that StackOverflow has been less-than-great for Darknet and YOLO questions. They often get closed early. You may want to join the Darknet/YOLO discord if you have further questions: https://discord.gg/zSq8rtW

    Disclaimer: I maintain the Darknet/YOLO codebase. I'm also the author of DarkHelp, DarkMark, DarkPlate, and various other Darknet-related tools.