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

mtcnn cant use gpu #157

Open
huojinyong opened this issue Jan 24, 2022 · 4 comments
Open

mtcnn cant use gpu #157

huojinyong opened this issue Jan 24, 2022 · 4 comments

Comments

@huojinyong
Copy link

hello!my tensorflow-gpu==2.4.1 and the program can use gpu to generate fawkes mask.But the gpu can't be used when run MTCNN face detector in 'def align' in align_face.py,it is very slow.
How can I solve this problem? Thank you very much!

@Shawn-Shan
Copy link
Owner

MTCNN will directly uses GPU. How did you observe that it does not use GPU?

@hexa-gon
Copy link

hexa-gon commented Feb 19, 2022 via email

@Shawn-Shan
Copy link
Owner

Can you post a screenshot here? I won't want to download unknown files.

@xaviermerino
Copy link

xaviermerino commented Apr 9, 2023

I am currently experiencing the same. After going through the directory of images and reporting the number of images in there, it is slowly aligning and detecting faces. It seems like MTCNN is not using GPU. See below:

1 Physical GPUs, 1 Logical GPU
Downloading data from http://mirror.cs.uchicago.edu/fawkes/files/extractor_2.h5
161832960/161829576 [==============================] - 31s 0us/step
Identify 24857 files in the directory
Identify 24857 images in the directory
Find 1 face(s) in 201761_00F27.JPG
Find 1 face(s) in 072462_10F43.JPG

And when checking the CPU utilization, is pegged at 100% while my GPU is at 0% even though the process has allocated GPU memory.

|===============================+======================+======================|
|   0  NVIDIA RTX A6000    Off  | 00000000:01:00.0 Off |                  Off |
| 45%   72C    P2    98W / 300W |   1977MiB / 49140MiB |      0%      Default |
|                               |                      |                  N/A |

Any ideas of what can be done @Shawn-Shan? @hexa-gon @huojinyong were you able to solve this?

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

4 participants