ageitgey / ageitgey/face_recognition
how to use multiprocess to speed up face recognition or other dl module? Thanks.
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
- Python version: 3.6
- Operating System: window 7 64bit
Description
I encounter a problem in redoing the example of "face_recognition-master\face_recognition\face_recognition_cli.py". I expect multiprocess can speed up face_recognition. But the speed of "--cpus 4" is same to "--cpus 1". My pc has 4 cores.
the code and pics in the zip. It be modified according to examples in face_recognition. Any suggestion is welcome. thank you.
face_recognition_multiprocess_problem.zip
What I Did
E:\image_process_project\ref_image_projects\face_recognition-master\face_recogni
tion>python face_recognition_cli.py .\imagefiles .\ccc\1.png --cpus 4
cpus: 4
.\ccc\1.png,a_ccc_20181112_15-42-25-521305
.\ccc\1.png,a_ccc_20181112_15-42-27-162399
.\ccc\1.png,a_ccc_20181112_15-42-34-66794
.\ccc\1.png,a_ccc_20181112_15-42-45-218432
.\ccc\1.png,a_ccc_20181112_15-42-50-438730
.\ccc\1.png,a_ccc_20181112_15-44-16-908676
.\ccc\1.png,a_ccc_20181112_15-44-2-346843
.\ccc\1.png,a_ccc_20181112_15-44-29-400391
.\ccc\1.png,a_ccc_20181112_15-44-3-508910
.\ccc\1.png,a_ccc_20181112_15-44-30-546456
.\ccc\1.png,a_ccc_20181112_15-44-31-970538
.\ccc\1.png,a_ccc_20181112_15-44-4-915990
.\ccc\1.png,a_ccc_20181112_15-44-44-778270
.\ccc\1.png,a_ccc_20181112_15-44-6-200064
.\ccc\1.png,a_ccc_20181112_15-45-14-391964
.\ccc\1.png,a_ccc_20181112_15-47-31-823825
time eclipsed: 0.718041181564331 second
--- cpus 1 -------
E:\image_process_project\ref_image_projects\face_recognition-master\face_recogni
tion>python face_recognition_cli.py .\imagefiles .\ccc\1.png --cpus 1
cpus: 1
.\ccc\1.png,a_ccc_20181112_15-42-25-521305
.\ccc\1.png,a_ccc_20181112_15-42-27-162399
.\ccc\1.png,a_ccc_20181112_15-42-34-66794
.\ccc\1.png,a_ccc_20181112_15-42-45-218432
.\ccc\1.png,a_ccc_20181112_15-42-50-438730
.\ccc\1.png,a_ccc_20181112_15-44-16-908676
.\ccc\1.png,a_ccc_20181112_15-44-2-346843
.\ccc\1.png,a_ccc_20181112_15-44-29-400391
.\ccc\1.png,a_ccc_20181112_15-44-3-508910
.\ccc\1.png,a_ccc_20181112_15-44-30-546456
.\ccc\1.png,a_ccc_20181112_15-44-31-970538
.\ccc\1.png,a_ccc_20181112_15-44-4-915990
.\ccc\1.png,a_ccc_20181112_15-44-44-778270
.\ccc\1.png,a_ccc_20181112_15-44-6-200064
.\ccc\1.png,a_ccc_20181112_15-45-14-391964
.\ccc\1.png,a_ccc_20181112_15-47-31-823825
time eclipsed: 0.8430483341217041 second
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 with face_recognition/face_recognition_cli.py and the attached reproduction, then run the documented commands with --cpus 1 and --cpus 4. Trace how the CLI uses the CPU count and compare the reported timings; done means the cause of the unchanged timing is identified and the issue has a verified fix or clear explanation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-vision, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100