class_docstr: Translate the images, bboxes, masks and segmentation maps horizontally
  or vertically.
  
  Args:
      level (int | float): The level for Translate and should be in
          range [0,_MAX_LEVEL].
      prob (float): The probability for performing translation and
          should be in range [0, 1].
      img_fill_val (int | float | tuple): The filled value for image
          border. If float, the same fill value will be used for all
          the three channels of image. If tuple, the should be 3
          elements (e.g. equals the number of channels for image).
      seg_ignore_label (int): The fill value used for segmentation map.
          Note this value must equals ``ignore_label`` in ``semantic_head``
          of the corresponding config. Default 255.
      direction (str): The translate direction, either "horizontal"
          or "vertical".
      max_translate_offset (int | float): The maximum pixel's offset for
          Translate.
      random_negative_prob (float): The probability that turns the
          offset negative.
      min_size (int | float): The minimum pixel for filtering
          invalid bboxes after the translation.
class_docstr_tok: ["Translate","the","images",",","bboxes",",","masks","and","segmentation","maps","horizontally","or","vertically",".","Args",":","level","(","int","|","float",")",":","The","level","for","Translate","and","should","be","in","range","[","0",",","_MAX_LEVEL","]",".","prob","(","float",")",":","The","probability","for","performing","translation","and","should","be","in","range","[","0",",","1","]",".","img_fill_val","(","int","|","float","|","tuple",")",":","The","filled","value","for","image","border",".","If","float",",","the","same","fill","value","will","be","used","for","all","the","three","channels","of","image",".","If","tuple",",","the","should","be","3","elements","(","e.g",".","equals","the","number","of","channels","for","image",")",".","seg_ignore_label","(","int",")",":","The","fill","value","used","for","segmentation","map",".","Note","this","value","must","equals","``","ignore_label","``","in","``","semantic_head","``","of","the","corresponding","config",".","Default","255.","direction","(","str",")",":","The","translate","direction",",","either","``","horizontal","''","or","``","vertical","''",".","max_translate_offset","(","int","|","float",")",":","The","maximum","pixel","'s","offset","for","Translate",".","random_negative_prob","(","float",")",":","The","probability","that","turns","the","offset","negative",".","min_size","(","int","|","float",")",":","The","minimum","pixel","for","filtering","invalid","bboxes","after","the","translation","."]
docstr: Call function to translate images, bounding boxes, masks and
  semantic segmentation maps.
  
  Args:
      results (dict): Result dict from loading pipeline.
  
  Returns:
      dict: Translated results.
docstr_tok: ["Call","function","to","translate","images",",","bounding","boxes",",","masks","and","semantic","segmentation","maps",".","Args",":","results","(","dict",")",":","Result","dict","from","loading","pipeline",".","Returns",":","dict",":","Translated","results","."]
code: def __call__(self, results):
      """Call function to translate images, bounding boxes, masks and
      semantic segmentation maps.
  
      Args:
          results (dict): Result dict from loading pipeline.
  
      Returns:
          dict: Translated results.
      """
      if np.random.rand() > self.prob:
          return results
      offset = random_negative(self.offset, self.random_negative_prob)
      self._translate_img(results, offset, self.direction)
      self._translate_bboxes(results, offset)
      # fill_val defaultly 0 for BitmapMasks and None for PolygonMasks.
      self._translate_masks(results, offset, self.direction)
      # fill_val set to ``seg_ignore_label`` for the ignored value
      # of segmentation map.
      self._translate_seg(
          results,
          offset,
          self.direction,
          fill_val=self.seg_ignore_label,
      )
      self._filter_invalid(results, min_size=self.min_size)
      return results
  
imports: import copy
  import cv2
  import mmcv
  import numpy
  from ..builder import PIPELINES
  from .compose import Compose
label_desc: Use image node_id 7 for calling the Translate obj's underlying member method code with example usage: obj.__call__(results) and returns: results, results