OpenMMLab Video Perception Toolbox. It supports Video Object Detection (VID), Multiple Object Tracking (MOT), Single Object Tracking (SOT), Video Instance Segmentation (VIS) with a unified framework.
Thanks for your error report and we appreciate it a lot.
Describe the bug
When I run SELSA , it reports AttributeError:'NoneType' object has no attribute 'copy'
What command or script did you run?
python ./tools/train.py configs/vid/selsa/selsa_faster_rcnn_r50_dc5_1x_imagenetvid.py
Did you make any modifications on the code or config? Did you understand what you have modified?
I modified '/mmdet/models/dense_heads/rpn_head.py', line185, from 'cfg.nms' to 'cfg.get('nms')'
What dataset did you use and what task did you run?
I used ILSVRC dataset and run video object detection task.
Environment
Python: 3.7.10 | packaged by conda-forge | (default, Feb 19 2021, 16:07:37) [GCC 9.3.0]
CUDA available: True
GPU 0,1,2,3,4,5,6,7: GeForce RTX 3090
CUDA_HOME: /usr/local/cuda
NVCC: Build cuda_11.1.TC455_06.29069683_0
GCC: gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
PyTorch: 1.7.1
PyTorch compiling details: PyTorch built with:
GCC 7.3
C++ Version: 201402
Intel(R) oneAPI Math Kernel Library Version 2021.2-Product Build 20210312 for Intel(R) 64 architecture applications
2021-05-29 17:39:53,278 - mmtrack - INFO - workflow: [('train', 1)], max: 7 epochs
Traceback (most recent call last):
File "./tools/train.py", line 168, in
main()
File "./tools/train.py", line 164, in main
meta=meta)
File "/mmdetection/mmtracking/mmtrack/apis/train.py", line 135, in train_model
runner.run(data_loaders, cfg.workflow, cfg.total_epochs)
File "/miniconda3/envs/mmtrack/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 125, in run
epoch_runner(data_loaders[i], kwargs)
File "/miniconda3/envs/mmtrack/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 50, in train
self.run_iter(data_batch, train_mode=True, kwargs)
File "/miniconda3/envs/mmtrack/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 30, in run_iter
kwargs)
File "/miniconda3/envs/mmtrack/lib/python3.7/site-packages/mmcv/parallel/data_parallel.py", line 67, in train_step
return self.module.train_step(inputs[0], kwargs[0])
File "/mmdetection/mmtracking/mmtrack/models/vid/base.py", line 215, in train_step
losses = self(data)
File "/miniconda3/envs/mmtrack/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(input, kwargs)
File "/miniconda3/envs/mmtrack/lib/python3.7/site-packages/mmcv/runner/fp16_utils.py", line 95, in new_func
return old_func(args, kwargs)
File "/mmdetection/mmtracking/mmtrack/models/vid/base.py", line 149, in forward
return self.forward_train(img, img_metas, kwargs)
File "/mmdetection/mmtracking/mmtrack/models/vid/selsa.py", line 156, in forward_train
proposal_cfg=proposal_cfg)
File "/mmdetection/mmdet/models/dense_heads/base_dense_head.py", line 58, in forward_train
proposal_list = self.get_bboxes(outs, img_metas, cfg=proposal_cfg)
File "/miniconda3/envs/mmtrack/lib/python3.7/site-packages/mmcv/runner/fp16_utils.py", line 182, in new_func
return old_func(*args, **kwargs)
File "/mmdetection/mmdet/models/dense_heads/anchor_head.py", line 580, in get_bboxes
scale_factors, cfg, rescale)
File "/mmdetection/mmdet/models/dense_heads/rpn_head.py", line 185, in _get_bboxes
cfg.get('nms'))
File "/miniconda3/envs/mmtrack/lib/python3.7/site-packages/mmcv/ops/nms.py", line 264, in batched_nms
nmscfg = nms_cfg.copy()
AttributeError: 'NoneType' object has no attribute 'copy'
Thanks for your error report and we appreciate it a lot.
Describe the bug When I run SELSA , it reports AttributeError:'NoneType' object has no attribute 'copy'
What command or script did you run? python ./tools/train.py configs/vid/selsa/selsa_faster_rcnn_r50_dc5_1x_imagenetvid.py
Did you make any modifications on the code or config? Did you understand what you have modified?
I modified '/mmdet/models/dense_heads/rpn_head.py', line185, from 'cfg.nms' to 'cfg.get('nms')'
TorchVision: 0.8.2 OpenCV: 4.5.2 MMCV: 1.3.5 MMCV Compiler: GCC 7.3 MMCV CUDA Compiler: 11.0 MMTracking: 0.5.0+22cf5ee
Error traceback
2021-05-29 17:39:53,278 - mmtrack - INFO - workflow: [('train', 1)], max: 7 epochs Traceback (most recent call last): File "./tools/train.py", line 168, in
main()
File "./tools/train.py", line 164, in main
meta=meta)
File "/mmdetection/mmtracking/mmtrack/apis/train.py", line 135, in train_model
runner.run(data_loaders, cfg.workflow, cfg.total_epochs)
File "/miniconda3/envs/mmtrack/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 125, in run
epoch_runner(data_loaders[i], kwargs)
File "/miniconda3/envs/mmtrack/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 50, in train
self.run_iter(data_batch, train_mode=True, kwargs)
File "/miniconda3/envs/mmtrack/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 30, in run_iter
kwargs)
File "/miniconda3/envs/mmtrack/lib/python3.7/site-packages/mmcv/parallel/data_parallel.py", line 67, in train_step
return self.module.train_step(inputs[0], kwargs[0])
File "/mmdetection/mmtracking/mmtrack/models/vid/base.py", line 215, in train_step
losses = self(data)
File "/miniconda3/envs/mmtrack/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(input, kwargs)
File "/miniconda3/envs/mmtrack/lib/python3.7/site-packages/mmcv/runner/fp16_utils.py", line 95, in new_func
return old_func(args, kwargs)
File "/mmdetection/mmtracking/mmtrack/models/vid/base.py", line 149, in forward
return self.forward_train(img, img_metas, kwargs)
File "/mmdetection/mmtracking/mmtrack/models/vid/selsa.py", line 156, in forward_train
proposal_cfg=proposal_cfg)
File "/mmdetection/mmdet/models/dense_heads/base_dense_head.py", line 58, in forward_train
proposal_list = self.get_bboxes(outs, img_metas, cfg=proposal_cfg)
File "/miniconda3/envs/mmtrack/lib/python3.7/site-packages/mmcv/runner/fp16_utils.py", line 182, in new_func
return old_func(*args, **kwargs)
File "/mmdetection/mmdet/models/dense_heads/anchor_head.py", line 580, in get_bboxes
scale_factors, cfg, rescale)
File "/mmdetection/mmdet/models/dense_heads/rpn_head.py", line 185, in _get_bboxes
cfg.get('nms'))
File "/miniconda3/envs/mmtrack/lib/python3.7/site-packages/mmcv/ops/nms.py", line 264, in batched_nms
nmscfg = nms_cfg.copy()
AttributeError: 'NoneType' object has no attribute 'copy'