facebookresearch / segment-anything

The repository provides code for running inference with the SegmentAnything Model (SAM), links for downloading the trained model checkpoints, and example notebooks that show how to use the model.
Apache License 2.0
46.39k stars 5.5k forks source link

How to get the name/type of the segment? #77

Open hairpin666 opened 1 year ago

hairpin666 commented 1 year ago

Hi,

In the demos it shows, that you can also extract the type of the segment (e.g a door, a human etc.) can it be extracted from the model or do we need an additional library for that?

Cheers

kgonia commented 1 year ago

I don't want to duplicate so I'll just wrote I'm also wondering is it possible to get labels or it isn't possible?

krishnaadithya commented 1 year ago

This current model does not provide any label, it is a generalised segmentation model

They mention that on the FAQ as well:

Does the model produce mask labels? No, the model predicts object masks only and does not generate labels.

hairpin666 commented 1 year ago

@krishnaadithya thanks for the answer and sorry for not seeing it in FAQ. How did you get the labels classified in your demo: grafik

Jiaqi-Chen-00 commented 1 year ago

We offer an automated annotation tool that can support categories in COCO, ADE20K, and open vocabulary annotation. Hopefully this will help you get the category labels for the SA dataset. Project: Semantic Segment Anything (SSA) Repo: https://github.com/fudan-zvg/Semantic-Segment-Anything

hairpin666 commented 1 year ago

Wow, nice exactly what I'm looking for. You don't happen to have a Hosted inference API on Hugging Face?