open-mmlab / mmtracking

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.
https://mmtracking.readthedocs.io/en/latest/
Apache License 2.0
3.55k stars 594 forks source link

AttributeError: 'ConfigDict' object has no attribute 'data' #422

Closed ZihaoZhao closed 2 years ago

ZihaoZhao commented 2 years ago

Describe the bug

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

Reproduction

python tools/test.py configs/sot/siamese_rpn/siamese_rpn_r50_1x_lasot.py \ --checkpoint checkpoints/siamese_rpn_r50_1x_lasot_20201218_051019-3c522eff.pth \ --out results.pkl \ --eval track

  1. Did you make any modifications on the code or config? Did you understand what you have modified?

No

  1. What dataset did you use and what task did you run?

Default setting in test.py

Environment

sys.platform: linux Python: 3.7.11 (default, Jul 27 2021, 14:32:16) [GCC 7.5.0] CUDA available: True GPU 0: GeForce RTX 2080 Ti CUDA_HOME: /usr/local/cuda NVCC: Cuda compilation tools, release 10.1, V10.1.243 GCC: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 PyTorch: 1.5.0 PyTorch compiling details: PyTorch built with:

TorchVision: 0.6.0a0+82fd1c8 OpenCV: 4.5.4-dev MMCV: 1.3.17 MMCV Compiler: GCC 7.5 MMCV CUDA Compiler: 10.1 MMTracking: 0.9.0+142922e

Error traceback

(open-mmlab) root@eehu4ka58egne-0:/zhzhao/code/mmtracking# python tools/test.py configs/sot/siamese_rpn/siamese_rpn_r50_1x_lasot.py \

   --checkpoint checkpoints/siamese_rpn_r50_1x_lasot_20201218_051019-3c522eff.pth \
   --out results.pkl \
   --eval track

/zhzhao/miniconda3/envs/open-mmlab/lib/python3.7/importlib/_bootstrap.py:219: ImportWarning: can't resolve package from spec or package, falling back on name and path return f(*args, **kwds) Traceback (most recent call last): File "tools/test.py", line 224, in main() File "tools/test.py", line 122, in main setup_multi_processes(cfg) File "/zhzhao/code/mmtracking/mmtrack/core/utils/misc.py", line 21, in setup_multi_processes if ('OMP_NUM_THREADS' not in os.environ and cfg.data.workers_per_gpu > 1): File "/zhzhao/miniconda3/envs/open-mmlab/lib/python3.7/site-packages/mmcv/utils/config.py", line 507, in getattr return getattr(self._cfg_dict, name) File "/zhzhao/miniconda3/envs/open-mmlab/lib/python3.7/site-packages/mmcv/utils/config.py", line 48, in getattr raise ex AttributeError: 'ConfigDict' object has no attribute 'data'

JingweiZhang12 commented 2 years ago

We can't reproduce your error. Could you print the variable 'cfg' in the AttributeError?

ZihaoZhao commented 2 years ago

Sorry, this is because I clear the cfg file by mistake.

wj51 commented 2 years ago

我也出现这个问题,请问是具体哪里的问题呢