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

More cameras for real time face recognition #938

Closed
roiksail opened this issue Oct 10, 2019 · 8 comments
Closed

More cameras for real time face recognition #938

roiksail opened this issue Oct 10, 2019 · 8 comments

Comments

@roiksail
Copy link

Hello everybody,im using arcface and mtcnn for real time face recognition and opencv for grab rtsp stream from my cameras,four ip cameras is processing for face recognition and i want to use more cameras for this project.
When i use four cameras my cpu usage is 90% and i couldnt to add more cameras.
How i can to use 20cameras for this project?

My system info is :gpu 1080ti,cpu core i7 9700k,32gb ram.
Isn't my hardware enough for this purpose?
How do I choose the right hardware?
Is retinaface a better target for my project?
How to run the whole process on gpu?
Please help me

@Luvata
Copy link

Luvata commented Oct 14, 2019

You should check the encode of your video stream, cv2.VideoCapture somehow use alot cpu

@roiksail
Copy link
Author

Thank you so much,but how to encode rtsp live stream??
While i add my cameras ,face detection(retinaface) get 50% cpu usage.

@Luvata
Copy link

Luvata commented Oct 15, 2019

I used ffmpeg to capture the stream and the cpu usage is much lower (but I'm not sure if it can run real time). I haven't tried yet but you may try passing ffmpeg parameters in cv2.VideoCapture, or using ffmpeg-python

@Luvata
Copy link

Luvata commented Oct 28, 2019

@nttstar You can close this issue since there's no activity recently

@GanbI4
Copy link

GanbI4 commented Oct 28, 2019

Also, we met with mxnet's high cpu usage, converting to tvm helps us. We was able to achieve about 1 core per camera (1080p@25fps). Other possible optimizations:

  1. Move ur image manipulations to GPU (opencv C++ can do a lot with CUDA)
  2. If you using python, take look at cpu profile.

@luan1412167
Copy link

@GanbI4 Can you share your experiment for running on tvm? What is your model you using for face detection? Because I use R50 retinaface run on tvm(gpu gtx 2070) with <15fps. How to tune retinaface run on gpu? Thanks for your sharing.

@GanbI4
Copy link

GanbI4 commented Nov 5, 2019

@luan1412167 Unfortunately, i can't share my code, cuz it's under NDA.
For general purpose, retinaface R50 is too much, try mobelinet from yangfly.
#669

For tuning, try to reduce this params:
https://github.com/deepinsight/insightface/blob/master/RetinaFace/test.py#L10

About tvm, this tutorial helped me a lot:
https://docs.tvm.ai/tutorials/frontend/from_mxnet.html

@ahmetybilgin
Copy link

@Luvata @roiksail @luan1412167 Any progress in your work? Thanks.

@nttstar nttstar closed this as completed Jun 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants