def get_pytorch_detr(get_pytorch_object_detector_data):
    """
    This class tests the PyTorchDetectionTransformer object detector.
    """
    import torch

    from art.estimators.object_detection.pytorch_detection_transformer import PyTorchDetectionTransformer

    mean = [0.485, 0.456, 0.406]
    std = [0.229, 0.224, 0.225]
    object_detector = PyTorchDetectionTransformer(
        input_shape=(3, 416, 416),
        clip_values=(0, 1),
        preprocessing=(mean, std),
        channels_first=True,
        attack_losses=("loss_ce", "loss_bbox", "loss_giou"),
    )
    params = [p for p in object_detector.model.parameters() if p.requires_grad]
    optimizer = torch.optim.SGD(params, lr=0.01)

    object_detector.set_params(optimizer=optimizer)

    x_test, y_test = get_pytorch_object_detector_data

    yield object_detector, x_test, y_test

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