AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.72k stars 7.96k forks source link

timestamp in video detection #4875

Open qillbel opened 4 years ago

qillbel commented 4 years ago

Hi all,

I was searching for hours without success. Does anyone know how to store the timestamp of the identified objects in the video?

Or perhapshow do we derive the timestamps from the fps identified?

Thank you so much all

sambo55 commented 4 years ago

Similar problems here. I got around it by using the -json_port 8070 flag, saving the output to a txt file then reading it in as a pandas dataframe and filtering on rows with detections. This gives frame number and detection so yes I suppose we can just divide frame number by fps to get timestamp.

qillbel commented 4 years ago

Hi @sambo55 , Do you mean you put -json_port 8070 flag on video detection? like !./darknet detector demo obj.data yolov3-tiny-obj.cfg yolov3-tiny-obj_last.weights -dont_show -json_port 8070 video.mp4 -i 0.6 -out_filename video.avi ?

Thanks

sambo55 commented 4 years ago

Yes

qillbel commented 4 years ago

Thanks @sambo55 , I tried the flag, but the output txt only printed JSON-stream sent, without frame number. Can I have it on txt output instead?

Thanks

pullmyleg commented 4 years ago

Hi @qillbel, you can access frame numbers from the JSON Stream at localhost:8070 using chrome (or another browser). If this is a one-off and you don't want to consume you could even convert this to CSV using a simple JSON to CSV converter.

2020-03-30_23-16-12