creotiv / object_detection_projects

My public projects about object detection algorithms
350 stars 225 forks source link

Won't open window #9

Closed lumbulliqi closed 6 years ago

lumbulliqi commented 6 years ago

The script traffic.py won't open the winodw of video. Just it excecutes on console/terminal.

creotiv commented 6 years ago

it shouldn't open any windows

lumbulliqi commented 6 years ago

The window of https://cdn-images-1.medium.com/max/1000/1*kFbuhpNtiUFUU0nL2n5NLA.png

creotiv commented 6 years ago

it's not a window, it's inference, video vizualization created from frames.

lumbulliqi commented 6 years ago

sir, I respect your job but can you help me and sry for my english

how to open that picture that i sad https://cdn-images-1.medium.com/max/1000/1*kFbuhpNtiUFUU0nL2n5NLA.png

creotiv commented 6 years ago

Here is docs: https://github.com/creotiv/object_detection_projects/tree/master/opencv_traffic_counting you need to use Visualizer(image_dir=IMAGE_DIR) in pipeline, which will save all images with vizualization to IMAGE_DIR folder(create it before run).

To create video from images you need to install ffmpeg: sudo apt-get install ffmpeg

and then go to your IMAGE_DIR and run ffmpeg -startnumber 0 -framerate 15 -i ./processed%04d.png -s:v 1280:720 -c:v libx264 -profile:v high -crf 20 -pix_fmt yuv420p ./out.mp4

this will create out.mp4 video

lumbulliqi commented 6 years ago

Thank you, good job (Y)