docstr: Add current model predictions (usually the result of a batch) to the tracking
          
docstr_tok: ["Add","current","model","predictions","(","usually","the","result","of","a","batch",")","to","the","tracking"]
code: def track(
      self,
      model: model_interface.TrackerInterface,
      full_res=False,
      data=None,
      **kwargs,
  ):
      """Add current model predictions (usually the result of a batch) to the tracking"""
      super().track(model)
  
      # Train mode or low res, nothing special to do
      if self._stage == "train" or not full_res:
          return
  
      # Test mode, compute votes in order to get full res predictions
      if self._test_area is None:
          self._test_area = self._dataset.test_data.clone()
          if self._test_area.y is None:
              raise ValueError(
                  "It seems that the test area data does not have labels (attribute y)."
              )
          self._test_area.prediction_count = torch.zeros(
              self._test_area.y.shape[0], dtype=torch.int
          )
          self._test_area.votes = torch.zeros(
              (self._test_area.y.shape[0], self._num_classes),
              dtype=torch.float,
          )
          self._test_area.to(model.device)
  
      # Gather origin ids and check that it fits with the test set
      inputs = data if data is not None else model.get_input()
      if inputs[SaveOriginalPosId.KEY] is None:
          raise ValueError(
              "The inputs given to the model do not have a %s attribute."
              % SaveOriginalPosId.KEY
          )
  
      originids = inputs[SaveOriginalPosId.KEY]
      if originids.dim() == 2:
          originids = originids.flatten()
      if originids.max() >= self._test_area.pos.shape[0]:
          raise ValueError(
              "Origin ids are larger than the number of points in the original point cloud."
          )
  
      # Set predictions
      outputs = model.get_output()
      self._test_area.votes[originids] += outputs
      self._test_area.prediction_count[originids] += 1
  
file_path: torch-points3d/torch_points3d/metrics/s3dis_tracker.py
imports: from typing import Dict, Any
  import logging
  import torch
  from torch_geometric.nn.unpool import knn_interpolate
  from torch_points3d.metrics.confusion_matrix import ConfusionMatrix
  from torch_points3d.metrics.segmentation_tracker import SegmentationTracker
  from torch_points3d.metrics.base_tracker import BaseTracker, meter_value
  from torch_points3d.datasets.segmentation import IGNORE_LABEL
  from torch_points3d.core.data_transform import SaveOriginalPosId
  from torch_points3d.models import model_interface
label_desc: Use image node_id 2 for calling the S3DISTracker obj's underlying member method code with example usage: obj.track(model, full_res, data) without return types