class_docstr: Extract RoI features from all level feature maps levels.
  
  This is the implementation of `A novel Region of Interest Extraction Layer
  for Instance Segmentation <https://arxiv.org/abs/2004.13665>`_.
  
  Args:
      aggregation (str): The method to aggregate multiple feature maps.
          Options are 'sum', 'concat'. Default: 'sum'.
      pre_cfg (dict | None): Specify pre-processing modules. Default: None.
      post_cfg (dict | None): Specify post-processing modules. Default: None.
      kwargs (keyword arguments): Arguments that are the same
          as :class:`BaseRoIExtractor`.
code: def __init__(
      self, aggregation="sum", pre_cfg=None, post_cfg=None, **kwargs
  ):
      super(GenericRoIExtractor, self).__init__(**kwargs)
  
      assert aggregation in ["sum", "concat"]
  
      self.aggregation = aggregation
      self.with_post = post_cfg is not None
      self.with_pre = pre_cfg is not None
      # build pre/post processing modules
      if self.with_post:
          self.post_module = build_plugin_layer(
              post_cfg, "_post_module"
          )[1]
      if self.with_pre:
          self.pre_module = build_plugin_layer(pre_cfg, "_pre_module")[
              1
          ]
  
file_path: insightface/detection/scrfd/mmdet/models/roi_heads/roi_extractors/generic_roi_extractor.py
imports: from mmcv.cnn.bricks import build_plugin_layer
  from mmcv.runner import force_fp32
  from mmdet.models.builder import ROI_EXTRACTORS
  from .base_roi_extractor import BaseRoIExtractor
label_desc: Use image node_id 1 to create a new GenericRoIExtractor object from inherited base classes: BaseRoIExtractor with example: obj = GenericRoIExtractor(aggregation, pre_cfg, post_cfg)