(self, loss, outputs, gt_instances, indices, num_boxes, **kwargs)
| 96 | return num_boxes |
| 97 | |
| 98 | def get_loss(self, loss, outputs, gt_instances, indices, num_boxes, **kwargs): |
| 99 | loss_map = { |
| 100 | 'labels': self.loss_labels, |
| 101 | 'cardinality': self.loss_cardinality, |
| 102 | 'boxes': self.loss_boxes, |
| 103 | } |
| 104 | assert loss in loss_map, f'do you really want to compute {loss} loss?' |
| 105 | return loss_map[loss](outputs, gt_instances, indices, num_boxes, **kwargs) |
| 106 | |
| 107 | def loss_boxes(self, outputs, gt_instances: List[Instances], indices: List[tuple], num_boxes): |
| 108 | """Compute the losses related to the bounding boxes, the L1 regression loss and the GIoU loss |
no outgoing calls
no test coverage detected