code: def test_large_model_pt(self):
      model_id = "facebook/detr-resnet-50"
  
      model = AutoModelForObjectDetection.from_pretrained(model_id)
      feature_extractor = AutoFeatureExtractor.from_pretrained(model_id)
      object_detector = ObjectDetectionPipeline(
          model=model, feature_extractor=feature_extractor
      )
  
      outputs = object_detector(
          "http://images.cocodataset.org/val2017/000000039769.jpg"
      )
      self.assertEqual(
          nested_simplify(outputs, decimals=4),
          [
              {
                  "score": 0.9982,
                  "label": "remote",
                  "box": {
                      "xmin": 40,
                      "ymin": 70,
                      "xmax": 175,
                      "ymax": 117,
                  },
              },
              {
                  "score": 0.9960,
                  "label": "remote",
                  "box": {
                      "xmin": 333,
                      "ymin": 72,
                      "xmax": 368,
                      "ymax": 187,
                  },
              },
              {
                  "score": 0.9955,
                  "label": "couch",
                  "box": {
                      "xmin": 0,
                      "ymin": 1,
                      "xmax": 639,
                      "ymax": 473,
                  },
              },
              {
                  "score": 0.9988,
                  "label": "cat",
                  "box": {
                      "xmin": 13,
                      "ymin": 52,
                      "xmax": 314,
                      "ymax": 470,
                  },
              },
              {
                  "score": 0.9987,
                  "label": "cat",
                  "box": {
                      "xmin": 345,
                      "ymin": 23,
                      "xmax": 640,
                      "ymax": 368,
                  },
              },
          ],
      )
  
      outputs = object_detector(
          [
              "http://images.cocodataset.org/val2017/000000039769.jpg",
              "http://images.cocodataset.org/val2017/000000039769.jpg",
          ]
      )
      self.assertEqual(
          nested_simplify(outputs, decimals=4),
          [
              [
                  {
                      "score": 0.9982,
                      "label": "remote",
                      "box": {
                          "xmin": 40,
                          "ymin": 70,
                          "xmax": 175,
                          "ymax": 117,
                      },
                  },
                  {
                      "score": 0.9960,
                      "label": "remote",
                      "box": {
                          "xmin": 333,
                          "ymin": 72,
                          "xmax": 368,
                          "ymax": 187,
                      },
                  },
                  {
                      "score": 0.9955,
                      "label": "couch",
                      "box": {
                          "xmin": 0,
                          "ymin": 1,
                          "xmax": 639,
                          "ymax": 473,
                      },
                  },
                  {
                      "score": 0.9988,
                      "label": "cat",
                      "box": {
                          "xmin": 13,
                          "ymin": 52,
                          "xmax": 314,
                          "ymax": 470,
                      },
                  },
                  {
                      "score": 0.9987,
                      "label": "cat",
                      "box": {
                          "xmin": 345,
                          "ymin": 23,
                          "xmax": 640,
                          "ymax": 368,
                      },
                  },
              ],
              [
                  {
                      "score": 0.9982,
                      "label": "remote",
                      "box": {
                          "xmin": 40,
                          "ymin": 70,
                          "xmax": 175,
                          "ymax": 117,
                      },
                  },
                  {
                      "score": 0.9960,
                      "label": "remote",
                      "box": {
                          "xmin": 333,
                          "ymin": 72,
                          "xmax": 368,
                          "ymax": 187,
                      },
                  },
                  {
                      "score": 0.9955,
                      "label": "couch",
                      "box": {
                          "xmin": 0,
                          "ymin": 1,
                          "xmax": 639,
                          "ymax": 473,
                      },
                  },
                  {
                      "score": 0.9988,
                      "label": "cat",
                      "box": {
                          "xmin": 13,
                          "ymin": 52,
                          "xmax": 314,
                          "ymax": 470,
                      },
                  },
                  {
                      "score": 0.9987,
                      "label": "cat",
                      "box": {
                          "xmin": 345,
                          "ymin": 23,
                          "xmax": 640,
                          "ymax": 368,
                      },
                  },
              ],
          ],
      )
  
file_path: transformers/tests/pipelines/test_pipelines_object_detection.py
imports: import unittest
  from transformers import MODEL_FOR_OBJECT_DETECTION_MAPPING, AutoFeatureExtractor, AutoModelForObjectDetection, ObjectDetectionPipeline, is_vision_available, pipeline
  from transformers.testing_utils import is_pipeline_test, nested_simplify, require_pytesseract, require_tf, require_timm, require_torch, require_vision, slow
  from .test_pipelines_common import ANY
label_desc: Use image node_id 5 for calling the ObjectDetectionPipelineTests obj's underlying member method code with example usage: obj.test_large_model_pt() without return types