• 【MMDetection】bug记录



    bug1:

    if env_cfg.get('cudnn_benchmark'): AttributeError: 'NoneType' object has no attribute 'get'

    解决办法:

    配置文件缺少了env_cfg信息,需要在config文件中添加,如以下内容:

    1. env_cfg = dict(
    2. cudnn_benchmark=False,
    3. mp_cfg=dict(mp_start_method='fork', opencv_num_threads=0),
    4. dist_cfg=dict(backend='nccl'))


     bug2

    KeyError: 'DetLocalVisualizer is not in the visualizer registry. Please check whether the value of `DetLocalVisualizer` is correct or it was registered as expected.

    解决办法:

    mmcv版本问题

    https://github.com/open-mmlab/mmdetection/issues/9914

    修改之前的版本信息:

    1. sys.platform: win32
    2. Python: 3.8.16 (default, Jun 12 2023, 21:00:42) [MSC v.1916 64 bit (AMD64)]
    3. CUDA available: True
    4. numpy_random_seed: 2147483648
    5. GPU 0: NVIDIA GeForce RTX 3060 Ti
    6. CUDA_HOME: None
    7. MSVC: 用于 x64 的 Microsoft (R) C/C++ 优化编译器 19.36.32535 版
    8. GCC: n/a
    9. PyTorch: 1.8.0
    10. PyTorch compiling details: PyTorch built with:
    11. - C++ Version: 199711
    12. - MSVC 192829337
    13. - Intel(R) Math Kernel Library Version 2020.0.0 Product Build 20191125 for Intel(R) 64 architecture applications
    14. - Intel(R) MKL-DNN v1.7.0 (Git Hash 7aed236906b1f7a05c0917e5257a1af05e9ff683)
    15. - OpenMP 2019
    16. - CPU capability usage: AVX2
    17. - CUDA Runtime 11.1
    18. - 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
    19. - CuDNN 8.0.5
    20. - Magma 2.5.4
    21. - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.1, CUDNN_VERSION=8.0.5, CXX_COMPILER=C:/cb/pytorch_1000000000000/work/tmp_bin/sccache-cl.exe, CXX_FLAGS=/DWIN32 /D_WINDOWS /GR /EHsc /w /bigobj -DUSE_PTHREADPOOL -openmp:experimental -DNDEBUG -DUSE_FBGEMM -DUSE_XNNPACK, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.8.0, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=OFF, USE_NNPACK=OFF, USE_OPENMP=ON,
    22. TorchVision: 0.9.0
    23. OpenCV: 4.8.0
    24. MMEngine: 0.8.0
    25. mmdetection: 3.1.0+f78af77

    以上所有问题 也有可能源自于继承文件没继承上,可以打印出继承前的配置文件与继承后的配置文件做对比:

    以下命令可以打印出配置文件所有信息,如打印configs\yolox\yolox_s_8xb8-300e_coco.py

    python tools\misc\print_config.py configs\yolox\yolox_s_8xb8-300e_coco.py

    最简单不易报错的使用方式:可以保存完整的配置文件,然后在完整的配置文件中直接修改

    python tools\misc\print_config.py  configs\yolox\yolox_s_8xb8-300e_coco.py --save-path complete_yolox_s_8xb8-300e_coco.py 

  • 相关阅读:
    [附源码]计算机毕业设计基于SpringBoot的疫苗接种管理系统
    2024年第三届数据统计与分析竞赛(A题)数学建模完整思路+完整代码全解全析
    【C语言】预处理详解,宏与函数的区别对比
    Chrome开发者工具课程
    linux内核编程入门之proc文件读写
    【C++心愿便利店】No.14---C++之探索list底层原理
    hudi安装
    linux下安装python3.8(有坑)
    精进 JavaScript | 这些手写你都会吗 ?
    为什么审计平台不适合进行数据库变更管理?
  • 原文地址:https://blog.csdn.net/qq_41964545/article/details/132757139