class_docstr: Base class for RoI extractor.
  
  Args:
      roi_layer (dict): Specify RoI layer type and arguments.
      out_channels (int): Output channels of RoI layers.
      featmap_strides (int): Strides of input feature maps.
docstr: Scale RoI coordinates by scale factor.
  
  Args:
      rois (torch.Tensor): RoI (Region of Interest), shape (n, 5)
      scale_factor (float): Scale factor that RoI will be multiplied by.
  
  Returns:
      torch.Tensor: Scaled RoI.
code: def roi_rescale(self, rois, scale_factor):
      """Scale RoI coordinates by scale factor.
  
      Args:
          rois (torch.Tensor): RoI (Region of Interest), shape (n, 5)
          scale_factor (float): Scale factor that RoI will be multiplied by.
  
      Returns:
          torch.Tensor: Scaled RoI.
      """
  
      cx = (rois[:, 1] + rois[:, 3]) * 0.5
      cy = (rois[:, 2] + rois[:, 4]) * 0.5
      w = rois[:, 3] - rois[:, 1]
      h = rois[:, 4] - rois[:, 2]
      new_w = w * scale_factor
      new_h = h * scale_factor
      x1 = cx - new_w * 0.5
      x2 = cx + new_w * 0.5
      y1 = cy - new_h * 0.5
      y2 = cy + new_h * 0.5
      new_rois = torch.stack((rois[:, 0], x1, y1, x2, y2), dim=-1)
      return new_rois
  
file_path: insightface/detection/scrfd/mmdet/models/roi_heads/roi_extractors/base_roi_extractor.py
imports: from abc import ABCMeta, abstractmethod
  import torch
  import torch.nn
  from mmcv import ops
label_desc: Use image node_id 5 for calling the BaseRoIExtractor obj's underlying member method code with example usage: obj.roi_rescale(rois, scale_factor) and returns: new_rois