sam3 icon indicating copy to clipboard operation
sam3 copied to clipboard

How to detect floor, wall, ceiling regions with sharp edges?

Open olegkolesnik911 opened this issue 8 months ago • 5 comments

Hi SAM3 Team,

This is Oleg Kolesnik.

I’m experimenting with SAM3 for room scene segmentation (floor, walls, ceiling).
While SAM3 successfully detects the regions, the edges are not sharp — the masks appear fuzzy and it is difficult to extract clean boundaries for downstream tasks like line fitting and tile replacement.

I have attached some example result images showing the issue.

Image

I want the more accuracy than this result image.

Any guidance would be greatly appreciated!

Thanks for your work on SAM3. Original Image:

Image Sample Images: [sample_rooms.zip](https://github.com/user-attachments/files/26244337/sample_rooms.zip)

olegkolesnik911 avatar Mar 25 '26 13:03 olegkolesnik911

Generally you'd need to train/fine-tune the model to have it work better for a specific use case like this, or use another model geared towards fine details like SAM-HQ (maybe the grounded-sam variant in this case).

Otherwise, you can try combinations of cropping in to difficult regions, running the model at a higher resolution and/or adjusting the prompt (in this example, 'wood floor' seems to work a bit better than 'floor'). Here's an example flipping between using 'floor' at the original resolution and 'wood floor' at a higher resolution on a crop near the left couch:

Image

heyoeyo avatar Mar 26 '26 14:03 heyoeyo

Which model did you use to make that demo?

kittysoftpaw0510 avatar Mar 26 '26 18:03 kittysoftpaw0510

Which model did you use to make that demo?

It's a screen capture from running this script. The text prompt & resolution are adjusted from the UI that pops up and cropping is done by running the script with the --crop flag.

The model is just the original sam3.pt file.

heyoeyo avatar Mar 26 '26 20:03 heyoeyo

Which model did you use to make that demo?

In my case, I used the model. Image

olegkolesnik911 avatar Mar 26 '26 20:03 olegkolesnik911

There are some issues in region detection. I will share them soon. I think SAM3 is perfect as zero-shot model to detect floor, ceiling, wall from room image.

olegkolesnik911 avatar Mar 26 '26 21:03 olegkolesnik911