class_docstr: Implementation of Region Proposal Network.
class_docstr_tok: ["Implementation","of","Region","Proposal","Network","."]
docstr: Initialize the weights in detector.
  
  Args:
      pretrained (str, optional): Path to pre-trained weights.
          Defaults to None.
docstr_tok: ["Initialize","the","weights","in","detector",".","Args",":","pretrained","(","str",",","optional",")",":","Path","to","pre-trained","weights",".","Defaults","to","None","."]
code: def init_weights(self, pretrained=None):
      """Initialize the weights in detector.
  
      Args:
          pretrained (str, optional): Path to pre-trained weights.
              Defaults to None.
      """
      super(RPN, self).init_weights(pretrained)
      self.backbone.init_weights(pretrained=pretrained)
      if self.with_neck:
          self.neck.init_weights()
      self.rpn_head.init_weights()
  
file_path: insightface/detection/scrfd/mmdet/models/detectors/rpn.py
imports: import mmcv
  from mmcv.image import tensor2imgs
  from mmdet.core import bbox_mapping
  from ..builder import DETECTORS, build_backbone, build_head, build_neck
  from .base import BaseDetector
label_desc: Use image node_id 2 for calling the RPN obj's underlying member method code with example usage: obj.init_weights(pretrained) without return types