class_docstr: Support bounding boxes.
class_docstr_tok: ["Support","bounding","boxes","."]
docstr: Adds DMVR pre-processors to the dataset.
docstr_tok: ["Adds","DMVR","pre-processors","to","the","dataset","."]
code: def _build(
      self,
      is_training: bool = True,
      # Video related parameters.
      num_frames: int = 32,
      stride: int = 1,
      num_test_clips: int = 1,
      min_resize: int = 256,
      crop_size: int = 224,
      resize_keep_aspect_ratio: bool = True,
      zero_centering_image: bool = False,
      random_flip: bool = True,
      normalization_mean: Union[tf.Tensor, float] = 0,
      normalization_std: Union[tf.Tensor, float] = 1,
      train_frame_sampling_mode: str = "random",
      use_crop_and_resize_video_mae: bool = False,
      # Label related parameters.
      one_hot_label: bool = True,
      get_label_str: bool = False,
      label_offset: int = 0,
      object_configs: ml_collections.ConfigDict = ml_collections.ConfigDict(),
  ):
      """Adds DMVR pre-processors to the dataset."""
  
      objects_dataset_utils.add_image_and_boxes(
          parser_builder=self.parser_builder,
          sampler_builder=self.sampler_builder,
          decoder_builder=self.decoder_builder,
          preprocessor_builder=self.preprocessor_builder,
          postprocessor_builder=self.postprocessor_builder,
          input_feature_name="image/encoded",
          output_feature_name=builders.IMAGE_FEATURE_NAME,
          is_training=is_training,
          random_flip=random_flip,
          num_frames=num_frames,
          stride=stride,
          num_test_clips=num_test_clips,
          min_resize=min_resize,
          crop_size=crop_size,
          use_crop_and_resize_video_mae=use_crop_and_resize_video_mae,
          train_frame_sampling_mode=train_frame_sampling_mode,
          zero_centering_image=zero_centering_image,
          normalization_mean=normalization_mean,
          normalization_std=normalization_std,
          object_configs=object_configs,
      )
  
      modalities.add_label(
          parser_builder=self.parser_builder,
          decoder_builder=self.decoder_builder,
          preprocessor_builder=self.preprocessor_builder,
          one_hot_label=one_hot_label,
          num_classes=self.num_classes,
          add_label_name=get_label_str,
      )
  
      if label_offset:
          self.preprocessor_builder.add_fn(
              fn=lambda x: x - label_offset,
              feature_name=builders.LABEL_INDEX_FEATURE_NAME,
              fn_name=f"label_offset_{label_offset}",
              add_before_fn_name=(
                  f"{builders.LABEL_INDEX_FEATURE_NAME}_one_hot"
              ),
          )
  
imports: import functools
  from typing import Dict, Iterator, Optional, Text, Tuple, Union
  from absl import logging
  from dmvr import builders
  from dmvr import modalities
  from flax import jax_utils
  import jax
  import jax.numpy
  import ml_collections
  import numpy
  from scenic.dataset_lib import dataset_utils
  from scenic.dataset_lib import datasets
  import scenic.projects.objectvivit.dataset_utils
  from scenic.projects.vivit.data.video_tfrecord_dataset import TFRecordDatasetFactory
  import tensorflow
label_desc: Use image node_id 1 for calling the ObjectsTFRecordDatasetFactory obj's underlying member method code with example usage: obj._build(is_training, num_frames, stride, num_test_clips, min_resize, crop_size, resize_keep_aspect_ratio, zero_centering_image, random_flip, normalization_mean, normalization_std, train_frame_sampling_mode, use_crop_and_resize_video_mae, one_hot_label, get_label_str, label_offset, object_configs) without return types