class_docstr: Definition of a learning experience based on a :class:`DetectionScenario`
  instance.
  
  This experience implementation uses the generic experience-patterns
  assignment defined in the :class:`DetectionScenario` instance. Instances of
  this class are usually obtained from an object detection benchmark stream.
docstr: Creates an instance of an experience given the stream from this
  experience was taken and the current experience ID.
  
  :param origin_stream: The stream from which this experience was
      obtained.
  :param current_experience: The current experience ID, as an integer.
code: def __init__(
      self: TDetectionExperience,
      origin_stream: DetectionStream[TDetectionExperience],
      current_experience: int,
  ):
      """
      Creates an instance of an experience given the stream from this
      experience was taken and the current experience ID.
  
      :param origin_stream: The stream from which this experience was
          obtained.
      :param current_experience: The current experience ID, as an integer.
      """
  
      self._benchmark: DetectionScenario = origin_stream.benchmark
  
      dataset: DetectionDataset = (
          origin_stream.benchmark.stream_definitions[
              origin_stream.name
          ].exps_data[current_experience]
      )
  
      (
          classes_in_this_exp,
          previous_classes,
          classes_seen_so_far,
          future_classes,
      ) = origin_stream.benchmark.get_classes_timeline(
          current_experience, stream=origin_stream.name
      )
  
      super().__init__(
          origin_stream,
          dataset,
          current_experience,
          classes_in_this_exp,
          previous_classes,
          classes_seen_so_far,
          future_classes,
      )
  
imports: from typing import Iterable, Mapping, Optional, Sequence, Set, Tuple, TypeVar, List, Callable, Union, overload
  import warnings
  from avalanche.benchmarks.scenarios.deprecated.dataset_scenario import ClassesTimelineCLScenario, DatasetScenario, FactoryBasedStream, TStreamsUserDict
  from avalanche.benchmarks.scenarios.deprecated import AbstractClassTimelineExperience
  from avalanche.benchmarks.utils.data import AvalancheDataset
  from avalanche.benchmarks.utils.dataset_utils import manage_advanced_indexing
  from avalanche.benchmarks.utils.detection_dataset import DetectionDataset
label_desc: Use image node_id 1 to create a new DetectionExperience object from inherited base classes: AbstractClassTimelineExperience with example: obj = DetectionExperience(origin_stream, current_experience)