code: def __init__(
      self,
      num_classes=80,
      hidden_dim=256,
      num_queries=300,
      position_embed_type="sine",
      in_feats_channel=[256, 512, 1024, 2048],
      num_levels=3,
      num_encoder_points=4,
      num_decoder_points=4,
      nhead=8,
      num_encoder_layers=6,
      num_decoder_layers=9,
      enc_dim_feedforward=1024,
      dec_dim_feedforward=2048,
      dropout=0.0,
      activation="relu",
      lr_mult=1.0,
      pe_temperature=10000,
      pe_offset=-0.5,
      num_denoising=100,
      label_noise_ratio=0.4,
      box_noise_scale=0.4,
      learnt_init_query=False,
      mask_enhanced=True,
      eps=1e-2,
  ):
      super(MaskDINO, self).__init__()
      assert position_embed_type in [
          "sine",
          "learned",
      ], f"ValueError: position_embed_type not supported {position_embed_type}!"
      feat0_dim = in_feats_channel.pop(0)
      assert len(in_feats_channel) <= num_levels
  
      self.hidden_dim = hidden_dim
      self.nhead = nhead
      self.num_levels = num_levels
      self.num_classes = num_classes
      self.num_queries = num_queries
      self.eps = eps
      self.num_decoder_layers = num_decoder_layers
      self.mask_enhanced = mask_enhanced
  
      weight_attr = ParamAttr(regularizer=L2Decay(0.0))
      bias_attr = ParamAttr(regularizer=L2Decay(0.0))
      # backbone feature projection
      self._build_input_proj_layer(
          in_feats_channel, weight_attr, bias_attr
      )
  
      # Transformer module
      encoder_layer = DeformableTransformerEncoderLayer(
          hidden_dim,
          nhead,
          enc_dim_feedforward,
          dropout,
          activation,
          num_levels,
          num_encoder_points,
          lr_mult,
          weight_attr,
          bias_attr,
      )
      self.encoder = DeformableTransformerEncoder(
          encoder_layer, num_encoder_layers
      )
      decoder_layer = DINOTransformerDecoderLayer(
          hidden_dim,
          nhead,
          dec_dim_feedforward,
          dropout,
          activation,
          num_levels,
          num_decoder_points,
          lr_mult,
          weight_attr,
          bias_attr,
      )
      self.decoder = MaskDINOTransformerDecoder(
          hidden_dim, decoder_layer, num_decoder_layers
      )
  
      # denoising part
      self.denoising_class_embed = nn.Embedding(
          num_classes,
          hidden_dim,
          weight_attr=ParamAttr(initializer=nn.initializer.Normal()),
      )
      self.num_denoising = num_denoising
      self.label_noise_ratio = label_noise_ratio
      self.box_noise_scale = box_noise_scale
  
      # position embedding
      self.position_embedding = PositionEmbedding(
          hidden_dim // 2,
          temperature=pe_temperature,
          normalize=True if position_embed_type == "sine" else False,
          embed_type=position_embed_type,
          offset=pe_offset,
      )
      self.level_embed = nn.Embedding(
          num_levels,
          hidden_dim,
          weight_attr=ParamAttr(initializer=nn.initializer.Normal()),
      )
      # decoder embedding
      self.learnt_init_query = learnt_init_query
      if learnt_init_query:
          self.tgt_embed = nn.Embedding(num_queries, hidden_dim)
      self.query_pos_head = MLP(
          2 * hidden_dim, hidden_dim, hidden_dim, num_layers=2
      )
      # mask embedding
      self.mask_query_head = MLP(
          hidden_dim, hidden_dim, hidden_dim, num_layers=3
      )
  
      # encoder mask head
      self.enc_mask_lateral = ConvGNBlock(feat0_dim, hidden_dim, 1)
      self.enc_mask_output = nn.Sequential(
          ConvGNBlock(hidden_dim, hidden_dim, 3, act=activation),
          nn.Conv2D(hidden_dim, hidden_dim, 1),
      )
      # encoder head
      self.enc_output = nn.Sequential(
          nn.Linear(hidden_dim, hidden_dim),
          nn.LayerNorm(
              hidden_dim, weight_attr=weight_attr, bias_attr=bias_attr
          ),
      )
      # decoder norm layer
      self.dec_norm = nn.LayerNorm(
          hidden_dim, weight_attr=weight_attr, bias_attr=bias_attr
      )
      # shared prediction head
      self.class_head = nn.Linear(hidden_dim, num_classes)
      self.bbox_head = MLP(hidden_dim, hidden_dim, 4, num_layers=3)
  
      self._reset_parameters()
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddle import ParamAttr
  from paddle.regularizer import L2Decay
  from ppdet.core.workspace import register
  from .position_encoding import PositionEmbedding
  from ..heads.detr_head import MLP
  from .deformable_transformer import DeformableTransformerEncoderLayer, DeformableTransformerEncoder
  from .dino_transformer import DINOTransformerDecoderLayer
  from ..initializer import linear_init_, constant_, xavier_uniform_, bias_init_with_prob
  from .utils import _get_clones, get_valid_ratio, get_denoising_training_group, get_sine_pos_embed, inverse_sigmoid, mask_to_box_coordinate
label_desc: Use image node_id 1 to create a new MaskDINO object from inherited base classes: nn with example: obj = MaskDINO(num_classes, hidden_dim, num_queries, position_embed_type, in_feats_channel, num_levels, num_encoder_points, num_decoder_points, nhead, num_encoder_layers, num_decoder_layers, enc_dim_feedforward, dec_dim_feedforward, dropout, activation, lr_mult, pe_temperature, pe_offset, num_denoising, label_noise_ratio, box_noise_scale, learnt_init_query, mask_enhanced, eps)