mmdetection
mmdetection copied to clipboard
[Bug] If torchvision=0.13.0, what should I do to change my resnet50 pretrain code in config
Prerequisite
- [X] I have searched Issues and Discussions but cannot get the expected help.
- [X] I have read the FAQ documentation but cannot get the expected help.
- [X] The bug has not been fixed in the latest version (master) or latest version (3.x).
Task
I have modified the scripts/configs, or I'm working on my own tasks/models/datasets.
Branch
master branch https://github.com/open-mmlab/mmdetection
Environment
PS G:\qxz\mmdetection-master\mmdetection-master> python mmdet/utils/collect_env.py
fatal: not a git repository (or any of the parent directories): .git
sys.platform: win32
Python: 3.8.13 (default, Oct 19 2022, 22:38:03) [MSC v.1916 64 bit (AMD64)]
CUDA available: True
GPU 0: Quadro RTX 8000
CUDA_HOME: None
MSVC: 用于 x64 的 Microsoft (R) C/C++ 优化编译器 19.29.30145 版
GCC: n/a
PyTorch: 1.12.0+cu116
PyTorch compiling details: PyTorch built with:
- C++ Version: 199711
- MSVC 192829337
- Intel(R) Math Kernel Library Version 2020.0.2 Product Build 20200624 for Intel(R) 64 architecture applications
- Intel(R) MKL-DNN v2.6.0 (Git Hash 52b5f107dd9cf10910aaa19cb47f3abf9b349815)
- OpenMP 2019
- LAPACK is enabled (usually provided by MKL)
- CPU capability usage: AVX2
- CUDA Runtime 11.6
- 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_ 80,code=sm_80;-gencode;arch=compute_86,code=sm_86;-gencode;arch=compute_37,code=compute_37
- CuDNN 8.3.2 (built against CUDA 11.5)
- Magma 2.5.4
- Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.6, CUDNN_VERSION=8.3.2, CXX_COMPILER=C:/actions-runner/_work/pytorch/pytorch/builder/windows/tmp_bin/sccache-cl.exe, CXX_FLAGS=/DWIN32 /D_WINDOWS /GR /EHsc /w /bigobj -DUSE_PTHREADPOOL -openmp:exp erimental -IC:/actions-runner/_work/pytorch/pytorch/builder/windows/mkl/include -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF _WITH_AVX512=1, TORCH_VERSION=1.12.0, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=OFF, USE_MPI=OFF, USE_NCCL=OFF, USE_NNPACK=OFF, USE_OPENMP=ON, USE_ROCM=OFF,
TorchVision: 0.13.0+cu116 OpenCV: 4.6.0 MMCV: 1.5.0 MMCV Compiler: MSVC 192930145 MMCV CUDA Compiler: not available MMDetection: 2.25.3+
Reproduces the problem - code sample

Reproduces the problem - command or script
python tools/train.py
Reproduces the problem - error message
Traceback (most recent call last):
File "G:/qxz/mmdetection-master/mmdetection-master/tools/train.py", line 223, in
Process finished with exit code 1
Additional information
I check the erro message and find this instruction, but I don't know how to set my config. My torchvision=0.13.0.

It seems that you need to upgrade your MMCV to the most recent version.
@wanghonglie Hi~ it seems a bug in MMCV, just as you say

'model_zoo/torchvision_0.12.json' is a linux format path, which is not compatible with windows platform. It should be corrected as:
osp.join(mmcv.__path__[0], 'model_zoo', 'torchvision_0.12.json')
Would you mind proposing a PR to fix this :smile: ?
Resolved in https://github.com/open-mmlab/mmengine/pull/820
I have also encountered the same problem. Have you resolved it