facebookresearch / facebookresearch/segment-anything

Type of argument 'crop-overlap-ratio' should be changed from int to float

Open
#259 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
54.9k
Forks
6.4k
PR merge metrics
No merged PRs in 30d

Description

In script/amg.py
`
amg_settings.add_argument(
"--crop-overlap-ratio",
type=int,
default=None,
help="Larger numbers mean image crops will overlap more.",
)
`
conflicts with SamAutomaticMaskGenerator in segment_anything/automatic_mask_generator.py
`
class SamAutomaticMaskGenerator:
def __init__(
self,
model: Sam,
...,
crop_overlap_ratio: float = 512 / 1500,
...):
`

Contributor guide

Open the contributing guide

Research direction

Open script/amg.py and compare the --crop-overlap-ratio argument definition with SamAutomaticMaskGenerator in segment_anything/automatic_mask_generator.py. Check how the CLI value is parsed and passed through, then confirm that fractional overlap ratios are accepted consistently with the generator's float default.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, computer-vision
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.