MCPcopy Create free account
hub / github.com/InternRobotics/EmbodiedScan / __call__

Method __call__

embodiedscan/models/losses/match_cost.py:102–113  ·  view source on GitHub ↗
(self, pred_instances: InstanceData,
                 gt_instances: InstanceData)

Source from the content-addressed store, hash-verified

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()

Callers

nothing calls this directly

Calls 2

overlapsMethod · 0.95

Tested by

no test coverage detected