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","."]
code: def __init__(
      self,
      pos_scale: float,
      neg_scale: float,
      min_pos_iof: float = 1e-2,
      ignore_gt_scale: float = 0.5,
      foreground_dominate: bool = False,
      iou_calculator: ConfigType = dict(type="BboxOverlaps2D"),
  ) -> None:
      self.pos_scale = pos_scale
      self.neg_scale = neg_scale
      self.min_pos_iof = min_pos_iof
      self.ignore_gt_scale = ignore_gt_scale
      self.foreground_dominate = foreground_dominate
      self.iou_calculator = TASK_UTILS.build(iou_calculator)
  
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 1 to create a new CenterRegionAssigner object from inherited base classes: BaseAssigner with example: obj = CenterRegionAssigner(pos_scale, neg_scale, min_pos_iof, ignore_gt_scale, foreground_dominate, iou_calculator)