class_docstr: Apply Rotate Transformation to image (and its corresponding bbox, mask,
  segmentation).
  
  Args:
      level (int | float): The level should be in range (0,_MAX_LEVEL].
      scale (int | float): Isotropic scale factor. Same in
          ``mmcv.imrotate``.
      center (int | float | tuple[float]): Center point (w, h) of the
          rotation in the source image. If None, the center of the
          image will be used. Same in ``mmcv.imrotate``.
      img_fill_val (int | float | tuple): The fill value for image border.
          If float, the same 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.
      prob (float): The probability for perform transformation and
          should be in range 0 to 1.
      max_rotate_angle (int | float): The maximum angles for rotate
          transformation.
      random_negative_prob (float): The probability that turns the
           offset negative.
class_docstr_tok: ["Apply","Rotate","Transformation","to","image","(","and","its","corresponding","bbox",",","mask",",","segmentation",")",".","Args",":","level","(","int","|","float",")",":","The","level","should","be","in","range","(","0",",","_MAX_LEVEL","]",".","scale","(","int","|","float",")",":","Isotropic","scale","factor",".","Same","in","``","mmcv.imrotate","``",".","center","(","int","|","float","|","tuple","[","float","]",")",":","Center","point","(","w",",","h",")","of","the","rotation","in","the","source","image",".","If","None",",","the","center","of","the","image","will","be","used",".","Same","in","``","mmcv.imrotate","``",".","img_fill_val","(","int","|","float","|","tuple",")",":","The","fill","value","for","image","border",".","If","float",",","the","same","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.","prob","(","float",")",":","The","probability","for","perform","transformation","and","should","be","in","range","0","to","1.","max_rotate_angle","(","int","|","float",")",":","The","maximum","angles","for","rotate","transformation",".","random_negative_prob","(","float",")",":","The","probability","that","turns","the","offset","negative","."]
docstr: Rotate the masks.
docstr_tok: ["Rotate","the","masks","."]
code: def _rotate_masks(
      self, results, angle, center=None, scale=1.0, fill_val=0
  ):
      """Rotate the masks."""
      h, w, c = results["img_shape"]
      for key in results.get("mask_fields", []):
          masks = results[key]
          results[key] = masks.rotate(
              (h, w), angle, center, scale, fill_val
          )
  
imports: import copy
  import cv2
  import mmcv
  import numpy
  from ..builder import PIPELINES
  from .compose import Compose
label_desc: Use image node_id 4 for calling the Rotate obj's underlying member method code with example usage: obj._rotate_masks(results, angle, center, scale, fill_val) without return types