levindabhi / cloth-segmentation

This repo contains code and a pre-trained model for clothes segmentation.
MIT License
565 stars 102 forks source link

Getting the predictions #8

Closed Lord-Psarris closed 1 year ago

Lord-Psarris commented 2 years ago

When I run the infer.py it segments the image but I don't get any of the detected objects or classes. and always have to refer to the image Is there a way I can get the segmented classes (e.g. upper, lower etc.) ?

karndeepsingh commented 2 years ago

Hi @Lord-Psarris, Any successful approach for segmenting different classes as you mentioned in the issue?

Please help, I have similar issue.

Thanks

Lord-Psarris commented 2 years ago

Hello @karndeepsingh, I made a simple script to detect the colors in the image.

The segmented image mask have a max of 4 colors (black for background, and 3 others for full body, upper body and lower body), so it simply checks the pixels to see which of the colors are detected in the image.

You might want to optimize the image or reduce its resolution first if computing time and memory are an issue. Let me know if you'd like to see my implementation

karndeepsingh commented 2 years ago

Hello @karndeepsingh, I made a simple script to detect the colors in the image.

The segmented image mask have a max of 4 colors (black for background, and 3 others for full body, upper body and lower body), so it simply checks the pixels to see which of the colors are detected in the image.

You might want to optimize the image or reduce its resolution first if computing time and memory are an issue. Let me know if you'd like to see my implementation

That’s great @Lord-Psarris Can you share your work? I would like to understand it.

Thankyou so much

kumar-hardik commented 1 year ago

@karndeepsingh @Lord-Psarris I have similar issue, can you guys help with the script to retrive the original colors for the segmentation?

Lord-Psarris commented 1 year ago

@karndeepsingh , @kumar-hardik here is a google collab of my implementation. Feel free to utilize it as you see fit

Lord-Psarris commented 1 year ago

@kumar-hardik , @karndeepsingh you can find my complete solution here: https://github.com/Lord-Psarris/cloth-segmentation