so I trained a yolov4 tiny model and I predict perfectly on images with this command :
!./darknet detect build/darknet/x64/cfg/custom-yolov4-tiny-detector.cfg build/darknet/x64/backup/custom-yolov4-tiny-detector_final.weights build/darknet/x64/data/obj/0b6093ce1fce5b8f.jpg -dont-show
and now I want to predict on video but I can manage to figure out the correct command.
Advertisement
Answer
To run detections on a video file run detector demo
. In your case:
!.darknet detector demo build/darknet/x64/cfg/custom-yolov4-tiny-detector.cfg build/darknet/x64/backup/custom-yolov4-tiny-detector_final.weights -ext_output build/darknet/x64/data/obj/your_video.mp4 -dont_show
If you want to see the predictions on the video, add -out_filename your_video.mp4
So the command becomes:
!.darknet detector demo build/darknet/x64/cfg/custom-yolov4-tiny-detector.cfg build/darknet/x64/backup/custom-yolov4-tiny-detector_final.weights -ext_output build/darknet/x64/data/obj/your_video.mp4 -out_filename detection_results_your_video.mp4 -dont_show