MCPcopy Create free account
hub / github.com/UX-Decoder/Semantic-SAM / crop_len

Function crop_len

utils/sam_utils/amg.py:215–216  ·  view source on GitHub ↗
(orig_len, n_crops, overlap)

Source from the content-addressed store, hash-verified

213 layer_idxs.append(0)
214
215 def crop_len(orig_len, n_crops, overlap):
216 return int(math.ceil((overlap * (n_crops - 1) + orig_len) / n_crops))
217
218 for i_layer in range(n_layers):
219 n_crops_per_side = 2 ** (i_layer + 1)

Callers 1

generate_crop_boxesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected