code: def test_video_prediction(self):
      from os import path
  
      from sahi.predict import predict
      from sahi.utils.file import download_from_url
      from sahi.utils.yolov5 import (
          Yolov5TestConstants,
          download_yolov5n_model,
      )
  
      # download video file
      source_url = "https://github.com/obss/sahi/releases/download/0.9.2/test.mp4"
      destination_path = "tests/data/test.mp4"
      if not path.exists(destination_path):
          download_from_url(source_url, destination_path)
  
      # init model
      download_yolov5n_model()
  
      postprocess_type = "GREEDYNMM"
      match_metric = "IOS"
      match_threshold = 0.5
      image_size = 320
      class_agnostic = True
  
      # prepare paths
      source = destination_path
      project_dir = "tests/data/predict_result"
  
      # get sliced inference from video input without exporting visual
      if os.path.isdir(project_dir):
          shutil.rmtree(project_dir, ignore_errors=True)
      predict(
          model_type="yolov5",
          model_path=Yolov5TestConstants.YOLOV5N_MODEL_PATH,
          model_config_path=None,
          model_confidence_threshold=CONFIDENCE_THRESHOLD,
          model_device=MODEL_DEVICE,
          model_category_mapping=None,
          model_category_remapping=None,
          source=source,
          no_sliced_prediction=False,
          no_standard_prediction=True,
          slice_height=512,
          slice_width=512,
          image_size=image_size,
          overlap_height_ratio=0.2,
          overlap_width_ratio=0.2,
          postprocess_type=postprocess_type,
          postprocess_match_metric=match_metric,
          postprocess_match_threshold=match_threshold,
          postprocess_class_agnostic=class_agnostic,
          novisual=True,
          export_pickle=False,
          export_crop=False,
          dataset_json_path=None,
          project=project_dir,
          name="exp",
          verbose=1,
      )
  
      postprocess_type = "GREEDYNMM"
      match_metric = "IOS"
      match_threshold = 0.5
      image_size = 320
      class_agnostic = True
  
      # get standard inference from video input without exporting visual
      if os.path.isdir(project_dir):
          shutil.rmtree(project_dir, ignore_errors=True)
      predict(
          model_type="yolov5",
          model_path=Yolov5TestConstants.YOLOV5N_MODEL_PATH,
          model_config_path=None,
          model_confidence_threshold=CONFIDENCE_THRESHOLD,
          model_device=MODEL_DEVICE,
          model_category_mapping=None,
          model_category_remapping=None,
          source=source,
          no_sliced_prediction=True,
          no_standard_prediction=False,
          image_size=image_size,
          postprocess_type=postprocess_type,
          postprocess_match_metric=match_metric,
          postprocess_match_threshold=match_threshold,
          postprocess_class_agnostic=class_agnostic,
          novisual=True,
          export_pickle=False,
          export_crop=False,
          dataset_json_path=None,
          project=project_dir,
          name="exp",
          verbose=1,
      )
  
      # get standard inference from video input and export visual
      postprocess_type = "GREEDYNMM"
      match_metric = "IOS"
      match_threshold = 0.5
      image_size = 320
      class_agnostic = True
  
      # get full sized prediction
      if os.path.isdir(project_dir):
          shutil.rmtree(project_dir, ignore_errors=True)
      predict(
          model_type="yolov5",
          model_path=Yolov5TestConstants.YOLOV5N_MODEL_PATH,
          model_config_path=None,
          model_confidence_threshold=CONFIDENCE_THRESHOLD,
          model_device=MODEL_DEVICE,
          model_category_mapping=None,
          model_category_remapping=None,
          source=source,
          no_sliced_prediction=True,
          no_standard_prediction=False,
          image_size=image_size,
          postprocess_type=postprocess_type,
          postprocess_match_metric=match_metric,
          postprocess_match_threshold=match_threshold,
          postprocess_class_agnostic=class_agnostic,
          export_pickle=False,
          export_crop=False,
          dataset_json_path=None,
          project=project_dir,
          name="exp",
          verbose=1,
      )
  
file_path: sahi/tests/test_predict.py
imports: import os
  import shutil
  import unittest
  import numpy
  from sahi.utils.cv import read_image
label_desc: Use image node_id 9 for calling the TestPredict obj's underlying member method code with example usage: obj.test_video_prediction() without return types