class_docstr: Implementation of RPN head.
  
  Args:
      in_channels (int): Number of channels in the input feature map.
      num_classes (int): Number of categories excluding the background
          category. Defaults to 1.
      init_cfg (:obj:`ConfigDict` or list[:obj:`ConfigDict`] or dict or             list[dict]): Initialization config dict.
      num_convs (int): Number of convolution layers in the head.
          Defaults to 1.
code: def __init__(
      self,
      in_channels: int,
      num_classes: int = 1,
      init_cfg: MultiConfig = dict(
          type="Normal", layer="Conv2d", std=0.01
      ),
      num_convs: int = 1,
      **kwargs,
  ) -> None:
      self.num_convs = num_convs
      assert num_classes == 1
      super().__init__(
          num_classes=num_classes,
          in_channels=in_channels,
          init_cfg=init_cfg,
          **kwargs,
      )
  
imports: import copy
  from typing import List, Optional, Tuple
  import torch
  import torch.nn
  import torch.nn.functional
  from mmcv.cnn import ConvModule
  from mmcv.ops import batched_nms
  from mmengine.config import ConfigDict
  from mmengine.structures import InstanceData
  from torch import Tensor
  from mmdet.registry import MODELS
  from mmdet.structures.bbox import cat_boxes, empty_box_as, get_box_tensor, get_box_wh, scale_boxes
  from mmdet.utils import InstanceList, MultiConfig, OptInstanceList
  from .anchor_head import AnchorHead
label_desc: Use image node_id 1 to create a new RPNHead object from inherited base classes: AnchorHead with example: obj = RPNHead(in_channels, num_classes, init_cfg, num_convs)