fawkes icon indicating copy to clipboard operation
fawkes copied to clipboard

mtcnn cant use gpu

Open huojinyong opened this issue 3 years ago • 4 comments

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!

huojinyong avatar Jan 24 '22 10:01 huojinyong

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

Shawn-Shan avatar Feb 19 '22 00:02 Shawn-Shan

https://www.icloud.com/iclouddrive/0ff5arvVgPeki_8psSIrCXujA#2022-02-17_247220304DB_X2241833

Am Mo., 24. Jan. 2022 um 05:57 Uhr schrieb huojinyong < @.***>:

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!

— Reply to this email directly, view it on GitHub https://github.com/Shawn-Shan/fawkes/issues/157, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALG4FHVBOAK3PUQFGCGUQ6DUXUWBXANCNFSM5MVA7CWQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

hexa-gon avatar Feb 19 '22 02:02 hexa-gon

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

Shawn-Shan avatar Jun 07 '22 17:06 Shawn-Shan

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?

xaviermerino avatar Apr 09 '23 05:04 xaviermerino