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

There are no uv-map texture results after i runned this code. #8

Closed pirate-zhang closed 3 years ago

pirate-zhang commented 3 years ago

Hi,there are no uv-map texture results after i runned this code.It only produces an empty folder named save_folder. What's the matter, please?

thaoshibe commented 3 years ago

Hi there, Please make sure that --path (line 14) is pointing to your image folder.

For example, if your image folder is /home/image/folder, then: python create_beautygan_uv.py --path /home/image/folder --savedir /path/to/save_folder should work.

pirate-zhang commented 3 years ago

Hi,Thank you for your reply!

It has shown that the new picture is saved in the folder, but I didn't see the picture after opening the folder. I changed the 1 code to this one, but it still can't work.

python create_beautygan_uv.py --path /home/zhangwei/CPM-main/Color/data --savedir /home/zhangwei/CPM-main/Color//save_folder

------------------ 原始邮件 ------------------ 发件人: "VinAIResearch/CPM" @.>; 发送时间: 2021年7月1日(星期四) 下午5:55 @.>; @.**@.>; 主题: Re: [VinAIResearch/CPM] There are no uv-map texture results after i runned this code. (#8)

Hi there, Please make sure that --path (line 14) is pointing to your image folder.

For example, if your image folder is /home/image/folder, then: python create_beautygan_uv.py --path /home/image/folder --savedir /path/to/save_folder should work.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

thaoshibe commented 3 years ago

Hi there, I guess there are some problem with your input folder. Please change (line 30):

list_imgs = glob.glob(os.path.join(args.path, "images", "*", "*.png"))

to:

list_imgs = glob.glob(os.path.join(args.path, "*.png"))

and see if it works.

thaoshibe commented 3 years ago

And as read in README.md, to run the code successfully, please make sure the dataset folder follows THIS STRUCTURE:

all
|__ images
    |__ makeup
    |__ non-makeup
|__ segs
    |__ makeup
    |__ non-makeup

Else, I'm sorry to say that I can not help you. Hope this helps! ( ´ ▽ ` )b

pirate-zhang commented 3 years ago

Thank you very much for your reply. I'll try to debug the code here

------------------ 原始邮件 ------------------ 发件人: "VinAIResearch/CPM" @.>; 发送时间: 2021年7月2日(星期五) 上午10:34 @.>; @.**@.>; 主题: Re: [VinAIResearch/CPM] There are no uv-map texture results after i runned this code. (#8)

And as read in README.md, to run the code successfully, please make sure the dataset folder follows THIS STRUCTURE: all | images | makeup | non-makeup | segs | makeup | non-makeup
Else, I'm sorry to say that I can not help you. Hope this helps! ( ´ ▽ ` )b

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

thaoshibe commented 3 years ago

You're more than welcome ( ´ ▽ ` )b Feel free to ask if you have any other questions.

pirate-zhang commented 3 years ago

Hi, I'm sorry to disturb you again.Firstly, I want to tell you that I got the Segmentation Mask  of the images like this.

But when i change  uv_texture, uv_seg = generator.get_texture(image, seg) to try: uv_texture, uv_seg = generator.get_texture(image, seg) except: print('Something wrong with: ', list_imgs[i]) it will report an error like this: Traceback (most recent call last):   File "create_beautygan_uv.py", line 55, in <module>     cv2.imwrite(os.path.join(args.savedir, "images", filenames[i]), uv_texture) NameError: name 'uv_texture' is not defined So it's not generated UV-texture.The folder of segs have no change like this.

In view of this situation, how should I deal with it? Please give me some advice! Thanks a lot~

------------------ 原始邮件 ------------------ 发件人: "VinAIResearch/CPM" @.>; 发送时间: 2021年7月2日(星期五) 上午10:51 @.>; @.**@.>; 主题: Re: [VinAIResearch/CPM] There are no uv-map texture results after i runned this code. (#8)

You're more than welcome ( ´ ▽ ` )b Feel free to ask if you have any other questions.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.