版本https://github.com/mit-han-lab/bevfusion

环境安装

docker方式

git clone https://github.com/mit-han-lab/bevfusion.git

  1. 创建data文件夹

  2. 下载数据集

    mmdetection3d
    ├── mmdet3d
    ├── tools
    ├── configs
    ├── data
    │   ├── nuscenes
    │   │   ├── maps
    │   │   ├── samples
    │   │   ├── sweeps
    │   │   ├── v1.0-test
    |    |   ├── v1.0-trainval

  3. 构建镜像

    cd docker && docker build . -t bevfusion

  4. 启动容器

由于我的数据集是从另一个盘软链接过来的,如果单纯的映射bevfusion下面的data文件夹进入容器内,是访问不了数据集的,所以需要在启动容器的时候,额外映射软链接的目录进去。

如下图如果没有映射data2进容器,是无法访问数据的


所以我的启动容器的方法为

nvidia-docker run -it -v ./data:/dataset -v /data2:/data2 --shm-size 16g bevfusion /bin/bash

编译环境

cd home && git clone https://github.com/mit-han-lab/bevfusion && cd bevfusion python setup.py develop

数据处理

进入容器内,在容器内处理数据

python tools/create_data.py nuscenes --root-path /dataset/nuscenes --out-dir /dataset/nuscenes --extra-tag nuscenes

报错1most likely due to a circular import

ImportError: cannot import name 'feature_decorator_ext' from partially initialized module 'mmdet3d.ops.feature_decorator' (most likely due to a circular import) (/home/bevfusion/mmdet3d/ops/feature_decorator/__init__.py)

修改/home/bevfusion/mmdet3d/ops/feature_decorator/feature_decorator.py

注释第四行

import torch 


#from . import feature_decorator_ext

报错2 module 'numpy' has no attribute 'long';

AttributeError: module 'numpy' has no attribute 'long'

https://github.com/open-mmlab/mmdetection3d/issues/2821

解决方案pip install numpy==1.22

下面就是开始生成数据了

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐