yuval-alaluf / stylegan3-editing

Official Implementation of "Third Time's the Charm? Image and Video Editing with StyleGAN3" (AIM ECCVW 2022) https://arxiv.org/abs/2201.13433
https://yuval-alaluf.github.io/stylegan3-editing/
MIT License
654 stars 73 forks source link

Computing landmarks transforms multithreading on CPU #20

Closed hqnicolas closed 2 years ago

hqnicolas commented 2 years ago

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

yuval-alaluf commented 2 years ago

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