facebookresearch / pytorchvideo

A deep learning library for video understanding research.
https://pytorchvideo.org/
Apache License 2.0
3.29k stars 406 forks source link

Real-time detection - CPU overload #98

Open pvd0anh opened 3 years ago

pvd0anh commented 3 years ago

Thank you for creating Pytorchvideo and SlowFast.

With input as a video stream, I use OpenCV to read the frame and pass the clip (stack multiple frames) to the model SlowFast.

My problem: when reading frame and processing to give output, the system uses too many CPUs (500% CPU), is there a way to reduce CPU usage without changing the speed?

Any ideas are welcome! :smiley:

kalyanvasudev commented 3 years ago

Hi @pvd0anh , what is the exact dataset you are working with?

You can always swap out cv2.imdecode for any other image decoder of your liking.

pvd0anh commented 3 years ago

Thanks, @kalyanvasudev for your answer,

I'm running in real-time, not using a pre-existing dataset. I read video streams and process them.