Open rorschach-xiao opened 4 years ago
该文件夹下所有的参数配置均以python字典形式给出,可以归类成_base_和其他实验config;
该文件夹下包括了mmdetection的核心代码,主要由apis、core、datasets、models、ops、utils六部分组成:
collect_results_gpu
和collect_results_cpu
两种方式。该文件夹下包括训练和测试时使用的一些实用脚本,总结分析有以下几类。
build_detector
来创建模型,使用build_dataset
来创建数据集等。这些模块都是通过mmcv中的Registry类的_register_module
方法注册的,整个注册过程即将cfg中的字符串转换成相应的模块。mmcv.runner.EpochBasedRunner
类中,通过实例化该类并调用run方法来启动整个训练流程。
在1个epoch的训练中默认使用了7种钩子:DistSamplerSeedHook、LrUpdaterHook、MomentumUpdaterHook、OptimizerStepperHook、CheckpointSaverHook、IterTimerHook、LoggerHook。
MMDataParallel
封装模型,并通过single_gpu_test
方法得到测试/推理结果;若使用多卡测试,则使用mmcv中的MMDistributedDataParallel
封装模型,并通过multi_gpu_test
方法得到测试/推理结果。
代码链接:https://github.com/open-mmlab/mmdetection/tree/master
文档链接:https://mmdetection.readthedocs.io/en/latest/index.html