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.45k
stars
5.61k
forks
source link
could you please explain what are the role of crop_overlap_ratio and crop_n_points_downscale_factor parameters? #750
First the entire image has masks generated for it based on your grid size you declare (32 x 32 for example)
Next, if crop_n_layers > 0, then it will divide the photo into quadrants with the amount of overlap between those quadrants being set as crop_overlap_ratio. This prevents some masks from being missed by two adjacent quadrants.
For each quadrant, it will "zoom into each" for another round of automatic mask generation. crop_n_points_downscale_factor =1 means a 32x32 grid will be used for generating masks in this quadrant. If that is overkill, and you dont need that many points inside a quadrant, you can use for example crop_n_points_downscale_factor=2 which will make the grid 16x16 inside that quadrant.
Crop_NMS determines which masks to keep from the quadrants but I'm not perfectly clear on how that works
Hi, could you please explain what are the role of crop_overlap_ratio and crop_n_points_downscale_factor parameters? Thanks!