Open sunanlin13174 opened 2 years ago
Hi, thank you for your attention. You can refer to DetNAS, which uses both SPOS from MMRazor and MMDet.
@pprp 您好!我有两个问题: 1、只要mmdetection中有的模块mmrazor都能直接调用吗? 2、我在mmdetection中添加了其他的模块,这种情况怎么使用mmrazor中的蒸馏方法?
Please use English or English & Chinese for issues so that we could have broader discussion.
OK! I have two questions. One is can mmrazor call directly all modules of mmdetection? The other is can I use distilling provided by mmrazor if I added other module in mmdetection? Appreciate it!
Thanks for your understanding.
If your custom modules are registered into mmdet's registry, you can call it by adding mmdet
prefix.
https://github.com/open-mmlab/mmrazor/blob/2dad24044d7f1dad88f20221f8fc071dd40fdd4f/configs/nas/detnas/detnas_supernet_frcnn_shufflenetv2_fpn_1x_coco.py#L9
Hi, @Audrey528, MMRazor currently can not be used in mmdet. On the contrary, you could implement mmdet in mmrazor.
In mmrazor, you should add mmdet
prefix to get mmdet's registry.
norm_cfg = dict(type='SyncBN', requires_grad=True)
model = dict(
type='mmdet.FasterRCNN',
backbone=dict(
type='mmcls.SearchableShuffleNetV2',
norm_cfg=norm_cfg,
out_indices=(0, 1, 2, 3),
widen_factor=1.0,
with_last_layer=False),
Maybe you can refer to CWD, an algorithm built based on mmseg.
In CWD, knowledge distillation is implemented in mmrazor. To complete the distillation-related training operations, you can migrate the mmdet part of the code to mmrazor.
Hi, @pprp ,CWD is a good example, and it would be perfect if there was a general tutorial on how to implement mmdet and mmseg in MMRazor.
Hi, @sunanlin13174 , thank you for your advice! We will add this requirement to the backlog.
@pprp @pppppM Thanks for your answers!Just like the following picture says, if I run 'pip install -v -e .', offical mmdet will be installed. I wanna know how can I install the mmdetection I changed modules. I need u help.
@pprp @pppppM Thanks for your answers!Just like the following picture says, if I run 'pip install -v -e .', offical mmdet will be installed. I wanna know how can I install the mmdetection I changed modules. I need u help.
There should be no re-installation of mmdet
.
If you have already installed a develop version mmdet
, you can use your installed mmdet
directly.
Checklist
Describe the question you meet
[here]
Post related information
pip list | grep "mmcv\|mmrazor\|^torch"
[here]mmrazor
folder. [here]