ageitgey / ageitgey/face_recognition
face_recognition uses only one CPU core. Is there a way to run it multithreaded?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 56.8k
- Forks
- 13.7k
- PR merge metrics
- No merged PRs in 30d
Description
- face_recognition version: 1.2.3
- dlib version: 19.16.99 from Git
- Python version: Python 3.6.5 (default, Apr 1 2018, 05:46:30)
- Operating System: Ubuntu 18.04
I am working on a program, that should recognize (identify) and track a lot of faces in real time.
Face_recognition is not fast enough and it uses only one CPU core. I tried to compile Dlib with Intel MKL and nothing has changed. Even in CNN mode no more than one core is used. But CNN mode was created for multithreaded parallel execution. It runs on CUDA in parallel, why it can not on CPU?
Is it possible to use face_recognition (face_locations and face_encodings) in multithread way?
Is it possible on pure Dlib or Is it a restriction within Dlib?
I know that I can make queue of frames and process each frame on it's own core.
But this is not an option in my case. I need to find and compare faces on each frame faster to have time to do another processing and inter-frame comparison.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the face_locations and face_encodings entry points and reviewing how they invoke dlib in CPU and CNN modes. The issue names no files or tests, so first establish the supported threading behavior and a reproducible real-time workload; done would require a documented, tested way to use multiple CPU cores, if feasible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-vision, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100