berkeley-hipie / HIPIE

[NeurIPS2023] Code release for "Hierarchical Open-vocabulary Universal Image Segmentation"
https://people.eecs.berkeley.edu/~xdwang/projects/HIPIE/
MIT License
269 stars 20 forks source link

Part segmentation #10

Closed sebastianopazo1 closed 9 months ago

sebastianopazo1 commented 1 year ago

Hi, great job with the project. I have a question about part segmentation. I run successfully the demo, but the segmentation worked as sup-part segmentation. Is it possible to try it only with part segmentation? Thanks!

KKallidromitis commented 11 months ago

Hi we currently support only part segmentation in the code base. The easiest approach is to replace the parts with a subpart dataset. Alternatively, you can use the custom demo and alter it for sub-parts and afterwards combine it with the normal demo.

sebastianopazo1 commented 11 months ago

Hi! Thanks for the answer. What I meant was that as a result I'm getting a subpart result, just like the following image. output_image My question is if there is a way to make segmentation to the complete head instead of segmentating the head, nose and so on, for example. Thanks for your help!

KKallidromitis commented 10 months ago

Hi there a couple ways to do this depending on the application. Existing model shown here is able to segment the head so you can remove the masks manually of the parts based on the label mapping and only keep the head (recommended).

Another way to obtain the head is to use torch.logical_or on the different parts and combine the masks that give the head. Finally we have a custom demo included where you are able to set your own labels. It will require some tweaking but you can obtain specific labels you request thought there.