yuval-alaluf/stylegan3-editing

Computing landmarks transforms multithreading on CPU

hqnicolas opened this issue · 1 comments

LandmarksHandler -> dlib.get_frontal_face_detector() -> alignment_utils.py -> get landmark with dlib
A numpy array, where each row contains a landmark/point x-y coordinates.
Return None if no face is detected by Dlib.

Do not have much experience with using ThreadPool
but I believe that its the bottleneck for sg3 inference in video
I've been passing files of 3000 frames
and the registration of the compute landmarks transforms take more time than inference

This is probably possible to parallelize using multiprocessing. You are free to try this out.