BEVFusion(mit)源码复现时遇到的报错

总结在复现BEVFusion(mit)代码时训练、测试和可视化遇到的报错!

1、报错:ImportError: cannot import name ‘feature_decorator_ext’ from partially initialized module ‘mmdet3d.ops.feature_decorator’ (most likely due to a circular import) (/home/mengwen/bevfusion/mmdet3d/ops/feature_decorator/init.py)

解决:

(1)注释掉 mmdet3d/ops/init.py 中的 from .feature_decorator import feature_decorator

2、报错:FileNotFoundError: NuScenesDataset: [Errno 2] No such file or directory: ‘data/nuscenes//nuscenes_infos_train.pkl’

解决:更改tools/data_converter/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、报错:TypeError: FormatCode() got an unexpected keyword argument ‘verify’

解决:yapf包的版本问题,我原来yapf包的0.40.2,降低为yapf==0.40.1

pip install yapf==0.40.1

4、报错:AttributeError: module ‘distutils’ has no attribute ‘version’

解决:setuptools版本过高导致的问题

pip install setuptools==58.0.4

5、报错: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

6、报错:RuntimeError: CUDA out of memory. Tried to allocate 168.00 MiB (GPU 0; 23.70 GiB total capacity; 2.41 GiB already allocated; 96.50 MiB free; 2.43 GiB reserved in total by PyTorch) If reserved memory i

解决:单卡gpu不能满足,采用分布式训练,在mmdet3d/apis/train.py文件中把distributed参数设置为True,直接vs-code全局搜索找到distributed

def train_model(
    model,
    dataset,
    cfg,
    distributed=True,
    validate=False,
    timestamp=None,
):

7、报错:ModuleNotFoundError: No module named ‘torchpack.utils.tqdm’

解决:把tools/visualize.py文件中from torchpack.utils.tqdm import tqdm改成from tqdm import tqdm

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值