Closed AloshkaD closed 4 years ago
Feel free to reopen it if you have any further questions.
I encounter this error, but I can't understand your reply
@AloshkaD I want to add cutout augmentation method in mmdetection but it not work well ,could you show me your code?
Describe the bug I'm training the mmdetection on some data with big features that sometimes occupy 80% of the image size. At some point the network throws the error below (see Error Trackback)
This error is likely caused by the anchor_strides values in the config. I know that because if I increase the anchor_strides value the error happens more often, which indicates that more images/masks are becoming problematic and the error occurs. I've tested countless stride values but that didn't help. Changing the learning rate did not help. I'm using the learning rate as per the recommendations for the number of GPUs/image per GPU
Reproduction
work_dir = .../work_dir/rooftop/zoom' load_from ='.../epoch_1.pth'
resume_from = None workflow = [('train', 1)]
File ".../mmdetection/tools/train.py", line 95, in
main()
File ".../mmdetection/tools/train.py", line 91, in main
logger=logger)
File ".../mmdetection/mmdet/apis/train.py", line 61, in train_detector
_non_dist_train(model, dataset, cfg, validate=validate)
File ".../mmdetection/mmdet/apis/train.py", line 197, in _non_dist_train
runner.run(data_loaders, cfg.workflow, cfg.total_epochs)
File "/home/a/anaconda3/envs/torch/lib/python3.7/site-packages/mmcv/runner/runner.py", line 358, in run
epoch_runner(data_loaders[i], kwargs)
File "/home/a/anaconda3/envs/torch/lib/python3.7/site-packages/mmcv/runner/runner.py", line 264, in train
self.model, data_batch, train_mode=True, kwargs)
File ".../mmdetection/mmdet/apis/train.py", line 39, in batch_processor
losses = model(data)
File "/home/a/anaconda3/envs/torch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, *kwargs)
File "/home/a/anaconda3/envs/torch/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 152, in forward
outputs = self.parallel_apply(replicas, inputs, kwargs)
File "/home/a/anaconda3/envs/torch/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 162, in parallel_apply
return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)])
File "/home/a/anaconda3/envs/torch/lib/python3.7/site-packages/torch/nn/parallel/parallel_apply.py", line 83, in parallel_apply
raise output
File "/home/a/anaconda3/envs/torch/lib/python3.7/site-packages/torch/nn/parallel/parallel_apply.py", line 59, in _worker
output = module(input, kwargs)
File "/home/a/anaconda3/envs/torch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(input, kwargs)
File ".../mmdetection/mmdet/models/detectors/base.py", line 84, in forward
return self.forward_train(img, img_meta, kwargs)
File ".../mmdetection/mmdet/models/detectors/htc.py", line 177, in forward_train
rpn_loss_inputs, gt_bboxes_ignore=gt_bboxes_ignore)
File ".../mmdetection/mmdet/models/anchor_heads/rpn_head.py", line 58, in loss
loss_rpn_cls=losses['loss_cls'], loss_rpn_reg=losses['loss_reg'])
TypeError: 'NoneType' object is not subscriptable