code: def test_evaluate_segmentations_on_disk():
      dataset = foz.load_zoo_dataset(
          "coco-2017",
          split="validation",
          max_samples=10,
          shuffle=True,
      ).clone()
  
      # These are the VOC classes
      CLASSES = [
          "background",
          "aeroplane",
          "bicycle",
          "bird",
          "boat",
          "bottle",
          "bus",
          "car",
          "cat",
          "chair",
          "cow",
          "diningtable",
          "dog",
          "horse",
          "motorbike",
          "person",
          "pottedplant",
          "sheep",
          "sofa",
          "train",
          "tvmonitor",
      ]
  
      MASK_TARGETS = {idx: label for idx, label in enumerate(CLASSES)}
  
      # Store segmentations on disk rather than in-database
      etau.ensure_empty_dir("/tmp/resnet50", cleanup=True)
      model = foz.load_zoo_model("deeplabv3-resnet50-coco-torch")
      dataset.apply_model(model, "resnet50", output_dir="/tmp/resnet50")
      print(dataset.values("resnet50.mask_path"))
  
      # Store segmentations on disk rather than in-database
      etau.ensure_empty_dir("/tmp/resnet101", cleanup=True)
      model = foz.load_zoo_model("deeplabv3-resnet101-coco-torch")
      dataset.apply_model(
          model, "resnet101", output_dir="/tmp/resnet101"
      )
      print(dataset.values("resnet101.mask_path"))
  
      #
      # Full evaluation
      #
  
      EVAL_KEY = "eval_resnet"
  
      results = dataset.evaluate_segmentations(
          "resnet50",
          gt_field="resnet101",
          eval_key=EVAL_KEY,
          mask_targets=MASK_TARGETS,
      )
  
      results.print_report()
  
      print(dataset.bounds("%s_accuracy" % EVAL_KEY))
      print(dataset.bounds("%s_precision" % EVAL_KEY))
      print(dataset.bounds("%s_recall" % EVAL_KEY))
      print(dataset.get_evaluation_info(EVAL_KEY))
  
      #
      # Bandwidth evaluation
      #
  
      EVAL_KEY_BW = "eval_resnet_bw"
  
      results = dataset.evaluate_segmentations(
          "resnet50",
          gt_field="resnet101",
          eval_key=EVAL_KEY_BW,
          mask_targets=MASK_TARGETS,
          bandwidth=5,
      )
  
      results.print_report()
  
      print(dataset.bounds("%s_accuracy" % EVAL_KEY_BW))
      print(dataset.bounds("%s_precision" % EVAL_KEY_BW))
      print(dataset.bounds("%s_recall" % EVAL_KEY_BW))
      print(dataset.get_evaluation_info(EVAL_KEY_BW))
  
      #
      # Cleanup
      #
  
      dataset.delete_evaluations()
  
file_path: fiftyone/tests/intensive/evaluation_tests.py
imports: import random
  import unittest
  import numpy
  import eta.core.utils
  import pytest
  import fiftyone
  import fiftyone.zoo
  from fiftyone import ViewField
label_desc: Use image node_id 9 for calling a global function with example usage: test_evaluate_segmentations_on_disk() without return types