(self, pred_instances: InstanceData,
gt_instances: InstanceData)
| 100 | self.weight = weight |
| 101 | |
| 102 | def __call__(self, pred_instances: InstanceData, |
| 103 | gt_instances: InstanceData): |
| 104 | pred_bboxes = EulerDepthInstance3DBoxes( |
| 105 | pred_instances.bboxes_3d.tensor, origin=(0.5, 0.5, 0.5)) |
| 106 | gt_bboxes = EulerDepthInstance3DBoxes(gt_instances.bboxes_3d.tensor, |
| 107 | origin=(0.5, 0.5, 0.5)) |
| 108 | overlaps = pred_bboxes.overlaps(pred_bboxes, gt_bboxes) |
| 109 | |
| 110 | # The 1 is a constant that doesn't change the matching, so omitted. |
| 111 | iou_cost = -overlaps |
| 112 | |
| 113 | return iou_cost * self.weight |
| 114 | |
| 115 | |
| 116 | @TASK_UTILS.register_module() |
nothing calls this directly
no test coverage detected