zllrunning / face-makeup.PyTorch

Lip and hair color editor using face parsing maps.
MIT License
496 stars 149 forks source link

index error #14

Closed 100tari closed 4 months ago

100tari commented 4 months ago

hey,

current code throws an error for the images which height and width are not equal, the reason is that the mask (evaluate return value) has a transposed dimensions. to fix that change the line 79 of makeup.py to: parsing = cv2.resize(parsing, image.shape[0:2][::-1], interpolation=cv2.INTER_NEAREST)

also , multichannel=True in line 17 of makeup.py must be removed.

hope this helps!