Shawn-Shan / fawkes

Fawkes, privacy preserving tool against facial recognition systems. More info at https://sandlab.cs.uchicago.edu/fawkes

Home Page:https://sandlab.cs.uchicago.edu/fawkes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mtcnn cant use gpu

huojinyong opened this issue · 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!

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

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

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?