class_docstr: Head of DDQDETR: Dense Distinct Query for
      End-to-End Object Detection.
  
  Code is modified from the `official github repo
      <https://github.com/jshilong/DDQ>`_.
  
  More details can be found in the `paper
      <https://arxiv.org/abs/2303.12776>`_ .
  
  Args:
      aux_num_pos (int): Number of positive targets assigned to a
          perdicted object. Defaults to 4.
code: def __init__(self, *args, aux_num_pos=4, **kwargs):
      super(DDQDETRHead, self).__init__(*args, **kwargs)
      self.aux_loss_for_dense = DDQAuxLoss(
          train_cfg=dict(
              assigner=dict(
                  type="TopkHungarianAssigner", topk=aux_num_pos
              ),
              alpha=1,
              beta=6,
          )
      )
  
imports: import copy
  from typing import Dict, List, Tuple
  import torch
  from mmengine.model import bias_init_with_prob, constant_init
  from torch import Tensor, nn
  from mmdet.registry import MODELS
  from mmdet.structures import SampleList
  from mmdet.structures.bbox import bbox_cxcywh_to_xyxy
  from mmdet.utils import InstanceList, OptInstanceList, reduce_mean
  from ..layers import inverse_sigmoid
  from ..losses import DDQAuxLoss
  from ..utils import multi_apply
  from .dino_head import DINOHead
label_desc: Use image node_id 1 to create a new DDQDETRHead object from inherited base classes: DINOHead with example: obj = DDQDETRHead()