def _translate_predictions(self, predictions: Any) -> list[dict[str, np.ndarray]]:
        """
        Translate object detection predictions from the model format (torchvision) to ART format (torchvision) and
        convert tensors to numpy arrays.

        :param predictions: Object detection predictions in format x1y1x2y2 (torchvision).
        :return: Object detection predictions in format x1y1x2y2 (torchvision).
        """
        predictions_x1y1x2y2: list[dict[str, np.ndarray]] = []
        for pred in predictions:
            prediction = {}

            prediction["boxes"] = pred["boxes"].detach().cpu().numpy()
            prediction["labels"] = pred["labels"].detach().cpu().numpy()
            prediction["scores"] = pred["scores"].detach().cpu().numpy()
            if "masks" in pred:
                prediction["masks"] = pred["masks"].detach().cpu().numpy().squeeze()

            predictions_x1y1x2y2.append(prediction)

        return predictions_x1y1x2y2

        Translate object detection predictions from the model format (torchvision) to ART format (torchvision) and
        convert tensors to numpy arrays.

        :param predictions: Object detection predictions in format x1y1x2y2 (torchvision).
        :return: Object detection predictions in format x1y1x2y2 (torchvision).
        
art/estimators/object_detection/pytorch_object_detector.py