code: def test_video_detection_retinanet_custom_objects():
      delete_cache([video_file_output + ".mp4"])
  
      detector = VideoObjectDetection()
      detector.setModelTypeAsRetinaNet()
      detector.setModelPath(
          model_path=os.path.join(
              test_folder,
              "data-models",
              "retinanet_resnet50_fpn_coco-eeacb38b.pth",
          )
      )
      detector.loadModel()
  
      custom_objects = detector.CustomObjects(person=True, bus=True)
  
      video_path = detector.detectObjectsFromVideo(
          input_file_path=video_file,
          output_file_path=video_file_output,
          save_detected_video=True,
          frames_per_second=30,
          log_progress=True,
          custom_objects=custom_objects,
      )
  
      assert os.path.exists(video_file_output + ".mp4")
      assert isinstance(video_path, str)
  
      delete_cache([video_file_output + ".mp4"])
  
file_path: ImageAI/test/test_video_object_detection.py
imports: import os, sys
  from typing import List
  from numpy import ndarray
  from os.path import dirname
  from mock import patch
  from imageai.Detection import VideoObjectDetection
label_desc: Use image node_id 3 for calling a global function with example usage: test_video_detection_retinanet_custom_objects() without return types