code: def from_config(cls, cfg, *args, **kwargs):
      backbone = create(cfg["backbone"])
      kwargs = {"input_shape": backbone.out_shape}
      neck = create(cfg["neck"], **kwargs)
  
      kwargs = {"input_shape": neck.out_shape}
      rpn_head = create(cfg["rpn_head"], **kwargs)
      roi_head = create(cfg["roi_head"], **kwargs)
  
      return {
          "backbone": backbone,
          "neck": neck,
          "rpn_head": rpn_head,
          "roi_head": roi_head,
      }
  
file_path: PaddleDetection/ppdet/modeling/architectures/queryinst.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import paddle
  from ppdet.core.workspace import register, create
  from .meta_arch import BaseArch
label_desc: Use image node_id 2 for calling the QueryInst obj's underlying member method code with example usage: obj.from_config(cls, cfg) and returns: dict