MCPcopy Create free account
hub / github.com/ImprintLab/Medical-SAM2 / agree_click

Function agree_click

func_2d/utils.py:432–438  ·  view source on GitHub ↗
(mask, label = 1)

Source from the content-addressed store, hash-verified

430 return point_label, indices[np.random.randint(len(indices))]
431
432def agree_click(mask, label = 1):
433 # max agreement position
434 indices = np.argwhere(mask == label)
435 if len(indices) == 0:
436 label = 1 - label
437 indices = np.argwhere(mask == label)
438 return label, indices[np.random.randint(len(indices))]
439
440
441def random_box(multi_rater):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected