Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test with other types of clothing #65

Open
JaquesM opened this issue Apr 15, 2021 · 8 comments
Open

Test with other types of clothing #65

JaquesM opened this issue Apr 15, 2021 · 8 comments

Comments

@JaquesM
Copy link

JaquesM commented Apr 15, 2021

Hi, I trained this code with a database that contains only pants, but the code treated the pants as if they were shirts...

Were in the code should I change to train properly the network to try pants?

@ericguillaume
Copy link

Hi @JaquesM good question !

You should update the parse_head and parse_cloth segmentation variable in cp_dataset.py.
By the way, I would love to know what dataset you are using for pants ? and how big it is ?

Don't hesitate to ask me if you need more help !

@JaquesM
Copy link
Author

JaquesM commented Apr 15, 2021

Thats in my cp_dataset file:

`parse_array = np.array(im_parse)

parse_shape = (parse_array > 0).astype(np.float32)
parse_head = (parse_array == 1).astype(np.float32) +
(parse_array == 2).astype(np.float32) +
(parse_array == 4).astype(np.float32) +
(parse_array == 13).astype(np.float32)

parse_cloth = (parse_array == 5).astype(np.float32) +
(parse_array == 6).astype(np.float32) +
(parse_array == 7).astype(np.float32)`

To what values should I change it?

About the dataset, I got it by scraping a lot of cloth stores online and filtering them. I have about 20 thousando images with their clothes.

Thanks

@ericguillaume
Copy link

ericguillaume commented Apr 15, 2021

Good,

Have you organised your dataset by pair of images first ? And resized all the images to the same size. Those are required steps.
I will post the code change when I have free time as I don't want to mistake you.

Do you think you could share with me your dataset, I would really enjoy running it on pants myself and you have more images than I do, but mine could help you improve your quality ! you can email me at if you are interested

Cheers

@ericguillaume
Copy link

ericguillaume commented Apr 18, 2021

I would go ahead and replace it with:

`parse_array = np.array(im_parse)

parse_shape = (parse_array > 0).astype(np.float32)
parse_head = (parse_array == 5).astype(np.float32) +
(parse_array == 18).astype(np.float32) +
(parse_array == 19).astype(np.float32)

parse_cloth = (parse_array == 6).astype(np.float32) +
(parse_array == 9).astype(np.float32) +
(parse_array == 12).astype(np.float32)`

I have no way to easily test it at the moment, but that basically how I would go with it.
Have you already run the algorithm with tops only ?

@masfour7
Copy link

masfour7 commented May 9, 2021

Hey @ericguillaume , Thanks for your work and your advice. May I ask why the parse_head needs to be changed? And why change it to this specific value?

@ericguillaume
Copy link

Hello @masfour7 , interesting question !,

The parse_head needs to be changed as it indicates parts of the image the algorithm shouldn't change, it improves resulting images quality but also stabilise the learning.

If you wishes I may have some interesting screenshots to offer more perspective on this, you can reach me at guillaumeric.info@gmail.com if you want to see them.

By the way, I would love to know what dataset you are using for changing several types of garments at the same time ?

Please ping me if you need further explanations.

@khader-zatari
Copy link

Hi, I trained this code with a database that contains only pants, but the code treated the pants as if they were shirts...

Were in the code should I change to train properly the network to try pants?

Hi
Have you trained the model?
if yes, could you please share the data set that you have used, and if you have the pre-trained model, can you share it with us?
and if you have a repo for your could can you share it too?

thanks,

@omaraga12
Copy link

Anyone of you got good results trying with pants?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants