class_docstr: Assign pixels at the center region of a bbox as positive.
  
  Each proposals will be assigned with `-1`, `0`, or a positive integer
  indicating the ground truth index.
  - -1: negative samples
  - semi-positive numbers: positive sample, index (0-based) of assigned gt
  
  Args:
      pos_scale (float): Threshold within which pixels are
          labelled as positive.
      neg_scale (float): Threshold above which pixels are
          labelled as positive.
      min_pos_iof (float): Minimum iof of a pixel with a gt to be
          labelled as positive. Default: 1e-2
      ignore_gt_scale (float): Threshold within which the pixels
          are ignored when the gt is labelled as shadowed. Default: 0.5
      foreground_dominate (bool): If True, the bbox will be assigned as
          positive when a gt's kernel region overlaps with another's shadowed
          (ignored) region, otherwise it is set as ignored. Default to False.
      iou_calculator (:obj:`ConfigDict` or dict): Config of overlaps
          Calculator.
class_docstr_tok: ["Assign","pixels","at","the","center","region","of","a","bbox","as","positive",".","Each","proposals","will","be","assigned","with","`","-1","`",",","`","0","`",",","or","a","positive","integer","indicating","the","ground","truth","index",".","-","-1",":","negative","samples","-","semi-positive","numbers",":","positive","sample",",","index","(","0-based",")","of","assigned","gt","Args",":","pos_scale","(","float",")",":","Threshold","within","which","pixels","are","labelled","as","positive",".","neg_scale","(","float",")",":","Threshold","above","which","pixels","are","labelled","as","positive",".","min_pos_iof","(","float",")",":","Minimum","iof","of","a","pixel","with","a","gt","to","be","labelled","as","positive",".","Default",":","1e-2","ignore_gt_scale","(","float",")",":","Threshold","within","which","the","pixels","are","ignored","when","the","gt","is","labelled","as","shadowed",".","Default",":","0.5","foreground_dominate","(","bool",")",":","If","True",",","the","bbox","will","be","assigned","as","positive","when","a","gt","'s","kernel","region","overlaps","with","another","'s","shadowed","(","ignored",")","region",",","otherwise","it","is","set","as","ignored",".","Default","to","False",".","iou_calculator","(",":","obj",":","`","ConfigDict","`","or","dict",")",":","Config","of","overlaps","Calculator","."]
docstr: Get gt priorities according to their areas.
  
  Smaller gt has higher priority.
  
  Args:
      gt_bboxes (Tensor): Ground truth boxes, shape (k, 4).
  
  Returns:
      Tensor: The priority of gts so that gts with larger priority is
      more likely to be assigned. Shape (k, )
docstr_tok: ["Get","gt","priorities","according","to","their","areas",".","Smaller","gt","has","higher","priority",".","Args",":","gt_bboxes","(","Tensor",")",":","Ground","truth","boxes",",","shape","(","k",",","4",")",".","Returns",":","Tensor",":","The","priority","of","gts","so","that","gts","with","larger","priority","is","more","likely","to","be","assigned",".","Shape","(","k",",",")"]
code: def get_gt_priorities(self, gt_bboxes: Tensor) -> Tensor:
      """Get gt priorities according to their areas.
  
      Smaller gt has higher priority.
  
      Args:
          gt_bboxes (Tensor): Ground truth boxes, shape (k, 4).
  
      Returns:
          Tensor: The priority of gts so that gts with larger priority is
          more likely to be assigned. Shape (k, )
      """
      gt_areas = bboxes_area(gt_bboxes)
      # Rank all gt bbox areas. Smaller objects has larger priority
      _, sort_idx = gt_areas.sort(descending=True)
      sort_idx = sort_idx.argsort()
      return sort_idx
  
file_path: mmdetection/mmdet/models/task_modules/assigners/center_region_assigner.py
imports: from typing import Optional, Tuple
  import torch
  from mmengine.structures import InstanceData
  from torch import Tensor
  from mmdet.registry import TASK_UTILS
  from mmdet.utils import ConfigType
  from .assign_result import AssignResult
  from .base_assigner import BaseAssigner
label_desc: Use image node_id 2 for calling the CenterRegionAssigner obj's underlying member method code with example usage: obj.get_gt_priorities(gt_bboxes) and returns: sort_idx