class_docstr: Base class for segmentation evaluation methods.
  
  Args:
      config: a :class:`SegmentationEvaluationConfig`
class_docstr_tok: ["Base","class","for","segmentation","evaluation","methods",".","Args",":","config",":","a",":","class",":","`","SegmentationEvaluationConfig","`"]
docstr: Registers the collection on which evaluation will be performed.
  
  This method will be called before calling :meth:`evaluate_samples`.
  Subclasses can extend this method to perform any setup required for an
  evaluation run.
  
  Args:
      samples: a :class:`fiftyone.core.collections.SampleCollection`
      eval_key: the evaluation key for this evaluation
docstr_tok: ["Registers","the","collection","on","which","evaluation","will","be","performed",".","This","method","will","be","called","before","calling",":","meth",":","`","evaluate_samples","`",".","Subclasses","can","extend","this","method","to","perform","any","setup","required","for","an","evaluation","run",".","Args",":","samples",":","a",":","class",":","`","fiftyone.core.collections.SampleCollection","`","eval_key",":","the","evaluation","key","for","this","evaluation"]
code: def register_samples(self, samples, eval_key):
      """Registers the collection on which evaluation will be performed.
  
      This method will be called before calling :meth:`evaluate_samples`.
      Subclasses can extend this method to perform any setup required for an
      evaluation run.
  
      Args:
          samples: a :class:`fiftyone.core.collections.SampleCollection`
          eval_key: the evaluation key for this evaluation
      """
      if eval_key is None:
          return
  
      dataset = samples._dataset
      processing_frames = samples._is_frame_field(self.config.gt_field)
  
      acc_field = "%s_accuracy" % eval_key
      pre_field = "%s_precision" % eval_key
      rec_field = "%s_recall" % eval_key
  
      dataset.add_sample_field(acc_field, fof.FloatField)
      dataset.add_sample_field(pre_field, fof.FloatField)
      dataset.add_sample_field(rec_field, fof.FloatField)
  
      if processing_frames:
          dataset.add_frame_field(acc_field, fof.FloatField)
          dataset.add_frame_field(pre_field, fof.FloatField)
          dataset.add_frame_field(rec_field, fof.FloatField)
  
      if self.config.compute_dice:
          dice_field = "%s_dice" % eval_key
          dataset.add_sample_field(dice_field, fof.FloatField)
          if processing_frames:
              dataset.add_frame_field(dice_field, fof.FloatField)
  
imports: from copy import deepcopy
  import logging
  import inspect
  import warnings
  import numpy
  import sklearn.metrics
  import eta.core.image
  import eta.core.utils
  import fiftyone
  import fiftyone.core.evaluation
  import fiftyone.core.fields
  import fiftyone.core.labels
  import fiftyone.core.utils
  import fiftyone.core.validation
  from .base import BaseEvaluationResults
label_desc: Use image node_id 1 for calling the SegmentationEvaluation obj's underlying member method code with example usage: obj.register_samples(samples, eval_key) without return types