wl-zhao / DiffSwap

[CVPR 2023] DiffSwap is a diffusion-based face-swapping framework.
99 stars 10 forks source link

Error: Affine Theta #2

Closed Syndulla closed 11 months ago

Syndulla commented 11 months ago

Hello,

Firstly - this looks like a fabulous piece of work. Thank you for sharing.

Have got this partially working, but am hitting the error below:

Traceback (most recent call last): File "pipeline.py", line 418, in save_mask() File "pipeline.py", line 328, in save_mask dataset = Portrait('data/portrait') File "C:\Users\XXXXXXXX\Coding\DiffSwap\utils\portrait.py", line 40, in init self.affine_thetas = json.load(open(f'{root}/affine_theta.json')) #affine_theta.json FileNotFoundError: [Errno 2] No such file or directory: 'data/portrait/affine_theta.json'

Where is the affine_theta.json generated, and do you have any suggestions on resolving this? I am trying to run the code as provided, with the example source and target data provided.

Thank you in advance.

wl-zhao commented 11 months ago

Hi, thanks for your interest in our work.

The affine theta is used to align the input image using the same protocol as FFHQ. Maybe you can check if these lines are executed properly. I think a possible reason is missing of the mtcnn package.

Syndulla commented 11 months ago

Lovely - thank you for your response. I will have a look there as a start !