use GPU in fastMtCnn

This commit is contained in:
aku-ato 2024-03-26 11:12:54 +01:00 committed by GitHub
parent 329606ffe8
commit 3d8733812b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -68,7 +68,7 @@ class FastMtCnnClient(Detector):
"Please install using 'pip install facenet-pytorch' " "Please install using 'pip install facenet-pytorch' "
) from e ) from e
face_detector = fast_mtcnn(device="cpu") face_detector = fast_mtcnn(device="cuda:0")
return face_detector return face_detector