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.87k
stars
5.66k
forks
source link
Add granularity parameter to control segmented object size #785
Fixes #770
Add granularity parameter to control segmented object granularity.
segment_anything/automatic_mask_generator.py
granularity
parameter toSamAutomaticMaskGenerator
class constructor.generate
method to blend smaller segments into larger ones based on thegranularity
parameter.blend_segments
method to handle the blending logic based on thegranularity
parameter.scripts/amg.py
--granularity
command-line argument to set the granularity of segmented objects.granularity
argument to theSamAutomaticMaskGenerator
class.README.md
granularity
parameter.granularity
parameter in theGetting Started
section.