VinAIResearch / CPM

💄 Lipstick ain't enough: Beyond Color-Matching for In-the-Wild Makeup Transfer (CVPR 2021)
https://thaoshibe.github.io/CPM
Apache License 2.0
367 stars 58 forks source link

Color Training #5

Closed pirate-zhang closed 3 years ago

pirate-zhang commented 3 years ago

When i try to train the Color Branch,there is a error occurred.Could you give me a suggestion when you have time. The error message is as follows: Traceback (most recent call last): File "create_beautygan_uv.py", line 51, in uv_texture, uv_seg = generator.get_texture(image, seg) File "/data/run01/scv0004/CPM-main/Color/texture_generator.py", line 23, in get_texture pos[:, :, :2].astype(np.float32), TypeError: 'NoneType' object is not subscriptable image

thaoshibe commented 3 years ago

Hello there, I guess there's something wrong with that image. Could you change the line here to this:

try:
    uv_texture, uv_seg = generator.get_texture(image, seg)
except:
    print('Something wrong with: ', list_imgs[i])

And we'll look at that image later. I've faced that issues before, it turned out that there's no faces in the images; Or dlib couldn't detect any faces.

thaoshibe commented 3 years ago

Hi again, If there's something wrong with the images (no face, degraded, corrupted images, etc.), then I can't help. Else, dlib couldn't detect any faces (very few cases) Please handle these images by passing face's bounding boxes manually (Find more information here)

I'm closing this issue and hope you can run the code smoothly!