class_docstr: Class that provides tracking of semantic segmentation as well as
  instance segmentation 
class_docstr_tok: ["Class","that","provides","tracking","of","semantic","segmentation","as","well","as","instance","segmentation"]
code: def finalise(self, track_instances=True, **kwargs):
      per_class_iou = (
          self._confusion_matrix.get_intersection_union_per_class()[0]
      )
      self._iou_per_class = {k: v for k, v in enumerate(per_class_iou)}
  
      if not track_instances:
          return
  
      rec, _, ap = self._ap_meter.eval(self._iou_threshold)
      self._ap = OrderedDict(sorted(ap.items()))
      self._rec = OrderedDict({})
      for key, val in sorted(rec.items()):
          try:
              value = val[-1]
          except TypeError:
              value = val
          self._rec[key] = value
  
imports: import torchnet
  from typing import NamedTuple, Dict, Any, List, Tuple
  import torch
  import numpy
  from torch_scatter import scatter_add
  from collections import OrderedDict, defaultdict
  from torch_points3d.models.model_interface import TrackerInterface
  from torch_points3d.metrics.segmentation_tracker import SegmentationTracker
  from torch_points3d.metrics.base_tracker import BaseTracker, meter_value
  from torch_points3d.models.panoptic.structures import PanopticResults, PanopticLabels
  from torch_points_kernels import instance_iou
  from .box_detection.ap import voc_ap
label_desc: Use image node_id 4 for calling the PanopticTracker obj's underlying member method code with example usage: obj.finalise(track_instances) without return types