文件最后提交记录最后更新时间
fix:fix code/documentation formatting issues using pre-commit Co-authored-by: xiaohuizhu1037<zhuxiaohui13@huawei.com> # message auto-generated for no-merge-commit merge: !2043 merge master into master fix:fix code/documentation formatting issues using pre-commit Created-by: xiaohuizhu1037 Commit-by: xiaohuizhu1037 Merged-by: ascend-robot Description: ## What this PR does / why we need it? 使用pre-commit扫描仓库的全量代码/文档并进行格式修复。 ## Does this PR introduce any user-facing change? 会对代码/文档做格式修改。 ## How was this patch tested? 工具自动修复和人工审视。 See merge request: Ascend/DrivingSDK!20437 天前
docs: add bevformer/sparse4d A5 configs. Co-authored-by: xiao-shaoning<xiaoshaoning@h-partners.com> # message auto-generated for no-merge-commit merge: !2015 merge master into master docs: add bevformer/sparse4d A5 configs. Created-by: xiao-shaoning Commit-by: xiao-shaoning Merged-by: ascend-robot Description: ## What this PR does / why we need it? Please describe the background and detailed changes of the PR. If it is a bugfix, please attach the related issue. add Sparse4D、BEVFormer A5 readme ## Does this PR introduce any user-facing change? Please describe whether the PR will result in any user-facing usage changes. If there is related documentation, please specify its path. N/A ## How was this patch tested? Please explain how to verify the correctness and effectiveness of this feature, as well as its usage constraints and limitations. N/A See merge request: Ascend/DrivingSDK!201517 天前
更新BEVFormer模型FP16训练使用私有格式 Co-authored-by: zhangchenrui<zhangchenrui2@huawei.com> # message auto-generated for no-merge-commit merge: !1823 merge master into master 更新BEVFormer模型FP16训练使用私有格式 Created-by: zhangchenrui2 Commit-by: zhangchenrui Merged-by: ascend-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 更新BEVFormer模型FP16训练使用私有格式,bn和relu走5hd格式,减少transdata,提升模型性能 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #123--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: Ascend/DrivingSDK!18235 个月前
新增BEVFormer模型A5适配 Co-authored-by: xiao-shaoning<xiaoshaoning@h-partners.com> # message auto-generated for no-merge-commit merge: !1914 merge master into master 新增BEVFormer模型A5适配 Created-by: xiao-shaoning Commit-by: xiao-shaoning Merged-by: ascend-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 新增BEVFormer模型A5适配 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #123--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> 新增BEVFormer文件夹下4个a5适配文件 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: Ascend/DrivingSDK!19143 个月前
feat: openvla pt2.7.1 adaption and env adjustment. Co-authored-by: xiao-shaoning<xiaoshaoning@h-partners.com> # message auto-generated for no-merge-commit merge: !2055 merge master into master feat: openvla pt2.7.1 adaption and env adjustment. Created-by: xiao-shaoning Commit-by: xiao-shaoning Merged-by: ascend-robot Description: ## What this PR does / why we need it? Please describe the background and detailed changes of the PR. If it is a bugfix, please attach the related issue. openvla pt2.7.1 adaption and env adjustment ## Does this PR introduce any user-facing change? Please describe whether the PR will result in any user-facing usage changes. If there is related documentation, please specify its path. N/A ## How was this patch tested? Please explain how to verify the correctness and effectiveness of this feature, as well as its usage constraints and limitations. openvla 模型 pt2.7.1 跑通 See merge request: Ascend/DrivingSDK!20559 天前
bevformer fix mmcv pin_memory bug Co-authored-by: 贺雨杰<heyujie8@huawei.com> # message auto-generated for no-merge-commit merge: !1726 merge master into master bevformer fix mmcv pin_memory bug Created-by: HHHyyyjjjjj Commit-by: 贺雨杰 Merged-by: ascend-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 修复 bevformer pin_memory 未生效 bug ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #123--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: Ascend/DrivingSDK!17266 个月前
!860 Update bevformer config. Merge pull request !860 from 刘哲续/master 1 年前
新增BEVFormer模型A5适配 Co-authored-by: xiao-shaoning<xiaoshaoning@h-partners.com> # message auto-generated for no-merge-commit merge: !1914 merge master into master 新增BEVFormer模型A5适配 Created-by: xiao-shaoning Commit-by: xiao-shaoning Merged-by: ascend-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 新增BEVFormer模型A5适配 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #123--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> 新增BEVFormer文件夹下4个a5适配文件 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: Ascend/DrivingSDK!19143 个月前
!1078 删除BEVFormer中出现的公网地址 Merge pull request !1078 from 贺雨杰/master 1 年前
update: modify bevformer/sparse4d A5 patch. Co-authored-by: xiao-shaoning<xiaoshaoning@h-partners.com> # message auto-generated for no-merge-commit merge: !1962 merge master into master update: modify bevformer/sparse4d A5 patch. Created-by: xiao-shaoning Commit-by: xiao-shaoning Merged-by: ascend-robot Description: ## What this PR does / why we need it? Please describe the background and detailed changes of the PR. If it is a bugfix, please attach the related issue. modify bevformer/sparse4d A5 patch to incorporate env adaption. ## Does this PR introduce any user-facing change? Please describe whether the PR will result in any user-facing usage changes. If there is related documentation, please specify its path. N/A ## How was this patch tested? Please explain how to verify the correctness and effectiveness of this feature, as well as its usage constraints and limitations. Verified on models. See merge request: Ascend/DrivingSDK!19622 个月前
fix:fix code/documentation formatting issues using pre-commit Co-authored-by: xiaohuizhu1037<zhuxiaohui13@huawei.com> # message auto-generated for no-merge-commit merge: !2043 merge master into master fix:fix code/documentation formatting issues using pre-commit Created-by: xiaohuizhu1037 Commit-by: xiaohuizhu1037 Merged-by: ascend-robot Description: ## What this PR does / why we need it? 使用pre-commit扫描仓库的全量代码/文档并进行格式修复。 ## Does this PR introduce any user-facing change? 会对代码/文档做格式修改。 ## How was this patch tested? 工具自动修复和人工审视。 See merge request: Ascend/DrivingSDK!20437 天前
fix:fix code/documentation formatting issues using pre-commit Co-authored-by: xiaohuizhu1037<zhuxiaohui13@huawei.com> # message auto-generated for no-merge-commit merge: !2043 merge master into master fix:fix code/documentation formatting issues using pre-commit Created-by: xiaohuizhu1037 Commit-by: xiaohuizhu1037 Merged-by: ascend-robot Description: ## What this PR does / why we need it? 使用pre-commit扫描仓库的全量代码/文档并进行格式修复。 ## Does this PR introduce any user-facing change? 会对代码/文档做格式修改。 ## How was this patch tested? 工具自动修复和人工审视。 See merge request: Ascend/DrivingSDK!20437 天前
fix:fix code/documentation formatting issues using pre-commit Co-authored-by: xiaohuizhu1037<zhuxiaohui13@huawei.com> # message auto-generated for no-merge-commit merge: !2043 merge master into master fix:fix code/documentation formatting issues using pre-commit Created-by: xiaohuizhu1037 Commit-by: xiaohuizhu1037 Merged-by: ascend-robot Description: ## What this PR does / why we need it? 使用pre-commit扫描仓库的全量代码/文档并进行格式修复。 ## Does this PR introduce any user-facing change? 会对代码/文档做格式修改。 ## How was this patch tested? 工具自动修复和人工审视。 See merge request: Ascend/DrivingSDK!20437 天前
feat: openvla pt2.7.1 adaption and env adjustment. Co-authored-by: xiao-shaoning<xiaoshaoning@h-partners.com> # message auto-generated for no-merge-commit merge: !2055 merge master into master feat: openvla pt2.7.1 adaption and env adjustment. Created-by: xiao-shaoning Commit-by: xiao-shaoning Merged-by: ascend-robot Description: ## What this PR does / why we need it? Please describe the background and detailed changes of the PR. If it is a bugfix, please attach the related issue. openvla pt2.7.1 adaption and env adjustment ## Does this PR introduce any user-facing change? Please describe whether the PR will result in any user-facing usage changes. If there is related documentation, please specify its path. N/A ## How was this patch tested? Please explain how to verify the correctness and effectiveness of this feature, as well as its usage constraints and limitations. openvla 模型 pt2.7.1 跑通 See merge request: Ascend/DrivingSDK!20559 天前
README.md

BEVFormer

概述

BEVFormer 通过提取环视相机采集到的图像特征,并将提取的环视特征通过模型学习的方式转换到 BEV 空间(模型去学习如何将特征从 图像坐标系转换到 BEV 坐标系),从而实现 3D 目标检测和地图分割任务。

  • 参考实现:

    url=https://github.com/fundamentalvision/BEVFormer
    commit_id=66b65f3a1f58caf0507cb2a971b9c0e7f842376c
    

支持模型

Backbone Method 训练方式
R101-DCN BEVFormer-base FP32
R101-DCN BEVFormer-base 混合精度训练

准备训练环境

安装昇腾环境

请参考昇腾社区中《Pytorch框架训练环境准备》文档搭建昇腾环境。本仓已支持表1中软件版本。

表 1 昇腾软件版本支持表

软件类型 首次支持版本
FrameworkPTAdapter 7.0.0
CANN 8.1.RC1

安装模型环境

  • 当前模型支持的 PyTorch 版本如下表所示。

    表 2 版本支持表

    Torch_Version
    PyTorch 2.1.0
    PyTorch 2.6.0
    PyTorch 2.7.1
  • 安装 Driving SDK 加速库

  • 克隆代码仓到当前目录

  • 推荐使用依赖安装一键配置脚本,可使用如下指令安装后续基础依赖、其他依赖、模型代码更新:

    bash install_BEVFormer.sh
    

    这里需要根据pytorch版本修改脚本,使用对应的requirements文件,一键配置脚本默认使用torch2.1.0的requirements.txt

  • 根据pytorch版本在模型根目录下安装依赖

    若服务器为A2/A3,安装步骤如下:

    • torch2.1.0
    pip install -r requirements.txt
    
    • torch2.6.0
    pip install -r requirements_pytorch2.6.0.txt
    
    • torch2.7.1
    pip install -r requirements_pytorch2.7.1.txt
    

    若服务器为A5,安装步骤如下:

    • A5 torch2.7.1
     pip install -r requirements_pytorch2.7.1_a5.txt
    
  • 安装其他依赖

    1. 源码编译安装 mmcv 1.x

      git clone -b 1.x https://github.com/open-mmlab/mmcv.git
      cp mmcv_config.patch mmcv
      cd mmcv
      git apply --reject mmcv_config.patch
      pip install -r requirements/runtime.txt
      MMCV_WITH_OPS=1 MAX_JOBS=8 FORCE_NPU=1 python setup.py build_ext
      MMCV_WITH_OPS=1 FORCE_NPU=1 python setup.py develop
      cd ..
      
    2. 源码安装 mmdetection3d v1.0.0rc4

      git clone -b v1.0.0rc4 https://github.com/open-mmlab/mmdetection3d.git
      cp mmdet3d_config.patch mmdetection3d
      cd mmdetection3d
      git apply --reject mmdet3d_config.patch
      pip install -e . --no-build-isolation
      cd ..
      
    3. 源码安装 mmdet 2.24.0

      若服务器为A2/A3,安装步骤如下:

      git clone -b v2.24.0 https://github.com/open-mmlab/mmdetection.git
      cp mmdet_config.patch mmdetection
      cd mmdetection
      git apply --reject mmdet_config.patch
      pip install -e . --no-build-isolation
      cd ..
      

      若服务器为A5,安装步骤如下:

      git clone -b v2.24.0 https://github.com/open-mmlab/mmdetection.git
      cp mmdet_a5.patch mmdetection
      cd mmdetection
      git apply --reject mmdet_a5.patch
      pip install -e . --no-build-isolation
      cd ..
      
    4. 安装 detectron2

      python -m pip install 'git+https://github.com/facebookresearch/detectron2.git' --no-build-isolation
      
  • 模型代码更新

    若服务器为A2/A3,步骤如下:

    git clone https://github.com/fundamentalvision/BEVFormer.git
    cp bev_former_config.patch BEVFormer
    cd BEVFormer
    git checkout 66b65f3a1f58caf0507cb2a971b9c0e7f842376c
    git apply --reject --whitespace=fix bev_former_config.patch
    cd ..
    

    若服务器为A5,步骤如下:

    git clone https://github.com/fundamentalvision/BEVFormer.git
    cp bevformer_a5.patch BEVFormer
    cp patch_a5.py BEVFormer/tools
    mv BEVFormer/tools/patch_a5.py BEVFormer/tools/patch.py
    cd BEVFormer
    git checkout 66b65f3a1f58caf0507cb2a971b9c0e7f842376c
    git apply --reject --whitespace=fix bevformer_a5.patch
    cd ..
    

准备数据集

  1. 用户需自行下载 nuScenes V1.0 full 和 CAN bus 数据集放置在BEVFormer模型代码目录下,结构如下:

     BEVFormer
     ├── data/
     │   ├── can_bus/
     │   ├── nuscenes/
     │   │   ├── maps/
     │   │   ├── samples/
     │   │   ├── sweeps/
     │   │   ├── v1.0-test/
     │   │   ├── v1.0-trainval/
     │   │   ├── nuscenes_infos_temporal_train.pkl
     │   │   ├── nuscenes_infos_temporal_val.pkl
    
  2. 数据预处理

    执行下面的命令进行数据预处理(若出现ModuleNotFoundError: No module named 'tools.data_converter'问题,参考FAQ进行处理)。

    python tools/create_data.py nuscenes --root-path ./data/nuscenes --out-dir ./data/nuscenes --extra-tag nuscenes --version v1.0 --canbus ./data
    

下载预训练权重

在BEVFormer模型代码目录下创建 ckpts 文件夹,下载预训练权重 r101_dcn_fcos3d_pretrain.pth

mkdir ckpts
cd ckpts
wget https://github.com/zhiqi-li/storage/releases/download/v1.0/r101_dcn_fcos3d_pretrain.pth
 BEVFormer
 ├── ckpts/
 │   ├── r101_dcn_fcos3d_pretrain.pth

开始训练

  • 单机8卡训练(fp32训练精度)

    bash test/train_full_8p_base_fp32.sh
    (option) bash test/train_full_8p_base_fp32.sh --epochs=4 --batch-size=1 --num-npu=8 # 8卡训练,默认训练24个epochs,这里只训练4个epochs
    
  • 单机8卡训练(fp32训练性能)

    bash test/train_performance_8p_base_fp32.sh
    (option) bash test/train_performance_8p_base_fp32.sh --batch-size=1 --num-npu=8 # 8卡性能
    
  • 单机8卡训练(混合精度训练精度)

    bash test/train_full_8p_base_fp16.sh
    (option) bash test/train_full_8p_base_fp16.sh --epochs=4 --batch-size=1 --num-npu=8 # 8卡训练,默认训练24个epochs,这里只训练4个epochs
    
  • 单机8卡训练(混合精度训练性能)

    bash test/train_performance_8p_base_fp16.sh
    (option) bash test/train_performance_8p_base_fp16.sh --batch-size=1 --num-npu=8 # 8卡性能
    

    模型训练脚本参数说明如下。

    公共参数:
    --batch-size                             //指定batchsize,默认值为1
    --num-npu                                //指定卡数,默认值为8
    精度训练脚本参数:
    --epochs                                 //指定训练epoch数,默认值为24
    

结果

NAME Backbone Method 训练方式 Epoch global batch size NDS mAP FPS
8p-Atlas 800T A2 R101-DCN BEVFormer-base FP32 4 8 44.23 35.52 3.66
8p-竞品A R101-DCN BEVFormer-base FP32 4 8 43.58 34.45 3.32
8p-Atlas 800T A2 R101-DCN BEVFormer-base FP32 4 16 - - 3.89
8p-竞品A R101-DCN BEVFormer-base FP32 4 16 - - 3.39
8p-Atlas 800T A2 R101-DCN BEVFormer-base 混合精度 4 8 46.23 37.92 3.33
8p-竞品A R101-DCN BEVFormer-base 混合精度 4 8 44.50 34.05 3.75
1p-A5 R101-DCN BEVFormer-base 混合精度 4 7 - - 1.35

版本说明

变更

2024.3.8:首次发布。

2025.1.6:更新发布。

2025.2.6:更新性能数据。

2025.4.23:base模型支持混合精度训练。

2025.8.7:增加batch_size=2性能,更新性能数据。

2026.1.19:更新对预处理数据集时出现的问题的处理办法。

2026.5.12:更新A5上的模型适配步骤。

FAQ

1、若执行数据预处理脚本过程中出现ModuleNotFoundError: No module named 'tools.data_converter'问题,参考bevformer 原仓的 issue( https://github.com/fundamentalvision/BEVFormer/issues/223 或者 https://github.com/fundamentalvision/BEVFormer/pull/241 )进行处理。