Skip to content

Instantly share code, notes, and snippets.

def aug_test(self,
imgs: List[Tensor],
img_metas: List[dict],
rescale: bool = False) -> Tensor:
acc_boxes = np.zeros((0, 5))
acc_score = np.zeros((0, self.roi_head.bbox_head.num_classes))
for img, img_meta in zip(imgs, img_metas):
for label, dets in enumerate(self.simple_test(img, img_meta, None, rescale)[0]):
boxes, scores = dets[:, :-1], dets[:, -1]
acc_boxes = np.vstack((acc_boxes, boxes))