class_docstr: This class is a helper to perform full point cloud prediction by having votes interpolated using knn
class_docstr_tok: ["This","class","is","a","helper","to","perform","full","point","cloud","prediction","by","having","votes","interpolated","using","knn"]
docstr: Populates scores for the points in data
  
  Parameters
  ----------
  data : Data
      should contain `pos` and `SaveOriginalPosId.KEY` keys
  output : torch.Tensor
      probablities out of the model, shape: [N,nb_classes]
  batch_mask: torch.Tensor | int
      mask to access the associated element
docstr_tok: ["Populates","scores","for","the","points","in","data","Parameters","--","--","--","--","--","data",":","Data","should","contain","`","pos","`","and","`","SaveOriginalPosId.KEY","`","keys","output",":","torch.Tensor","probablities","out","of","the","model",",","shape",":","[","N",",","nb_classes","]","batch_mask",":","torch.Tensor","|","int","mask","to","access","the","associated","element"]
code: def add_vote(self, data, output, batch_mask):
      """Populates scores for the points in data
  
      Parameters
      ----------
      data : Data
          should contain `pos` and `SaveOriginalPosId.KEY` keys
      output : torch.Tensor
          probablities out of the model, shape: [N,nb_classes]
      batch_mask: torch.Tensor | int
          mask to access the associated element
      """
      idx = data[SaveOriginalPosId.KEY][batch_mask]
      self._votes[idx] += output
      self._vote_counts[idx] += 1
      self._num_votes += 1
  
file_path: torch-points3d/torch_points3d/metrics/segmentation_helpers.py
imports: import numpy
  import torch
  from torch_points3d.core.data_transform import SaveOriginalPosId
  from torch_geometric.nn.unpool import knn_interpolate
label_desc: Use image node_id 8 for calling the SegmentationVoter obj's underlying member method code with example usage: obj.add_vote(data, output, batch_mask) without return types