class_docstr: Detection Head of `DDOD <https://arxiv.org/abs/2107.02963>`_.
  
  DDOD head decomposes conjunctions lying in most current one-stage
  detectors via label assignment disentanglement, spatial feature
  disentanglement, and pyramid supervision disentanglement.
  
  Args:
      num_classes (int): Number of categories excluding the
          background category.
      in_channels (int): Number of channels in the input feature map.
      stacked_convs (int): The number of stacked Conv. Defaults to 4.
      conv_cfg (:obj:`ConfigDict` or dict, optional): Config dict for
          convolution layer. Defaults to None.
      use_dcn (bool): Use dcn, Same as ATSS when False. Defaults to True.
      norm_cfg (:obj:`ConfigDict` or dict): Normal config of ddod head.
          Defaults to dict(type='GN', num_groups=32, requires_grad=True).
      loss_iou (:obj:`ConfigDict` or dict): Config of IoU loss. Defaults to
          dict(type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0).
code: def __init__(
      self,
      num_classes: int,
      in_channels: int,
      stacked_convs: int = 4,
      conv_cfg: OptConfigType = None,
      use_dcn: bool = True,
      norm_cfg: ConfigType = dict(
          type="GN", num_groups=32, requires_grad=True
      ),
      loss_iou: ConfigType = dict(
          type="CrossEntropyLoss", use_sigmoid=True, loss_weight=1.0
      ),
      **kwargs,
  ) -> None:
      self.stacked_convs = stacked_convs
      self.conv_cfg = conv_cfg
      self.norm_cfg = norm_cfg
      self.use_dcn = use_dcn
      super().__init__(num_classes, in_channels, **kwargs)
  
      if self.train_cfg:
          self.cls_assigner = TASK_UTILS.build(
              self.train_cfg["assigner"]
          )
          self.reg_assigner = TASK_UTILS.build(
              self.train_cfg["reg_assigner"]
          )
      self.loss_iou = MODELS.build(loss_iou)
  
imports: from typing import List, Optional, Sequence, Tuple
  import torch
  import torch.nn
  from mmcv.cnn import ConvModule, Scale
  from mmengine.model import bias_init_with_prob, normal_init
  from mmengine.structures import InstanceData
  from torch import Tensor
  from mmdet.registry import MODELS, TASK_UTILS
  from mmdet.structures.bbox import bbox_overlaps
  from mmdet.utils import ConfigType, InstanceList, OptConfigType, OptInstanceList, reduce_mean
  from ..task_modules.prior_generators import anchor_inside_flags
  from ..utils import images_to_levels, multi_apply, unmap
  from .anchor_head import AnchorHead
label_desc: Use image node_id 1 to create a new DDODHead object from inherited base classes: AnchorHead with example: obj = DDODHead(num_classes, in_channels, stacked_convs, conv_cfg, use_dcn, norm_cfg, loss_iou)