Commit 892fc949 authored by fengzch-das's avatar fengzch-das
Browse files

update readme

parent f4ac1567
# D2Go
# <div align="center"><strong>D2Go</strong></div>
D2Go is a production ready software system from FacebookResearch, which supports end-to-end model training and deployment for mobile platforms.
## 1 简介
## What's D2Go
D2Go 是 FacebookResearch 开发的生产就绪软件系统,支持移动平台的端到端模型训练和部署。
- It is a deep learning toolkit powered by [PyTorch](https://pytorch.org/) and [Detectron2](https://github.com/facebookresearch/detectron2).
- State-of-the-art efficient backbone networks for mobile devices.
- End-to-end model training, quantization and deployment pipeline.
- Easy export to TorchScript format for deployment.
## 2 安装
## Installation
组件支持组合
Install PyTorch Nightly (use CUDA 10.2 as example, see details at [PyTorch Website](https://pytorch.org/get-started/)):
| PyTorch版本 | fastpt版本 | cuBVH版本 | DTK版本 | Python版本 | 推荐编译方式 |
| ----------- | ---------- | ------------- | -------- | --------------- | ------------ |
| 2.5.1 | 2.1.0 | main-eeb9d5fa | >= 25.04 | 3.8、3.10、3.11 | fastpt不转码 |
| 2.4.1 | 2.0.1 | main-eeb9d5fa | >= 25.04 | 3.8、3.10、3.11 | fastpt不转码 |
```bash
conda install pytorch torchvision cudatoolkit=10.2 -c pytorch-nightly
+ pytorch 版本大于 2.4.1 && dtk 版本大于 25.04 推荐使用 fastpt 不转码编译。
### 2.1 使用pip方式安装
d2go whl 包下载目录:[光和开发者社区](https://download.sourcefind.cn:65024/4/main),选择对应的 pytorch 版本和 python 版本下载对应 d2go 的 whl 包:
```shell
pip install torch* # 下载torch的whl包
pip install fastpt* --no-deps # 下载fastpt的whl包
source /usr/local/bin/fastpt -E
pip install d2go* # # 下载的 d2go-fastpt 的whl包
```
Install Detectron2 (other installation options at [Detectron2](https://github.com/facebookresearch/detectron2/blob/master/INSTALL.md)):
### 2.2 使用源码编译方式安装
```bash
python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
#### 2.2.1 编译环境准备
提供基于 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 pytest scikit-learn
```
Install mobile_cv:
#### 2.2.2 源码编译安装
```bash
python -m pip install 'git+https://github.com/facebookresearch/mobile-vision.git'
- 代码下载
```shell
git clone http://developer.sourcefind.cn/codes/OpenDAS/d2go.git # 根据编译需要切换分支
```
Install d2go:
- 提供2种源码编译方式(进入 d2go 目录):
- 源码编译安装:
```bash
source /usr/local/bin/fastpt -C
python -m pip install 'git+https://github.tbedu.top/https://github.com/facebookresearch/detectron2.git'
python -m pip install 'git+https://github.tbedu.top/https://github.com/facebookresearch/mobile-vision.git'
python setup.py develop
python setup.py install
```
- whl 包构建安装:
```bash
source /usr/local/bin/fastpt -C
python setup.py bdist_wheel # 该指令用于编译whl包,执行该指令时不必执行前两个指令
pip install dist/d2go-0.0.1b20250528-py3-none-any.whl
```
#### 2.2.3 注意事项
+ ROCM_PATH 为 dtk 的路径,默认为 /opt/dtk;
+ 在 pytorch2.5.1 环境下编译需要支持 c++17 语法,打开setup.py文件,把文件中的 -std=c++14 修改为 -std=c++17。
## 3 验证
- 执行下面的命令测试组件:
```bash
git clone https://github.com/facebookresearch/d2go
cd d2go & python -m pip install .
```
source /usr/local/bin/fastpt -E
## Get Started
pytest -vs ./tests
- [Getting Started with D2Go](./demo).
```
- See our [model zoo](./MODEL_ZOO.md) for example configs and pretrained models.
## 4 Known Issue
## License
-
D2Go is released under the [Apache 2.0 license](LICENSE).
## 5 参考资料
- [README_ORIGIN](README_ORIGIN.md)
- [https://github.com/facebookresearch/d2go.git](https://github.com/facebookresearch/d2go.git)
# D2Go
D2Go is a production ready software system from FacebookResearch, which supports end-to-end model training and deployment for mobile platforms.
## What's D2Go
- It is a deep learning toolkit powered by [PyTorch](https://pytorch.org/) and [Detectron2](https://github.com/facebookresearch/detectron2).
- State-of-the-art efficient backbone networks for mobile devices.
- End-to-end model training, quantization and deployment pipeline.
- Easy export to TorchScript format for deployment.
## Installation
Install PyTorch Nightly (use CUDA 10.2 as example, see details at [PyTorch Website](https://pytorch.org/get-started/)):
```bash
conda install pytorch torchvision cudatoolkit=10.2 -c pytorch-nightly
```
Install Detectron2 (other installation options at [Detectron2](https://github.com/facebookresearch/detectron2/blob/master/INSTALL.md)):
```bash
python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
```
Install mobile_cv:
```bash
python -m pip install 'git+https://github.com/facebookresearch/mobile-vision.git'
```
Install d2go:
```bash
git clone https://github.com/facebookresearch/d2go
cd d2go & python -m pip install .
```
## Get Started
- [Getting Started with D2Go](./demo).
- See our [model zoo](./MODEL_ZOO.md) for example configs and pretrained models.
## License
D2Go is released under the [Apache 2.0 license](LICENSE).
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment