mmengine icon indicating copy to clipboard operation
mmengine copied to clipboard

[Feature]

Open Aoldcat1997 opened this issue 2 years ago • 0 comments

What is the feature?

When I wanted to create a custom model structure, the existing help documentation made it a bit difficult to understand how the model module inherits the configuration from the parameter file when the parameter file builds the model

Any other context?

The documentation provides a detailed introduction to config and runner, but lacks an introduction to how the model is constructed, taking target detection as an example how backbone, neck, roi_head in config achieve inheritance relationships with config.py, how do we define a new type of network structure such as change detection based on a twin network, which is described in the part of the conducting academic research process is very important. I am a beginner to understand this part of the content is still somewhat abstract, I believe that this part of the content of the supplement can give full play to the extensibility of mmlab, can make it easier for beginners to accept! for example in mmdetection\mmdet\models\detectors\two_stage.py,we can see

origin code

    'def __init__(self,
             backbone: ConfigType,
             neck: OptConfigType = None,
             rpn_head: OptConfigType = None,
             roi_head: OptConfigType = None,
             train_cfg: OptConfigType = None,
             test_cfg: OptConfigType = None,
             data_preprocessor: OptConfigType = None,
             init_cfg: OptMultiConfig = None) -> None:
    super().__init__(
        data_preprocessor=data_preprocessor, init_cfg=init_cfg)'

and how do I define a new Two_stage .py that contain a new X_head,and witch how to connect with config.py

new feature

       'def __init__(self,
             backbone: ConfigType,
             neck: OptConfigType = None,
             X_head: OptConfigType = None,
             train_cfg: OptConfigType = None,
             test_cfg: OptConfigType = None,
             data_preprocessor: OptConfigType = None,
             init_cfg: OptMultiConfig = None) -> None:
    super().__init__(
        data_preprocessor=data_preprocessor, init_cfg=init_cfg)'

A detailed example would be very helpful for beginners to utilize the convenience of mmlab!

Aoldcat1997 avatar Sep 24 '23 03:09 Aoldcat1997