Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performace of analyzing #51

Closed
myscho15 opened this issue May 11, 2021 · 8 comments
Closed

Performace of analyzing #51

myscho15 opened this issue May 11, 2021 · 8 comments

Comments

@myscho15
Copy link

Hay, first i love you program!

I use your software for analyzing videos from security cameras. (Rsolutions Full HD - 15/25fps, hd 15fps)

I have imac 27 inch (2017) 3,8Ghz intel core i5 with 4 cores. And notebook with similar procesor little bit slower.

When software analyzing HD with 15fps - making, speed of analyzing is 160-170 fps, but when is Full HD analyzed with 15 fps - ist about 65 fps and with 25fps is 35-40fps performance.

Please help me with this, i want better perrformace, wich kind of Processor i need to buy (yes i need whole new pc) but with what kind of processor (AMD Intel) become i better performance. What is important - number of cores, or speed, or cache? I want to buy new PC direct for this software, but i dont know what is important, please help me with wich one choose -

I am biggest noob to programming and to in computer.

Thank you verry much for your answer

@Breakthrough
Copy link
Owner

Breakthrough commented May 13, 2021

Hi @myscho15;

Part of the problem is actually with how DVR-Scan is written and distributed. The biggest issue is that it's not possible (yet) to use GPU acceleration. You might also get better performance by compiling the opencv-python module manually, enabling all of the relevant options to ensure it's optimized (there are instructions here for doing so).

Other than that, the current bottleneck is likely CPU clock speed and memory bandwidth. Since there's no parallelization, number of cores doesn't matter either. I don't believe the underlying libraries I'm using support parallel implementations either, however, they do have GPU support. Again though, DVR-Scan doesn't support this, but when it does support CUDA acceleration, a GPU would definitely help.

Hope this helps!

@Breakthrough
Copy link
Owner

Breakthrough commented May 13, 2021

Closing as duplicate of #12. Feel free to continue the discussion there if you would like.

@Breakthrough
Copy link
Owner

Also @myscho15, thank you for being my first sponsor on Github! It really means a lot to me, and will help offset some of the running costs for the project. I will prioritize GPU integration for the next release of DVR-Scan (although unfortunately I cannot provide a date for when it can be done by).

The other thing that may help is to use scan-only mode, and afterwards, use ffmpeg to split the motion events out. I also plan to address that in the next release with tighter integration with PySceneDetect, which provides that natively.

Really appreciate your kind words, and hope this helps. Sorry that performance isn't the best currently, but I'll put some effort into improving that for the next release :)

Thank you!

@Breakthrough
Copy link
Owner

Breakthrough commented May 14, 2021

You might also want to see #48 - there are some newer background subtraction algorithms OpenCV provides which can use multiple CPU cores. As those are included in the binaries already, I might be able to enable that by adding a flag to the command line to switch between different background subtraction algorithms.

Work for multiple CPU cores will be tracked in #48, and GPU support will be tracked in #12.

Edit: It looks like finishing #48 might not be too difficult, so I might try to go for that and release another version or two of DVR-Scan before doing the major refactor. Stay tuned! :)

@Breakthrough
Copy link
Owner

Hey @myscho15;

I actually made some progress in #48! The next version of DVR-Scan will include a faster way of scanning by specifying -b CNT. Keep an eye out for DVR-Scan v1.3 when it will be included. On my system, it improves my scanning performance from 90 FPS to 125 FPS.

Thanks!

@myscho15
Copy link
Author

myscho15 commented May 17, 2021 via email

@myscho15
Copy link
Author

myscho15 commented May 23, 2021 via email

@Breakthrough
Copy link
Owner

Hey @myscho15;

With DVR-Scan v1.3, you can specify -b CNT and it will use the new parallelized background subtractor! It should give you some better performance when scanning.

Feel free to provide any feedback here or in #48. Thanks again! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants