open-mmlab / mmdetection

OpenMMLab Detection Toolbox and Benchmark
https://mmdetection.readthedocs.io
Apache License 2.0
29.66k stars 9.47k forks source link

how to train from scratch(如何从头开始训练网络) #12038

Open PanffeeReal opened 1 week ago

PanffeeReal commented 1 week ago

Hi,I'd like to ask how to revise the config file when I want to train a detection model such as FCOS from scratch, that is, don't use the pretrained model and initialize the backbone parameters randomly.

你好,我想请教如何配置 config文件,实现从头训练检测模型,即不使用预训练模型参数,而采用例如随即的方式初始化特征提取器backbone的参数?

期待您的回复~

viktorho commented 2 days ago

Not a pro, but in this repository, they trying to make everything in a pipeline, if you tried to create something from the scratch, if your model didn't require to make any customize with these pipelines mentioned in this docs mmegine: https://mmengine.readthedocs.io/en/latest/design/runner.html#customize-runner then you need to create step-by-step all of these: First, create a dataset, dataloader; if it is a detection model, mmdet repository could help mmdet: https://mmdetection.readthedocs.io/en/latest/ then replicate your model, similar to Pytorch Ex: https://mmengine.readthedocs.io/en/latest/tutorials/model.html after that, is optim-wraper and exe,... make sure to registry all of them on the same framework, sometime when you import mmdet instead of mmengine can caused import issues. Good luck,