class_docstr: RepPoint head.
  
  Args:
      point_feat_channels (int): Number of channels of points features.
      gradient_mul (float): The multiplier to gradients from
          points refinement and recognition.
      point_strides (Iterable): points strides.
      point_base_scale (int): bbox scale for assigning labels.
      loss_cls (dict): Config of classification loss.
      loss_bbox_init (dict): Config of initial points loss.
      loss_bbox_refine (dict): Config of points loss in refinement.
      use_grid_points (bool): If we use bounding box representation, the
      reppoints is represented as grid points on the bounding box.
      center_init (bool): Whether to use center point assignment.
      transform_method (str): The methods to transform RepPoints to bbox.
class_docstr_tok: ["RepPoint","head",".","Args",":","point_feat_channels","(","int",")",":","Number","of","channels","of","points","features",".","gradient_mul","(","float",")",":","The","multiplier","to","gradients","from","points","refinement","and","recognition",".","point_strides","(","Iterable",")",":","points","strides",".","point_base_scale","(","int",")",":","bbox","scale","for","assigning","labels",".","loss_cls","(","dict",")",":","Config","of","classification","loss",".","loss_bbox_init","(","dict",")",":","Config","of","initial","points","loss",".","loss_bbox_refine","(","dict",")",":","Config","of","points","loss","in","refinement",".","use_grid_points","(","bool",")",":","If","we","use","bounding","box","representation",",","the","reppoints","is","represented","as","grid","points","on","the","bounding","box",".","center_init","(","bool",")",":","Whether","to","use","center","point","assignment",".","transform_method","(","str",")",":","The","methods","to","transform","RepPoints","to","bbox","."]
docstr: Get points according to feature map sizes.
  
  Args:
      featmap_sizes (list[tuple]): Multi-level feature map sizes.
      img_metas (list[dict]): Image meta info.
  
  Returns:
      tuple: points of each image, valid flags of each image
docstr_tok: ["Get","points","according","to","feature","map","sizes",".","Args",":","featmap_sizes","(","list","[","tuple","]",")",":","Multi-level","feature","map","sizes",".","img_metas","(","list","[","dict","]",")",":","Image","meta","info",".","Returns",":","tuple",":","points","of","each","image",",","valid","flags","of","each","image"]
code: def get_points(self, featmap_sizes, img_metas, device):
      """Get points according to feature map sizes.
  
      Args:
          featmap_sizes (list[tuple]): Multi-level feature map sizes.
          img_metas (list[dict]): Image meta info.
  
      Returns:
          tuple: points of each image, valid flags of each image
      """
      num_imgs = len(img_metas)
      num_levels = len(featmap_sizes)
  
      # since feature map sizes of all images are the same, we only compute
      # points center for one time
      multi_level_points = []
      for i in range(num_levels):
          points = self.point_generators[i].grid_points(
              featmap_sizes[i], self.point_strides[i], device
          )
          multi_level_points.append(points)
      points_list = [
          [point.clone() for point in multi_level_points]
          for _ in range(num_imgs)
      ]
  
      # for each image, we compute valid flags of multi level grids
      valid_flag_list = []
      for img_id, img_meta in enumerate(img_metas):
          multi_level_flags = []
          for i in range(num_levels):
              point_stride = self.point_strides[i]
              feat_h, feat_w = featmap_sizes[i]
              h, w = img_meta["pad_shape"][:2]
              valid_feat_h = min(int(np.ceil(h / point_stride)), feat_h)
              valid_feat_w = min(int(np.ceil(w / point_stride)), feat_w)
              flags = self.point_generators[i].valid_flags(
                  (feat_h, feat_w), (valid_feat_h, valid_feat_w), device
              )
              multi_level_flags.append(flags)
          valid_flag_list.append(multi_level_flags)
  
      return points_list, valid_flag_list
  
imports: import numpy
  import torch
  import torch.nn
  from mmcv.cnn import ConvModule, bias_init_with_prob, normal_init
  from mmcv.ops import DeformConv2d
  from mmdet.core import PointGenerator, build_assigner, build_sampler, images_to_levels, multi_apply, multiclass_nms, unmap
  from ..builder import HEADS, build_loss
  from .anchor_free_head import AnchorFreeHead
label_desc: Use image node_id 8 for calling the RepPointsHead obj's underlying member method code with example usage: obj.get_points(featmap_sizes, img_metas, device) and returns: points_list,  valid_flag_list