1.遇到  AttributeError: module ‘distutils‘ has no attribute ‘version‘ 

我是直接运行下面这行代码(详解见这篇文章

conda install setuptools==58.0.4

2.处理data遇到  FileNotFoundError: [Errno 2] No such file or directory: './data/nuscenes/nuscenes_infos_train.pkl'

将 nuscenes_converter.py 中第95~100行改为

info_path = osp.join(root_path,
'{}_infos_train.pkl'.format(info_prefix))
info_val_path = osp.join(root_path,
'{}_infos_val.pkl'.format(info_prefix))

3.训练时遇到  RuntimeError: Given groups=1, weight of size [8, 1, 1, 1], expected input[24, 6, 256, 704] to have 1 channels, but got 6 channels instead.

将 mmdet3d/models/vtransforms/base 中第38行: add_depth_features=True 改为 False ,37行也改为 False


4.训练camera_only遇到TypeError: CyclicLrUpdaterHook: __init__() got an unexpected keyword argument 'min_lr_ratio

删除 configs/nuscenes/det/centerhead/lssfpn/default.yaml 中最后一行的 min_lr_ratio: 1.0e-3 


5.新代码训练精度不高

新代码和原代码相比有一处错误,要将 bevfusion/configs/nuscenes/det/default.yaml 中第33行 sweeps_num = 0 改为9


6.报错cannot import name 'feature_decorator_ext' from partially initialized module 'mmdet3d.ops.feature_decorator

注释掉 mmdet3d/ops/__init__.py 中的 from .feature_decorator import feature_decorator 

from .ball_query import ball_query
# from .feature_decorator import feature_decorator
from .furthest_point_sample import (
    Points_Sampler,
    furthest_point_sample,
    furthest_point_sample_with_dist,
)

mmdet3d/models/backbones/__init__.py 中的 from .radar_encoder import *

...
from .vovnet import *
from .dla import *
# from .radar_encoder import *

7.单卡训练

参考这篇博客

但是测试我没有用他的,会报错。测试时我只是修改了test.py中的distributed=False,然后将下面两句注释掉

dist.init()
troch.cuda.set_device(dist.local_rank())

8.结语

其实上述问题很多GitHub的issue里都有,大家可以经常去看。我记录在此也是方便自己查看,省的以后重新来还要一个问题一个问题去翻找。之后也会不断更新问题:)

Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐