varungupta31 / dashcam_anonymizer

Code to Blur Human Faces and Vehicle License Plates in Video and Images using a SoTA Object Detection model YOLOv8
MIT License
29 stars 4 forks source link

How to process longer Video-Files ? #3

Closed graebec closed 1 year ago

graebec commented 1 year ago

Hi there I just tested the tool, but it is not able to process bigger video files, because the option that is recommended "stream=true" isn't available.

Any Idea ?

Best regards

varungupta31 commented 1 year ago

I processed 1 minute long videos @ 25 FPS fine. I recently came across a much more effective video handler, Decord. Which makes io more efficient. You could change the video reader using that, and see it it helps.

What exactly is the error when you say 'unable to process'?

If its system memory issues, i'm unaware how cv2.VideoWriter operates, but it may somewhere be accumulating things on the CPU memory.

A fix would be to simply dump the blurred frames of a large video, and then create a video of it, rather than writing it with the writer which probably is accumulating stuff.