Git Product home page Git Product logo

detectors's Introduction

DetectoRS

News

[06/30/2020] DetectoRS is now officially supported by MMDetection. A huge thanks to @xvjiarui, @ZwwWayne and @hellock for helping migrating the code.

[06/15/2020] We have released the implementation of DetectoRS based on mmdetection-v2 in the branch mmdetv2, which allows more detectors to use RFP and SAC.

Introduction

This repo holds the code for DetectoRS: Detecting Objects with Recursive Feature Pyramid and Switchable Atrous Convolution. The project is based on mmdetection codebase. Please refer to mmdetection readme for installation and running scripts. The code is tested with PyTorch 1.4.0. It may not run with other versions. See conda_env.md for the versions of all the packages.

Main Results on COCO test-dev

Method Backbone Config Model Box AP Mask AP
DetectoRS ResNet-50 File Link Download 51.3 44.4
DetectoRS ResNeXt-101-32x4d File Link Download 53.3 45.8

Citing DetectoRS

If you think DetectoRS is useful in your project, please consider citing us.

@article{detectors,
  title={DetectoRS: Detecting Objects with Recursive Feature Pyramid and Switchable Atrous Convolution},
  author={Qiao, Siyuan and Chen, Liang-Chieh and Yuille, Alan},
  journal={arXiv preprint arXiv:2006.02334},
  year={2020}
}

detectors's People

Contributors

borda avatar donnyyou avatar erotemic avatar eugenelawrence avatar fanqie03 avatar gfjiangly avatar hellock avatar innerlee avatar joe-siyuan-qiao avatar korabelnikov avatar lindahua avatar liushuchun avatar melikovk avatar michaelisc avatar mxbonn avatar myownskyw7 avatar oceanpang avatar rydenisbak avatar sovrasov avatar stevehjc avatar ternaus avatar thangvubk avatar tyomj avatar whikwon avatar wswday avatar xvjiarui avatar yhcao6 avatar youkaichao avatar zhihuagao avatar zwwwayne avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

detectors's Issues

TypeError: __init__() got an unexpected keyword argument 'sac'

When I was running image_demo.py on a branch based on mmdetv2, a problem occurred. I was testing detectors_htc_r50_1x_coco.py, how can I fix it?

/home/powerop/.local/lib/python3.6/site-packages/mmcv/utils/registry.py:64: UserWarning: The old API of register_module(module, force=False) is deprecated and will be removed, please use the new API register_module(name=None, force=False, module=None) instead.
'The old API of register_module(module, force=False) '
Traceback (most recent call last):
File "image_demo.py", line 26, in
main()
File "image_demo.py", line 18, in main
model = init_detector(args.config, args.checkpoint, device=args.device)
File "/home/powerop/work/package/mmdetection-master/mmdet/apis/inference.py", line 33, in init_detector
model = build_detector(config.model, test_cfg=config.test_cfg)
File "/home/powerop/work/package/mmdetection-master/mmdet/models/builder.py", line 48, in build_detector
return build(cfg, DETECTORS, dict(train_cfg=train_cfg, test_cfg=test_cfg))
File "/home/powerop/work/package/mmdetection-master/mmdet/models/builder.py", line 20, in build
return build_from_cfg(cfg, registry, default_args)
File "/home/powerop/.local/lib/python3.6/site-packages/mmcv/utils/registry.py", line 167, in build_from_cfg
return obj_cls(**args)
File "/home/powerop/work/package/mmdetection-master/mmdet/models/detectors/htc.py", line 9, in init
super(HybridTaskCascade, self).init(**kwargs)
File "/home/powerop/work/package/mmdetection-master/mmdet/models/detectors/cascade_rcnn.py", line 23, in init
pretrained=pretrained)
File "/home/powerop/work/package/mmdetection-master/mmdet/models/detectors/two_stage.py", line 26, in init
self.backbone = build_backbone(backbone)
File "/home/powerop/work/package/mmdetection-master/mmdet/models/builder.py", line 24, in build_backbone
return build(cfg, BACKBONES)
File "/home/powerop/work/package/mmdetection-master/mmdet/models/builder.py", line 20, in build
return build_from_cfg(cfg, registry, default_args)
File "/home/powerop/.local/lib/python3.6/site-packages/mmcv/utils/registry.py", line 167, in build_from_cfg
return obj_cls(**args)
TypeError: init() got an unexpected keyword argument 'sac'

just object detect

Thanks for your great work!
If I just want to use object detection and no mask ,how can I adjust the config?
Thanks!

loss nan occurred when i integrated sac module into atss detector

Thanks for your excellent work.
In addition to the dataset, the configuration of atss is the same as that in mmdetection. I used SAC module in res101, and only using res101 can be trained normally. Lowering the lr doesn't work. I can't figure out why nan appeared.

reproduce detectoRS htc x101 performance on coco

Hello sir, I'm reproducing detectoRS htc x101 performance on coco. With 1 img per gpu on 16 gpus, which is the recommended setting for htc x101, I'm getting 51.4mAP; with 1 img per gpu on 32 gpus, I'm getting 52.4mAP, which is pretty close to the off-the-shelf model, but still, there's some gap. There might be some details I didn't notice.
Also, the training is very time and gpu memory consuming, have you tried mmdet fp16 train and how is the performance?
Thanks a lot.

AttributeError: 'ConfigDict' object has no attribute 'gpu_ids'

when we use mmdetv2 to do detection task, the error occured, can you tell me how to do it?

the error is as follows:
Traceback (most recent call last):
File "/home/lgl/PycharmProjects/DetectoRS-mmdetv2/train_crossing.py", line 148, in
main()
File "/home/lgl/PycharmProjects/DetectoRS-mmdetv2/train_crossing.py", line 144, in main
meta=meta)
File "/home/lgl/PycharmProjects/DetectoRS-mmdetv2/mmdet/apis/train.py", line 116, in train_detector
seed=cfg.seed) for ds in dataset
File "/home/lgl/PycharmProjects/DetectoRS-mmdetv2/mmdet/apis/train.py", line 116, in
seed=cfg.seed) for ds in dataset
File "/home/lgl/anaconda3/envs/DetectoRS/lib/python3.6/site-packages/mmcv/utils/config.py", line 324, in getattr
return getattr(self._cfg_dict, name)
File "/home/lgl/anaconda3/envs/DetectoRS/lib/python3.6/site-packages/mmcv/utils/config.py", line 36, in getattr
raise ex
AttributeError: 'ConfigDict' object has no attribute 'gpu_ids'

torch version update in requirements

Hi,
Could you please update the requirements in the requirements directory
Your mmdetection codebase supports torch>=1.1.0,<=1.4.0
and torchvision==0.5.0
This problem is mentioned in issue#5
Related files:

requirements/build.txt
requirements/runtime.txt

training from ImageNet pretrained model. Miss keys.

Hello, thank you very much for your beautiful work.
But when I try to train from ImageNet pretrained model by running

python /root/DetectoRS/tools/train.py /root/DetectoRS/configs/DetectoRS/DetectoRS_mstrain_400_1200_r50_40e.py

I got a warning which tell me the resnet50 key word miss mathed.

unexpected key in source state_dict: fc.weight, fc.bias

missing keys in source state_dict: conv1.weight_gamma, conv1.weight_beta, layer1.0.conv1.weight_gamma, layer1.0.conv1.weight_beta, layer1.0.conv2.weight_gamma, layer1.0.conv2.weight_beta, layer1.0.conv3.weight_gamma, layer1.0.conv3.weight_beta, layer1.0.downsample.0.weight_gamma, layer1.0.downsample.0.weight_beta, layer1.1.conv1.weight_gamma, layer1.1.conv1.weight_beta, layer1.1.conv2.weight_gamma, layer1.1.conv2.weight_beta, layer1.1.conv3.weight_gamma, layer1.1.conv3.weight_beta, layer1.2.conv1.weight_gamma, layer1.2.conv1.weight_beta, layer1.2.conv2.weight_gamma, layer1.2.conv2.weight_beta, layer1.2.conv3.weight_gamma, layer1.2.conv3.weight_beta, layer2.0.conv1.weight_gamma, layer2.0.conv1.weight_beta, layer2.0.conv2.weight_diff, layer2.0.conv2.weight_gamma, layer2.0.conv2.weight_beta, layer2.0.conv2.switch.weight, layer2.0.conv2.switch.bias, layer2.0.conv2.pre_context.weight, layer2.0.conv2.pre_context.bias, layer2.0.conv2.post_context.weight, layer2.0.conv2.post_context.bias, layer2.0.conv2.offset_s.weight, layer2.0.conv2.offset_s.bias, layer2.0.conv2.offset_l.weight, layer2.0.conv2.offset_l.bias, layer2.0.conv3.weight_gamma, layer2.0.conv3.weight_beta, layer2.0.downsample.0.weight_gamma, layer2.0.downsample.0.weight_beta, layer2.1.conv1.weight_gamma, layer2.1.conv1.weight_beta, layer2.1.conv2.weight_diff, layer2.1.conv2.weight_gamma, layer2.1.conv2.weight_beta, layer2.1.conv2.switch.weight, layer2.1.conv2.switch.bias, layer2.1.conv2.pre_context.weight, layer2.1.conv2.pre_context.bias, layer2.1.conv2.post_context.weight, layer2.1.conv2.post_context.bias, layer2.1.conv2.offset_s.weight, layer2.1.conv2.offset_s.bias, layer2.1.conv2.offset_l.weight, layer2.1.conv2.offset_l.bias, layer2.1.conv3.weight_gamma, layer2.1.conv3.weight_beta, layer2.2.conv1.weight_gamma, layer2.2.conv1.weight_beta, layer2.2.conv2.weight_diff, layer2.2.conv2.weight_gamma, layer2.2.conv2.weight_beta, layer2.2.conv2.switch.weight, layer2.2.conv2.switch.bias, layer2.2.conv2.pre_context.weight, layer2.2.conv2.pre_context.bias, layer2.2.conv2.post_context.weight, layer2.2.conv2.post_context.bias, layer2.2.conv2.offset_s.weight, layer2.2.conv2.offset_s.bias, layer2.2.conv2.offset_l.weight, layer2.2.conv2.offset_l.bias, layer2.2.conv3.weight_gamma, layer2.2.conv3.weight_beta, layer2.3.conv1.weight_gamma, layer2.3.conv1.weight_beta, layer2.3.conv2.weight_diff, layer2.3.conv2.weight_gamma, layer2.3.conv2.weight_beta, layer2.3.conv2.switch.weight, layer2.3.conv2.switch.bias, layer2.3.conv2.pre_context.weight, layer2.3.conv2.pre_context.bias, layer2.3.conv2.post_context.weight, layer2.3.conv2.post_context.bias, layer2.3.conv2.offset_s.weight, layer2.3.conv2.offset_s.bias, layer2.3.conv2.offset_l.weight, layer2.3.conv2.offset_l.bias, layer2.3.conv3.weight_gamma, layer2.3.conv3.weight_beta, layer3.0.conv1.weight_gamma, layer3.0.conv1.weight_beta, layer3.0.conv2.weight_diff, layer3.0.conv2.weight_gamma, layer3.0.conv2.weight_beta, layer3.0.conv2.switch.weight, layer3.0.conv2.switch.bias, layer3.0.conv2.pre_context.weight, layer3.0.conv2.pre_context.bias, layer3.0.conv2.post_context.weight, layer3.0.conv2.post_context.bias, layer3.0.conv2.offset_s.weight, layer3.0.conv2.offset_s.bias, layer3.0.conv2.offset_l.weight, layer3.0.conv2.offset_l.bias, layer3.0.conv3.weight_gamma, layer3.0.conv3.weight_beta, layer3.0.downsample.0.weight_gamma, layer3.0.downsample.0.weight_beta, layer3.1.conv1.weight_gamma, layer3.1.conv1.weight_beta, layer3.1.conv2.weight_diff, layer3.1.conv2.weight_gamma, layer3.1.conv2.weight_beta, layer3.1.conv2.switch.weight, layer3.1.conv2.switch.bias, layer3.1.conv2.pre_context.weight, layer3.1.conv2.pre_context.bias, layer3.1.conv2.post_context.weight, layer3.1.conv2.post_context.bias, layer3.1.conv2.offset_s.weight, layer3.1.conv2.offset_s.bias, layer3.1.conv2.offset_l.weight, layer3.1.conv2.offset_l.bias, layer3.1.conv3.weight_gamma, layer3.1.conv3.weight_beta, layer3.2.conv1.weight_gamma, layer3.2.conv1.weight_beta, layer3.2.conv2.weight_diff, layer3.2.conv2.weight_gamma, layer3.2.conv2.weight_beta, layer3.2.conv2.switch.weight, layer3.2.conv2.switch.bias, layer3.2.conv2.pre_context.weight, layer3.2.conv2.pre_context.bias, layer3.2.conv2.post_context.weight, layer3.2.conv2.post_context.bias, layer3.2.conv2.offset_s.weight, layer3.2.conv2.offset_s.bias, layer3.2.conv2.offset_l.weight, layer3.2.conv2.offset_l.bias, layer3.2.conv3.weight_gamma, layer3.2.conv3.weight_beta, layer3.3.conv1.weight_gamma, layer3.3.conv1.weight_beta, layer3.3.conv2.weight_diff, layer3.3.conv2.weight_gamma, layer3.3.conv2.weight_beta, layer3.3.conv2.switch.weight, layer3.3.conv2.switch.bias, layer3.3.conv2.pre_context.weight, layer3.3.conv2.pre_context.bias, layer3.3.conv2.post_context.weight, layer3.3.conv2.post_context.bias, layer3.3.conv2.offset_s.weight, layer3.3.conv2.offset_s.bias, layer3.3.conv2.offset_l.weight, layer3.3.conv2.offset_l.bias, layer3.3.conv3.weight_gamma, layer3.3.conv3.weight_beta, layer3.4.conv1.weight_gamma, layer3.4.conv1.weight_beta, layer3.4.conv2.weight_diff, layer3.4.conv2.weight_gamma, layer3.4.conv2.weight_beta, layer3.4.conv2.switch.weight, layer3.4.conv2.switch.bias, layer3.4.conv2.pre_context.weight, layer3.4.conv2.pre_context.bias, layer3.4.conv2.post_context.weight,

The vision of mmcv seems not match

When I run test.py, it reports the error: "KeyError: 'RecursiveFeaturePyramid is not in the detector registry'
", so could help me about this? Thank you very much.

about batch size

I'm reproducing the performance using this repo but I didn't reproduce the reported resnet50 51.3 Box AP. I guess my batch size setting is wrong. I use LR 0.02, 1 image per gpu and 32 GPUs for resnet50, and I got 50.4 Box AP.
May I ask the image per GPU and GPU number for resnet50 and resnext101-32x4d?
thank you.

AttributeError: 'super' object has no attribute 'conv2d_forward'

when inferece image:
raceback (most recent call last):
File "tools/demo.py", line 101, in
result = inference_detector(model, img_path)
File "/mnt/mmdet/apis/inference.py", line 86, in inference_detector
result = model(return_loss=False, rescale=True, **data)
File "/root/miniconda3/envs/mmdetection/lib/python3.7/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/mnt/mmdet/core/fp16/decorators.py", line 49, in new_func
return old_func(*args, **kwargs)
File "/mnt/mmdet/models/detectors/base.py", line 149, in forward
return self.forward_test(img, img_metas, **kwargs)
File "/mnt/mmdet/models/detectors/base.py", line 130, in forward_test
return self.simple_test(imgs[0], img_metas[0], **kwargs)
File "/mnt/mmdet/models/detectors/htc.py", line 311, in simple_test
x = self.extract_feat(img)
File "/mnt/mmdet/models/detectors/rfp.py", line 98, in extract_feat
x = self.backbone(img)
File "/root/miniconda3/envs/mmdetection/lib/python3.7/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/mnt/mmdet/models/backbones/resnet.py", line 583, in forward
x = self.conv1(x)
File "/root/miniconda3/envs/mmdetection/lib/python3.7/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/mnt/mmdet/ops/conv_ws.py", line 84, in forward
return super().conv2d_forward(x, weight)
AttributeError: 'super' object has no attribute 'conv2d_forward'

FP16 Support

Hi! Since DetectoRS is quite large, are there any plans to support fp16 training since I was not allowed to add other features to it due to 11GB memory limitation

Wrong questions in training

Training 👍:
python tools/train.py /home/fw-traffic-02/DetectoRS/configs/DetectoRS/DetectoRS_mstrain_400_1200_r50_40e.py

Training set data format:

image

Error reporting:
Traceback (most recent call last):
File "tools/train.py", line 142, in
main()
File "tools/train.py", line 115, in main
cfg.model, train_cfg=cfg.train_cfg, test_cfg=cfg.test_cfg)
File "/home/fw-traffic-02/mmdetection/mmdet/models/builder.py", line 48, in build_detector
return build(cfg, DETECTORS, dict(train_cfg=train_cfg, test_cfg=test_cfg))
File "/home/fw-traffic-02/mmdetection/mmdet/models/builder.py", line 20, in build
return build_from_cfg(cfg, registry, default_args)
File "/home/fw-traffic-02/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/mmcv/utils/registry.py", line 158, in build_from_cfg
f'{obj_type} is not in the {registry.name} registry')
KeyError: 'RecursiveFeaturePyramid is not in the detector registry'

Please help me to solve the problem, thank you

batch_size should be a positive integer value, but got batch_size=0(for object detection on my own data))

Thanks for your strong work!
I got " batch_size=0" when I trained using my own data only for object detection. I used 1 gpu, imgs_per_gpu=2, and lr = 0.001.
The ERROR and config file are as blow. Thanks so much!!!!

unexpected key in source state_dict: backbone.conv1.weight, backbone.conv1.weight_gamma, backbone.conv1.weight_beta, backbone.bn1.weight, backbone.bn1.bias, backbone.bn1.running_mean, backbone.bn1.running_var, backbone.bn1.num_batches_tracked, backbone.layer1.0.conv1.weight, backbone.layer1.0.conv1.weight_gamma,

loading annotations into memory...
Done (t=0.00s)
creating index...
index created!
loading annotations into memory...
Done (t=0.48s)
creating index...
index created!
Traceback (most recent call last):
  File "tools/train.py", line 141, in <module>
    main()
  File "tools/train.py", line 138, in main
    meta=meta)
  File "/home/disk2/gwf/mmdetection-based/DetectoRS/mmdet/apis/train.py", line 111, in train_detector
    meta=meta)
  File "/home/disk2/gwf/mmdetection-based/DetectoRS/mmdet/apis/train.py", line 200, in _non_dist_train
    seed=cfg.seed) for ds in dataset
  File "/home/disk2/gwf/mmdetection-based/DetectoRS/mmdet/apis/train.py", line 200, in <listcomp>
    seed=cfg.seed) for ds in dataset
  File "/home/disk2/gwf/mmdetection-based/DetectoRS/mmdet/datasets/loader/build_loader.py", line 78, in build_dataloader
    **kwargs)
  File "/home/disk2/gwf/anaconda3/envs/py36torch140/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 219, in __init__
    batch_sampler = BatchSampler(sampler, batch_size, drop_last)
  File "/home/disk2/gwf/anaconda3/envs/py36torch140/lib/python3.6/site-packages/torch/utils/data/sampler.py", line 190, in __init__
    "but got batch_size={}".format(batch_size))
ValueError: batch_size should be a positive integer value, but got batch_size=0

2020-06-12 19:40:42,709 - mmdet - INFO - Environment info:

sys.platform: linux
Python: 3.6.10 |Anaconda, Inc.| (default, Jan 7 2020, 21:14:29) [GCC 7.3.0]
CUDA available: True
CUDA_HOME: /usr/local/cuda-10.1
NVCC: Cuda compilation tools, release 10.1, V10.1.243
GPU 0: GeForce GTX 1080 Ti
GCC: gcc (Ubuntu 5.5.0-12ubuntu1~16.04) 5.5.0 20171010
PyTorch: 1.4.0
PyTorch compiling details: PyTorch built with:

  • GCC 7.3
  • Intel(R) Math Kernel Library Version 2019.0.4 Product Build 20190411 for Intel(R) 64 architecture applications
  • Intel(R) MKL-DNN v0.21.1 (Git Hash 7d2fd500bc78936d1d648ca713b901012f470dbc)
  • OpenMP 201511 (a.k.a. OpenMP 4.5)
  • NNPACK is enabled
  • CUDA Runtime 10.1
  • NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_37,code=compute_37
  • CuDNN 7.6.3
  • Magma 2.5.1
  • Build settings: BLAS=MKL, BUILD_NAMEDTENSOR=OFF, BUILD_TYPE=Release, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -fopenmp -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -O2 -fPIC -Wno-narrowing -Wall -Wextra -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Wno-stringop-overflow, DISABLE_NUMA=1, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, USE_CUDA=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON, USE_STATIC_DISPATCH=OFF,

TorchVision: 0.5.0
OpenCV: 4.2.0
MMCV: 0.5.9
MMDetection: 1.1.0+unknown
MMDetection Compiler: GCC 5.5
MMDetection CUDA Compiler: 10.1

2020-06-12 19:40:42,709 - mmdet - INFO - Distributed training: False
2020-06-12 19:40:42,709 - mmdet - INFO - Config:
/home/disk2/gwf/mmdetection-based/DetectoRS/configs/DetectoRS/DetectoRS_mstrain_400_1200_x101_32x4d_40e.py
conv_cfg = dict(type='ConvAWS')

model settings

model = dict(
type='RecursiveFeaturePyramid',
rfp_steps=2,
rfp_sharing=False,
stage_with_rfp=(False, True, True, True),
num_stages=3,
pretrained='/home/disk2/gwf/mmdetection-based/DetectoRS/pretrained/DetectoRS_X101-ed983634.pth', ##default: 'open-mmlab://resnext101_32x4d'
interleaved=True,
mask_info_flow=True,
backbone=dict(
type='ResNeXt',
depth=101,
groups=32,
base_width=4,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
conv_cfg=conv_cfg,
sac=dict(type='SAC', use_deform=True),
stage_with_sac=(False, True, True, True),
norm_cfg=dict(type='BN', requires_grad=True), #default: type='BN'
style='pytorch'),
neck=dict(
type='FPN',
in_channels=[256, 512, 1024, 2048],
out_channels=256,
num_outs=5),
rpn_head=dict(
type='RPNHead',
in_channels=256,
feat_channels=256,
anchor_scales=[8],
anchor_ratios=[0.5, 1.0, 2.0],
anchor_strides=[4, 8, 16, 32, 64],
target_means=[.0, .0, .0, .0],
target_stds=[1.0, 1.0, 1.0, 1.0],
loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0)),
bbox_roi_extractor=dict(
type='SingleRoIExtractor',
roi_layer=dict(type='RoIAlign', out_size=7, sample_num=2),
out_channels=256,
featmap_strides=[4, 8, 16, 32]),
bbox_head=[
dict(
type='SharedFCBBoxHead',
num_fcs=2,
in_channels=256,
fc_out_channels=1024,
roi_feat_size=7,
num_classes=11, #default: num_classes=81,
target_means=[0., 0., 0., 0.],
target_stds=[0.1, 0.1, 0.2, 0.2],
reg_class_agnostic=True,
loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0, loss_weight=1.0)),
dict(
type='SharedFCBBoxHead',
num_fcs=2,
in_channels=256,
fc_out_channels=1024,
roi_feat_size=7,
num_classes=11, #default: num_classes=81,
target_means=[0., 0., 0., 0.],
target_stds=[0.05, 0.05, 0.1, 0.1],
reg_class_agnostic=True,
loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0, loss_weight=1.0)),
dict(
type='SharedFCBBoxHead',
num_fcs=2,
in_channels=256,
fc_out_channels=1024,
roi_feat_size=7,
num_classes=11, #default: num_classes=81,
target_means=[0., 0., 0., 0.],
target_stds=[0.033, 0.033, 0.067, 0.067],
reg_class_agnostic=True,
loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0, loss_weight=1.0))
],
mask_roi_extractor=dict(
type='SingleRoIExtractor',
roi_layer=dict(type='RoIAlign', out_size=14, sample_num=2),
out_channels=256,
featmap_strides=[4, 8, 16, 32]),
mask_head=[
dict(
type='HTCMaskHead',
with_conv_res=False,
num_convs=4,
in_channels=256,
conv_out_channels=256,
num_classes=11, #default: num_classes=81,
loss_mask=dict(
type='CrossEntropyLoss', use_mask=True, loss_weight=1.0)),
dict(
type='HTCMaskHead',
num_convs=4,
in_channels=256,
conv_out_channels=256,
num_classes=11, #default: num_classes=81,
loss_mask=dict(
type='CrossEntropyLoss', use_mask=True, loss_weight=1.0)),
dict(
type='HTCMaskHead',
num_convs=4,
in_channels=256,
num_classes=11, #default: num_classes=81,
loss_mask=dict(
type='CrossEntropyLoss', use_mask=True, loss_weight=1.0))
],
semantic_roi_extractor=dict(
type='SingleRoIExtractor',
roi_layer=dict(type='RoIAlign', out_size=14, sample_num=2),
out_channels=256,
featmap_strides=[8]),
semantic_head=dict(
type='FusedSemanticHead',
num_ins=5,
fusion_level=1,
num_convs=4,
in_channels=256,
conv_out_channels=256,
num_classes=183,
ignore_label=255,
loss_weight=0.2))

model training and testing settings

train_cfg = dict(
rpn=dict(
assigner=dict(
type='MaxIoUAssigner',
pos_iou_thr=0.7,
neg_iou_thr=0.3,
min_pos_iou=0.3,
ignore_iof_thr=-1),
sampler=dict(
type='RandomSampler',
num=256,
pos_fraction=0.5,
neg_pos_ub=-1,
add_gt_as_proposals=False),
allowed_border=0,
pos_weight=-1,
debug=False),
rpn_proposal=dict(
nms_across_levels=False,
nms_pre=2000,
nms_post=2000,
max_num=2000,
nms_thr=0.7,
min_bbox_size=0),
rcnn=[
dict(
assigner=dict(
type='MaxIoUAssigner',
pos_iou_thr=0.5,
neg_iou_thr=0.5,
min_pos_iou=0.5,
ignore_iof_thr=-1),
sampler=dict(
type='RandomSampler',
num=512,
pos_fraction=0.25,
neg_pos_ub=-1,
add_gt_as_proposals=True),
mask_size=28,
pos_weight=-1,
debug=False),
dict(
assigner=dict(
type='MaxIoUAssigner',
pos_iou_thr=0.6,
neg_iou_thr=0.6,
min_pos_iou=0.6,
ignore_iof_thr=-1),
sampler=dict(
type='RandomSampler',
num=512,
pos_fraction=0.25,
neg_pos_ub=-1,
add_gt_as_proposals=True),
mask_size=28,
pos_weight=-1,
debug=False),
dict(
assigner=dict(
type='MaxIoUAssigner',
pos_iou_thr=0.7,
neg_iou_thr=0.7,
min_pos_iou=0.7,
ignore_iof_thr=-1),
sampler=dict(
type='RandomSampler',
num=512,
pos_fraction=0.25,
neg_pos_ub=-1,
add_gt_as_proposals=True),
mask_size=28,
pos_weight=-1,
debug=False)
],
stage_loss_weights=[1, 0.5, 0.25])
test_cfg = dict(
rpn=dict(
nms_across_levels=False,
nms_pre=1000,
nms_post=1000,
max_num=1000,
nms_thr=0.7,
min_bbox_size=0),
rcnn=dict(
score_thr=0.001,
nms=dict(type='soft_nms', iou_thr=0.5),
max_per_img=1000, #default: max_per_img=100,
mask_thr_binary=0.5))

dataset settings

dataset_type = 'VisdroneDataset' #default: CocoDataset
data_root = 'data/visdrone/' #default: 'data/coco/'
img_norm_cfg = dict(
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
train_pipeline = [
dict(type='LoadImageFromFile'),
dict(
type='LoadAnnotations', with_bbox=True, with_mask=False, with_seg=False), #default: type='LoadAnnotations', with_bbox=True, with_mask=True, with_seg=True),
dict(
type='Resize',
img_scale=[(1333, 400), (1333, 1200)],
multiscale_mode='range',
keep_ratio=True),
dict(type='RandomFlip', flip_ratio=0.5),
dict(type='Normalize', **img_norm_cfg),
dict(type='Pad', size_divisor=32),
dict(type='SegRescale', scale_factor=1 / 8),
dict(type='DefaultFormatBundle'),
dict(
type='Collect',
keys=['img', 'gt_bboxes', 'gt_labels', 'gt_masks', 'gt_semantic_seg']),
]
test_pipeline = [
dict(type='LoadImageFromFile'),
dict(
type='MultiScaleFlipAug',
img_scale=(1333, 800),
flip=False,
transforms=[
dict(type='Resize', keep_ratio=True),
dict(type='RandomFlip', flip_ratio=0.5),
dict(type='Normalize', **img_norm_cfg),
dict(type='Pad', size_divisor=32),
dict(type='ImageToTensor', keys=['img']),
dict(type='Collect', keys=['img']),
])
]
data = dict(
imgs_per_gpu=2,
workers_per_gpu=4,
# train=dict(
# type=dataset_type,
# ann_file=data_root + 'annotations/instances_train2017.json',
# img_prefix=data_root + 'train2017/',
# seg_prefix=data_root + 'stuffthingmaps/train2017/',
# pipeline=train_pipeline),
# val=dict(
# type=dataset_type,
# ann_file=data_root + 'annotations/instances_val2017.json',
# img_prefix=data_root + 'val2017/',
# pipeline=test_pipeline),
# test=dict(
# type=dataset_type,
# ann_file=data_root + 'annotations/instances_val2017.json',
# img_prefix=data_root + 'val2017/',
# pipeline=test_pipeline))

#add by gwf=======================================
train=dict(
    type=dataset_type,
    ann_file=data_root + 'annotations/train.json',
    img_prefix=data_root + 'train/',
    seg_prefix=data_root + 'train/',
    pipeline=train_pipeline),
test_dev=dict(
    type=dataset_type,
    ann_file=data_root + 'annotations/test_dev.json',
    img_prefix=data_root + 'test_dev/',
    seg_prefix=data_root + 'test_dev/',
    pipeline=train_pipeline),
val=dict(
    type=dataset_type,
    ann_file=data_root + 'annotations/test.json',
    img_prefix=data_root + 'test/',
    pipeline=test_pipeline),
test=dict(
    type=dataset_type,
    ann_file=data_root + 'annotations/test.json',
    img_prefix=data_root + 'test/',
    pipeline=test_pipeline))

evaluation = dict(interval=1, metric=['bbox', 'segm'])

optimizer

optimizer = dict(type='SGD', lr=0.001, momentum=0.9, weight_decay=0.0001) #default: lr=0.02
optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))

learning policy

lr_config = dict(
policy='step',
warmup='linear',
warmup_iters=500,
warmup_ratio=1.0 / 3,
step=[140, 175]) #default: step=[36, 39]
checkpoint_config = dict(interval=1) ## This evaluate the model per 1 epoch.

yapf:disable

log_config = dict(
interval=50,
hooks=[
dict(type='TextLoggerHook'),
# dict(type='TensorboardLoggerHook')
])

yapf:enable

runtime settings

total_epochs = 200 #default: 40
dist_params = dict(backend='nccl')
log_level = 'INFO'
work_dir = './work_dirs/DetectoRS_mstrain_400_1200_x101_32x4d_40e.py'
load_from = '/home/disk2/gwf/mmdetection-based/DetectoRS/pretrained/DetectoRS_X101-ed983634.pth'##default: None
resume_from = None
workflow = [('train', 1),('test_dev', 1),('val', 1)] #default: workflow = [('train', 1)]

Thanks for your error report and we appreciate it a lot.

Checklist

  1. I have searched related issues but cannot get the expected help.
  2. The bug has not been fixed in the latest version.

Describe the bug
A clear and concise description of what the bug is.

Reproduction

  1. What command or script did you run?
A placeholder for the command.
  1. Did you make any modifications on the code or config? Did you understand what you have modified?
  2. What dataset did you use?

Environment

  1. Please run python mmdet/utils/collect_env.py to collect necessary environment infomation and paste it here.
  2. You may add addition that may be helpful for locating the problem, such as
    • How you installed PyTorch [e.g., pip, conda, source]
    • Other environment variables that may be related (such as $PATH, $LD_LIBRARY_PATH, $PYTHONPATH, etc.)

Error traceback
If applicable, paste the error trackback here.

A placeholder for trackback.

Bug fix
If you have already identified the reason, you can provide the information here. If you are willing to create a PR to fix it, please also leave a comment here and that would be much appreciated!

RuntimeError: copy_if failed to synchronize: device-side assert triggered terminate called after throwing an instance of 'c10::Error'

sys.platform: linux
Python: 3.6.9 (default, Apr 18 2020, 01:56:04) [GCC 8.4.0]
CUDA available: True
CUDA_HOME: /usr/local/cuda
NVCC: Cuda compilation tools, release 10.1, V10.1.243
GPU 0: Tesla K80
GCC: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
PyTorch: 1.4.0+cu100
PyTorch compiling details: PyTorch built with:
  - GCC 7.3
  - Intel(R) Math Kernel Library Version 2019.0.4 Product Build 20190411 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v0.21.1 (Git Hash 7d2fd500bc78936d1d648ca713b901012f470dbc)
  - OpenMP 201511 (a.k.a. OpenMP 4.5)
  - NNPACK is enabled
  - CUDA Runtime 10.0
  - NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_37,code=compute_37
  - CuDNN 7.6.3
  - Magma 2.5.1
  - Build settings: BLAS=MKL, BUILD_NAMEDTENSOR=OFF, BUILD_TYPE=Release, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -fopenmp -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -O2 -fPIC -Wno-narrowing -Wall -Wextra -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Wno-stringop-overflow, DISABLE_NUMA=1, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, USE_CUDA=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON, USE_STATIC_DISPATCH=OFF, 

TorchVision: 0.5.0+cu100
OpenCV: 4.1.2
MMCV: 0.5.9
MMDetection: 1.1.0+bccc528
MMDetection Compiler: GCC 7.5
MMDetection CUDA Compiler: 10.1
------------------------------------------------------------

2020-06-08 08:59:36,404 - mmdet - INFO - Distributed training: False
2020-06-08 08:59:36,404 - mmdet - INFO - Config:
/content/drive/My Drive/DetectoRS/configs/DetectoRS/DetectoRS_mstrain_400_1200_x101_32x4d_40e.py
conv_cfg = dict(type='ConvAWS')
# model settings
model = dict(
    type='RecursiveFeaturePyramid',
    rfp_steps=2,
    rfp_sharing=False,
    stage_with_rfp=(False, True, True, True),
    num_stages=3,
    pretrained='open-mmlab://resnext101_32x4d',
    interleaved=True,
    mask_info_flow=True,
    backbone=dict(
        type='ResNeXt',
        depth=101,
        groups=32,
        base_width=4,
        num_stages=4,
        out_indices=(0, 1, 2, 3),
        frozen_stages=1,
        conv_cfg=conv_cfg,
        sac=dict(type='SAC', use_deform=True),
        stage_with_sac=(False, True, True, True),
        norm_cfg=dict(type='BN', requires_grad=True),
        style='pytorch'),
    neck=dict(
        type='FPN',
        in_channels=[256, 512, 1024, 2048],
        out_channels=256,
        num_outs=5),
    rpn_head=dict(
        type='RPNHead',
        in_channels=256,
        feat_channels=256,
        anchor_scales=[8],
        anchor_ratios=[0.5, 1.0, 2.0],
        anchor_strides=[4, 8, 16, 32, 64],
        target_means=[.0, .0, .0, .0],
        target_stds=[1.0, 1.0, 1.0, 1.0],
        loss_cls=dict(
            type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
        loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0)),
    bbox_roi_extractor=dict(
        type='SingleRoIExtractor',
        roi_layer=dict(type='RoIAlign', out_size=7, sample_num=2),
        out_channels=256,
        featmap_strides=[4, 8, 16, 32]),
    bbox_head=[
        dict(
            type='SharedFCBBoxHead',
            num_fcs=2,
            in_channels=256,
            fc_out_channels=1024,
            roi_feat_size=7,
            num_classes=1,
            target_means=[0., 0., 0., 0.],
            target_stds=[0.1, 0.1, 0.2, 0.2],
            reg_class_agnostic=True,
            loss_cls=dict(
                type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0),
            loss_bbox=dict(type='SmoothL1Loss', beta=1.0, loss_weight=1.0)),
        dict(
            type='SharedFCBBoxHead',
            num_fcs=2,
            in_channels=256,
            fc_out_channels=1024,
            roi_feat_size=7,
            num_classes=2,
            target_means=[0., 0., 0., 0.],
            target_stds=[0.05, 0.05, 0.1, 0.1],
            reg_class_agnostic=True,
            loss_cls=dict(
                type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0),
            loss_bbox=dict(type='SmoothL1Loss', beta=1.0, loss_weight=1.0)),
        dict(
            type='SharedFCBBoxHead',
            num_fcs=2,
            in_channels=256,
            fc_out_channels=1024,
            roi_feat_size=7,
            num_classes=2,
            target_means=[0., 0., 0., 0.],
            target_stds=[0.033, 0.033, 0.067, 0.067],
            reg_class_agnostic=True,
            loss_cls=dict(
                type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0),
            loss_bbox=dict(type='SmoothL1Loss', beta=1.0, loss_weight=1.0))
    ],
    mask_roi_extractor=dict(
        type='SingleRoIExtractor',
        roi_layer=dict(type='RoIAlign', out_size=14, sample_num=2),
        out_channels=256,
        featmap_strides=[4, 8, 16, 32]),
    mask_head=[
        dict(
            type='HTCMaskHead',
            with_conv_res=False,
            num_convs=4,
            in_channels=256,
            conv_out_channels=256,
            num_classes=1,
            loss_mask=dict(
                type='CrossEntropyLoss', use_mask=True, loss_weight=1.0)),
        dict(
            type='HTCMaskHead',
            num_convs=4,
            in_channels=256,
            conv_out_channels=256,
            num_classes=1,
            loss_mask=dict(
                type='CrossEntropyLoss', use_mask=True, loss_weight=1.0)),
        dict(
            type='HTCMaskHead',
            num_convs=4,
            in_channels=256,
            conv_out_channels=256,
            num_classes=1,
            loss_mask=dict(
                type='CrossEntropyLoss', use_mask=True, loss_weight=1.0))
    ],
    semantic_roi_extractor=dict(
        type='SingleRoIExtractor',
        roi_layer=dict(type='RoIAlign', out_size=14, sample_num=2),
        out_channels=256,
        featmap_strides=[8]),
    semantic_head=dict(
        type='FusedSemanticHead',
        num_ins=5,
        fusion_level=1,
        num_convs=4,
        in_channels=256,
        conv_out_channels=256,
        num_classes=1,
        ignore_label=255,
        loss_weight=0.2))
# model training and testing settings
train_cfg = dict(
    rpn=dict(
        assigner=dict(
            type='MaxIoUAssigner',
            pos_iou_thr=0.7,
            neg_iou_thr=0.3,
            min_pos_iou=0.3,
            ignore_iof_thr=-1),
        sampler=dict(
            type='RandomSampler',
            num=256,
            pos_fraction=0.5,
            neg_pos_ub=-1,
            add_gt_as_proposals=False),
        allowed_border=0,
        pos_weight=-1,
        debug=False),
    rpn_proposal=dict(
        nms_across_levels=False,
        nms_pre=2000,
        nms_post=2000,
        max_num=2000,
        nms_thr=0.7,
        min_bbox_size=0),
    rcnn=[
        dict(
            assigner=dict(
                type='MaxIoUAssigner',
                pos_iou_thr=0.5,
                neg_iou_thr=0.5,
                min_pos_iou=0.5,
                ignore_iof_thr=-1),
            sampler=dict(
                type='RandomSampler',
                num=512,
                pos_fraction=0.25,
                neg_pos_ub=-1,
                add_gt_as_proposals=True),
            mask_size=28,
            pos_weight=-1,
            debug=False),
        dict(
            assigner=dict(
                type='MaxIoUAssigner',
                pos_iou_thr=0.6,
                neg_iou_thr=0.6,
                min_pos_iou=0.6,
                ignore_iof_thr=-1),
            sampler=dict(
                type='RandomSampler',
                num=512,
                pos_fraction=0.25,
                neg_pos_ub=-1,
                add_gt_as_proposals=True),
            mask_size=28,
            pos_weight=-1,
            debug=False),
        dict(
            assigner=dict(
                type='MaxIoUAssigner',
                pos_iou_thr=0.7,
                neg_iou_thr=0.7,
                min_pos_iou=0.7,
                ignore_iof_thr=-1),
            sampler=dict(
                type='RandomSampler',
                num=512,
                pos_fraction=0.25,
                neg_pos_ub=-1,
                add_gt_as_proposals=True),
            mask_size=28,
            pos_weight=-1,
            debug=False)
    ],
    stage_loss_weights=[1, 0.5, 0.25])
test_cfg = dict(
    rpn=dict(
        nms_across_levels=False,
        nms_pre=1000,
        nms_post=1000,
        max_num=1000,
        nms_thr=0.7,
        min_bbox_size=0),
    rcnn=dict(
        score_thr=0.001,
        nms=dict(type='soft_nms', iou_thr=0.5),
        max_per_img=100,
        mask_thr_binary=0.5))
# dataset settings
dataset_type = 'CocoDataset'
data_root = '/content/drive/My Drive/collab/data/'
img_norm_cfg = dict(
    mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
train_pipeline = [
    dict(type='LoadImageFromFile'),
    dict(
        type='LoadAnnotations', with_bbox=True, with_mask=True, with_seg=True),
    dict(
        type='Resize',
        img_scale=[(1333, 400), (1333, 1200)],
        multiscale_mode='range',
        keep_ratio=True),
    dict(type='RandomFlip', flip_ratio=0.5),
    dict(type='Normalize', **img_norm_cfg),
    dict(type='Pad', size_divisor=32),
    dict(type='SegRescale', scale_factor=1 / 8),
    dict(type='DefaultFormatBundle'),
    dict(
        type='Collect',
        keys=['img', 'gt_bboxes', 'gt_labels', 'gt_masks', 'gt_semantic_seg']),
]
test_pipeline = [
    dict(type='LoadImageFromFile'),
    dict(
        type='MultiScaleFlipAug',
        img_scale=(1333, 800),
        flip=False,
        transforms=[
            dict(type='Resize', keep_ratio=True),
            dict(type='RandomFlip', flip_ratio=0.5),
            dict(type='Normalize', **img_norm_cfg),
            dict(type='Pad', size_divisor=32),
            dict(type='ImageToTensor', keys=['img']),
            dict(type='Collect', keys=['img']),
        ])
]
data = dict(
    imgs_per_gpu=1,
    workers_per_gpu=1,
    train=dict(
        type=dataset_type,
        ann_file=data_root + 'annotations/instances_train2017.json',
        img_prefix=data_root + 'train2017/',
        seg_prefix=data_root + 'train2017/',
        pipeline=train_pipeline),
    val=dict(
        type=dataset_type,
        ann_file=data_root + 'annotations/instances_val2017.json',
        img_prefix=data_root + 'val2017/',
        pipeline=test_pipeline),
    test=dict(
        type=dataset_type,
        ann_file=data_root + 'annotations/instances_val2017.json',
        img_prefix=data_root + 'val2017/',
        pipeline=test_pipeline))
evaluation = dict(interval=1, metric=['bbox', 'segm'])
# optimizer
optimizer = dict(type='SGD', lr=0.02, momentum=0.9, weight_decay=0.0001)
optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))
# learning policy
lr_config = dict(
    policy='step',
    warmup='linear',
    warmup_iters=500,
    warmup_ratio=1.0 / 3,
    step=[36, 39])
checkpoint_config = dict(interval=1)
# yapf:disable
log_config = dict(
    interval=50,
    hooks=[
        dict(type='TextLoggerHook'),
        # dict(type='TensorboardLoggerHook')
    ])
# yapf:enable
# runtime settings
total_epochs = 40
dist_params = dict(backend='nccl')
log_level = 'INFO'
work_dir = './work_dirs/DetectoRS_mstrain_400_1200_x101_32x4d_40e.py'
load_from = None
resume_from = None
workflow = [('train', 1)]

2020-06-08 08:59:39,001 - mmdet - INFO - load model from: open-mmlab://resnext101_32x4d
2020-06-08 08:59:39,627 - mmdet - WARNING - The model and loaded state dict do not match exactly

missing keys in source state_dict: conv1.weight_gamma, conv1.weight_beta, layer1.0.conv1.weight_gamma, layer1.0.conv1.weight_beta, layer1.0.conv2.weight_gamma, layer1.0.conv2.weight_beta, layer1.0.conv3.weight_gamma, layer1.0.conv3.weight_beta, layer1.0.downsample.0.weight_gamma, layer1.0.downsample.0.weight_beta, layer1.1.conv1.weight_gamma, layer1.1.conv1.weight_beta, layer1.1.conv2.weight_gamma, layer1.1.conv2.weight_beta, layer1.1.conv3.weight_gamma, layer1.1.conv3.weight_beta, layer1.2.conv1.weight_gamma, layer1.2.conv1.weight_beta, layer1.2.conv2.weight_gamma, layer1.2.conv2.weight_beta, layer1.2.conv3.weight_gamma, layer1.2.conv3.weight_beta, layer2.0.conv1.weight_gamma, layer2.0.conv1.weight_beta, layer2.0.conv2.weight_diff, layer2.0.conv2.weight_gamma, layer2.0.conv2.weight_beta, layer2.0.conv2.switch.weight, layer2.0.conv2.switch.bias, layer2.0.conv2.pre_context.weight, layer2.0.conv2.pre_context.bias, layer2.0.conv2.post_context.weight, layer2.0.conv2.post_context.bias, layer2.0.conv2.offset_s.weight, layer2.0.conv2.offset_s.bias, layer2.0.conv2.offset_l.weight, layer2.0.conv2.offset_l.bias, layer2.0.conv3.weight_gamma, layer2.0.conv3.weight_beta, layer2.0.downsample.0.weight_gamma, layer2.0.downsample.0.weight_beta, layer2.1.conv1.weight_gamma, layer2.1.conv1.weight_beta, layer2.1.conv2.weight_diff, layer2.1.conv2.weight_gamma, layer2.1.conv2.weight_beta, layer2.1.conv2.switch.weight, layer2.1.conv2.switch.bias, layer2.1.conv2.pre_context.weight, layer2.1.conv2.pre_context.bias, layer2.1.conv2.post_context.weight, layer2.1.conv2.post_context.bias, layer2.1.conv2.offset_s.weight, layer2.1.conv2.offset_s.bias, layer2.1.conv2.offset_l.weight, layer2.1.conv2.offset_l.bias, layer2.1.conv3.weight_gamma, layer2.1.conv3.weight_beta, layer2.2.conv1.weight_gamma, layer2.2.conv1.weight_beta, layer2.2.conv2.weight_diff, layer2.2.conv2.weight_gamma, layer2.2.conv2.weight_beta, layer2.2.conv2.switch.weight, layer2.2.conv2.switch.bias, layer2.2.conv2.pre_context.weight, layer2.2.conv2.pre_context.bias, layer2.2.conv2.post_context.weight, layer2.2.conv2.post_context.bias, layer2.2.conv2.offset_s.weight, layer2.2.conv2.offset_s.bias, layer2.2.conv2.offset_l.weight, layer2.2.conv2.offset_l.bias, layer2.2.conv3.weight_gamma, layer2.2.conv3.weight_beta, layer2.3.conv1.weight_gamma, layer2.3.conv1.weight_beta, layer2.3.conv2.weight_diff, layer2.3.conv2.weight_gamma, layer2.3.conv2.weight_beta, layer2.3.conv2.switch.weight, layer2.3.conv2.switch.bias, layer2.3.conv2.pre_context.weight, layer2.3.conv2.pre_context.bias, layer2.3.conv2.post_context.weight, layer2.3.conv2.post_context.bias, layer2.3.conv2.offset_s.weight, layer2.3.conv2.offset_s.bias, layer2.3.conv2.offset_l.weight, layer2.3.conv2.offset_l.bias, layer2.3.conv3.weight_gamma, layer2.3.conv3.weight_beta, layer3.0.conv1.weight_gamma, layer3.0.conv1.weight_beta, layer3.0.conv2.weight_diff, layer3.0.conv2.weight_gamma, layer3.0.conv2.weight_beta, layer3.0.conv2.switch.weight, layer3.0.conv2.switch.bias, layer3.0.conv2.pre_context.weight, layer3.0.conv2.pre_context.bias, layer3.0.conv2.post_context.weight, layer3.0.conv2.post_context.bias, layer3.0.conv2.offset_s.weight, layer3.0.conv2.offset_s.bias, layer3.0.conv2.offset_l.weight, layer3.0.conv2.offset_l.bias, layer3.0.conv3.weight_gamma, layer3.0.conv3.weight_beta, layer3.0.downsample.0.weight_gamma, layer3.0.downsample.0.weight_beta, layer3.1.conv1.weight_gamma, layer3.1.conv1.weight_beta, layer3.1.conv2.weight_diff, layer3.1.conv2.weight_gamma, layer3.1.conv2.weight_beta, layer3.1.conv2.switch.weight, layer3.1.conv2.switch.bias, layer3.1.conv2.pre_context.weight, layer3.1.conv2.pre_context.bias, layer3.1.conv2.post_context.weight, layer3.1.conv2.post_context.bias, layer3.1.conv2.offset_s.weight, layer3.1.conv2.offset_s.bias, layer3.1.conv2.offset_l.weight, layer3.1.conv2.offset_l.bias, layer3.1.conv3.weight_gamma, layer3.1.conv3.weight_beta, layer3.2.conv1.weight_gamma, layer3.2.conv1.weight_beta, layer3.2.conv2.weight_diff, layer3.2.conv2.weight_gamma, layer3.2.conv2.weight_beta, layer3.2.conv2.switch.weight, layer3.2.conv2.switch.bias, layer3.2.conv2.pre_context.weight, layer3.2.conv2.pre_context.bias, layer3.2.conv2.post_context.weight, layer3.2.conv2.post_context.bias, layer3.2.conv2.offset_s.weight, layer3.2.conv2.offset_s.bias, layer3.2.conv2.offset_l.weight, layer3.2.conv2.offset_l.bias, layer3.2.conv3.weight_gamma, layer3.2.conv3.weight_beta, layer3.3.conv1.weight_gamma, layer3.3.conv1.weight_beta, layer3.3.conv2.weight_diff, layer3.3.conv2.weight_gamma, layer3.3.conv2.weight_beta, layer3.3.conv2.switch.weight, layer3.3.conv2.switch.bias, layer3.3.conv2.pre_context.weight, layer3.3.conv2.pre_context.bias, layer3.3.conv2.post_context.weight, layer3.3.conv2.post_context.bias, layer3.3.conv2.offset_s.weight, layer3.3.conv2.offset_s.bias, layer3.3.conv2.offset_l.weight, layer3.3.conv2.offset_l.bias, layer3.3.conv3.weight_gamma, layer3.3.conv3.weight_beta, layer3.4.conv1.weight_gamma, layer3.4.conv1.weight_beta, layer3.4.conv2.weight_diff, layer3.4.conv2.weight_gamma, layer3.4.conv2.weight_beta, layer3.4.conv2.switch.weight, layer3.4.conv2.switch.bias, layer3.4.conv2.pre_context.weight, layer3.4.conv2.pre_context.bias, layer3.4.conv2.post_context.weight, layer3.4.conv2.post_context.bias, layer3.4.conv2.offset_s.weight, layer3.4.conv2.offset_s.bias, layer3.4.conv2.offset_l.weight, layer3.4.conv2.offset_l.bias, layer3.4.conv3.weight_gamma, layer3.4.conv3.weight_beta, layer3.5.conv1.weight_gamma, layer3.5.conv1.weight_beta, layer3.5.conv2.weight_diff, layer3.5.conv2.weight_gamma, layer3.5.conv2.weight_beta, layer3.5.conv2.switch.weight, layer3.5.conv2.switch.bias, layer3.5.conv2.pre_context.weight, layer3.5.conv2.pre_context.bias, layer3.5.conv2.post_context.weight, layer3.5.conv2.post_context.bias, layer3.5.conv2.offset_s.weight, layer3.5.conv2.offset_s.bias, layer3.5.conv2.offset_l.weight, layer3.5.conv2.offset_l.bias, layer3.5.conv3.weight_gamma, layer3.5.conv3.weight_beta, layer3.6.conv1.weight_gamma, layer3.6.conv1.weight_beta, layer3.6.conv2.weight_diff, layer3.6.conv2.weight_gamma, layer3.6.conv2.weight_beta, layer3.6.conv2.switch.weight, layer3.6.conv2.switch.bias, layer3.6.conv2.pre_context.weight, layer3.6.conv2.pre_context.bias, layer3.6.conv2.post_context.weight, layer3.6.conv2.post_context.bias, layer3.6.conv2.offset_s.weight, layer3.6.conv2.offset_s.bias, layer3.6.conv2.offset_l.weight, layer3.6.conv2.offset_l.bias, layer3.6.conv3.weight_gamma, layer3.6.conv3.weight_beta, layer3.7.conv1.weight_gamma, layer3.7.conv1.weight_beta, layer3.7.conv2.weight_diff, layer3.7.conv2.weight_gamma, layer3.7.conv2.weight_beta, layer3.7.conv2.switch.weight, layer3.7.conv2.switch.bias, layer3.7.conv2.pre_context.weight, layer3.7.conv2.pre_context.bias, layer3.7.conv2.post_context.weight, layer3.7.conv2.post_context.bias, layer3.7.conv2.offset_s.weight, layer3.7.conv2.offset_s.bias, layer3.7.conv2.offset_l.weight, layer3.7.conv2.offset_l.bias, layer3.7.conv3.weight_gamma, layer3.7.conv3.weight_beta, layer3.8.conv1.weight_gamma, layer3.8.conv1.weight_beta, layer3.8.conv2.weight_diff, layer3.8.conv2.weight_gamma, layer3.8.conv2.weight_beta, layer3.8.conv2.switch.weight, layer3.8.conv2.switch.bias, layer3.8.conv2.pre_context.weight, layer3.8.conv2.pre_context.bias, layer3.8.conv2.post_context.weight, layer3.8.conv2.post_context.bias, layer3.8.conv2.offset_s.weight, layer3.8.conv2.offset_s.bias, layer3.8.conv2.offset_l.weight, layer3.8.conv2.offset_l.bias, layer3.8.conv3.weight_gamma, layer3.8.conv3.weight_beta, layer3.9.conv1.weight_gamma, layer3.9.conv1.weight_beta, layer3.9.conv2.weight_diff, layer3.9.conv2.weight_gamma, layer3.9.conv2.weight_beta, layer3.9.conv2.switch.weight, layer3.9.conv2.switch.bias, layer3.9.conv2.pre_context.weight, layer3.9.conv2.pre_context.bias, layer3.9.conv2.post_context.weight, layer3.9.conv2.post_context.bias, layer3.9.conv2.offset_s.weight, layer3.9.conv2.offset_s.bias, layer3.9.conv2.offset_l.weight, layer3.9.conv2.offset_l.bias, layer3.9.conv3.weight_gamma, layer3.9.conv3.weight_beta, layer3.10.conv1.weight_gamma, layer3.10.conv1.weight_beta, layer3.10.conv2.weight_diff, layer3.10.conv2.weight_gamma, layer3.10.conv2.weight_beta, layer3.10.conv2.switch.weight, layer3.10.conv2.switch.bias, layer3.10.conv2.pre_context.weight, layer3.10.conv2.pre_context.bias, layer3.10.conv2.post_context.weight, layer3.10.conv2.post_context.bias, layer3.10.conv2.offset_s.weight, layer3.10.conv2.offset_s.bias, layer3.10.conv2.offset_l.weight, layer3.10.conv2.offset_l.bias, layer3.10.conv3.weight_gamma, layer3.10.conv3.weight_beta, layer3.11.conv1.weight_gamma, layer3.11.conv1.weight_beta, layer3.11.conv2.weight_diff, layer3.11.conv2.weight_gamma, layer3.11.conv2.weight_beta, layer3.11.conv2.switch.weight, layer3.11.conv2.switch.bias, layer3.11.conv2.pre_context.weight, layer3.11.conv2.pre_context.bias, layer3.11.conv2.post_context.weight, layer3.11.conv2.post_context.bias, layer3.11.conv2.offset_s.weight, layer3.11.conv2.offset_s.bias, layer3.11.conv2.offset_l.weight, layer3.11.conv2.offset_l.bias, layer3.11.conv3.weight_gamma, layer3.11.conv3.weight_beta, layer3.12.conv1.weight_gamma, layer3.12.conv1.weight_beta, layer3.12.conv2.weight_diff, layer3.12.conv2.weight_gamma, layer3.12.conv2.weight_beta, layer3.12.conv2.switch.weight, layer3.12.conv2.switch.bias, layer3.12.conv2.pre_context.weight, layer3.12.conv2.pre_context.bias, layer3.12.conv2.post_context.weight, layer3.12.conv2.post_context.bias, layer3.12.conv2.offset_s.weight, layer3.12.conv2.offset_s.bias, layer3.12.conv2.offset_l.weight, layer3.12.conv2.offset_l.bias, layer3.12.conv3.weight_gamma, layer3.12.conv3.weight_beta, layer3.13.conv1.weight_gamma, layer3.13.conv1.weight_beta, layer3.13.conv2.weight_diff, layer3.13.conv2.weight_gamma, layer3.13.conv2.weight_beta, layer3.13.conv2.switch.weight, layer3.13.conv2.switch.bias, layer3.13.conv2.pre_context.weight, layer3.13.conv2.pre_context.bias, layer3.13.conv2.post_context.weight, layer3.13.conv2.post_context.bias, layer3.13.conv2.offset_s.weight, layer3.13.conv2.offset_s.bias, layer3.13.conv2.offset_l.weight, layer3.13.conv2.offset_l.bias, layer3.13.conv3.weight_gamma, layer3.13.conv3.weight_beta, layer3.14.conv1.weight_gamma, layer3.14.conv1.weight_beta, layer3.14.conv2.weight_diff, layer3.14.conv2.weight_gamma, layer3.14.conv2.weight_beta, layer3.14.conv2.switch.weight, layer3.14.conv2.switch.bias, layer3.14.conv2.pre_context.weight, layer3.14.conv2.pre_context.bias, layer3.14.conv2.post_context.weight, layer3.14.conv2.post_context.bias, layer3.14.conv2.offset_s.weight, layer3.14.conv2.offset_s.bias, layer3.14.conv2.offset_l.weight, layer3.14.conv2.offset_l.bias, layer3.14.conv3.weight_gamma, layer3.14.conv3.weight_beta, layer3.15.conv1.weight_gamma, layer3.15.conv1.weight_beta, layer3.15.conv2.weight_diff, layer3.15.conv2.weight_gamma, layer3.15.conv2.weight_beta, layer3.15.conv2.switch.weight, layer3.15.conv2.switch.bias, layer3.15.conv2.pre_context.weight, layer3.15.conv2.pre_context.bias, layer3.15.conv2.post_context.weight, layer3.15.conv2.post_context.bias, layer3.15.conv2.offset_s.weight, layer3.15.conv2.offset_s.bias, layer3.15.conv2.offset_l.weight, layer3.15.conv2.offset_l.bias, layer3.15.conv3.weight_gamma, layer3.15.conv3.weight_beta, layer3.16.conv1.weight_gamma, layer3.16.conv1.weight_beta, layer3.16.conv2.weight_diff, layer3.16.conv2.weight_gamma, layer3.16.conv2.weight_beta, layer3.16.conv2.switch.weight, layer3.16.conv2.switch.bias, layer3.16.conv2.pre_context.weight, layer3.16.conv2.pre_context.bias, layer3.16.conv2.post_context.weight, layer3.16.conv2.post_context.bias, layer3.16.conv2.offset_s.weight, layer3.16.conv2.offset_s.bias, layer3.16.conv2.offset_l.weight, layer3.16.conv2.offset_l.bias, layer3.16.conv3.weight_gamma, layer3.16.conv3.weight_beta, layer3.17.conv1.weight_gamma, layer3.17.conv1.weight_beta, layer3.17.conv2.weight_diff, layer3.17.conv2.weight_gamma, layer3.17.conv2.weight_beta, layer3.17.conv2.switch.weight, layer3.17.conv2.switch.bias, layer3.17.conv2.pre_context.weight, layer3.17.conv2.pre_context.bias, layer3.17.conv2.post_context.weight, layer3.17.conv2.post_context.bias, layer3.17.conv2.offset_s.weight, layer3.17.conv2.offset_s.bias, layer3.17.conv2.offset_l.weight, layer3.17.conv2.offset_l.bias, layer3.17.conv3.weight_gamma, layer3.17.conv3.weight_beta, layer3.18.conv1.weight_gamma, layer3.18.conv1.weight_beta, layer3.18.conv2.weight_diff, layer3.18.conv2.weight_gamma, layer3.18.conv2.weight_beta, layer3.18.conv2.switch.weight, layer3.18.conv2.switch.bias, layer3.18.conv2.pre_context.weight, layer3.18.conv2.pre_context.bias, layer3.18.conv2.post_context.weight, layer3.18.conv2.post_context.bias, layer3.18.conv2.offset_s.weight, layer3.18.conv2.offset_s.bias, layer3.18.conv2.offset_l.weight, layer3.18.conv2.offset_l.bias, layer3.18.conv3.weight_gamma, layer3.18.conv3.weight_beta, layer3.19.conv1.weight_gamma, layer3.19.conv1.weight_beta, layer3.19.conv2.weight_diff, layer3.19.conv2.weight_gamma, layer3.19.conv2.weight_beta, layer3.19.conv2.switch.weight, layer3.19.conv2.switch.bias, layer3.19.conv2.pre_context.weight, layer3.19.conv2.pre_context.bias, layer3.19.conv2.post_context.weight, layer3.19.conv2.post_context.bias, layer3.19.conv2.offset_s.weight, layer3.19.conv2.offset_s.bias, layer3.19.conv2.offset_l.weight, layer3.19.conv2.offset_l.bias, layer3.19.conv3.weight_gamma, layer3.19.conv3.weight_beta, layer3.20.conv1.weight_gamma, layer3.20.conv1.weight_beta, layer3.20.conv2.weight_diff, layer3.20.conv2.weight_gamma, layer3.20.conv2.weight_beta, layer3.20.conv2.switch.weight, layer3.20.conv2.switch.bias, layer3.20.conv2.pre_context.weight, layer3.20.conv2.pre_context.bias, layer3.20.conv2.post_context.weight, layer3.20.conv2.post_context.bias, layer3.20.conv2.offset_s.weight, layer3.20.conv2.offset_s.bias, layer3.20.conv2.offset_l.weight, layer3.20.conv2.offset_l.bias, layer3.20.conv3.weight_gamma, layer3.20.conv3.weight_beta, layer3.21.conv1.weight_gamma, layer3.21.conv1.weight_beta, layer3.21.conv2.weight_diff, layer3.21.conv2.weight_gamma, layer3.21.conv2.weight_beta, layer3.21.conv2.switch.weight, layer3.21.conv2.switch.bias, layer3.21.conv2.pre_context.weight, layer3.21.conv2.pre_context.bias, layer3.21.conv2.post_context.weight, layer3.21.conv2.post_context.bias, layer3.21.conv2.offset_s.weight, layer3.21.conv2.offset_s.bias, layer3.21.conv2.offset_l.weight, layer3.21.conv2.offset_l.bias, layer3.21.conv3.weight_gamma, layer3.21.conv3.weight_beta, layer3.22.conv1.weight_gamma, layer3.22.conv1.weight_beta, layer3.22.conv2.weight_diff, layer3.22.conv2.weight_gamma, layer3.22.conv2.weight_beta, layer3.22.conv2.switch.weight, layer3.22.conv2.switch.bias, layer3.22.conv2.pre_context.weight, layer3.22.conv2.pre_context.bias, layer3.22.conv2.post_context.weight, layer3.22.conv2.post_context.bias, layer3.22.conv2.offset_s.weight, layer3.22.conv2.offset_s.bias, layer3.22.conv2.offset_l.weight, layer3.22.conv2.offset_l.bias, layer3.22.conv3.weight_gamma, layer3.22.conv3.weight_beta, layer4.0.conv1.weight_gamma, layer4.0.conv1.weight_beta, layer4.0.conv2.weight_diff, layer4.0.conv2.weight_gamma, layer4.0.conv2.weight_beta, layer4.0.conv2.switch.weight, layer4.0.conv2.switch.bias, layer4.0.conv2.pre_context.weight, layer4.0.conv2.pre_context.bias, layer4.0.conv2.post_context.weight, layer4.0.conv2.post_context.bias, layer4.0.conv2.offset_s.weight, layer4.0.conv2.offset_s.bias, layer4.0.conv2.offset_l.weight, layer4.0.conv2.offset_l.bias, layer4.0.conv3.weight_gamma, layer4.0.conv3.weight_beta, layer4.0.downsample.0.weight_gamma, layer4.0.downsample.0.weight_beta, layer4.1.conv1.weight_gamma, layer4.1.conv1.weight_beta, layer4.1.conv2.weight_diff, layer4.1.conv2.weight_gamma, layer4.1.conv2.weight_beta, layer4.1.conv2.switch.weight, layer4.1.conv2.switch.bias, layer4.1.conv2.pre_context.weight, layer4.1.conv2.pre_context.bias, layer4.1.conv2.post_context.weight, layer4.1.conv2.post_context.bias, layer4.1.conv2.offset_s.weight, layer4.1.conv2.offset_s.bias, layer4.1.conv2.offset_l.weight, layer4.1.conv2.offset_l.bias, layer4.1.conv3.weight_gamma, layer4.1.conv3.weight_beta, layer4.2.conv1.weight_gamma, layer4.2.conv1.weight_beta, layer4.2.conv2.weight_diff, layer4.2.conv2.weight_gamma, layer4.2.conv2.weight_beta, layer4.2.conv2.switch.weight, layer4.2.conv2.switch.bias, layer4.2.conv2.pre_context.weight, layer4.2.conv2.pre_context.bias, layer4.2.conv2.post_context.weight, layer4.2.conv2.post_context.bias, layer4.2.conv2.offset_s.weight, layer4.2.conv2.offset_s.bias, layer4.2.conv2.offset_l.weight, layer4.2.conv2.offset_l.bias, layer4.2.conv3.weight_gamma, layer4.2.conv3.weight_beta

2020-06-08 08:59:42,601 - mmdet - WARNING - The model and loaded state dict do not match exactly

missing keys in source state_dict: conv1.weight_gamma, conv1.weight_beta, layer1.0.conv1.weight_gamma, layer1.0.conv1.weight_beta, layer1.0.conv2.weight_gamma, layer1.0.conv2.weight_beta, layer1.0.conv3.weight_gamma, layer1.0.conv3.weight_beta, layer1.0.downsample.0.weight_gamma, layer1.0.downsample.0.weight_beta, layer1.1.conv1.weight_gamma, layer1.1.conv1.weight_beta, layer1.1.conv2.weight_gamma, layer1.1.conv2.weight_beta, layer1.1.conv3.weight_gamma, layer1.1.conv3.weight_beta, layer1.2.conv1.weight_gamma, layer1.2.conv1.weight_beta, layer1.2.conv2.weight_gamma, layer1.2.conv2.weight_beta, layer1.2.conv3.weight_gamma, layer1.2.conv3.weight_beta, layer2.0.conv1.weight_gamma, layer2.0.conv1.weight_beta, layer2.0.conv2.weight_diff, layer2.0.conv2.weight_gamma, layer2.0.conv2.weight_beta, layer2.0.conv2.switch.weight, layer2.0.conv2.switch.bias, layer2.0.conv2.pre_context.weight, layer2.0.conv2.pre_context.bias, layer2.0.conv2.post_context.weight, layer2.0.conv2.post_context.bias, layer2.0.conv2.offset_s.weight, layer2.0.conv2.offset_s.bias, layer2.0.conv2.offset_l.weight, layer2.0.conv2.offset_l.bias, layer2.0.conv3.weight_gamma, layer2.0.conv3.weight_beta, layer2.0.downsample.0.weight_gamma, layer2.0.downsample.0.weight_beta, layer2.0.rfp_conv.weight, layer2.0.rfp_conv.bias, layer2.1.conv1.weight_gamma, layer2.1.conv1.weight_beta, layer2.1.conv2.weight_diff, layer2.1.conv2.weight_gamma, layer2.1.conv2.weight_beta, layer2.1.conv2.switch.weight, layer2.1.conv2.switch.bias, layer2.1.conv2.pre_context.weight, layer2.1.conv2.pre_context.bias, layer2.1.conv2.post_context.weight, layer2.1.conv2.post_context.bias, layer2.1.conv2.offset_s.weight, layer2.1.conv2.offset_s.bias, layer2.1.conv2.offset_l.weight, layer2.1.conv2.offset_l.bias, layer2.1.conv3.weight_gamma, layer2.1.conv3.weight_beta, layer2.2.conv1.weight_gamma, layer2.2.conv1.weight_beta, layer2.2.conv2.weight_diff, layer2.2.conv2.weight_gamma, layer2.2.conv2.weight_beta, layer2.2.conv2.switch.weight, layer2.2.conv2.switch.bias, layer2.2.conv2.pre_context.weight, layer2.2.conv2.pre_context.bias, layer2.2.conv2.post_context.weight, layer2.2.conv2.post_context.bias, layer2.2.conv2.offset_s.weight, layer2.2.conv2.offset_s.bias, layer2.2.conv2.offset_l.weight, layer2.2.conv2.offset_l.bias, layer2.2.conv3.weight_gamma, layer2.2.conv3.weight_beta, layer2.3.conv1.weight_gamma, layer2.3.conv1.weight_beta, layer2.3.conv2.weight_diff, layer2.3.conv2.weight_gamma, layer2.3.conv2.weight_beta, layer2.3.conv2.switch.weight, layer2.3.conv2.switch.bias, layer2.3.conv2.pre_context.weight, layer2.3.conv2.pre_context.bias, layer2.3.conv2.post_context.weight, layer2.3.conv2.post_context.bias, layer2.3.conv2.offset_s.weight, layer2.3.conv2.offset_s.bias, layer2.3.conv2.offset_l.weight, layer2.3.conv2.offset_l.bias, layer2.3.conv3.weight_gamma, layer2.3.conv3.weight_beta, layer3.0.conv1.weight_gamma, layer3.0.conv1.weight_beta, layer3.0.conv2.weight_diff, layer3.0.conv2.weight_gamma, layer3.0.conv2.weight_beta, layer3.0.conv2.switch.weight, layer3.0.conv2.switch.bias, layer3.0.conv2.pre_context.weight, layer3.0.conv2.pre_context.bias, layer3.0.conv2.post_context.weight, layer3.0.conv2.post_context.bias, layer3.0.conv2.offset_s.weight, layer3.0.conv2.offset_s.bias, layer3.0.conv2.offset_l.weight, layer3.0.conv2.offset_l.bias, layer3.0.conv3.weight_gamma, layer3.0.conv3.weight_beta, layer3.0.downsample.0.weight_gamma, layer3.0.downsample.0.weight_beta, layer3.0.rfp_conv.weight, layer3.0.rfp_conv.bias, layer3.1.conv1.weight_gamma, layer3.1.conv1.weight_beta, layer3.1.conv2.weight_diff, layer3.1.conv2.weight_gamma, layer3.1.conv2.weight_beta, layer3.1.conv2.switch.weight, layer3.1.conv2.switch.bias, layer3.1.conv2.pre_context.weight, layer3.1.conv2.pre_context.bias, layer3.1.conv2.post_context.weight, layer3.1.conv2.post_context.bias, layer3.1.conv2.offset_s.weight, layer3.1.conv2.offset_s.bias, layer3.1.conv2.offset_l.weight, layer3.1.conv2.offset_l.bias, layer3.1.conv3.weight_gamma, layer3.1.conv3.weight_beta, layer3.2.conv1.weight_gamma, layer3.2.conv1.weight_beta, layer3.2.conv2.weight_diff, layer3.2.conv2.weight_gamma, layer3.2.conv2.weight_beta, layer3.2.conv2.switch.weight, layer3.2.conv2.switch.bias, layer3.2.conv2.pre_context.weight, layer3.2.conv2.pre_context.bias, layer3.2.conv2.post_context.weight, layer3.2.conv2.post_context.bias, layer3.2.conv2.offset_s.weight, layer3.2.conv2.offset_s.bias, layer3.2.conv2.offset_l.weight, layer3.2.conv2.offset_l.bias, layer3.2.conv3.weight_gamma, layer3.2.conv3.weight_beta, layer3.3.conv1.weight_gamma, layer3.3.conv1.weight_beta, layer3.3.conv2.weight_diff, layer3.3.conv2.weight_gamma, layer3.3.conv2.weight_beta, layer3.3.conv2.switch.weight, layer3.3.conv2.switch.bias, layer3.3.conv2.pre_context.weight, layer3.3.conv2.pre_context.bias, layer3.3.conv2.post_context.weight, layer3.3.conv2.post_context.bias, layer3.3.conv2.offset_s.weight, layer3.3.conv2.offset_s.bias, layer3.3.conv2.offset_l.weight, layer3.3.conv2.offset_l.bias, layer3.3.conv3.weight_gamma, layer3.3.conv3.weight_beta, layer3.4.conv1.weight_gamma, layer3.4.conv1.weight_beta, layer3.4.conv2.weight_diff, layer3.4.conv2.weight_gamma, layer3.4.conv2.weight_beta, layer3.4.conv2.switch.weight, layer3.4.conv2.switch.bias, layer3.4.conv2.pre_context.weight, layer3.4.conv2.pre_context.bias, layer3.4.conv2.post_context.weight, layer3.4.conv2.post_context.bias, layer3.4.conv2.offset_s.weight, layer3.4.conv2.offset_s.bias, layer3.4.conv2.offset_l.weight, layer3.4.conv2.offset_l.bias, layer3.4.conv3.weight_gamma, layer3.4.conv3.weight_beta, layer3.5.conv1.weight_gamma, layer3.5.conv1.weight_beta, layer3.5.conv2.weight_diff, layer3.5.conv2.weight_gamma, layer3.5.conv2.weight_beta, layer3.5.conv2.switch.weight, layer3.5.conv2.switch.bias, layer3.5.conv2.pre_context.weight, layer3.5.conv2.pre_context.bias, layer3.5.conv2.post_context.weight, layer3.5.conv2.post_context.bias, layer3.5.conv2.offset_s.weight, layer3.5.conv2.offset_s.bias, layer3.5.conv2.offset_l.weight, layer3.5.conv2.offset_l.bias, layer3.5.conv3.weight_gamma, layer3.5.conv3.weight_beta, layer3.6.conv1.weight_gamma, layer3.6.conv1.weight_beta, layer3.6.conv2.weight_diff, layer3.6.conv2.weight_gamma, layer3.6.conv2.weight_beta, layer3.6.conv2.switch.weight, layer3.6.conv2.switch.bias, layer3.6.conv2.pre_context.weight, layer3.6.conv2.pre_context.bias, layer3.6.conv2.post_context.weight, layer3.6.conv2.post_context.bias, layer3.6.conv2.offset_s.weight, layer3.6.conv2.offset_s.bias, layer3.6.conv2.offset_l.weight, layer3.6.conv2.offset_l.bias, layer3.6.conv3.weight_gamma, layer3.6.conv3.weight_beta, layer3.7.conv1.weight_gamma, layer3.7.conv1.weight_beta, layer3.7.conv2.weight_diff, layer3.7.conv2.weight_gamma, layer3.7.conv2.weight_beta, layer3.7.conv2.switch.weight, layer3.7.conv2.switch.bias, layer3.7.conv2.pre_context.weight, layer3.7.conv2.pre_context.bias, layer3.7.conv2.post_context.weight, layer3.7.conv2.post_context.bias, layer3.7.conv2.offset_s.weight, layer3.7.conv2.offset_s.bias, layer3.7.conv2.offset_l.weight, layer3.7.conv2.offset_l.bias, layer3.7.conv3.weight_gamma, layer3.7.conv3.weight_beta, layer3.8.conv1.weight_gamma, layer3.8.conv1.weight_beta, layer3.8.conv2.weight_diff, layer3.8.conv2.weight_gamma, layer3.8.conv2.weight_beta, layer3.8.conv2.switch.weight, layer3.8.conv2.switch.bias, layer3.8.conv2.pre_context.weight, layer3.8.conv2.pre_context.bias, layer3.8.conv2.post_context.weight, layer3.8.conv2.post_context.bias, layer3.8.conv2.offset_s.weight, layer3.8.conv2.offset_s.bias, layer3.8.conv2.offset_l.weight, layer3.8.conv2.offset_l.bias, layer3.8.conv3.weight_gamma, layer3.8.conv3.weight_beta, layer3.9.conv1.weight_gamma, layer3.9.conv1.weight_beta, layer3.9.conv2.weight_diff, layer3.9.conv2.weight_gamma, layer3.9.conv2.weight_beta, layer3.9.conv2.switch.weight, layer3.9.conv2.switch.bias, layer3.9.conv2.pre_context.weight, layer3.9.conv2.pre_context.bias, layer3.9.conv2.post_context.weight, layer3.9.conv2.post_context.bias, layer3.9.conv2.offset_s.weight, layer3.9.conv2.offset_s.bias, layer3.9.conv2.offset_l.weight, layer3.9.conv2.offset_l.bias, layer3.9.conv3.weight_gamma, layer3.9.conv3.weight_beta, layer3.10.conv1.weight_gamma, layer3.10.conv1.weight_beta, layer3.10.conv2.weight_diff, layer3.10.conv2.weight_gamma, layer3.10.conv2.weight_beta, layer3.10.conv2.switch.weight, layer3.10.conv2.switch.bias, layer3.10.conv2.pre_context.weight, layer3.10.conv2.pre_context.bias, layer3.10.conv2.post_context.weight, layer3.10.conv2.post_context.bias, layer3.10.conv2.offset_s.weight, layer3.10.conv2.offset_s.bias, layer3.10.conv2.offset_l.weight, layer3.10.conv2.offset_l.bias, layer3.10.conv3.weight_gamma, layer3.10.conv3.weight_beta, layer3.11.conv1.weight_gamma, layer3.11.conv1.weight_beta, layer3.11.conv2.weight_diff, layer3.11.conv2.weight_gamma, layer3.11.conv2.weight_beta, layer3.11.conv2.switch.weight, layer3.11.conv2.switch.bias, layer3.11.conv2.pre_context.weight, layer3.11.conv2.pre_context.bias, layer3.11.conv2.post_context.weight, layer3.11.conv2.post_context.bias, layer3.11.conv2.offset_s.weight, layer3.11.conv2.offset_s.bias, layer3.11.conv2.offset_l.weight, layer3.11.conv2.offset_l.bias, layer3.11.conv3.weight_gamma, layer3.11.conv3.weight_beta, layer3.12.conv1.weight_gamma, layer3.12.conv1.weight_beta, layer3.12.conv2.weight_diff, layer3.12.conv2.weight_gamma, layer3.12.conv2.weight_beta, layer3.12.conv2.switch.weight, layer3.12.conv2.switch.bias, layer3.12.conv2.pre_context.weight, layer3.12.conv2.pre_context.bias, layer3.12.conv2.post_context.weight, layer3.12.conv2.post_context.bias, layer3.12.conv2.offset_s.weight, layer3.12.conv2.offset_s.bias, layer3.12.conv2.offset_l.weight, layer3.12.conv2.offset_l.bias, layer3.12.conv3.weight_gamma, layer3.12.conv3.weight_beta, layer3.13.conv1.weight_gamma, layer3.13.conv1.weight_beta, layer3.13.conv2.weight_diff, layer3.13.conv2.weight_gamma, layer3.13.conv2.weight_beta, layer3.13.conv2.switch.weight, layer3.13.conv2.switch.bias, layer3.13.conv2.pre_context.weight, layer3.13.conv2.pre_context.bias, layer3.13.conv2.post_context.weight, layer3.13.conv2.post_context.bias, layer3.13.conv2.offset_s.weight, layer3.13.conv2.offset_s.bias, layer3.13.conv2.offset_l.weight, layer3.13.conv2.offset_l.bias, layer3.13.conv3.weight_gamma, layer3.13.conv3.weight_beta, layer3.14.conv1.weight_gamma, layer3.14.conv1.weight_beta, layer3.14.conv2.weight_diff, layer3.14.conv2.weight_gamma, layer3.14.conv2.weight_beta, layer3.14.conv2.switch.weight, layer3.14.conv2.switch.bias, layer3.14.conv2.pre_context.weight, layer3.14.conv2.pre_context.bias, layer3.14.conv2.post_context.weight, layer3.14.conv2.post_context.bias, layer3.14.conv2.offset_s.weight, layer3.14.conv2.offset_s.bias, layer3.14.conv2.offset_l.weight, layer3.14.conv2.offset_l.bias, layer3.14.conv3.weight_gamma, layer3.14.conv3.weight_beta, layer3.15.conv1.weight_gamma, layer3.15.conv1.weight_beta, layer3.15.conv2.weight_diff, layer3.15.conv2.weight_gamma, layer3.15.conv2.weight_beta, layer3.15.conv2.switch.weight, layer3.15.conv2.switch.bias, layer3.15.conv2.pre_context.weight, layer3.15.conv2.pre_context.bias, layer3.15.conv2.post_context.weight, layer3.15.conv2.post_context.bias, layer3.15.conv2.offset_s.weight, layer3.15.conv2.offset_s.bias, layer3.15.conv2.offset_l.weight, layer3.15.conv2.offset_l.bias, layer3.15.conv3.weight_gamma, layer3.15.conv3.weight_beta, layer3.16.conv1.weight_gamma, layer3.16.conv1.weight_beta, layer3.16.conv2.weight_diff, layer3.16.conv2.weight_gamma, layer3.16.conv2.weight_beta, layer3.16.conv2.switch.weight, layer3.16.conv2.switch.bias, layer3.16.conv2.pre_context.weight, layer3.16.conv2.pre_context.bias, layer3.16.conv2.post_context.weight, layer3.16.conv2.post_context.bias, layer3.16.conv2.offset_s.weight, layer3.16.conv2.offset_s.bias, layer3.16.conv2.offset_l.weight, layer3.16.conv2.offset_l.bias, layer3.16.conv3.weight_gamma, layer3.16.conv3.weight_beta, layer3.17.conv1.weight_gamma, layer3.17.conv1.weight_beta, layer3.17.conv2.weight_diff, layer3.17.conv2.weight_gamma, layer3.17.conv2.weight_beta, layer3.17.conv2.switch.weight, layer3.17.conv2.switch.bias, layer3.17.conv2.pre_context.weight, layer3.17.conv2.pre_context.bias, layer3.17.conv2.post_context.weight, layer3.17.conv2.post_context.bias, layer3.17.conv2.offset_s.weight, layer3.17.conv2.offset_s.bias, layer3.17.conv2.offset_l.weight, layer3.17.conv2.offset_l.bias, layer3.17.conv3.weight_gamma, layer3.17.conv3.weight_beta, layer3.18.conv1.weight_gamma, layer3.18.conv1.weight_beta, layer3.18.conv2.weight_diff, layer3.18.conv2.weight_gamma, layer3.18.conv2.weight_beta, layer3.18.conv2.switch.weight, layer3.18.conv2.switch.bias, layer3.18.conv2.pre_context.weight, layer3.18.conv2.pre_context.bias, layer3.18.conv2.post_context.weight, layer3.18.conv2.post_context.bias, layer3.18.conv2.offset_s.weight, layer3.18.conv2.offset_s.bias, layer3.18.conv2.offset_l.weight, layer3.18.conv2.offset_l.bias, layer3.18.conv3.weight_gamma, layer3.18.conv3.weight_beta, layer3.19.conv1.weight_gamma, layer3.19.conv1.weight_beta, layer3.19.conv2.weight_diff, layer3.19.conv2.weight_gamma, layer3.19.conv2.weight_beta, layer3.19.conv2.switch.weight, layer3.19.conv2.switch.bias, layer3.19.conv2.pre_context.weight, layer3.19.conv2.pre_context.bias, layer3.19.conv2.post_context.weight, layer3.19.conv2.post_context.bias, layer3.19.conv2.offset_s.weight, layer3.19.conv2.offset_s.bias, layer3.19.conv2.offset_l.weight, layer3.19.conv2.offset_l.bias, layer3.19.conv3.weight_gamma, layer3.19.conv3.weight_beta, layer3.20.conv1.weight_gamma, layer3.20.conv1.weight_beta, layer3.20.conv2.weight_diff, layer3.20.conv2.weight_gamma, layer3.20.conv2.weight_beta, layer3.20.conv2.switch.weight, layer3.20.conv2.switch.bias, layer3.20.conv2.pre_context.weight, layer3.20.conv2.pre_context.bias, layer3.20.conv2.post_context.weight, layer3.20.conv2.post_context.bias, layer3.20.conv2.offset_s.weight, layer3.20.conv2.offset_s.bias, layer3.20.conv2.offset_l.weight, layer3.20.conv2.offset_l.bias, layer3.20.conv3.weight_gamma, layer3.20.conv3.weight_beta, layer3.21.conv1.weight_gamma, layer3.21.conv1.weight_beta, layer3.21.conv2.weight_diff, layer3.21.conv2.weight_gamma, layer3.21.conv2.weight_beta, layer3.21.conv2.switch.weight, layer3.21.conv2.switch.bias, layer3.21.conv2.pre_context.weight, layer3.21.conv2.pre_context.bias, layer3.21.conv2.post_context.weight, layer3.21.conv2.post_context.bias, layer3.21.conv2.offset_s.weight, layer3.21.conv2.offset_s.bias, layer3.21.conv2.offset_l.weight, layer3.21.conv2.offset_l.bias, layer3.21.conv3.weight_gamma, layer3.21.conv3.weight_beta, layer3.22.conv1.weight_gamma, layer3.22.conv1.weight_beta, layer3.22.conv2.weight_diff, layer3.22.conv2.weight_gamma, layer3.22.conv2.weight_beta, layer3.22.conv2.switch.weight, layer3.22.conv2.switch.bias, layer3.22.conv2.pre_context.weight, layer3.22.conv2.pre_context.bias, layer3.22.conv2.post_context.weight, layer3.22.conv2.post_context.bias, layer3.22.conv2.offset_s.weight, layer3.22.conv2.offset_s.bias, layer3.22.conv2.offset_l.weight, layer3.22.conv2.offset_l.bias, layer3.22.conv3.weight_gamma, layer3.22.conv3.weight_beta, layer4.0.conv1.weight_gamma, layer4.0.conv1.weight_beta, layer4.0.conv2.weight_diff, layer4.0.conv2.weight_gamma, layer4.0.conv2.weight_beta, layer4.0.conv2.switch.weight, layer4.0.conv2.switch.bias, layer4.0.conv2.pre_context.weight, layer4.0.conv2.pre_context.bias, layer4.0.conv2.post_context.weight, layer4.0.conv2.post_context.bias, layer4.0.conv2.offset_s.weight, layer4.0.conv2.offset_s.bias, layer4.0.conv2.offset_l.weight, layer4.0.conv2.offset_l.bias, layer4.0.conv3.weight_gamma, layer4.0.conv3.weight_beta, layer4.0.downsample.0.weight_gamma, layer4.0.downsample.0.weight_beta, layer4.0.rfp_conv.weight, layer4.0.rfp_conv.bias, layer4.1.conv1.weight_gamma, layer4.1.conv1.weight_beta, layer4.1.conv2.weight_diff, layer4.1.conv2.weight_gamma, layer4.1.conv2.weight_beta, layer4.1.conv2.switch.weight, layer4.1.conv2.switch.bias, layer4.1.conv2.pre_context.weight, layer4.1.conv2.pre_context.bias, layer4.1.conv2.post_context.weight, layer4.1.conv2.post_context.bias, layer4.1.conv2.offset_s.weight, layer4.1.conv2.offset_s.bias, layer4.1.conv2.offset_l.weight, layer4.1.conv2.offset_l.bias, layer4.1.conv3.weight_gamma, layer4.1.conv3.weight_beta, layer4.2.conv1.weight_gamma, layer4.2.conv1.weight_beta, layer4.2.conv2.weight_diff, layer4.2.conv2.weight_gamma, layer4.2.conv2.weight_beta, layer4.2.conv2.switch.weight, layer4.2.conv2.switch.bias, layer4.2.conv2.pre_context.weight, layer4.2.conv2.pre_context.bias, layer4.2.conv2.post_context.weight, layer4.2.conv2.post_context.bias, layer4.2.conv2.offset_s.weight, layer4.2.conv2.offset_s.bias, layer4.2.conv2.offset_l.weight, layer4.2.conv2.offset_l.bias, layer4.2.conv3.weight_gamma, layer4.2.conv3.weight_beta

loading annotations into memory...
Done (t=0.00s)
creating index...
index created!
2020-06-08 08:59:45,129 - mmdet - INFO - Start running, host: root@c73feb983947, work_dir: /content/drive/My Drive/DetectoRS/work_dirs/DetectoRS_mstrain_400_1200_x101_32x4d_40e.py
2020-06-08 08:59:45,130 - mmdet - INFO - workflow: [('train', 1)], max: 40 epochs
error in deformable_im2col: no kernel image is available for execution on the device
error in deformable_im2col: no kernel image is available for execution on the device
error in deformable_im2col: no kernel image is available for execution on the device
error in deformable_im2col: no kernel image is available for execution on the device
error in deformable_im2col: no kernel image is available for execution on the device
error in deformable_im2col: no kernel image is available for execution on the device
error in deformable_im2col: no kernel image is available for execution on the device
error in deformable_im2col: no kernel image is available for execution on the device
error in deformable_im2col: no kernel image is available for execution on the device
error in deformable_im2col: no kernel image is available for execution on the device
error in deformable_im2col: no kernel image is available for execution on the device
error in deformable_im2col: no kernel image is available for execution on the device
error in deformable_im2col: no kernel image is available for execution on the device
error in deformable_im2col: no kernel image is available for execution on the device
error in deformable_im2col: no kernel image is available for execution on the device
error in deformable_im2col: no kernel image is available for execution on the device
error in deformable_im2col: no kernel image is available for execution on the device
/pytorch/aten/src/THCUNN/SpatialClassNLLCriterion.cu:104: void cunn_SpatialClassNLLCriterion_updateOutput_kernel(T *, T *, T *, long *, T *, int, int, int, int, int, long) [with T = float, AccumT = float]: block: [0,0,0], thread: [93,0,0] Assertion `t >= 0 && t < n_classes` failed.
/pytorch/aten/src/THCUNN/SpatialClassNLLCriterion.cu:104: void cunn_SpatialClassNLLCriterion_updateOutput_kernel(T *, T *, T *, long *, T *, int, int, int, int, int, long) [with T = float, AccumT = float]: block: [0,0,0], thread: [94,0,0] Assertion `t >= 0 && t < n_classes` failed.
/pytorch/aten/src/THCUNN/SpatialClassNLLCriterion.cu:104: void cunn_SpatialClassNLLCriterion_updateOutput_kernel(T *, T *, T *, long *, T *, int, int, int, int, int, long) [with T = float, AccumT = float]: block: [0,0,0], thread: [95,0,0] Assertion `t >= 0 && t < n_classes` failed.
Traceback (most recent call last):
  File "/content/drive/My Drive/DetectoRS/tools/train.py", line 142, in <module>
    main()
  File "/content/drive/My Drive/DetectoRS/tools/train.py", line 138, in main
    meta=meta)
  File "/content/drive/My Drive/DetectoRS/mmdet/apis/train.py", line 111, in train_detector
    meta=meta)
  File "/content/drive/My Drive/DetectoRS/mmdet/apis/train.py", line 242, in _non_dist_train
    runner.run(data_loaders, cfg.workflow, cfg.total_epochs)
  File "/usr/local/lib/python3.6/dist-packages/mmcv/runner/runner.py", line 384, in run
    epoch_runner(data_loaders[i], **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/mmcv/runner/runner.py", line 283, in train
    self.model, data_batch, train_mode=True, **kwargs)
  File "/content/drive/My Drive/DetectoRS/mmdet/apis/train.py", line 75, in batch_processor
    losses = model(**data)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 532, in __call__
    result = self.forward(*input, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/parallel/data_parallel.py", line 150, in forward
    return self.module(*inputs[0], **kwargs[0])
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 532, in __call__
    result = self.forward(*input, **kwargs)
  File "/content/drive/My Drive/DetectoRS/mmdet/core/fp16/decorators.py", line 49, in new_func
    return old_func(*args, **kwargs)
  File "/content/drive/My Drive/DetectoRS/mmdet/models/detectors/base.py", line 147, in forward
    return self.forward_train(img, img_metas, **kwargs)
  File "/content/drive/My Drive/DetectoRS/mmdet/models/detectors/htc.py", line 252, in forward_train
    gt_labels[j])
  File "/content/drive/My Drive/DetectoRS/mmdet/core/bbox/assigners/max_iou_assigner.py", line 113, in assign
    assign_result = self.assign_wrt_overlaps(overlaps, gt_labels)
  File "/content/drive/My Drive/DetectoRS/mmdet/core/bbox/assigners/max_iou_assigner.py", line 166, in assign_wrt_overlaps
    & (max_overlaps < self.neg_iou_thr)] = 0
RuntimeError: copy_if failed to synchronize: device-side assert triggered
terminate called after throwing an instance of 'c10::Error'
  what():  CUDA error: device-side assert triggered (insert_events at /pytorch/c10/cuda/CUDACachingAllocator.cpp:764)
frame #0: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x33 (0x7f200fd5c193 in /usr/local/lib/python3.6/dist-packages/torch/lib/libc10.so)
frame #1: <unknown function> + 0x17f66 (0x7f200ff99f66 in /usr/local/lib/python3.6/dist-packages/torch/lib/libc10_cuda.so)
frame #2: <unknown function> + 0x19cbd (0x7f200ff9bcbd in /usr/local/lib/python3.6/dist-packages/torch/lib/libc10_cuda.so)
frame #3: c10::TensorImpl::release_resources() + 0x4d (0x7f200fd4c63d in /usr/local/lib/python3.6/dist-packages/torch/lib/libc10.so)
frame #4: <unknown function> + 0x67a902 (0x7f2058d83902 in /usr/local/lib/python3.6/dist-packages/torch/lib/libtorch_python.so)
frame #5: <unknown function> + 0x67a9a6 (0x7f2058d839a6 in /usr/local/lib/python3.6/dist-packages/torch/lib/libtorch_python.so)
frame #6: python3() [0x54ef16]
frame #7: python3() [0x572890]
frame #8: python3() [0x54ec1b]
frame #9: python3() [0x588948]
frame #10: python3() [0x5ad438]
frame #11: python3() [0x5ad44e]
frame #12: python3() [0x5ad44e]
frame #13: python3() [0x5ad44e]
frame #14: python3() [0x5ad44e]
frame #15: python3() [0x5ad44e]
frame #16: python3() [0x5ad44e]
frame #17: python3() [0x5ad44e]
frame #18: python3() [0x5ad44e]
frame #19: python3() [0x56b276]
<omitting python frames>
frame #25: __libc_start_main + 0xe7 (0x7f20643f3b97 in /lib/x86_64-linux-gnu/libc.so.6)

Install question

I install DetectoRS following mmdetection install.md.And then when I run DetecoRS/tools/train.py use DetectoRS_mstrain_400_1200_x101_32x4d_40e.py, "KeyError: 'RecursiveFeaturePyramid is not in the detector registry'"occured. So if I have some mistake during install DetectoRS? And I should clone mmdetection or DetecoRS and then run pip install -v -e .?

AttributeError: 'NoneType' object has no attribute 'squeeze'

we have prepared the data as follows:
data
coco
annotations
trainval2017
testdev2017
minival2017
mask
when we train the DetectoRS, the error occured as follows:
Traceback (most recent call last):
File "/home/lgl/soft/pycharm/pycharm-2018.1.1/helpers/pydev/pydevd.py", line 1664, in
main()
File "/home/lgl/soft/pycharm/pycharm-2018.1.1/helpers/pydev/pydevd.py", line 1658, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "/home/lgl/soft/pycharm/pycharm-2018.1.1/helpers/pydev/pydevd.py", line 1068, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "/home/lgl/soft/pycharm/pycharm-2018.1.1/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/home/lgl/PycharmProjects/DetectoRS/train_crossing.py", line 142, in
main()
File "/home/lgl/PycharmProjects/DetectoRS/train_crossing.py", line 138, in main
meta=meta)
File "/home/lgl/PycharmProjects/DetectoRS/mmdet/apis/train.py", line 111, in train_detector
meta=meta)
File "/home/lgl/PycharmProjects/DetectoRS/mmdet/apis/train.py", line 242, in _non_dist_train
runner.run(data_loaders, cfg.workflow, cfg.total_epochs)
File "/home/lgl/anaconda3/envs/DetectoRS/lib/python3.6/site-packages/mmcv/runner/epoch_based_runner.py", line 122, in run
epoch_runner(data_loaders[i], **kwargs)
File "/home/lgl/anaconda3/envs/DetectoRS/lib/python3.6/site-packages/mmcv/runner/epoch_based_runner.py", line 35, in train
self.model, data_batch, train_mode=True, **kwargs)
File "/home/lgl/PycharmProjects/DetectoRS/mmdet/apis/train.py", line 75, in batch_processor
losses = model(**data)
File "/home/lgl/anaconda3/envs/DetectoRS/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/home/lgl/anaconda3/envs/DetectoRS/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 150, in forward
return self.module(*inputs[0], **kwargs[0])
File "/home/lgl/anaconda3/envs/DetectoRS/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/home/lgl/PycharmProjects/DetectoRS/mmdet/core/fp16/decorators.py", line 49, in new_func
return old_func(*args, **kwargs)
File "/home/lgl/PycharmProjects/DetectoRS/mmdet/models/detectors/base.py", line 147, in forward
return self.forward_train(img, img_metas, **kwargs)
File "/home/lgl/PycharmProjects/DetectoRS/mmdet/models/detectors/htc.py", line 230, in forward_train
loss_seg = self.semantic_head.loss(semantic_pred, gt_semantic_seg)
File "/home/lgl/PycharmProjects/DetectoRS/mmdet/core/fp16/decorators.py", line 127, in new_func
return old_func(*args, **kwargs)
File "/home/lgl/PycharmProjects/DetectoRS/mmdet/models/mask_heads/fused_semantic_head.py", line 103, in loss
labels = labels.squeeze(1).long()
AttributeError: 'NoneType' object has no attribute 'squeeze'

can you tell me how to solve it, thank you?

RuntimeError: Failed to register operator torchvision::_new_empty_tensor_op.

I installed mmdetection and set up the environment as what README.mmdet.md told, i.e. PyTorch 1.4, mmcv, etc.
After that, i tried to train model(DetectoRS)) with a single GPU
python tools/train.py ${CONFIG_FILE} [optional arguments]
The error information was as following:

_Traceback (most recent call last):
File "tools/train.py", line 11, in
from mmcv.runner import init_dist
File "/root/anaconda2/envs/open-mmlab/lib/python3.7/site-packages/mmcv/runner/init.py", line 2, in
from .checkpoint import (_load_checkpoint, load_checkpoint, load_state_dict,
File "/root/anaconda2/envs/open-mmlab/lib/python3.7/site-packages/mmcv/runner/checkpoint.py", line 11, in
import torchvision
File "/root/anaconda2/envs/open-mmlab/lib/python3.7/site-packages/torchvision/init.py", line 3, in
from torchvision import models
File "/root/anaconda2/envs/open-mmlab/lib/python3.7/site-packages/torchvision/models/init.py", line 12, in
from . import detection
File "/root/anaconda2/envs/open-mmlab/lib/python3.7/site-packages/torchvision/models/detection/init.py", line 1, in
from .faster_rcnn import *
File "/root/anaconda2/envs/open-mmlab/lib/python3.7/site-packages/torchvision/models/detection/faster_rcnn.py", line 7, in
from torchvision.ops import misc as misc_nn_ops
File "/root/anaconda2/envs/open-mmlab/lib/python3.7/site-packages/torchvision/ops/init.py", line 13, in
_register_custom_op()
File "/root/anaconda2/envs/open-mmlab/lib/python3.7/site-packages/torchvision/ops/_register_onnx_ops.py", line 51, in _register_custom_op
register_custom_op_symbolic('torchvision::_new_empty_tensor_op', new_empty_tensor_op, _onnx_opset_version)
File "/root/anaconda2/envs/open-mmlab/lib/python3.7/site-packages/torch/onnx/init.py", line 200, in register_custom_op_symbolic
return utils.register_custom_op_symbolic(symbolic_name, symbolic_fn, opset_version)
File "/root/anaconda2/envs/open-mmlab/lib/python3.7/site-packages/torch/onnx/utils.py", line 793, in register_custom_op_symbolic
.format(symbolic_name))
RuntimeError: Failed to register operator torchvision::new_empty_tensor_op. The symbolic name must match the format Domain::Name, and sould start with a letter and contain only alphanumerical characters

Results without AWSConv?

I have found that the SAC is implemented based on AWSConv, which is not mentioned in ur DetectoRS paper. Have you tested standard nn.Conv2d in DetectoRS and what's the difference? What's more, it seems that AWSConv is not mentioned in Weight Standardization paper, is it similar to scaling and shifting in BN?

Question about the whole model size with rfp_sharing=False

Thanks for your awesome work!
Sorry for disturbing you. I notice that another new backbone would be builten while rfp_sharing is set as 'False'.

if not self.rfp_sharing:
backbone["rfp"] = neck_out_channels
self.rfp_modules = torch.nn.ModuleList()
for rfp_idx in range(1, rfp_steps):
rfp_module = builder.build_backbone(backbone)
rfp_module.init_weights(kwargs["pretrained"])
self.rfp_modules.append(rfp_module)

Would it cost extra memo for a whole ResNet backbone while training, inferencing or ckpt saving?
Hope for ur reply~

in build resnet rfp

Thanks for your error report and we appreciate it a lot.

in resnet.py 305
out = out + rfp_feat

The size of 'out' and 'rfp_feat' is not match

what's the performance on Cascade R-CNN?

hi, thank you for your impressive work!
Did you try your RFP and SAC on vanilla object detection model like Cascade R-CNN? what's the performance? thank you in advance.

TTA Question

@joe-siyuan-qiao Hi, thanks for your great work. But what is the correct TTA settings to get 54.7mAP on coco val2017?

When using img_scale=[(1200, 800), (1500, 1000), (1800, 1200), (2100, 1400), (2400, 1600)], flip=True(same with paper), it takes 7 hours on 8x10180Ti, but only get 53.7mAP, compared with default img_scale=(1333, 800), flip=False, 52.9mAP.

AssertionError: Caught AssertionError in DataLoader worker process 0.

We prepared the data followed by https://github.com/joe-siyuan-qiao/DetectoRS/tree/master/configs/htc, but when we train our own data with seg task, the error occured.

loading annotations into memory...
Done (t=0.62s)
creating index...
index created!
loading annotations into memory...
Done (t=0.05s)
creating index...
index created!
2020-07-05 19:34:20,227 - mmdet - INFO - Start running, host: amax@amax, work_dir: /home/lgl/PycharmProjects/DetectoRS/work_dirs/building-seg
2020-07-05 19:34:20,227 - mmdet - INFO - workflow: [('train', 1)], max: 45 epochs
Traceback (most recent call last):
File "/home/lgl/PycharmProjects/DetectoRS/train_building.py", line 144, in
main()
File "/home/lgl/PycharmProjects/DetectoRS/train_building.py", line 140, in main
meta=meta)
File "/home/lgl/PycharmProjects/DetectoRS/mmdet/apis/train.py", line 111, in train_detector
meta=meta)
File "/home/lgl/PycharmProjects/DetectoRS/mmdet/apis/train.py", line 242, in _non_dist_train
runner.run(data_loaders, cfg.workflow, cfg.total_epochs)
File "/home/lgl/anaconda3/envs/DetectoRS/lib/python3.6/site-packages/mmcv/runner/epoch_based_runner.py", line 122, in run
epoch_runner(data_loaders[i], **kwargs)
File "/home/lgl/anaconda3/envs/DetectoRS/lib/python3.6/site-packages/mmcv/runner/epoch_based_runner.py", line 27, in train
for i, data_batch in enumerate(data_loader):
File "/home/lgl/anaconda3/envs/DetectoRS/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 345, in next
data = self._next_data()
File "/home/lgl/anaconda3/envs/DetectoRS/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 856, in _next_data
return self._process_data(data)
File "/home/lgl/anaconda3/envs/DetectoRS/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 881, in _process_data
data.reraise()
File "/home/lgl/anaconda3/envs/DetectoRS/lib/python3.6/site-packages/torch/_utils.py", line 394, in reraise
raise self.exc_type(msg)
AssertionError: Caught AssertionError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/lgl/anaconda3/envs/DetectoRS/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 178, in _worker_loop
data = fetcher.fetch(index)
File "/home/lgl/anaconda3/envs/DetectoRS/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 47, in fetch
return self.collate_fn(data)
File "/home/lgl/anaconda3/envs/DetectoRS/lib/python3.6/site-packages/mmcv/parallel/collate.py", line 82, in collate
for key in batch[0]
File "/home/lgl/anaconda3/envs/DetectoRS/lib/python3.6/site-packages/mmcv/parallel/collate.py", line 82, in
for key in batch[0]
File "/home/lgl/anaconda3/envs/DetectoRS/lib/python3.6/site-packages/mmcv/parallel/collate.py", line 47, in collate
assert batch[i].size(dim) == sample.size(dim)
AssertionError

Would like to use detection only

I am using DetectoRS/mmdetv2 branch for object detection with my own dataset.

I have edited config files but I am getting errors from masking stage because I don't have mask labels in my dataset.

How could I edit my config file so that I do not use masking part?

I am using detectors_htc_r50_1x_coco.py config file.

KeyError

when I run “python demo/webcam_demo.py configs/DetectoRS/DetectoRS_mstrain_400_1200_r50_40e.py checkpoints/DetectoRS_R50-0f1c8080.pth ” ,
"/home/leo/anaconda3/envs/py36/lib/python3.6/site-packages/mmcv/utils/registry.py", line 158, in build_from_cfg
f'{obj_type} is not in the {registry.name} registry')
KeyError: 'RecursiveFeaturePyramid is not in the detector registry' happen

How to train DetectoRS without semantic using coco dataset , i can't solve the error.

i have changed the DetectoRS_mstrain_400_1200_r50_40e.py, coco.py, class_names.py to make classes, data root, roi head match. The following is the modified cofig file.

Cofig File:

conv_cfg = dict(type='ConvAWS')
model = dict(
type='RecursiveFeaturePyramid',
rfp_steps=2,
rfp_sharing=False,
stage_with_rfp=(False, True, True, True),
num_stages=3,
pretrained='open-mmlab://resnext101_32x4d',
interleaved=True,
mask_info_flow=True,
backbone=dict(
type='ResNeXt',
depth=101,
groups=32,
base_width=4,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
conv_cfg=conv_cfg,
sac=dict(type='SAC', use_deform=True),
stage_with_sac=(False, True, True, True),
norm_cfg=dict(type='BN', requires_grad=True),
style='pytorch'),
neck=dict(
type='FPN',
in_channels=[256, 512, 1024, 2048],
out_channels=256,
num_outs=5),
rpn_head=dict(
type='RPNHead',
in_channels=256,
feat_channels=256,
anchor_scales=[8],
anchor_ratios=[0.5, 1.0, 2.0],
anchor_strides=[4, 8, 16, 32, 64],
target_means=[.0, .0, .0, .0],
target_stds=[1.0, 1.0, 1.0, 1.0],
loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0)),
bbox_roi_extractor=dict(
type='SingleRoIExtractor',
roi_layer=dict(type='RoIAlign', out_size=7, sample_num=2),
out_channels=256,
featmap_strides=[4, 8, 16, 32]),
bbox_head=[
dict(
type='SharedFCBBoxHead',
num_fcs=2,
in_channels=256,
fc_out_channels=1024,
roi_feat_size=7,
num_classes=2,
target_means=[0., 0., 0., 0.],
target_stds=[0.1, 0.1, 0.2, 0.2],
reg_class_agnostic=False,
loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0, loss_weight=1.0)),
dict(
type='SharedFCBBoxHead',
num_fcs=2,
in_channels=256,
fc_out_channels=1024,
roi_feat_size=7,
num_classes=2,
target_means=[0., 0., 0., 0.],
target_stds=[0.05, 0.05, 0.1, 0.1],
reg_class_agnostic=False,
loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0, loss_weight=1.0)),
dict(
type='SharedFCBBoxHead',
num_fcs=2,
in_channels=256,
fc_out_channels=1024,
roi_feat_size=7,
num_classes=2,
target_means=[0., 0., 0., 0.],
target_stds=[0.033, 0.033, 0.067, 0.067],
reg_class_agnostic=False,
loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0, loss_weight=1.0))
],
mask_roi_extractor=dict(
type='SingleRoIExtractor',
roi_layer=dict(type='RoIAlign', out_size=14, sample_num=2),
out_channels=256,
featmap_strides=[4, 8, 16, 32]),
mask_head=[
dict(
type='HTCMaskHead',
with_conv_res=False,
num_convs=4,
in_channels=256,
conv_out_channels=256,
num_classes=2,
loss_mask=dict(
type='CrossEntropyLoss', use_mask=True, loss_weight=1.0)),
dict(
type='HTCMaskHead',
num_convs=4,
in_channels=256,
conv_out_channels=256,
num_classes=2,
loss_mask=dict(
type='CrossEntropyLoss', use_mask=True, loss_weight=1.0)),
dict(
type='HTCMaskHead',
num_convs=4,
in_channels=256,
conv_out_channels=256,
num_classes=2,
loss_mask=dict(
type='CrossEntropyLoss', use_mask=True, loss_weight=1.0))
])
# semantic_roi_extractor=dict(
# type='SingleRoIExtractor',
# roi_layer=dict(type='RoIAlign', out_size=14, sample_num=2),
# out_channels=256,
# featmap_strides=[8]),
# semantic_head=dict(
# type='FusedSemanticHead',
# num_ins=5,
# fusion_level=1,
# num_convs=4,
# in_channels=256,
# conv_out_channels=256,
# num_classes=183,
# ignore_label=255,
# loss_weight=0.2))

train_cfg = dict(
rpn=dict(
assigner=dict(
type='MaxIoUAssigner',
pos_iou_thr=0.7,
neg_iou_thr=0.3,
min_pos_iou=0.3,
ignore_iof_thr=-1),
sampler=dict(
type='RandomSampler',
num=256,
pos_fraction=0.5,
neg_pos_ub=-1,
add_gt_as_proposals=False),
allowed_border=0,
pos_weight=-1,
debug=False),
rpn_proposal=dict(
nms_across_levels=False,
nms_pre=2000,
nms_post=2000,
max_num=2000,
nms_thr=0.7,
min_bbox_size=0),
rcnn=[
dict(
assigner=dict(
type='MaxIoUAssigner',
pos_iou_thr=0.5,
neg_iou_thr=0.5,
min_pos_iou=0.5,
ignore_iof_thr=-1),
sampler=dict(
type='RandomSampler',
num=512,
pos_fraction=0.25,
neg_pos_ub=-1,
add_gt_as_proposals=True),
mask_size=28,
pos_weight=-1,
debug=False),
dict(
assigner=dict(
type='MaxIoUAssigner',
pos_iou_thr=0.6,
neg_iou_thr=0.6,
min_pos_iou=0.6,
ignore_iof_thr=-1),
sampler=dict(
type='RandomSampler',
num=512,
pos_fraction=0.25,
neg_pos_ub=-1,
add_gt_as_proposals=True),
mask_size=28,
pos_weight=-1,
debug=False),
dict(
assigner=dict(
type='MaxIoUAssigner',
pos_iou_thr=0.7,
neg_iou_thr=0.7,
min_pos_iou=0.7,
ignore_iof_thr=-1),
sampler=dict(
type='RandomSampler',
num=512,
pos_fraction=0.25,
neg_pos_ub=-1,
add_gt_as_proposals=True),
mask_size=28,
pos_weight=-1,
debug=False)
],
stage_loss_weights=[1, 0.5, 0.25])
test_cfg = dict(
rpn=dict(
nms_across_levels=False,
nms_pre=1000,
nms_post=1000,
max_num=1000,
nms_thr=0.7,
min_bbox_size=0),
rcnn=dict(
score_thr=0.001,
nms=dict(type='soft_nms', iou_thr=0.5),
max_per_img=100,
mask_thr_binary=0.5))

dataset_type = 'CocoDataset'
data_root = '/kaggle/working/data/coco/'

img_norm_cfg = dict(
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)

train_pipeline = [
dict(type='LoadImageFromFile'),
dict(
type='LoadAnnotations', with_bbox=True, with_mask=True, with_seg=True),
dict(
type='Resize',
img_scale=[(1333, 400), (1333, 1200)],
multiscale_mode='range',
keep_ratio=True),
dict(type='RandomFlip', flip_ratio=0.5),
dict(type='Normalize', **img_norm_cfg),
dict(type='Pad', size_divisor=32),
dict(type='SegRescale', scale_factor=1 / 8),
dict(type='DefaultFormatBundle'),
dict(
type='Collect',
keys=['img', 'gt_bboxes', 'gt_labels', 'gt_masks']),
]
test_pipeline = [
dict(type='LoadImageFromFile'),
dict(
type='MultiScaleFlipAug',
img_scale=(1333, 800),
flip=False,
transforms=[
dict(type='Resize', keep_ratio=True),
dict(type='RandomFlip', flip_ratio=0.5),
dict(type='Normalize', **img_norm_cfg),
dict(type='Pad', size_divisor=32),
dict(type='ImageToTensor', keys=['img']),
dict(type='Collect', keys=['img']),
])
]
data = dict(
imgs_per_gpu=1,
workers_per_gpu=1,
train=dict(
type=dataset_type,
ann_file=data_root + 'annotations/instances_train2017.json',
img_prefix=data_root + 'train2017/',
pipeline=train_pipeline),
val=dict(
type=dataset_type,
ann_file=data_root + 'annotations/instances_val2017.json',
img_prefix=data_root + 'val2017/',
pipeline=test_pipeline),
test=dict(
type=dataset_type,
ann_file=data_root + 'annotations/instances_val2017.json',
img_prefix=data_root + 'val2017/',
pipeline=test_pipeline))
evaluation = dict(interval=1, metric=['bbox', 'segm'])

optimizer = dict(type='SGD', lr=0.02, momentum=0.9, weight_decay=0.0001)
optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))

lr_config = dict(
policy='step',
warmup='linear',
warmup_iters=500,
warmup_ratio=1.0 / 3,
step=[36, 39])
checkpoint_config = dict(interval=1)

log_config = dict(
interval=50,
hooks=[
dict(type='TextLoggerHook'),
# dict(type='TensorboardLoggerHook')
])

runtime settings

total_epochs = 60
dist_params = dict(backend='nccl')
log_level = 'INFO'
work_dir = None
load_from = None
resume_from = None
workflow = [('train', 1)]

coco.py and class_names.py also modified:

image
image

and my coco dataset is this :

"images": [
{
"height": 1024,
"width": 1024,
"id": 0,
"file_name": "00764ad5d.jpg"
}]
"annotations": [
{
"id": 0,
"image_id": 0,
"category_id": 1,
"segmentation": [
[
89,
256,
89,
309.5,
89,
363,
145.5,
363,
202,
363,
202,
309.5,
202,
256,
145.5,
256
]
],
"bbox": [
89,
256,
113,
107
],
"iscrowd": 0,
"area": 12312
}]

Download the pretrained model and run train.py:

!wget -c https://www.cs.jhu.edu/~syqiao/DetectoRS/DetectoRS_X101-ed983634.pth -O /kaggle/working/DetectoRS_X101.pth

!python /kaggle/working/mmdetection/tools/train.py /kaggle/working/mmdetection/configs/DetectoRS/DetectoRS_mstrain_400_1200_x101_32x4d_40e.py
--work_dir /kaggle/working/mmdetection/work_dir --resume_from /kaggle/working/DetectoRS_X101.pth

Error:

Downloading: "https://s3.ap-northeast-2.amazonaws.com/open-mmlab/pretrain/third_party/resnext101_32x4d-a5af3160.pth" to /root/.cache/torch/checkpoints/resnext101_32x4d-a5af3160.pth
100%|████████████████████████████████████████| 161M/161M [00:11<00:00, 14.2MB/s]
loading annotations into memory...
Done (t=1.34s)
creating index...
index created!
Traceback (most recent call last):
File "/kaggle/working/mmdetection/tools/train.py", line 142, in
main()
File "/kaggle/working/mmdetection/tools/train.py", line 138, in main
meta=meta)
File "/kaggle/working/mmdetection/mmdet/apis/train.py", line 111, in train_detector
meta=meta)
File "/kaggle/working/mmdetection/mmdet/apis/train.py", line 242, in _non_dist_train
runner.run(data_loaders, cfg.workflow, cfg.total_epochs)
File "/opt/conda/lib/python3.7/site-packages/mmcv/runner/runner.py", line 383, in run
epoch_runner(data_loaders[i], **kwargs)
File "/opt/conda/lib/python3.7/site-packages/mmcv/runner/runner.py", line 278, in train
for i, data_batch in enumerate(data_loader):
File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 345, in next
data = self._next_data()
File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 856, in _next_data
return self._process_data(data)
File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 881, in _process_data
data.reraise()
File "/opt/conda/lib/python3.7/site-packages/torch/_utils.py", line 394, in reraise
raise self.exc_type(msg)
TypeError: Caught TypeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 178, in _worker_loop
data = fetcher.fetch(index)
File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/kaggle/working/mmdetection/mmdet/datasets/custom.py", line 132, in getitem
data = self.prepare_train_img(idx)
File "/kaggle/working/mmdetection/mmdet/datasets/custom.py", line 145, in prepare_train_img
return self.pipeline(results)
File "/kaggle/working/mmdetection/mmdet/datasets/pipelines/compose.py", line 24, in call
data = t(data)
File "/kaggle/working/mmdetection/mmdet/datasets/pipelines/loading.py", line 149, in call
results = self._load_semantic_seg(results)
File "/kaggle/working/mmdetection/mmdet/datasets/pipelines/loading.py", line 134, in _load_semantic_seg
osp.join(results['seg_prefix'], results['ann_info']['seg_map']),
File "/opt/conda/lib/python3.7/posixpath.py", line 80, in join
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType

time consuming?

Why two times backbone, and the time consuming is not bigger than HTC too much? and two times backbone is sequential.

how to train DetectoRS with the COCO2017 datasets

when i train DetectoRS with the config DetectoRS_mstrain_400_1200_r50_40e.py, i get an error:
RuntimeError: 1only batches of spatial targets supported (non-empty 3D tensors) but got targets of size: : [1, 148, 152, 3]. the error is in "loss_semantic_seg = self.criterion(mask_pred, labels)"
i have found the mask_pred size is [1, 163, 148, 152], but the label is [1, 148, 152, 3].
how to solve it?

i modified the config files:
data = dict(
imgs_per_gpu=1,
workers_per_gpu=1,
train=dict(
type=dataset_type,
ann_file=data_root + 'annotations/stuff_train2017.json',
img_prefix=data_root + 'train2017/',
seg_prefix=data_root + 'annotations/stuff_train2017_pixelmaps/',
pipeline=train_pipeline),
val=dict(
type=dataset_type,
ann_file=data_root + 'annotations/stuff_val2017.json',
img_prefix=data_root + 'val2017/',
pipeline=test_pipeline),
test=dict(
type=dataset_type,
ann_file=data_root + 'annotations/stuff_val2017.json',
img_prefix=data_root + 'val2017/',
pipeline=test_pipeline))

i do not know how you get the instances_train2017.json.

The purpose of the Post-Global Context

I have just read your paper. It's an excellent work. However, I am confused about the purpose of the Post-Global Context. It is written in the paper that We then move the global information outside the switch function and place it before and after the major body so that both Conv and S can benefit from it. But it seems that only the Pre-Global Context is injected to Conv and S. How can I understand those words correctly?

Custom Training

Hi there, just wondering if you have a quick guide for setting up custom training? Using a pretrained network and training the heads.

typo in paper

section 5.1 experimental details, for 1x schedule, lr multiplied by 0.1 after 8 and 12 epochs. Maybe 12 should be 11?
Another question, does DetectoRS adopts softnms and multiscale training in the main result to reach mAP53.3? I noticed that you mentioned it in section 5.1 but didn't annotate it table 4.
ps. figure1b is so cute :)

RuntimeError: cuda runtime error (209)

I am getting the following error. I have prepared a dataset in the coco dataset format.

2020-06-06 09:20:27,572 - mmdet - INFO - Environment info:
------------------------------------------------------------
sys.platform: linux
Python: 3.6.9 (default, Apr 18 2020, 01:56:04) [GCC 8.4.0]
CUDA available: True
CUDA_HOME: /usr/local/cuda
NVCC: Cuda compilation tools, release 10.1, V10.1.243
GPU 0: Tesla T4
GCC: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
PyTorch: 1.4.0+cu100
PyTorch compiling details: PyTorch built with:
  - GCC 7.3
  - Intel(R) Math Kernel Library Version 2019.0.4 Product Build 20190411 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v0.21.1 (Git Hash 7d2fd500bc78936d1d648ca713b901012f470dbc)
  - OpenMP 201511 (a.k.a. OpenMP 4.5)
  - NNPACK is enabled
  - CUDA Runtime 10.0
  - NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_37,code=compute_37
  - CuDNN 7.6.3
  - Magma 2.5.1
  - Build settings: BLAS=MKL, BUILD_NAMEDTENSOR=OFF, BUILD_TYPE=Release, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -fopenmp -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -O2 -fPIC -Wno-narrowing -Wall -Wextra -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Wno-stringop-overflow, DISABLE_NUMA=1, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, USE_CUDA=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON, USE_STATIC_DISPATCH=OFF, 

TorchVision: 0.5.0+cu100
OpenCV: 4.1.2
MMCV: 0.5.9
MMDetection: 1.1.0+bccc528
MMDetection Compiler: GCC 7.5
MMDetection CUDA Compiler: 10.1
------------------------------------------------------------

2020-06-06 09:20:27,576 - mmdet - INFO - Distributed training: False
2020-06-06 09:20:27,576 - mmdet - INFO - Config:
/content/drive/My Drive/DetectoRS/configs/ms_rcnn/ms_rcnn_x101_64x4d_fpn_1x.py
# model settings
model = dict(
    type='MaskScoringRCNN',
    pretrained='open-mmlab://resnext101_64x4d',
    backbone=dict(
        type='ResNeXt',
        depth=101,
        groups=64,
        base_width=4,
        num_stages=4,
        out_indices=(0, 1, 2, 3),
        frozen_stages=1,
        norm_cfg=dict(type='BN', requires_grad=True),
        style='pytorch'),
    neck=dict(
        type='FPN',
        in_channels=[256, 512, 1024, 2048],
        out_channels=256,
        num_outs=5),
    rpn_head=dict(
        type='RPNHead',
        in_channels=256,
        feat_channels=256,
        anchor_scales=[8],
        anchor_ratios=[0.5, 1.0, 2.0],
        anchor_strides=[4, 8, 16, 32, 64],
        target_means=[.0, .0, .0, .0],
        target_stds=[1.0, 1.0, 1.0, 1.0],
        loss_cls=dict(
            type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
        loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0)),
    bbox_roi_extractor=dict(
        type='SingleRoIExtractor',
        roi_layer=dict(type='RoIAlign', out_size=7, sample_num=2),
        out_channels=256,
        featmap_strides=[4, 8, 16, 32]),
    bbox_head=dict(
        type='SharedFCBBoxHead',
        num_fcs=2,
        in_channels=256,
        fc_out_channels=1024,
        roi_feat_size=7,
        num_classes=1,
        target_means=[0., 0., 0., 0.],
        target_stds=[0.1, 0.1, 0.2, 0.2],
        reg_class_agnostic=False,
        loss_cls=dict(
            type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0),
        loss_bbox=dict(type='SmoothL1Loss', beta=1.0, loss_weight=1.0)),
    mask_roi_extractor=dict(
        type='SingleRoIExtractor',
        roi_layer=dict(type='RoIAlign', out_size=14, sample_num=2),
        out_channels=256,
        featmap_strides=[4, 8, 16, 32]),
    mask_head=dict(
        type='FCNMaskHead',
        num_convs=4,
        in_channels=256,
        conv_out_channels=256,
        num_classes=1,
        loss_mask=dict(
            type='CrossEntropyLoss', use_mask=True, loss_weight=1.0)),
    mask_iou_head=dict(
        type='MaskIoUHead',
        num_convs=4,
        num_fcs=2,
        roi_feat_size=14,
        in_channels=256,
        conv_out_channels=256,
        fc_out_channels=1024,
        num_classes=81))
# model training and testing settings
train_cfg = dict(
    rpn=dict(
        assigner=dict(
            type='MaxIoUAssigner',
            pos_iou_thr=0.7,
            neg_iou_thr=0.3,
            min_pos_iou=0.3,
            ignore_iof_thr=-1),
        sampler=dict(
            type='RandomSampler',
            num=256,
            pos_fraction=0.5,
            neg_pos_ub=-1,
            add_gt_as_proposals=False),
        allowed_border=0,
        pos_weight=-1,
        debug=False),
    rpn_proposal=dict(
        nms_across_levels=False,
        nms_pre=2000,
        nms_post=2000,
        max_num=2000,
        nms_thr=0.7,
        min_bbox_size=0),
    rcnn=dict(
        assigner=dict(
            type='MaxIoUAssigner',
            pos_iou_thr=0.5,
            neg_iou_thr=0.5,
            min_pos_iou=0.5,
            ignore_iof_thr=-1),
        sampler=dict(
            type='RandomSampler',
            num=512,
            pos_fraction=0.25,
            neg_pos_ub=-1,
            add_gt_as_proposals=True),
        mask_size=28,
        pos_weight=-1,
        mask_thr_binary=0.5,
        debug=False))
test_cfg = dict(
    rpn=dict(
        nms_across_levels=False,
        nms_pre=1000,
        nms_post=1000,
        max_num=1000,
        nms_thr=0.7,
        min_bbox_size=0),
    rcnn=dict(
        score_thr=0.05,
        nms=dict(type='nms', iou_thr=0.5),
        max_per_img=100,
        mask_thr_binary=0.5))
# dataset settings
dataset_type = 'CocoDataset'
data_root = '/content/drive/My Drive/collab/data/'
img_norm_cfg = dict(
    mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
train_pipeline = [
    dict(type='LoadImageFromFile'),
    dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
    dict(type='Resize', img_scale=(1333, 800), keep_ratio=True),
    dict(type='RandomFlip', flip_ratio=0.5),
    dict(type='Normalize', **img_norm_cfg),
    dict(type='Pad', size_divisor=32),
    dict(type='DefaultFormatBundle'),
    dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels', 'gt_masks']),
]
test_pipeline = [
    dict(type='LoadImageFromFile'),
    dict(
        type='MultiScaleFlipAug',
        img_scale=(1333, 800),
        flip=False,
        transforms=[
            dict(type='Resize', keep_ratio=True),
            dict(type='RandomFlip'),
            dict(type='Normalize', **img_norm_cfg),
            dict(type='Pad', size_divisor=32),
            dict(type='ImageToTensor', keys=['img']),
            dict(type='Collect', keys=['img']),
        ])
]
data = dict(
    imgs_per_gpu=2,
    workers_per_gpu=2,
    train=dict(
        type=dataset_type,
        ann_file=data_root + 'annotations/instances_train2017.json',
        img_prefix=data_root + 'train2017/',
        pipeline=train_pipeline),
    val=dict(
        type=dataset_type,
        ann_file=data_root + 'annotations/instances_val2017.json',
        img_prefix=data_root + 'val2017/',
        pipeline=test_pipeline),
    test=dict(
        type=dataset_type,
        ann_file=data_root + 'annotations/instances_val2017.json',
        img_prefix=data_root + 'val2017/',
        pipeline=test_pipeline))
evaluation = dict(interval=1, metric=['bbox', 'segm'])
# optimizer
optimizer = dict(type='SGD', lr=0.001, momentum=0.9, weight_decay=0.0001)
optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))
# learning policy
lr_config = dict(
    policy='step',
    warmup='linear',
    warmup_iters=500,
    warmup_ratio=1.0 / 3,
    step=[8, 11])
checkpoint_config = dict(interval=1)
# yapf:disable
log_config = dict(
    interval=50,
    hooks=[
        dict(type='TextLoggerHook'),
        # dict(type='TensorboardLoggerHook')
    ])
# yapf:enable
# runtime settings
total_epochs = 12
dist_params = dict(backend='nccl')
log_level = 'INFO'
work_dir = './work_dirs/ms_rcnn_x101_64x4d_fpn_1x'
load_from = None
resume_from = None
workflow = [('train', 1)]
2020-06-06 09:20:29,298 - mmdet - INFO - load model from: open-mmlab://resnext101_64x4d
loading annotations into memory...
Done (t=0.00s)
creating index...
index created!
2020-06-06 09:20:33,941 - mmdet - INFO - Start running, host: root@bf517d5ff35a, work_dir: /content/drive/My Drive/DetectoRS/work_dirs/ms_rcnn_x101_64x4d_fpn_1x
2020-06-06 09:20:33,942 - mmdet - INFO - workflow: [('train', 1)], max: 12 epochs
THCudaCheck FAIL file=mmdet/ops/roi_align/src/roi_align_kernel.cu line=139 error=209 : unrecognized error code
Traceback (most recent call last):
  File "/content/drive/My Drive/DetectoRS/tools/train.py", line 142, in <module>
    main()
  File "/content/drive/My Drive/DetectoRS/tools/train.py", line 138, in main
    meta=meta)
  File "/content/drive/My Drive/DetectoRS/mmdet/apis/train.py", line 111, in train_detector
    meta=meta)
  File "/content/drive/My Drive/DetectoRS/mmdet/apis/train.py", line 242, in _non_dist_train
    runner.run(data_loaders, cfg.workflow, cfg.total_epochs)
  File "/usr/local/lib/python3.6/dist-packages/mmcv/runner/runner.py", line 384, in run
    epoch_runner(data_loaders[i], **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/mmcv/runner/runner.py", line 283, in train
    self.model, data_batch, train_mode=True, **kwargs)
  File "/content/drive/My Drive/DetectoRS/mmdet/apis/train.py", line 75, in batch_processor
    losses = model(**data)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 532, in __call__
    result = self.forward(*input, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/parallel/data_parallel.py", line 150, in forward
    return self.module(*inputs[0], **kwargs[0])
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 532, in __call__
    result = self.forward(*input, **kwargs)
  File "/content/drive/My Drive/DetectoRS/mmdet/core/fp16/decorators.py", line 49, in new_func
    return old_func(*args, **kwargs)
  File "/content/drive/My Drive/DetectoRS/mmdet/models/detectors/base.py", line 147, in forward
    return self.forward_train(img, img_metas, **kwargs)
  File "/content/drive/My Drive/DetectoRS/mmdet/models/detectors/mask_scoring_rcnn.py", line 104, in forward_train
    x[:self.bbox_roi_extractor.num_inputs], rois)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 532, in __call__
    result = self.forward(*input, **kwargs)
  File "/content/drive/My Drive/DetectoRS/mmdet/core/fp16/decorators.py", line 127, in new_func
    return old_func(*args, **kwargs)
  File "/content/drive/My Drive/DetectoRS/mmdet/models/roi_extractors/single_level.py", line 105, in forward
    roi_feats_t = self.roi_layers[i](feats[i], rois_)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 532, in __call__
    result = self.forward(*input, **kwargs)
  File "/content/drive/My Drive/DetectoRS/mmdet/ops/roi_align/roi_align.py", line 144, in forward
    self.sample_num, self.aligned)
  File "/content/drive/My Drive/DetectoRS/mmdet/ops/roi_align/roi_align.py", line 36, in forward
    spatial_scale, sample_num, output)
RuntimeError: cuda runtime error (209) : unrecognized error code at mmdet/ops/roi_align/src/roi_align_kernel.cu:139

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.