def get_pytorch_object_detector_mask(get_pytorch_object_detector_data):
    """
    This class tests the PyTorchObjectDetector object detector.
    """
    import torch
    import torchvision

    from art.estimators.object_detection.pytorch_object_detector import PyTorchObjectDetector

    # Define object detector
    model = torchvision.models.detection.maskrcnn_resnet50_fpn(
        pretrained=True, progress=True, num_classes=91, pretrained_backbone=True
    )
    params = [p for p in model.parameters() if p.requires_grad]
    optimizer = torch.optim.SGD(params, lr=0.01)

    object_detector = PyTorchObjectDetector(
        model=model,
        input_shape=(3, 416, 416),
        optimizer=optimizer,
        clip_values=(0, 1),
        channels_first=True,
        attack_losses=["loss_classifier", "loss_box_reg", "loss_objectness", "loss_rpn_box_reg"],
    )

    x_test, y_test = get_pytorch_object_detector_data

    yield object_detector, x_test, y_test

    This class tests the PyTorchObjectDetector object detector.
    
tests/estimators/object_detection/conftest.py