segment-anything icon indicating copy to clipboard operation
segment-anything copied to clipboard

how to get predicted masks classes?

Open lucasjinreal opened this issue 1 year ago • 7 comments

Does every masks have a semantic classes group index or name?

lucasjinreal avatar Apr 06 '23 03:04 lucasjinreal

It seems a kind of pixels clustering.

Does every masks have a semantic classes group index or name?

zaiquanyang avatar Apr 06 '23 05:04 zaiquanyang

@zaiquanyang clustering doesn't know exactly which part belongs to which class. For instance, I using text prompt to segment chair and cup, but how can I know which part belongs to cup?

lucasjinreal avatar Apr 06 '23 06:04 lucasjinreal

@zaiquanyang clustering doesn't know exactly which part belongs to which class. For instance, I using text prompt to segment chair and cup, but how can I know which part belongs to cup?

SAM's output is class-agnostic and you may need an extra point-like prompt for certain object.

zaiquanyang avatar Apr 06 '23 06:04 zaiquanyang

@zaiquanyang clustering doesn't know exactly which part belongs to which class. For instance, I using text prompt to segment chair and cup, but how can I know which part belongs to cup?

SAM's output is class-agnostic and you may need an extra point-like prompt for certain object.

so that means I need to put the class names in the prompts. If I want to segment 80 classes, do I need to infer the SAM 80 times?

alexw994 avatar Apr 06 '23 10:04 alexw994

@zaiquanyang clustering doesn't know exactly which part belongs to which class. For instance, I using text prompt to segment chair and cup, but how can I know which part belongs to cup?

SAM's output is class-agnostic and you may need an extra point-like prompt for certain object.

so that means I need to put the class names in the prompts. If I want to segment 80 classes, do I need to infer the SAM 80 times?

I guess you only need infer one time. According to the paper, when given the text prompts, it is like previous zero-shot segmentation work and you can obtain the class name corresponding mask.

zaiquanyang avatar Apr 06 '23 10:04 zaiquanyang

Hi Anyone know if it's possible to get the labels/class name for each mask? They are saying the dataset have 11 million images and generate 1.1 billion masks.

broullon avatar Apr 07 '23 20:04 broullon

We have developed a project that provides an automated data annotation engine for the SA-1B dataset, which offers basic categories from COCO and ADE20K, as well as open-vocabulary category labeling based on image captions. However, we only provide the code and users must run it themselves to complete the annotation process.

Project: Semantic segment anything Repo: https://github.com/fudan-zvg/Semantic-Segment-Anything

Jiaqi-Chen-00 avatar Apr 09 '23 17:04 Jiaqi-Chen-00

Wrote a simple example notebook that allows you to generate overlays with provided classes. The labeling of the masks comes from CLIP. Maybe this is helpful!

Repo: https://github.com/jvpassarelli/sam-clip-segmentation

jvpassarelli avatar May 11 '23 01:05 jvpassarelli