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
47.24k stars 5.59k forks source link

Achieving Full Pixel Segmentation in SAM Project on Linux: Seeking Technical Guidance #654

Open Timothy-pop opened 10 months ago

Timothy-pop commented 10 months ago

Hello, I am truly grateful for the exceptional work your team has done, which I find extremely valuable.

I am currently attempting to utilize your results (SAM) through two main approaches:

Firstly, through the demo on your official website, which includes a feature to 'Find all the objects in the image automatically.'

Secondly, I have deployed your project on a Linux system. As I understand it, in its unmodified state, the input is images, and the output is separate segmentation masks for different targets, stored as multiple images.

However, a notable issue is that merging the white areas of all these images does not cover the entire image. I have tried adjusting some parameters, but it seems none have achieved the desired effect.

I would like to know how to implement complete segmentation of all pixels in the deployed code. Thank you very much for your patience and guidance. I look forward to your response and suggestions.

shubhamtyagii commented 10 months ago

You should run the script amg.py. This script can be used to generate the mask automatically for a given input image.

Timothy-pop commented 10 months ago

Thank you very much for your response. I am running this code, but some key masks are not being identified, whereas on the official website's segmentation everything is recognized, including the masks I need. I have tried adjusting various parameters given in the script, but it hasn't solved the problem.I look forward to your response and suggestions.

zdk258 commented 3 weeks ago

Have you found the method to cover the entire image?

GZ-YourZY commented 1 week ago

Thank you very much for your response. I am running this code, but some key masks are not being identified, whereas on the official website's segmentation everything is recognized, including the masks I need. I have tried adjusting various parameters given in the script, but it hasn't solved the problem.I look forward to your response and suggestions.

Tóng wèn, qǐngwèn nín rúhé jiějué zhège wèntí 14 / 5,000 Same question, how do you solve this problem?