yoyo-nb / Thin-Plate-Spline-Motion-Model

[CVPR 2022] Thin-Plate Spline Motion Model for Image Animation.
MIT License
3.43k stars 556 forks source link

How to crop and align the face from image and video #4

Closed SwordBearFire closed 2 years ago

SwordBearFire commented 2 years ago

Thank you for releasing the code, could you add the code to crop and align the face from image and video. Is it like FFHQ landmark?

Sincerely yours.

dvm-Omydoo commented 2 years ago

To crop videos: https://github.com/Chando0185/first-order-model/blob/master/crop-video.py

To crop images: don't know, you may convert (using ffmpeg) an image to a video frame, then use crop-video.py with "min_frames" set to 0, then extract the first frame back to image.

Chopin68 commented 2 years ago

裁剪视频:https ://github.com/Chando0185/first-order-model/blob/master/crop-video.py

裁剪图像:不知道,您可以将(使用 ffmpeg)图像转换为视频帧,然后使用crop-video.py 并将“min_frames”设置为0,然后将第一帧提取回图像。

Thank you. This is effective for vox model. Do you have any suggestions on the alignment and clipping of Ted model?