open-mmlab / mmdetection

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

question about res2net with dcn? #3699

Closed sky-fly97 closed 4 years ago

sky-fly97 commented 4 years ago

When I use res2net with dcn, I found this problem.

sky-fly97 commented 4 years ago

My config: model = dict( type='CascadeRCNN', pretrained='data/pre/res2net101.pth', backbone=dict( type='Res2Net', depth=101, scales=4, base_width=26, dcn=dict(type='DCN', deform_groups=1, fallback_on_stride=False), stage_with_dcn=(False, True, True, True)),

sky-fly97 commented 4 years ago

I find this problem, the Res2Net-v1b-101.pth is downloaded from https://github.com/Res2Net/Res2Net-PretrainedModels

`2020-09-06 23:50:32,051 - mmdet - INFO - load model from: data/pre/res2net101.pth 2020-09-06 23:50:34,500 - mmdet - WARNING - The model and loaded state dict do not match exactly

unexpected key in source state_dict: conv1.0.weight, conv1.1.weight, conv1.1.bias, conv1.1.running_mean, conv1.1.running_var, conv1.1.num_batches_tracked, conv1.3.weight, conv1.4.weight, conv1.4.bias, conv1.4.running_mean, conv1.4.running_var, conv1.4.num_batches_tracked, conv1.6.weight, bn1.weight, bn1.bias, bn1.running_mean, bn1.running_var, bn1.num_batches_tracked, fc.weight, fc.bias

missing keys in source state_dict: stem.0.weight, stem.1.weight, stem.1.bias, stem.1.running_mean, stem.1.running_var, stem.3.weight, stem.4.weight, stem.4.bias, stem.4.running_mean, stem.4.running_var, stem.6.weight, stem.7.weight, stem.7.bias, stem.7.running_mean, stem.7.running_var, layer2.0.convs.0.conv_offset.weight, layer2.0.convs.0.conv_offset.bias, layer2.0.convs.1.conv_offset.weight, layer2.0.convs.1.conv_offset.bias, layer2.0.convs.2.conv_offset.weight, layer2.0.convs.2.conv_offset.bias, layer2.1.convs.0.conv_offset.weight, layer2.1.convs.0.conv_offset.bias, layer2.1.convs.1.conv_offset.weight, layer2.1.convs.1.conv_offset.bias, layer2.1.convs.2.conv_offset.weight, layer2.1.convs.2.conv_offset.bias, layer2.2.convs.0.conv_offset.weight, layer2.2.convs.0.conv_offset.bias, layer2.2.convs.1.conv_offset.weight, layer2.2.convs.1.conv_offset.bias, layer2.2.convs.2.conv_offset.weight, layer2.2.convs.2.conv_offset.bias, layer2.3.convs.0.conv_offset.weight, layer2.3.convs.0.conv_offset.bias, layer2.3.convs.1.conv_offset.weight, layer2.3.convs.1.conv_offset.bias, layer2.3.convs.2.conv_offset.weight, layer2.3.convs.2.conv_offset.bias, layer3.0.convs.0.conv_offset.weight, layer3.0.convs.0.conv_offset.bias, layer3.0.convs.1.conv_offset.weight, layer3.0.convs.1.conv_offset.bias, layer3.0.convs.2.conv_offset.weight, layer3.0.convs.2.conv_offset.bias, layer3.1.convs.0.conv_offset.weight, layer3.1.convs.0.conv_offset.bias, layer3.1.convs.1.conv_offset.weight, layer3.1.convs.1.conv_offset.bias, layer3.1.convs.2.conv_offset.weight, layer3.1.convs.2.conv_offset.bias, layer3.2.convs.0.conv_offset.weight, layer3.2.convs.0.conv_offset.bias, layer3.2.convs.1.conv_offset.weight, layer3.2.convs.1.conv_offset.bias, layer3.2.convs.2.conv_offset.weight, layer3.2.convs.2.conv_offset.bias, layer3.3.convs.0.conv_offset.weight, layer3.3.convs.0.conv_offset.bias, layer3.3.convs.1.conv_offset.weight, layer3.3.convs.1.conv_offset.bias, layer3.3.convs.2.conv_offset.weight, layer3.3.convs.2.conv_offset.bias, layer3.4.convs.0.conv_offset.weight, layer3.4.convs.0.conv_offset.bias, layer3.4.convs.1.conv_offset.weight, layer3.4.convs.1.conv_offset.bias, layer3.4.convs.2.conv_offset.weight, layer3.4.convs.2.conv_offset.bias, layer3.5.convs.0.conv_offset.weight, layer3.5.convs.0.conv_offset.bias, layer3.5.convs.1.conv_offset.weight, layer3.5.convs.1.conv_offset.bias, layer3.5.convs.2.conv_offset.weight, layer3.5.convs.2.conv_offset.bias, layer3.6.convs.0.conv_offset.weight, layer3.6.convs.0.conv_offset.bias, layer3.6.convs.1.conv_offset.weight, layer3.6.convs.1.conv_offset.bias, layer3.6.convs.2.conv_offset.weight, layer3.6.convs.2.conv_offset.bias, layer3.7.convs.0.conv_offset.weight, layer3.7.convs.0.conv_offset.bias, layer3.7.convs.1.conv_offset.weight, layer3.7.convs.1.conv_offset.bias, layer3.7.convs.2.conv_offset.weight, layer3.7.convs.2.conv_offset.bias, layer3.8.convs.0.conv_offset.weight, layer3.8.convs.0.conv_offset.bias, layer3.8.convs.1.conv_offset.weight, layer3.8.convs.1.conv_offset.bias, layer3.8.convs.2.conv_offset.weight, layer3.8.convs.2.conv_offset.bias, layer3.9.convs.0.conv_offset.weight, layer3.9.convs.0.conv_offset.bias, layer3.9.convs.1.conv_offset.weight, layer3.9.convs.1.conv_offset.bias, layer3.9.convs.2.conv_offset.weight, layer3.9.convs.2.conv_offset.bias, layer3.10.convs.0.conv_offset.weight, layer3.10.convs.0.conv_offset.bias, layer3.10.convs.1.conv_offset.weight, layer3.10.convs.1.conv_offset.bias, layer3.10.convs.2.conv_offset.weight, layer3.10.convs.2.conv_offset.bias, layer3.11.convs.0.conv_offset.weight, layer3.11.convs.0.conv_offset.bias, layer3.11.convs.1.conv_offset.weight, layer3.11.convs.1.conv_offset.bias, layer3.11.convs.2.conv_offset.weight, layer3.11.convs.2.conv_offset.bias, layer3.12.convs.0.conv_offset.weight, layer3.12.convs.0.conv_offset.bias, layer3.12.convs.1.conv_offset.weight, layer3.12.convs.1.conv_offset.bias, layer3.12.convs.2.conv_offset.weight, layer3.12.convs.2.conv_offset.bias, layer3.13.convs.0.conv_offset.weight, layer3.13.convs.0.conv_offset.bias, layer3.13.convs.1.conv_offset.weight, layer3.13.convs.1.conv_offset.bias, layer3.13.convs.2.conv_offset.weight, layer3.13.convs.2.conv_offset.bias, layer3.14.convs.0.conv_offset.weight, layer3.14.convs.0.conv_offset.bias, layer3.14.convs.1.conv_offset.weight, layer3.14.convs.1.conv_offset.bias, layer3.14.convs.2.conv_offset.weight, layer3.14.convs.2.conv_offset.bias, layer3.15.convs.0.conv_offset.weight, layer3.15.convs.0.conv_offset.bias, layer3.15.convs.1.conv_offset.weight, layer3.15.convs.1.conv_offset.bias, layer3.15.convs.2.conv_offset.weight, layer3.15.convs.2.conv_offset.bias, layer3.16.convs.0.conv_offset.weight, layer3.16.convs.0.conv_offset.bias, layer3.16.convs.1.conv_offset.weight, layer3.16.convs.1.conv_offset.bias, layer3.16.convs.2.conv_offset.weight, layer3.16.convs.2.conv_offset.bias, layer3.17.convs.0.conv_offset.weight, layer3.17.convs.0.conv_offset.bias, layer3.17.convs.1.conv_offset.weight, layer3.17.convs.1.conv_offset.bias, layer3.17.convs.2.conv_offset.weight, layer3.17.convs.2.conv_offset.bias, layer3.18.convs.0.conv_offset.weight, layer3.18.convs.0.conv_offset.bias, layer3.18.convs.1.conv_offset.weight, layer3.18.convs.1.conv_offset.bias, layer3.18.convs.2.conv_offset.weight, layer3.18.convs.2.conv_offset.bias, layer3.19.convs.0.conv_offset.weight, layer3.19.convs.0.conv_offset.bias, layer3.19.convs.1.conv_offset.weight, layer3.19.convs.1.conv_offset.bias, layer3.19.convs.2.conv_offset.weight, layer3.19.convs.2.conv_offset.bias, layer3.20.convs.0.conv_offset.weight, layer3.20.convs.0.conv_offset.bias, layer3.20.convs.1.conv_offset.weight, layer3.20.convs.1.conv_offset.bias, layer3.20.convs.2.conv_offset.weight, layer3.20.convs.2.conv_offset.bias, layer3.21.convs.0.conv_offset.weight, layer3.21.convs.0.conv_offset.bias, layer3.21.convs.1.conv_offset.weight, layer3.21.convs.1.conv_offset.bias, layer3.21.convs.2.conv_offset.weight, layer3.21.convs.2.conv_offset.bias, layer3.22.convs.0.conv_offset.weight, layer3.22.convs.0.conv_offset.bias, layer3.22.convs.1.conv_offset.weight, layer3.22.convs.1.conv_offset.bias, layer3.22.convs.2.conv_offset.weight, layer3.22.convs.2.conv_offset.bias, layer4.0.convs.0.conv_offset.weight, layer4.0.convs.0.conv_offset.bias, layer4.0.convs.1.conv_offset.weight, layer4.0.convs.1.conv_offset.bias, layer4.0.convs.2.conv_offset.weight, layer4.0.convs.2.conv_offset.bias, layer4.1.convs.0.conv_offset.weight, layer4.1.convs.0.conv_offset.bias, layer4.1.convs.1.conv_offset.weight, layer4.1.convs.1.conv_offset.bias, layer4.1.convs.2.conv_offset.weight, layer4.1.convs.2.conv_offset.bias, layer4.2.convs.0.conv_offset.weight, layer4.2.convs.0.conv_offset.bias, layer4.2.convs.1.conv_offset.weight, layer4.2.convs.1.conv_offset.bias, layer4.2.convs.2.conv_offset.weight, layer4.2.convs.2.conv_offset.bias`

sky-fly97 commented 4 years ago

Does this problem affect training results?

sky-fly97 commented 4 years ago

Well, by 11epoch, loss suddenly changed to Nan, but the previous training seemed to be OK.

`2020-09-07 09:09:45,508 - mmdet - INFO - Epoch [11][5050/6296] lr: 2.500e-03, eta: 5:18:30, time: 0.494, data_time: 0.003, memory: 4115, loss_rpn_cls: 0.0259, loss_rpn_bbox: 0.0171, s0.loss_cls: 0.1849, s0.acc: 93.5957, s0.loss_bbox: 0.1336, s1.loss_cls: 0.0775, s1.acc: 94.4901, s1.loss_bbox: 0.1476, s2.loss_cls: 0.0403, s2.acc: 94.1091, s2.loss_bbox: 0.0924, loss: 0.7193 2020-09-07 09:10:10,463 - mmdet - INFO - Epoch [11][5100/6296] lr: 2.500e-03, eta: 5:18:05, time: 0.499, data_time: 0.003, memory: 4115, loss_rpn_cls: 0.0194, loss_rpn_bbox: 0.0151, s0.loss_cls: 0.1918, s0.acc: 93.3594, s0.loss_bbox: 0.1412, s1.loss_cls: 0.0856, s1.acc: 93.9460, s1.loss_bbox: 0.1583, s2.loss_cls: 0.0426, s2.acc: 93.2062, s2.loss_bbox: 0.0916, loss: 0.7457 2020-09-07 09:10:34,897 - mmdet - INFO - Epoch [11][5150/6296] lr: 2.500e-03, eta: 5:17:41, time: 0.489, data_time: 0.004, memory: 4115, loss_rpn_cls: 0.0248, loss_rpn_bbox: 0.0181, s0.loss_cls: 0.1868, s0.acc: 93.4805, s0.loss_bbox: 0.1331, s1.loss_cls: 0.0794, s1.acc: 94.4264, s1.loss_bbox: 0.1414, s2.loss_cls: 0.0372, s2.acc: 94.0963, s2.loss_bbox: 0.0843, loss: 0.7052 2020-09-07 09:11:00,009 - mmdet - INFO - Epoch [11][5200/6296] lr: 2.500e-03, eta: 5:17:17, time: 0.502, data_time: 0.003, memory: 4115, loss_rpn_cls: 0.0248, loss_rpn_bbox: 0.0142, s0.loss_cls: 0.1651, s0.acc: 94.5586, s0.loss_bbox: 0.1132, s1.loss_cls: 0.0726, s1.acc: 94.9319, s1.loss_bbox: 0.1299, s2.loss_cls: 0.0341, s2.acc: 95.0632, s2.loss_bbox: 0.0834, loss: 0.6372

2020-09-07 09:11:23,801 - mmdet - INFO - Epoch [11][5250/6296] lr: 2.500e-03, eta: 5:16:52, time: 0.475, data_time: 0.003, memory: 4115, loss_rpn_cls: 0.8262, loss_rpn_bbox: 0.0616, s0.loss_cls: nan, s0.acc: 44.7031, s0.loss_bbox: nan, s1.loss_cls: nan, s1.acc: 46.4556, s1.loss_bbox: nan, s2.loss_cls: nan, s2.acc: 46.6877, s2.loss_bbox: nan, loss: nan 2020-09-07 09:11:48,830 - mmdet - INFO - Epoch [11][5300/6296] lr: 2.500e-03, eta: 5:16:28, time: 0.501, data_time: 0.004, memory: 4115, loss_rpn_cls: 0.6458, loss_rpn_bbox: 0.0278, s0.loss_cls: nan, s0.acc: 0.0840, s0.loss_bbox: nan, s1.loss_cls: nan, s1.acc: 1.0774, s1.loss_bbox: nan, s2.loss_cls: nan, s2.acc: 0.9762, s2.loss_bbox: nan, loss: nan 2020-09-07 09:12:13,004 - mmdet - INFO - Epoch [11][5350/6296] lr: 2.500e-03, eta: 5:16:03, time: 0.484, data_time: 0.004, memory: 4115, loss_rpn_cls: 0.6098, loss_rpn_bbox: 0.0303, s0.loss_cls: nan, s0.acc: 0.1230, s0.loss_bbox: nan, s1.loss_cls: nan, s1.acc: 2.4286, s1.loss_bbox: nan, s2.loss_cls: nan, s2.acc: 2.7786, s2.loss_bbox: nan, loss: nan 2020-09-07 09:12:36,075 - mmdet - INFO - Epoch [11][5400/6296] lr: 2.500e-03, eta: 5:15:38, time: 0.461, data_time: 0.003, memory: 4115, loss_rpn_cls: 0.5786, loss_rpn_bbox: 0.0336, s0.loss_cls: nan, s0.acc: 0.1055, s0.loss_bbox: nan, s1.loss_cls: nan, s1.acc: 1.2956, s1.loss_bbox: nan, s2.loss_cls: nan, s2.acc: 2.5167, s2.loss_bbox: nan, loss: nan 2020-09-07 09:12:59,321 - mmdet - INFO - Epoch [11][5450/6296] lr: 2.500e-03, eta: 5:15:13, time: 0.465, data_time: 0.003, memory: 4115, loss_rpn_cls: 0.5501, loss_rpn_bbox: 0.0312, s0.loss_cls: nan, s0.acc: 0.0859, s0.loss_bbox: nan, s1.loss_cls: nan, s1.acc: 0.9762, s1.loss_bbox: nan, s2.loss_cls: nan, s2.acc: 1.5762, s2.loss_bbox: nan, loss: nan 2020-09-07 09:13:22,112 - mmdet - INFO - Epoch [11][5500/6296] lr: 2.500e-03, eta: 5:14:47, time: 0.455, data_time: 0.003, memory: 4115, loss_rpn_cls: 0.5181, loss_rpn_bbox: 0.0251, s0.loss_cls: nan, s0.acc: 0.0977, s0.loss_bbox: nan, s1.loss_cls: nan, s1.acc: 3.1778, s1.loss_bbox: nan, s2.loss_cls: nan, s2.acc: 2.8944, s2.loss_bbox: nan, loss: nan`

yuzhj commented 4 years ago

"res2net101_v1d_26w_4s": "https://openmmlab.ossaccelerate.aliyuncs.com/pretrain/third_party/res2net101_v1d_26w_4s_mmdetv2-f0a600f9.pth"

yuzhj commented 4 years ago

a smaller learning rate maybe can address the nan problem

sky-fly97 commented 4 years ago

"res2net101_v1d_26w_4s": "https://openmmlab.ossaccelerate.aliyuncs.com/pretrain/third_party/res2net101_v1d_26w_4s_mmdetv2-f0a600f9.pth"

Sorry, I can't open the link.

sky-fly97 commented 4 years ago

a smaller learning rate maybe can address the nan problem

I calculated the learning rate according to the official formula, and I didn't have this problem with other backbones.

yuzhj commented 4 years ago

"res2net101_v1d_26w_4s": "https://openmmlab.ossaccelerate.aliyuncs.com/pretrain/third_party/res2net101_v1d_26w_4s_mmdetv2-f0a600f9.pth"

Sorry, I can't open the link.

they changed the download path.you can download the model from here(https://openmmlab.oss-accelerate.aliyuncs.com/pretrain/third_party/res2net101_v1d_26w_4s_mmdetv2-f0a600f9.pth)

sky-fly97 commented 4 years ago

"res2net101_v1d_26w_4s": "https://openmmlab.ossaccelerate.aliyuncs.com/pretrain/third_party/res2net101_v1d_26w_4s_mmdetv2-f0a600f9.pth"

Sorry, I can't open the link.

they changed the download path.you can download the model from here(https://openmmlab.oss-accelerate.aliyuncs.com/pretrain/third_party/res2net101_v1d_26w_4s_mmdetv2-f0a600f9.pth)

Thanks, I will try again!

sky-fly97 commented 4 years ago

"res2net101_v1d_26w_4s": "https://openmmlab.ossaccelerate.aliyuncs.com/pretrain/third_party/res2net101_v1d_26w_4s_mmdetv2-f0a600f9.pth"

Sorry, I can't open the link.

they changed the download path.you can download the model from here(https://openmmlab.oss-accelerate.aliyuncs.com/pretrain/third_party/res2net101_v1d_26w_4s_mmdetv2-f0a600f9.pth)

Hello, I have a question. Does res2net add DCN like this? model = dict( type='CascadeRCNN', pretrained='data/pre/res2net101.pth', backbone=dict( type='Res2Net', depth=101, scales=4, base_width=26, dcn=dict(type='DCN', deform_groups=1, fallback_on_stride=False), stage_with_dcn=(False, True, True, True)),

I use your model, but the problem also appear

`mmdet - WARNING - The model and loaded state dict do not match exactly

unexpected key in source state_dict: conv1.0.weight, conv1.1.weight, conv1.1.bias, conv1.1.running_mean, conv1.1.running_var, conv1.1.num_batches_tracked, conv1.3.weight, conv1.4.weight, conv1.4.bias, conv1.4.running_mean, conv1.4.running_var, conv1.4.num_batches_tracked, conv1.6.weight, bn1.weight, bn1.bias, bn1.running_mean, bn1.running_var, bn1.num_batches_tracked, fc.weight, fc.bias

missing keys in source state_dict: stem.0.weight, stem.1.weight, stem.1.bias, stem.1.running_mean, stem.1.running_var, stem.3.weight, stem.4.weight, stem.4.bias, stem.4.running_mean, stem.4.running_var, stem.6.weight, stem.7.weight, stem.7.bias, stem.7.running_mean, stem.7.running_var, layer2.0.convs.0.conv_offset.weight, layer2.0.convs.0.conv_offset.bias, layer2.0.convs.1.conv_offset.weight, layer2.0.convs.1.conv_offset.bias, layer2.0.convs.2.conv_offset.weight, layer2.0.convs.2.conv_offset.bias, layer2.1.convs.0.conv_offset.weight, layer2.1.convs.0.conv_offset.bias, layer2.1.convs.1.conv_offset.weight, layer2.1.convs.1.conv_offset.bias, layer2.1.convs.2.conv_offset.weight, layer2.1.convs.2.conv_offset.bias, layer2.2.convs.0.conv_offset.weight, layer2.2.convs.0.conv_offset.bias, layer2.2.convs.1.conv_offset.weight, layer2.2.convs.1.conv_offset.bias, layer2.2.convs.2.conv_offset.weight, layer2.2.convs.2.conv_offset.bias, layer2.3.convs.0.conv_offset.weight, layer2.3.convs.0.conv_offset.bias, layer2.3.convs.1.conv_offset.weight, layer2.3.convs.1.conv_offset.bias, layer2.3.convs.2.conv_offset.weight, layer2.3.convs.2.conv_offset.bias, layer3.0.convs.0.conv_offset.weight, layer3.0.convs.0.conv_offset.bias, layer3.0.convs.1.conv_offset.weight, layer3.0.convs.1.conv_offset.bias, layer3.0.convs.2.conv_offset.weight, layer3.0.convs.2.conv_offset.bias, layer3.1.convs.0.conv_offset.weight, layer3.1.convs.0.conv_offset.bias, layer3.1.convs.1.conv_offset.weight, layer3.1.convs.1.conv_offset.bias, layer3.1.convs.2.conv_offset.weight, layer3.1.convs.2.conv_offset.bias, layer3.2.convs.0.conv_offset.weight, layer3.2.convs.0.conv_offset.bias, layer3.2.convs.1.conv_offset.weight, layer3.2.convs.1.conv_offset.bias, layer3.2.convs.2.conv_offset.weight, layer3.2.convs.2.conv_offset.bias, layer3.3.convs.0.conv_offset.weight, layer3.3.convs.0.conv_offset.bias, layer3.3.convs.1.conv_offset.weight, layer3.3.convs.1.conv_offset.bias, layer3.3.convs.2.conv_offset.weight, layer3.3.convs.2.conv_offset.bias, layer3.4.convs.0.conv_offset.weight, layer3.4.convs.0.conv_offset.bias, layer3.4.convs.1.conv_offset.weight, layer3.4.convs.1.conv_offset.bias, layer3.4.convs.2.conv_offset.weight, layer3.4.convs.2.conv_offset.bias, layer3.5.convs.0.conv_offset.weight, layer3.5.convs.0.conv_offset.bias, layer3.5.convs.1.conv_offset.weight, layer3.5.convs.1.conv_offset.bias, layer3.5.convs.2.conv_offset.weight, layer3.5.convs.2.conv_offset.bias, layer3.6.convs.0.conv_offset.weight, layer3.6.convs.0.conv_offset.bias, layer3.6.convs.1.conv_offset.weight, layer3.6.convs.1.conv_offset.bias, layer3.6.convs.2.conv_offset.weight, layer3.6.convs.2.conv_offset.bias, layer3.7.convs.0.conv_offset.weight, layer3.7.convs.0.conv_offset.bias, layer3.7.convs.1.conv_offset.weight, layer3.7.convs.1.conv_offset.bias, layer3.7.convs.2.conv_offset.weight, layer3.7.convs.2.conv_offset.bias, layer3.8.convs.0.conv_offset.weight, layer3.8.convs.0.conv_offset.bias, layer3.8.convs.1.conv_offset.weight, layer3.8.convs.1.conv_offset.bias, layer3.8.convs.2.conv_offset.weight, layer3.8.convs.2.conv_offset.bias, layer3.9.convs.0.conv_offset.weight, layer3.9.convs.0.conv_offset.bias, layer3.9.convs.1.conv_offset.weight, layer3.9.convs.1.conv_offset.bias, layer3.9.convs.2.conv_offset.weight, layer3.9.convs.2.conv_offset.bias, layer3.10.convs.0.conv_offset.weight, layer3.10.convs.0.conv_offset.bias, layer3.10.convs.1.conv_offset.weight, layer3.10.convs.1.conv_offset.bias, layer3.10.convs.2.conv_offset.weight, layer3.10.convs.2.conv_offset.bias, layer3.11.convs.0.conv_offset.weight, layer3.11.convs.0.conv_offset.bias, layer3.11.convs.1.conv_offset.weight, layer3.11.convs.1.conv_offset.bias, layer3.11.convs.2.conv_offset.weight, layer3.11.convs.2.conv_offset.bias, layer3.12.convs.0.conv_offset.weight, layer3.12.convs.0.conv_offset.bias, layer3.12.convs.1.conv_offset.weight, layer3.12.convs.1.conv_offset.bias, layer3.12.convs.2.conv_offset.weight, layer3.12.convs.2.conv_offset.bias, layer3.13.convs.0.conv_offset.weight, layer3.13.convs.0.conv_offset.bias, layer3.13.convs.1.conv_offset.weight, layer3.13.convs.1.conv_offset.bias, layer3.13.convs.2.conv_offset.weight, layer3.13.convs.2.conv_offset.bias, layer3.14.convs.0.conv_offset.weight, layer3.14.convs.0.conv_offset.bias, layer3.14.convs.1.conv_offset.weight, layer3.14.convs.1.conv_offset.bias, layer3.14.convs.2.conv_offset.weight, layer3.14.convs.2.conv_offset.bias, layer3.15.convs.0.conv_offset.weight, layer3.15.convs.0.conv_offset.bias, layer3.15.convs.1.conv_offset.weight, layer3.15.convs.1.conv_offset.bias, layer3.15.convs.2.conv_offset.weight, layer3.15.convs.2.conv_offset.bias, layer3.16.convs.0.conv_offset.weight, layer3.16.convs.0.conv_offset.bias, layer3.16.convs.1.conv_offset.weight, layer3.16.convs.1.conv_offset.bias, layer3.16.convs.2.conv_offset.weight, layer3.16.convs.2.conv_offset.bias, layer3.17.convs.0.conv_offset.weight, layer3.17.convs.0.conv_offset.bias, layer3.17.convs.1.conv_offset.weight, layer3.17.convs.1.conv_offset.bias, layer3.17.convs.2.conv_offset.weight, layer3.17.convs.2.conv_offset.bias, layer3.18.convs.0.conv_offset.weight, layer3.18.convs.0.conv_offset.bias, layer3.18.convs.1.conv_offset.weight, layer3.18.convs.1.conv_offset.bias, layer3.18.convs.2.conv_offset.weight, layer3.18.convs.2.conv_offset.bias, layer3.19.convs.0.conv_offset.weight, layer3.19.convs.0.conv_offset.bias, layer3.19.convs.1.conv_offset.weight, layer3.19.convs.1.conv_offset.bias, layer3.19.convs.2.conv_offset.weight, layer3.19.convs.2.conv_offset.bias, layer3.20.convs.0.conv_offset.weight, layer3.20.convs.0.conv_offset.bias, layer3.20.convs.1.conv_offset.weight, layer3.20.convs.1.conv_offset.bias, layer3.20.convs.2.conv_offset.weight, layer3.20.convs.2.conv_offset.bias, layer3.21.convs.0.conv_offset.weight, layer3.21.convs.0.conv_offset.bias, layer3.21.convs.1.conv_offset.weight, layer3.21.convs.1.conv_offset.bias, layer3.21.convs.2.conv_offset.weight, layer3.21.convs.2.conv_offset.bias, layer3.22.convs.0.conv_offset.weight, layer3.22.convs.0.conv_offset.bias, layer3.22.convs.1.conv_offset.weight, layer3.22.convs.1.conv_offset.bias, layer3.22.convs.2.conv_offset.weight, layer3.22.convs.2.conv_offset.bias, layer4.0.convs.0.conv_offset.weight, layer4.0.convs.0.conv_offset.bias, layer4.0.convs.1.conv_offset.weight, layer4.0.convs.1.conv_offset.bias, layer4.0.convs.2.conv_offset.weight, layer4.0.convs.2.conv_offset.bias, layer4.1.convs.0.conv_offset.weight, layer4.1.convs.0.conv_offset.bias, layer4.1.convs.1.conv_offset.weight, layer4.1.convs.1.conv_offset.bias, layer4.1.convs.2.conv_offset.weight, layer4.1.convs.2.conv_offset.bias, layer4.2.convs.0.conv_offset.weight, layer4.2.convs.0.conv_offset.bias, layer4.2.convs.1.conv_offset.weight, layer4.2.convs.1.conv_offset.bias, layer4.2.convs.2.conv_offset.weight, layer4.2.convs.2.conv_offset.bias``
yuzhj commented 4 years ago

"res2net101_v1d_26w_4s": "https://openmmlab.ossaccelerate.aliyuncs.com/pretrain/third_party/res2net101_v1d_26w_4s_mmdetv2-f0a600f9.pth"

Sorry, I can't open the link.

they changed the download path.you can download the model from here(https://openmmlab.oss-accelerate.aliyuncs.com/pretrain/third_party/res2net101_v1d_26w_4s_mmdetv2-f0a600f9.pth)

Hello, I have a question. Does res2net add DCN like this? model = dict( type='CascadeRCNN', pretrained='data/pre/res2net101.pth', backbone=dict( type='Res2Net', depth=101, scales=4, base_width=26, dcn=dict(type='DCN', deform_groups=1, fallback_on_stride=False), stage_with_dcn=(False, True, True, True)),

I use your model, but the problem also appear

`mmdet - WARNING - The model and loaded state dict do not match exactly

unexpected key in source state_dict: conv1.0.weight, conv1.1.weight, conv1.1.bias, conv1.1.running_mean, conv1.1.running_var, conv1.1.num_batches_tracked, conv1.3.weight, conv1.4.weight, conv1.4.bias, conv1.4.running_mean, conv1.4.running_var, conv1.4.num_batches_tracked, conv1.6.weight, bn1.weight, bn1.bias, bn1.running_mean, bn1.running_var, bn1.num_batches_tracked, fc.weight, fc.bias

missing keys in source state_dict: stem.0.weight, stem.1.weight, stem.1.bias, stem.1.running_mean, stem.1.running_var, stem.3.weight, stem.4.weight, stem.4.bias, stem.4.running_mean, stem.4.running_var, stem.6.weight, stem.7.weight, stem.7.bias, stem.7.running_mean, stem.7.running_var, layer2.0.convs.0.conv_offset.weight, layer2.0.convs.0.conv_offset.bias, layer2.0.convs.1.conv_offset.weight, layer2.0.convs.1.conv_offset.bias, layer2.0.convs.2.conv_offset.weight, layer2.0.convs.2.conv_offset.bias, layer2.1.convs.0.conv_offset.weight, layer2.1.convs.0.conv_offset.bias, layer2.1.convs.1.conv_offset.weight, layer2.1.convs.1.conv_offset.bias, layer2.1.convs.2.conv_offset.weight, layer2.1.convs.2.conv_offset.bias, layer2.2.convs.0.conv_offset.weight, layer2.2.convs.0.conv_offset.bias, layer2.2.convs.1.conv_offset.weight, layer2.2.convs.1.conv_offset.bias, layer2.2.convs.2.conv_offset.weight, layer2.2.convs.2.conv_offset.bias, layer2.3.convs.0.conv_offset.weight, layer2.3.convs.0.conv_offset.bias, layer2.3.convs.1.conv_offset.weight, layer2.3.convs.1.conv_offset.bias, layer2.3.convs.2.conv_offset.weight, layer2.3.convs.2.conv_offset.bias, layer3.0.convs.0.conv_offset.weight, layer3.0.convs.0.conv_offset.bias, layer3.0.convs.1.conv_offset.weight, layer3.0.convs.1.conv_offset.bias, layer3.0.convs.2.conv_offset.weight, layer3.0.convs.2.conv_offset.bias, layer3.1.convs.0.conv_offset.weight, layer3.1.convs.0.conv_offset.bias, layer3.1.convs.1.conv_offset.weight, layer3.1.convs.1.conv_offset.bias, layer3.1.convs.2.conv_offset.weight, layer3.1.convs.2.conv_offset.bias, layer3.2.convs.0.conv_offset.weight, layer3.2.convs.0.conv_offset.bias, layer3.2.convs.1.conv_offset.weight, layer3.2.convs.1.conv_offset.bias, layer3.2.convs.2.conv_offset.weight, layer3.2.convs.2.conv_offset.bias, layer3.3.convs.0.conv_offset.weight, layer3.3.convs.0.conv_offset.bias, layer3.3.convs.1.conv_offset.weight, layer3.3.convs.1.conv_offset.bias, layer3.3.convs.2.conv_offset.weight, layer3.3.convs.2.conv_offset.bias, layer3.4.convs.0.conv_offset.weight, layer3.4.convs.0.conv_offset.bias, layer3.4.convs.1.conv_offset.weight, layer3.4.convs.1.conv_offset.bias, layer3.4.convs.2.conv_offset.weight, layer3.4.convs.2.conv_offset.bias, layer3.5.convs.0.conv_offset.weight, layer3.5.convs.0.conv_offset.bias, layer3.5.convs.1.conv_offset.weight, layer3.5.convs.1.conv_offset.bias, layer3.5.convs.2.conv_offset.weight, layer3.5.convs.2.conv_offset.bias, layer3.6.convs.0.conv_offset.weight, layer3.6.convs.0.conv_offset.bias, layer3.6.convs.1.conv_offset.weight, layer3.6.convs.1.conv_offset.bias, layer3.6.convs.2.conv_offset.weight, layer3.6.convs.2.conv_offset.bias, layer3.7.convs.0.conv_offset.weight, layer3.7.convs.0.conv_offset.bias, layer3.7.convs.1.conv_offset.weight, layer3.7.convs.1.conv_offset.bias, layer3.7.convs.2.conv_offset.weight, layer3.7.convs.2.conv_offset.bias, layer3.8.convs.0.conv_offset.weight, layer3.8.convs.0.conv_offset.bias, layer3.8.convs.1.conv_offset.weight, layer3.8.convs.1.conv_offset.bias, layer3.8.convs.2.conv_offset.weight, layer3.8.convs.2.conv_offset.bias, layer3.9.convs.0.conv_offset.weight, layer3.9.convs.0.conv_offset.bias, layer3.9.convs.1.conv_offset.weight, layer3.9.convs.1.conv_offset.bias, layer3.9.convs.2.conv_offset.weight, layer3.9.convs.2.conv_offset.bias, layer3.10.convs.0.conv_offset.weight, layer3.10.convs.0.conv_offset.bias, layer3.10.convs.1.conv_offset.weight, layer3.10.convs.1.conv_offset.bias, layer3.10.convs.2.conv_offset.weight, layer3.10.convs.2.conv_offset.bias, layer3.11.convs.0.conv_offset.weight, layer3.11.convs.0.conv_offset.bias, layer3.11.convs.1.conv_offset.weight, layer3.11.convs.1.conv_offset.bias, layer3.11.convs.2.conv_offset.weight, layer3.11.convs.2.conv_offset.bias, layer3.12.convs.0.conv_offset.weight, layer3.12.convs.0.conv_offset.bias, layer3.12.convs.1.conv_offset.weight, layer3.12.convs.1.conv_offset.bias, layer3.12.convs.2.conv_offset.weight, layer3.12.convs.2.conv_offset.bias, layer3.13.convs.0.conv_offset.weight, layer3.13.convs.0.conv_offset.bias, layer3.13.convs.1.conv_offset.weight, layer3.13.convs.1.conv_offset.bias, layer3.13.convs.2.conv_offset.weight, layer3.13.convs.2.conv_offset.bias, layer3.14.convs.0.conv_offset.weight, layer3.14.convs.0.conv_offset.bias, layer3.14.convs.1.conv_offset.weight, layer3.14.convs.1.conv_offset.bias, layer3.14.convs.2.conv_offset.weight, layer3.14.convs.2.conv_offset.bias, layer3.15.convs.0.conv_offset.weight, layer3.15.convs.0.conv_offset.bias, layer3.15.convs.1.conv_offset.weight, layer3.15.convs.1.conv_offset.bias, layer3.15.convs.2.conv_offset.weight, layer3.15.convs.2.conv_offset.bias, layer3.16.convs.0.conv_offset.weight, layer3.16.convs.0.conv_offset.bias, layer3.16.convs.1.conv_offset.weight, layer3.16.convs.1.conv_offset.bias, layer3.16.convs.2.conv_offset.weight, layer3.16.convs.2.conv_offset.bias, layer3.17.convs.0.conv_offset.weight, layer3.17.convs.0.conv_offset.bias, layer3.17.convs.1.conv_offset.weight, layer3.17.convs.1.conv_offset.bias, layer3.17.convs.2.conv_offset.weight, layer3.17.convs.2.conv_offset.bias, layer3.18.convs.0.conv_offset.weight, layer3.18.convs.0.conv_offset.bias, layer3.18.convs.1.conv_offset.weight, layer3.18.convs.1.conv_offset.bias, layer3.18.convs.2.conv_offset.weight, layer3.18.convs.2.conv_offset.bias, layer3.19.convs.0.conv_offset.weight, layer3.19.convs.0.conv_offset.bias, layer3.19.convs.1.conv_offset.weight, layer3.19.convs.1.conv_offset.bias, layer3.19.convs.2.conv_offset.weight, layer3.19.convs.2.conv_offset.bias, layer3.20.convs.0.conv_offset.weight, layer3.20.convs.0.conv_offset.bias, layer3.20.convs.1.conv_offset.weight, layer3.20.convs.1.conv_offset.bias, layer3.20.convs.2.conv_offset.weight, layer3.20.convs.2.conv_offset.bias, layer3.21.convs.0.conv_offset.weight, layer3.21.convs.0.conv_offset.bias, layer3.21.convs.1.conv_offset.weight, layer3.21.convs.1.conv_offset.bias, layer3.21.convs.2.conv_offset.weight, layer3.21.convs.2.conv_offset.bias, layer3.22.convs.0.conv_offset.weight, layer3.22.convs.0.conv_offset.bias, layer3.22.convs.1.conv_offset.weight, layer3.22.convs.1.conv_offset.bias, layer3.22.convs.2.conv_offset.weight, layer3.22.convs.2.conv_offset.bias, layer4.0.convs.0.conv_offset.weight, layer4.0.convs.0.conv_offset.bias, layer4.0.convs.1.conv_offset.weight, layer4.0.convs.1.conv_offset.bias, layer4.0.convs.2.conv_offset.weight, layer4.0.convs.2.conv_offset.bias, layer4.1.convs.0.conv_offset.weight, layer4.1.convs.0.conv_offset.bias, layer4.1.convs.1.conv_offset.weight, layer4.1.convs.1.conv_offset.bias, layer4.1.convs.2.conv_offset.weight, layer4.1.convs.2.conv_offset.bias, layer4.2.convs.0.conv_offset.weight, layer4.2.convs.0.conv_offset.bias, layer4.2.convs.1.conv_offset.weight, layer4.2.convs.1.conv_offset.bias, layer4.2.convs.2.conv_offset.weight, layer4.2.convs.2.conv_offset.bias``
_base_ = '../cascade_rcnn/cascade_rcnn_r50_fpn_1x_coco.py'
model = dict(
    pretrained='open-mmlab://res2net101_v1d_26w_4s',
    backbone=dict(type='Res2Net', depth=101, scales=4, base_width=26,
                  dcn=dict(type='DCN', deform_groups=1, fallback_on_stride=False),
                  stage_with_dcn=(False, True, True, True)),

It works normally for me

sky-fly97 commented 4 years ago

"res2net101_v1d_26w_4s": "https://openmmlab.ossaccelerate.aliyuncs.com/pretrain/third_party/res2net101_v1d_26w_4s_mmdetv2-f0a600f9.pth"

Sorry, I can't open the link.

they changed the download path.you can download the model from here(https://openmmlab.oss-accelerate.aliyuncs.com/pretrain/third_party/res2net101_v1d_26w_4s_mmdetv2-f0a600f9.pth)

Hello, I have a question. Does res2net add DCN like this? model = dict( type='CascadeRCNN', pretrained='data/pre/res2net101.pth', backbone=dict( type='Res2Net', depth=101, scales=4, base_width=26, dcn=dict(type='DCN', deform_groups=1, fallback_on_stride=False), stage_with_dcn=(False, True, True, True)), I use your model, but the problem also appear

`mmdet - WARNING - The model and loaded state dict do not match exactly

unexpected key in source state_dict: conv1.0.weight, conv1.1.weight, conv1.1.bias, conv1.1.running_mean, conv1.1.running_var, conv1.1.num_batches_tracked, conv1.3.weight, conv1.4.weight, conv1.4.bias, conv1.4.running_mean, conv1.4.running_var, conv1.4.num_batches_tracked, conv1.6.weight, bn1.weight, bn1.bias, bn1.running_mean, bn1.running_var, bn1.num_batches_tracked, fc.weight, fc.bias

missing keys in source state_dict: stem.0.weight, stem.1.weight, stem.1.bias, stem.1.running_mean, stem.1.running_var, stem.3.weight, stem.4.weight, stem.4.bias, stem.4.running_mean, stem.4.running_var, stem.6.weight, stem.7.weight, stem.7.bias, stem.7.running_mean, stem.7.running_var, layer2.0.convs.0.conv_offset.weight, layer2.0.convs.0.conv_offset.bias, layer2.0.convs.1.conv_offset.weight, layer2.0.convs.1.conv_offset.bias, layer2.0.convs.2.conv_offset.weight, layer2.0.convs.2.conv_offset.bias, layer2.1.convs.0.conv_offset.weight, layer2.1.convs.0.conv_offset.bias, layer2.1.convs.1.conv_offset.weight, layer2.1.convs.1.conv_offset.bias, layer2.1.convs.2.conv_offset.weight, layer2.1.convs.2.conv_offset.bias, layer2.2.convs.0.conv_offset.weight, layer2.2.convs.0.conv_offset.bias, layer2.2.convs.1.conv_offset.weight, layer2.2.convs.1.conv_offset.bias, layer2.2.convs.2.conv_offset.weight, layer2.2.convs.2.conv_offset.bias, layer2.3.convs.0.conv_offset.weight, layer2.3.convs.0.conv_offset.bias, layer2.3.convs.1.conv_offset.weight, layer2.3.convs.1.conv_offset.bias, layer2.3.convs.2.conv_offset.weight, layer2.3.convs.2.conv_offset.bias, layer3.0.convs.0.conv_offset.weight, layer3.0.convs.0.conv_offset.bias, layer3.0.convs.1.conv_offset.weight, layer3.0.convs.1.conv_offset.bias, layer3.0.convs.2.conv_offset.weight, layer3.0.convs.2.conv_offset.bias, layer3.1.convs.0.conv_offset.weight, layer3.1.convs.0.conv_offset.bias, layer3.1.convs.1.conv_offset.weight, layer3.1.convs.1.conv_offset.bias, layer3.1.convs.2.conv_offset.weight, layer3.1.convs.2.conv_offset.bias, layer3.2.convs.0.conv_offset.weight, layer3.2.convs.0.conv_offset.bias, layer3.2.convs.1.conv_offset.weight, layer3.2.convs.1.conv_offset.bias, layer3.2.convs.2.conv_offset.weight, layer3.2.convs.2.conv_offset.bias, layer3.3.convs.0.conv_offset.weight, layer3.3.convs.0.conv_offset.bias, layer3.3.convs.1.conv_offset.weight, layer3.3.convs.1.conv_offset.bias, layer3.3.convs.2.conv_offset.weight, layer3.3.convs.2.conv_offset.bias, layer3.4.convs.0.conv_offset.weight, layer3.4.convs.0.conv_offset.bias, layer3.4.convs.1.conv_offset.weight, layer3.4.convs.1.conv_offset.bias, layer3.4.convs.2.conv_offset.weight, layer3.4.convs.2.conv_offset.bias, layer3.5.convs.0.conv_offset.weight, layer3.5.convs.0.conv_offset.bias, layer3.5.convs.1.conv_offset.weight, layer3.5.convs.1.conv_offset.bias, layer3.5.convs.2.conv_offset.weight, layer3.5.convs.2.conv_offset.bias, layer3.6.convs.0.conv_offset.weight, layer3.6.convs.0.conv_offset.bias, layer3.6.convs.1.conv_offset.weight, layer3.6.convs.1.conv_offset.bias, layer3.6.convs.2.conv_offset.weight, layer3.6.convs.2.conv_offset.bias, layer3.7.convs.0.conv_offset.weight, layer3.7.convs.0.conv_offset.bias, layer3.7.convs.1.conv_offset.weight, layer3.7.convs.1.conv_offset.bias, layer3.7.convs.2.conv_offset.weight, layer3.7.convs.2.conv_offset.bias, layer3.8.convs.0.conv_offset.weight, layer3.8.convs.0.conv_offset.bias, layer3.8.convs.1.conv_offset.weight, layer3.8.convs.1.conv_offset.bias, layer3.8.convs.2.conv_offset.weight, layer3.8.convs.2.conv_offset.bias, layer3.9.convs.0.conv_offset.weight, layer3.9.convs.0.conv_offset.bias, layer3.9.convs.1.conv_offset.weight, layer3.9.convs.1.conv_offset.bias, layer3.9.convs.2.conv_offset.weight, layer3.9.convs.2.conv_offset.bias, layer3.10.convs.0.conv_offset.weight, layer3.10.convs.0.conv_offset.bias, layer3.10.convs.1.conv_offset.weight, layer3.10.convs.1.conv_offset.bias, layer3.10.convs.2.conv_offset.weight, layer3.10.convs.2.conv_offset.bias, layer3.11.convs.0.conv_offset.weight, layer3.11.convs.0.conv_offset.bias, layer3.11.convs.1.conv_offset.weight, layer3.11.convs.1.conv_offset.bias, layer3.11.convs.2.conv_offset.weight, layer3.11.convs.2.conv_offset.bias, layer3.12.convs.0.conv_offset.weight, layer3.12.convs.0.conv_offset.bias, layer3.12.convs.1.conv_offset.weight, layer3.12.convs.1.conv_offset.bias, layer3.12.convs.2.conv_offset.weight, layer3.12.convs.2.conv_offset.bias, layer3.13.convs.0.conv_offset.weight, layer3.13.convs.0.conv_offset.bias, layer3.13.convs.1.conv_offset.weight, layer3.13.convs.1.conv_offset.bias, layer3.13.convs.2.conv_offset.weight, layer3.13.convs.2.conv_offset.bias, layer3.14.convs.0.conv_offset.weight, layer3.14.convs.0.conv_offset.bias, layer3.14.convs.1.conv_offset.weight, layer3.14.convs.1.conv_offset.bias, layer3.14.convs.2.conv_offset.weight, layer3.14.convs.2.conv_offset.bias, layer3.15.convs.0.conv_offset.weight, layer3.15.convs.0.conv_offset.bias, layer3.15.convs.1.conv_offset.weight, layer3.15.convs.1.conv_offset.bias, layer3.15.convs.2.conv_offset.weight, layer3.15.convs.2.conv_offset.bias, layer3.16.convs.0.conv_offset.weight, layer3.16.convs.0.conv_offset.bias, layer3.16.convs.1.conv_offset.weight, layer3.16.convs.1.conv_offset.bias, layer3.16.convs.2.conv_offset.weight, layer3.16.convs.2.conv_offset.bias, layer3.17.convs.0.conv_offset.weight, layer3.17.convs.0.conv_offset.bias, layer3.17.convs.1.conv_offset.weight, layer3.17.convs.1.conv_offset.bias, layer3.17.convs.2.conv_offset.weight, layer3.17.convs.2.conv_offset.bias, layer3.18.convs.0.conv_offset.weight, layer3.18.convs.0.conv_offset.bias, layer3.18.convs.1.conv_offset.weight, layer3.18.convs.1.conv_offset.bias, layer3.18.convs.2.conv_offset.weight, layer3.18.convs.2.conv_offset.bias, layer3.19.convs.0.conv_offset.weight, layer3.19.convs.0.conv_offset.bias, layer3.19.convs.1.conv_offset.weight, layer3.19.convs.1.conv_offset.bias, layer3.19.convs.2.conv_offset.weight, layer3.19.convs.2.conv_offset.bias, layer3.20.convs.0.conv_offset.weight, layer3.20.convs.0.conv_offset.bias, layer3.20.convs.1.conv_offset.weight, layer3.20.convs.1.conv_offset.bias, layer3.20.convs.2.conv_offset.weight, layer3.20.convs.2.conv_offset.bias, layer3.21.convs.0.conv_offset.weight, layer3.21.convs.0.conv_offset.bias, layer3.21.convs.1.conv_offset.weight, layer3.21.convs.1.conv_offset.bias, layer3.21.convs.2.conv_offset.weight, layer3.21.convs.2.conv_offset.bias, layer3.22.convs.0.conv_offset.weight, layer3.22.convs.0.conv_offset.bias, layer3.22.convs.1.conv_offset.weight, layer3.22.convs.1.conv_offset.bias, layer3.22.convs.2.conv_offset.weight, layer3.22.convs.2.conv_offset.bias, layer4.0.convs.0.conv_offset.weight, layer4.0.convs.0.conv_offset.bias, layer4.0.convs.1.conv_offset.weight, layer4.0.convs.1.conv_offset.bias, layer4.0.convs.2.conv_offset.weight, layer4.0.convs.2.conv_offset.bias, layer4.1.convs.0.conv_offset.weight, layer4.1.convs.0.conv_offset.bias, layer4.1.convs.1.conv_offset.weight, layer4.1.convs.1.conv_offset.bias, layer4.1.convs.2.conv_offset.weight, layer4.1.convs.2.conv_offset.bias, layer4.2.convs.0.conv_offset.weight, layer4.2.convs.0.conv_offset.bias, layer4.2.convs.1.conv_offset.weight, layer4.2.convs.1.conv_offset.bias, layer4.2.convs.2.conv_offset.weight, layer4.2.convs.2.conv_offset.bias``
_base_ = '../cascade_rcnn/cascade_rcnn_r50_fpn_1x_coco.py'
model = dict(
    pretrained='open-mmlab://res2net101_v1d_26w_4s',
    backbone=dict(type='Res2Net', depth=101, scales=4, base_width=26,
                  dcn=dict(type='DCN', deform_groups=1, fallback_on_stride=False),
                  stage_with_dcn=(False, True, True, True)),

It works normally for me

Hello, I have trained it, but when I test, I met this problem.

`Traceback (most recent call last):
  File "tools/test.py", line 197, in <module>
    main()
  File "tools/test.py", line 153, in main
    model = build_detector(cfg.model, train_cfg=None, test_cfg=cfg.test_cfg)
  File "/data-output/mmdetection-master/mmdet/models/builder.py", line 67, in build_detector
    return build(cfg, DETECTORS, dict(train_cfg=train_cfg, test_cfg=test_cfg))
  File "/data-output/mmdetection-master/mmdet/models/builder.py", line 32, in build
    return build_from_cfg(cfg, registry, default_args)
  File "/opt/conda/lib/python3.6/site-packages/mmcv/utils/registry.py", line 167, in build_from_cfg
    return obj_cls(**args)
  File "/data-output/mmdetection-master/mmdet/models/detectors/cascade_rcnn.py", line 25, in __init__
    pretrained=pretrained)
  File "/data-output/mmdetection-master/mmdet/models/detectors/two_stage.py", line 48, in __init__
    self.init_weights(pretrained=pretrained)
  File "/data-output/mmdetection-master/mmdet/models/detectors/two_stage.py", line 68, in init_weights
    self.backbone.init_weights(pretrained=pretrained)
  File "/data-output/mmdetection-master/mmdet/models/backbones/resnet.py", line 611, in init_weights
    m.conv2, 'conv_offset'):
  File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 576, in __getattr__
    type(self).__name__, name))
AttributeError: 'Bottle2neck' object has no attribute 'conv2'

How can I test? Thanks!

yuzhj commented 4 years ago

@sky-fly97 #3007 #2237

sky-fly97 commented 4 years ago

@sky-fly97 #3007 #2237

I've commented out this line, and I see that it's also done in it, but I don't know if the result is right

`mmdetection/mmdet/models/backbones/res2net.py

Line 100 in c298a0a

#  delattr(self, 'conv2') `
yuzhj commented 4 years ago

@sky-fly97 #3007 #2237

I've commented out this line, and I see that it's also done in it, but I don't know if the result is right

`mmdetection/mmdet/models/backbones/res2net.py

Line 100 in c298a0a

#  delattr(self, 'conv2') `

I have fixed this problem, you can download the latest version(master) to test your own model

sky-fly97 commented 4 years ago

@sky-fly97 #3007 #2237

I've commented out this line, and I see that it's also done in it, but I don't know if the result is right

`mmdetection/mmdet/models/backbones/res2net.py

Line 100 in c298a0a

#  delattr(self, 'conv2') `

I have fixed this problem, you can download the latest version(master) to test your own model

Thanks~

minan19605 commented 4 years ago

@sky-fly97 I comment below code in the init_weights() of resnet.py for test. The test result is good.

        if self.dcn is not None:
            for m in self.modules():
                if isinstance(m, Bottleneck) and hasattr(
                        m.conv2, 'conv_offset'):
                    constant_init(m.conv2.conv_offset, 0)
hellock commented 4 years ago

Looks like that it has been solved.

forever-rz commented 1 year ago
_base_ = '../cascade_rcnn/cascade_rcnn_r50_fpn_1x_coco.py'
model = dict(
    pretrained='open-mmlab://res2net101_v1d_26w_4s',
    backbone=dict(type='Res2Net', depth=101, scales=4, base_width=26,
                  dcn=dict(type='DCN', deform_groups=1, fallback_on_stride=False),
                  stage_with_dcn=(False, True, True, True)),

It works normally for me

Is this code could download the RES2NET pre-trained model with DCN? If I want to download a pre-trained model without dcn, is it like the following code, just delete one line?

_base_ = '../cascade_rcnn/cascade_rcnn_r50_fpn_1x_coco.py'
model = dict(
    pretrained='open-mmlab://res2net101_v1d_26w_4s',
    backbone=dict(type='Res2Net', depth=101, scales=4, base_width=26,
                  stage_with_dcn=(False, True, True, True)),