segment-anything icon indicating copy to clipboard operation
segment-anything copied to clipboard

Add granularity parameter to control segmented object size

Open HendricksJudy opened this issue 1 year ago • 0 comments

Fixes #770

Add granularity parameter to control segmented object granularity.

  • segment_anything/automatic_mask_generator.py

    • Add granularity parameter to SamAutomaticMaskGenerator class constructor.
    • Update generate method to blend smaller segments into larger ones based on the granularity parameter.
    • Add blend_segments method to handle the blending logic based on the granularity parameter.
  • scripts/amg.py

    • Add --granularity command-line argument to set the granularity of segmented objects.
    • Pass the granularity argument to the SamAutomaticMaskGenerator class.
  • README.md

    • Update documentation to include information about the new granularity parameter.
    • Add examples of how to use the granularity parameter in the Getting Started section.

HendricksJudy avatar Oct 22 '24 09:10 HendricksJudy