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
45.46k stars 5.37k forks source link

[Help] How to restrict the number of predicted labels #404

Open the5solae opened 1 year ago

the5solae commented 1 year ago

Hi all,

I'm working on semantic segmentation with a limited number labels. I realize that whenever I use SAM on my data I have multiple labels being generated. Ideally, I would want to restrict the labels to say 3 or 4 labels.

I was wondering if anyone has figured out how to do this?

lai-pf commented 1 year ago

I have the same question, I need the fixed number of mask, I don't know how to use sam to achieve that.