def __call__(
        self,
        proposals_with_gt: List[Instances],
        densepose_predictor_outputs: Any,
        packed_annotations: Any,
    ) -> torch.Tensor:
        """
        Compute segmentation loss as cross-entropy between aligned unnormalized
        score estimates and ground truth; with ground truth given
        either by masks, or by coarse segmentation annotations.

        Args:
            proposals_with_gt (list of Instances): detections with associated ground truth data
            densepose_predictor_outputs: an object of a dataclass that contains predictor outputs
                with estimated values; assumed to have the following attributes:
                * coarse_segm - coarse segmentation estimates, tensor of shape [N, D, S, S]
            packed_annotations: packed annotations for efficient loss computation
        Return:
            tensor: loss value as cross-entropy for raw unnormalized scores
                given ground truth labels
        """
        if self.segm_trained_by_masks:
            return self.mask_loss(proposals_with_gt, densepose_predictor_outputs)
        return self.segm_loss(proposals_with_gt, densepose_predictor_outputs, packed_annotations)

        Compute segmentation loss as cross-entropy between aligned unnormalized
        score estimates and ground truth; with ground truth given
        either by masks, or by coarse segmentation annotations.

        Args:
            proposals_with_gt (list of Instances): detections with associated ground truth data
            densepose_predictor_outputs: an object of a dataclass that contains predictor outputs
                with estimated values; assumed to have the following attributes:
                * coarse_segm - coarse segmentation estimates, tensor of shape [N, D, S, S]
            packed_annotations: packed annotations for efficient loss computation
        Return:
            tensor: loss value as cross-entropy for raw unnormalized scores
                given ground truth labels
        
EVA-02/det/projects/DensePose/densepose/modeling/losses/mask_or_segm.py