code: def test_mmdet_object_detection_fit_basics(checkpoint_name):
      mmdet_image_name = download_sample_images()
      data_dir = download_sample_dataset()
  
      train_path = os.path.join(
          data_dir, "Annotations", "trainval_cocoformat.json"
      )
      test_path = os.path.join(
          data_dir, "Annotations", "test_cocoformat.json"
      )
      # Init predictor
      predictor = MultiModalPredictor(
          hyperparameters={
              "model.mmdet_image.checkpoint_name": checkpoint_name,
              "env.num_gpus": -1,
          },
          problem_type="object_detection",
          sample_data_path=train_path,
      )
  
      # Fit
      predictor.fit(
          train_path,
          hyperparameters={
              "optimization.learning_rate": 2e-4,
              "env.per_gpu_batch_size": 2,
          },
          time_limit=40,
      )
  
      # Evaluate on COCO format data
      predictor.evaluate(test_path)
  
      # Inference on COCO format data
      pred = predictor.predict(test_path)  # test batch inference
  
      # Inference on dictionary format data
      pred = predictor.predict(
          {"image": [mmdet_image_name] * 10}
      )  # test batch inference
  
      test_df = from_coco_or_voc(test_path)
  
      # Inference on dataframe format data
      pred = predictor.predict(test_df.iloc[:100])
  
      # Inference on COCO format data without annotations
      test_path_with_images_only = os.path.join(
          data_dir, "Annotations", "test_cocoformat_nolabel.json"
      )
      with open(test_path, "r") as f:
          test_data = json.load(f)
      test_data_images_only = {}
      test_data_images_only["images"] = test_data["images"][:100]
      with open(test_path_with_images_only, "w+") as f_wo_ann:
          json.dump(test_data_images_only, f_wo_ann)
      pred = predictor.predict(test_path_with_images_only)
  
file_path: autogluon/multimodal/tests/unittests/others/test_object_detection.py
imports: import json
  import os
  import pytest
  import requests
  from PIL import Image
  from autogluon.core.utils.loaders import load_zip
  from autogluon.multimodal import MultiModalPredictor
  from autogluon.multimodal.utils import from_coco_or_voc
label_desc: Use image node_id 3 for calling a global function with example usage: test_mmdet_object_detection_fit_basics(checkpoint_name) without return types