def get_global_pred_target_pairs_on_batch(type_heatmap: Tensor, tar_bbox: Tensor, tar_type: Optional[Tensor], pad_value: float = -1, **kwargs) -> Tensor: # compute pred target pairs for types target = CenterNetMixin.combine_box_target(tar_bbox, tar_type) type_pairs = CenterNetMixin.get_global_pred_target_pairs( type_heatmap, target, pad_value=pad_value, **kwargs) return type_pairs
def get_local_pred_target_pairs_on_batch( type_heatmap: Tensor, tar_bbox: Tensor, tar_type: Tensor, pad_value: float = -1, **kwargs) -> Union[Tensor, List[Tensor]]: target = CenterNetMixin.combine_box_target(tar_bbox, tar_type) type_pairs = CenterNetMixin.get_pred_target_pairs(type_heatmap, target, upsample, pad_value=pad_value, **kwargs) return type_pairs