After the latest commits by @pjreddie, the steps listed here by @AlexeyAB don't work anymore.
I have tried using https://github.com/AlexeyAB/darknet but there is a weird issue where-in I don't get any predictions when using that repository, while it works perfectly well when using this repo.
Any help is appreciated!
you can change name as .avi
https://github.com/YunYang1994/tensorflow-yolov3 hope it helps you
@C-Aniruddh:
I'm searching a solution for the same issue at the moment. Have you found something that works fine?
Thanks in advance for your help!
I created a bash script that uses libav (ffmpeg also possible for newer Linux versions). You have to pass the input video as first argument. The output is a MP4 file.
#!/bin/bash
if [ $# -eq 0 ]
then
echo "ERROR! Usage: help/video filepath"
exit
fi
./darknet detector demo cfg/coco.data cfg/yolov3.cfg yolov3.weights $1 -prefix pictures
avconv -i pictures_%08d.jpg video.mp4
avconv -i video.mp4 -i $1 output.mp4
rm pictures_*.jpg video.mp4
I created a bash script that uses libav (ffmpeg also possible for newer Linux versions). You have to pass the input video as first argument. The output is a MP4 file.
#!/bin/bash if [ $# -eq 0 ] then echo "ERROR! Usage: help/video filepath" exit fi ./darknet detector demo cfg/coco.data cfg/yolov3.cfg yolov3.weights $1 -prefix pictures avconv -i pictures_%08d.jpg video.mp4 avconv -i video.mp4 -i $1 output.mp4 rm pictures_*.jpg video.mp4
Nice, it works. Thank you very much.
I created a bash script that uses libav (ffmpeg also possible for newer Linux versions). You have to pass the input video as first argument. The output is a MP4 file.
#!/bin/bash if [ $# -eq 0 ] then echo "ERROR! Usage: help/video filepath" exit fi ./darknet detector demo cfg/coco.data cfg/yolov3.cfg yolov3.weights $1 -prefix pictures avconv -i pictures_%08d.jpg video.mp4 avconv -i video.mp4 -i $1 output.mp4 rm pictures_*.jpg video.mp4
how to use it bash script?thanks
I created a bash script that uses libav (ffmpeg also possible for newer Linux versions). You have to pass the input video as first argument. The output is a MP4 file.
#!/bin/bash if [ $# -eq 0 ] then echo "ERROR! Usage: help/video filepath" exit fi ./darknet detector demo cfg/coco.data cfg/yolov3.cfg yolov3.weights $1 -prefix pictures avconv -i pictures_%08d.jpg video.mp4 avconv -i video.mp4 -i $1 output.mp4 rm pictures_*.jpg video.mp4how to use it bash script?thanks
If I remember right, you can just call the script with the path to the source video as argument. I hope this is enough to help you, otherwise please clarify your problem.
I created a bash script that uses libav (ffmpeg also possible for newer Linux versions). You have to pass the input video as first argument. The output is a MP4 file.
#!/bin/bash if [ $# -eq 0 ] then echo "ERROR! Usage: help/video filepath" exit fi ./darknet detector demo cfg/coco.data cfg/yolov3.cfg yolov3.weights $1 -prefix pictures avconv -i pictures_%08d.jpg video.mp4 avconv -i video.mp4 -i $1 output.mp4 rm pictures_*.jpg video.mp4
Excellent script. It worked for me!
I created a bash script that uses libav (ffmpeg also possible for newer Linux versions). You have to pass the input video as first argument. The output is a MP4 file.
#!/bin/bash if [ $# -eq 0 ] then echo "ERROR! Usage: help/video filepath" exit fi ./darknet detector demo cfg/coco.data cfg/yolov3.cfg yolov3.weights $1 -prefix pictures avconv -i pictures_%08d.jpg video.mp4 avconv -i video.mp4 -i $1 output.mp4 rm pictures_*.jpg video.mp4Thank you for the solution. For some reason avconv doesn't work for me, so I changed your code into:
`#!/bin/bash
if [ $# -eq 0 ]
then
echo "ERROR! Usage: help/video filepath"
exit
fi
./darknet detector demoyolo.data yolov3.cfg backup/yolov3_8000.weights $1 -prefix pictures
ffmpeg -framerate 25 -i pictures_%08d.jpg -c:v libx264 -profile:v high -crf 20 -pix_fmt yuv420p output.mp4
rm pictures_*.jpg`
That did work. For anyone new to working with bash scripts:
chmod 755 TheNameOfTheFile./TheNameOfTheFile PathToYourVideoFileThat's it.
Hello @fj0n @LinderPi while running your scripts, i am getting this error.
rm: cannot remove 'pictures_*.jpg': No such file or directory
Any help?
Hello @fj0n @LinderPi while running your scripts, i am getting this error.
rm: cannot remove 'pictures_*.jpg': No such file or directory
Any help?
Try to only use the darknet command of line 8. To do so, change $1 to the desired filepath. What is your output? It seems that it does not create the wanted output pictures.
Most helpful comment
I created a bash script that uses libav (ffmpeg also possible for newer Linux versions). You have to pass the input video as first argument. The output is a MP4 file.