harlanhong / CVPR2022-DaGAN

Official code for CVPR2022 paper: Depth-Aware Generative Adversarial Network for Talking Head Video Generation
https://harlanhong.github.io/publications/dagan.html
Other
969 stars 126 forks source link

crop face #48

Closed Carlyx closed 2 years ago

Carlyx commented 2 years ago

Your work is amazing!

But I have two questions:

  1. Is it possible to pad more borders when cropping faces? Or does it have to crop the face strictly according to the detected box?
  2. https://github.com/harlanhong/CVPR2022-DaGAN/blob/78b22edcdbb4192b81c5adf343f980b42cddfe5d/crop-video.py#L25 When -1 is used, the IndexError is reported.
harlanhong commented 2 years ago

1/ You don't have to crop the face strictly. You can just make the source and driving similar. For example, they contain the same proportion of body parts in the image.

2/ The length of "bboxes" is 0. You should check that.

Carlyx commented 2 years ago

1/ Got it~

2/ The IndexError is about https://github.com/harlanhong/CVPR2022-DaGAN/blob/78b22edcdbb4192b81c5adf343f980b42cddfe5d/crop-video.py#L33 微信截图_20221029103443

With -1, boxA is [ 62 45 211] and boxB is [ 62 45 211]. W/o -1, boxA is [ 62 45 211 194] and boxB is[ 62 45 211 194].

harlanhong commented 2 years ago

Could you upload the video here? Or you can debug it step by step. You can also try again with an another video.

Carlyx commented 2 years ago

Could you upload the video here? Or you can debug it step by step. You can also try again with an another video.

I tried three different videos, and got the same error.

https://drive.google.com/file/d/1pUPKxaZYcW2dsS92YJXF2bOGkqpRDqoP/view?usp=share_link (Failed to upload videos here)

harlanhong commented 2 years ago

Hi @Carlyx ,

image

I ran successfully on my side. That may be caused by your environment. You can check whether your installed ffmpeg is correct.

Carlyx commented 2 years ago

Hi @Carlyx ,

image

I ran successfully on my side. That may be caused by your environment. You can check whether your installed ffmpeg is correct.

Ok. Thanks for your help~ I will check it. Again, awesome work!