(
self, thresholds: List[float], labels: List[int], allow_low_quality_matches: bool = False
)
| 5 | # useful when there are huge number of gt boxes |
| 6 | class LoopMatcher(object): |
| 7 | def __init__( |
| 8 | self, thresholds: List[float], labels: List[int], allow_low_quality_matches: bool = False |
| 9 | ): |
| 10 | thresholds = thresholds[:] |
| 11 | assert thresholds[0] > 0 |
| 12 | thresholds.insert(0, -float("inf")) |
| 13 | thresholds.append(float("inf")) |
| 14 | assert all(low <= high for (low, high) in zip(thresholds[:-1], thresholds[1:])) |
| 15 | assert all(l in [-1, 0, 1] for l in labels) |
| 16 | assert len(labels) == len(thresholds) - 1 |
| 17 | |
| 18 | self.low_quality_thrshold = 0.3 |
| 19 | self.thresholds = thresholds |
| 20 | self.labels = labels |
| 21 | self.allow_low_quality_matches = allow_low_quality_matches |
| 22 | |
| 23 | |
| 24 | def _iou(self, boxes, box): |
nothing calls this directly
no outgoing calls
no test coverage detected