class_docstr: Random padding augmenter.
  
  Parameters
  ----------
  aspect_ratio_range : tuple of floats, default=(0.75, 1.33)
      The padded area of the image must have an aspect ratio = width / height
      within this range.
  area_range : tuple of floats, default=(1.0, 3.0)
      The padded area of the image must be larger than the original area
  max_attempts : int, default=50
      Number of attempts at generating a padded region of the image of the
      specified constraints. After max_attempts failures, return the original image.
  pad_val: float or tuple of float, default=(128, 128, 128)
      pixel value to be filled when padding is enabled.
class_docstr_tok: ["Random","padding","augmenter",".","Parameters","--","--","--","--","--","aspect_ratio_range",":","tuple","of","floats",",","default=","(","0.75",",","1.33",")","The","padded","area","of","the","image","must","have","an","aspect","ratio","=","width","\/","height","within","this","range",".","area_range",":","tuple","of","floats",",","default=","(","1.0",",","3.0",")","The","padded","area","of","the","image","must","be","larger","than","the","original","area","max_attempts",":","int",",","default=50","Number","of","attempts","at","generating","a","padded","region","of","the","image","of","the","specified","constraints",".","After","max_attempts","failures",",","return","the","original","image",".","pad_val",":","float","or","tuple","of","float",",","default=","(","128",",","128",",","128",")","pixel","value","to","be","filled","when","padding","is","enabled","."]
docstr: Update label according to padding region
docstr_tok: ["Update","label","according","to","padding","region"]
code: def _update_labels(self, label, pad_box, height, width):
      """Update label according to padding region"""
      out = label.copy()
      out[:, (1, 3)] = (out[:, (1, 3)] * width + pad_box[0]) / pad_box[
          2
      ]
      out[:, (2, 4)] = (out[:, (2, 4)] * height + pad_box[1]) / pad_box[
          3
      ]
      return out
  
imports: import json
  import logging
  import random
  import warnings
  import numpy
  from ..base import numeric_types
  from ..None import ndarray
  from ..ndarray._internal import _cvcopyMakeBorder
  from ..None import io
  from .image import RandomOrderAug, ColorJitterAug, LightingAug, ColorNormalizeAug
  from .image import ResizeAug, ForceResizeAug, CastAug, HueJitterAug, RandomGrayAug
  from .image import fixed_crop, ImageIter, Augmenter
  from ..util import is_np_array
  from ..None import numpy
label_desc: Use image node_id 3 for calling the DetRandomPadAug obj's underlying member method code with example usage: obj._update_labels(label, pad_box, height, width) and returns: out