Modify: from_mmdetection add mask. See #703

This commit is contained in:
Seongjun Choi
2024-01-23 15:14:56 +09:00
parent 6b7ccfccd9
commit 823dc56057
+3
View File
@@ -330,6 +330,9 @@ class Detections:
xyxy=mmdet_results.pred_instances.bboxes.cpu().numpy(),
confidence=mmdet_results.pred_instances.scores.cpu().numpy(),
class_id=mmdet_results.pred_instances.labels.cpu().numpy().astype(int),
mask=mmdet_results.pred_instances.masks.cpu().numpy()
if 'masks' in mmdet_results.pred_instances
else None,
)
@classmethod