class_docstr: Assign the ground truth bounding boxes to anchors.
  
  Assigns the ground truth bounding boxes to anchors for training Region
  Proposal Networks introduced in Faster R-CNN [#]_.
  
  Offsets and scales to match anchors to the ground truth are
  calculated using the encoding scheme of
  :func:`~chainercv.links.model.faster_rcnn.bbox2loc`.
  
  .. [#] Shaoqing Ren, Kaiming He, Ross Girshick, Jian Sun.     Faster R-CNN: Towards Real-Time Object Detection with     Region Proposal Networks. NIPS 2015.
  
  Args:
      n_sample (int): The number of regions to produce.
      pos_iou_thresh (float): Anchors with IoU above this
          threshold will be assigned as positive.
      neg_iou_thresh (float): Anchors with IoU below this
          threshold will be assigned as negative.
      pos_ratio (float): Ratio of positive regions in the
          sampled regions.
class_docstr_tok: ["Assign","the","ground","truth","bounding","boxes","to","anchors",".","Assigns","the","ground","truth","bounding","boxes","to","anchors","for","training","Region","Proposal","Networks","introduced","in","Faster","R-CNN","[","#","]","_.","Offsets","and","scales","to","match","anchors","to","the","ground","truth","are","calculated","using","the","encoding","scheme","of",":","func",":","`","~chainercv.links.model.faster_rcnn.bbox2loc","`",".","..","[","#","]","Shaoqing","Ren",",","Kaiming","He",",","Ross","Girshick",",","Jian","Sun",".","Faster","R-CNN",":","Towards","Real-Time","Object","Detection","with","Region","Proposal","Networks",".","NIPS","2015",".","Args",":","n_sample","(","int",")",":","The","number","of","regions","to","produce",".","pos_iou_thresh","(","float",")",":","Anchors","with","IoU","above","this","threshold","will","be","assigned","as","positive",".","neg_iou_thresh","(","float",")",":","Anchors","with","IoU","below","this","threshold","will","be","assigned","as","negative",".","pos_ratio","(","float",")",":","Ratio","of","positive","regions","in","the","sampled","regions","."]
code: def __init__(
      self,
      n_sample=256,
      pos_iou_thresh=0.7,
      neg_iou_thresh=0.3,
      pos_ratio=0.5,
  ):
      self.n_sample = n_sample
      self.pos_iou_thresh = pos_iou_thresh
      self.neg_iou_thresh = neg_iou_thresh
      self.pos_ratio = pos_ratio
  
file_path: chainercv/chainercv/links/model/faster_rcnn/utils/anchor_target_creator.py
imports: import numpy
  import chainer
  from chainer.backends import cuda
  from chainercv.links.model.faster_rcnn.utils.bbox2loc import bbox2loc
  from chainercv.utils.bbox.bbox_iou import bbox_iou
label_desc: Use image node_id 1 to create a new AnchorTargetCreator object from inherited base classes: object with example: obj = AnchorTargetCreator(n_sample, pos_iou_thresh, neg_iou_thresh, pos_ratio)