README.md 2.76 KB
Newer Older
zhanggzh's avatar
zhanggzh committed
1
2
3
4
# <div align="center"><strong>OpenPCDet</strong></div>
## 简介
OpenPCDet是一个清晰、简单、独立的开源项目,用于基于 LiDAR 的 3D 对象检测。
它也是 [PointRCNN]、[Part-A2-Net]、[PV-RCNN]、[Voxel R-CNN]、[PV-RCNN++] 和 [MPPNet] 的官方代码版本。
zhanggezhong's avatar
zhanggezhong committed
5

zhanggzh's avatar
zhanggzh committed
6
## 安装
zhanggezhong's avatar
zhanggezhong committed
7
8
9
10
11
12
13
14
15
16
组件支持组合

   | PyTorch版本 | fastpt版本  |OpenPCDet版本      | DTK版本                  | Python版本       | 推荐编译方式 |
   | ----------- | ----------- | ----------- | ------------------------ | -----------------| ------------ |
   | 2.5.1       | 2.1.0       |0.6.0        | >= 25.04                 | 3.8、3.10、3.11  | fastpt不转码 |
   | 2.4.1       | 2.0.1       |0.6.0        | >= 25.04                 | 3.8、3.10、3.11  | fastpt不转码 |
   | 其他        | 其他         | 其他        | 其他                     | 3.8、3.10、3.11  | hip转码      |

+ pytorch版本大于2.4.1 && dtk版本大于25.04 推荐使用fastpt不转码编译。

zhanggezhong's avatar
zhanggezhong committed
17
### 1、使用源码编译方式安装
zhanggezhong's avatar
zhanggezhong committed
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

#### 编译环境准备
提供基于fastpt不转码编译:

1. 基于光源pytorch基础镜像环境:镜像下载地址:[光合开发者社区](https://sourcefind.cn/#/image/dcu/pytorch),根据pytorch、python、dtk及系统下载对应的镜像版本。

2. 基于现有python环境:安装pytorch,fastpt whl包下载目录:[光合开发者社区](https://sourcefind.cn/#/image/dcu/pytorch),根据python、dtk版本,下载对应pytorch的whl包。安装命令如下:
```shell
pip install torch* (下载torch的whl包)
pip install fastpt* --no-deps (下载fastpt的whl包, 安装顺序,先安装torch,后安装fastpt)
pip install setuptools==59.5.0 wheel
```

#### 源码编译安装
- 代码下载
```shell
git clone https://developer.sourcefind.cn/codes/OpenDAS/openpcdet.git # 根据编译需要切换分支
```
zhanggezhong's avatar
zhanggezhong committed
36
- 进入openpcdet目录:
zhanggezhong's avatar
zhanggezhong committed
37
38
39
40
41
```
1. 设置不转码编译环境变量
source /usr/local/bin/fastpt -C

3. 源码编译安装
zhanggezhong's avatar
zhanggezhong committed
42
python3 setup.py develop
zhanggezhong's avatar
zhanggezhong committed
43
44
45
46
47
48
49
```
#### 注意事项
+ 若使用pip install下载安装过慢,可添加pypi清华源:-i https://pypi.tuna.tsinghua.edu.cn/simple/
+ ROCM_PATH为dtk的路径,默认为/opt/dtk
+ 在pytorch2.5.1环境下编译需要支持c++17语法,打开setup.py文件,把文件中的 -std=c++14 修改为 -std=c++17

## 验证
Shaoshuai Shi's avatar
Shaoshuai Shi committed
50
```
zhanggzh's avatar
zhanggzh committed
51
python3
zhanggezhong's avatar
zhanggezhong committed
52
53
54
55
56
57
Python 3.10.12 (main, Feb  4 2025, 14:57:36) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pcdet
>>> pcdet.__version__
'0.6.0+bfcebc0'
>>>
Shaoshuai Shi's avatar
Shaoshuai Shi committed
58
```
zhanggezhong's avatar
zhanggezhong committed
59
60
61
62
版本号与官方版本同步,查询该软件的版本号,例如0.6.0;

## Known Issue
-
Shaoshuai Shi's avatar
Shaoshuai Shi committed
63

zhanggezhong's avatar
zhanggezhong committed
64
65
66
67
## 参考资料
- [README_ORIGIN](README_ORIGIN.md)
- [README_zh-CN](README_zh-CN.md)
- [https://github.com/open-mmlab/OpenPCDet](https://github.com/open-mmlab/OpenPCDet)