code: def __init__(
      self,
      *args,
      init_cfg: Optional[Union[dict, ConfigDict]] = None,
      **kwargs,
  ) -> None:
      super().__init__(*args, init_cfg=init_cfg, **kwargs)
      # reconstruct fc_cls and fc_reg since input channels are changed
      assert self.with_cls
      cls_channels = self.num_classes
      cls_predictor_cfg_ = self.cls_predictor_cfg.copy()
      cls_predictor_cfg_.update(
          in_features=self.cls_last_dim, out_features=cls_channels
      )
      self.fc_cls = MODELS.build(cls_predictor_cfg_)
  
file_path: mmdetection/projects/Detic/detic/detic_bbox_head.py
imports: from typing import Optional, Union
  from mmengine.config import ConfigDict
  from mmengine.structures import InstanceData
  from torch import Tensor
  from mmdet.models.layers import multiclass_nms
  from mmdet.models.roi_heads.bbox_heads import Shared2FCBBoxHead
  from mmdet.models.utils import empty_instances
  from mmdet.registry import MODELS
  from mmdet.structures.bbox import get_box_tensor, scale_boxes
label_desc: Use image node_id 1 to create a new DeticBBoxHead object from inherited base classes: Shared2FCBBoxHead with example: obj = DeticBBoxHead()