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: Change from point offset to point coordinate.
docstr_tok: ["Change","from","point","offset","to","point","coordinate","."]
code: def offset_to_pts(self, center_list, pred_list):
      """Change from point offset to point coordinate."""
      pts_list = []
      for i_lvl in range(len(self.point_strides)):
          pts_lvl = []
          for i_img in range(len(center_list)):
              pts_center = center_list[i_img][i_lvl][:, :2].repeat(
                  1, self.num_points
              )
              pts_shift = pred_list[i_lvl][i_img]
              yx_pts_shift = pts_shift.permute(1, 2, 0).view(
                  -1, 2 * self.num_points
              )
              y_pts_shift = yx_pts_shift[..., 0::2]
              x_pts_shift = yx_pts_shift[..., 1::2]
              xy_pts_shift = torch.stack([x_pts_shift, y_pts_shift], -1)
              xy_pts_shift = xy_pts_shift.view(
                  *yx_pts_shift.shape[:-1], -1
              )
              pts = (
                  xy_pts_shift * self.point_strides[i_lvl] + pts_center
              )
              pts_lvl.append(pts)
          pts_lvl = torch.stack(pts_lvl, 0)
          pts_list.append(pts_lvl)
      return pts_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 10 for calling the RepPointsHead obj's underlying member method code with example usage: obj.offset_to_pts(center_list, pred_list) and returns: pts_list