Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
maskrcnn
Commits
e94ba698
Commit
e94ba698
authored
May 30, 2025
by
zhanggezhong
Browse files
Update README.md
parent
95a3fbc4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
27 deletions
+48
-27
README.md
README.md
+48
-27
No files found.
README.md
View file @
e94ba698
# <div align="center"><strong>Mask-RCNN</strong></div>
## 简介
Mask R-CNN 是在 Faster R-CNN 架构的基础上发展而来的,Faster R-CNN 是一种经典的两阶段目标检测算法,主要由骨干网络(Backbone)、区域建议网络(Region Proposal Network, RPN)和检测头(Detection Head)三部分组成。Mask R-CNN 在 Faster R-CNN 的基础上添加了一个用于生成目标掩码(mask)的分支,形成了一个多任务学习框架。
## 安装
组件支持组合
### 适用环境
| PyTorch版本 | fastpt版本 |Mask-RCNN版本 | DTK版本 | Python版本 | 推荐编译方式 |
| ----------- | ----------- | ----------- | ------------------------ | -----------------| ------------ |
| 2.5.1 | 2.1.0 |0.1 | >= 25.04 | 3.8、3.10、3.11 | fastpt不转码 |
| 2.4.1 | 2.0.1 |0.1 | >= 25.04 | 3.8、3.10、3.11 | fastpt不转码 |
-
ubuntu20.04 或 rocky8.6
-
Python==3.10
+
pytorch版本大于2.4.1 && dtk版本大于25.04 推荐使用fastpt不转码编译。
-
PyTorch==2.4.1 DTK=25.04
### 源码编译安装
### 1、使用pip方式安装
maskrcnn whl包下载目录:
[
光和开发者社区
](
https://download.sourcefind.cn:65024/4/main
)
,选择对应的pytorch版本和python版本下载对应maskrcnn的whl包
```
shell
pip
install
torch
*
(
下载torch的whl包
)
pip
install
fastpt
*
--no-deps
(
下载fastpt的whl包
)
source
/usr/local/bin/fastpt
-E
pip
install
maskrcnn
*
(
下载的maskrcnn-fastpt的whl包
)
```
### 2、使用源码编译方式安装
#### 编译环境准备
提供基于fastpt不转码编译:
-
拉取maskrcnn代码
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
git clone
-b
maskrcnn-hcu https://developer.sourcefind.cn/codes/OpenDAS/maskrcnn.git
pip
install
torch
*
(
下载torch的whl包
)
pip
install
fastpt
*
--no-deps
(
下载fastpt的whl包, 安装顺序,先安装torch,后安装fastpt
)
pip
install
setuptools
==
59.5.0 wheel
```
#### 编译安装
-
执行编译命令并安装
#### 源码编译安装
-
代码下载
```
shell
pip3
install
fastpt-2.0.1+das.dtk2504-py3-none-any.whl
#以torch2.4.1,dtk2504为例
source
/usr/local/bin/fastpt
-c
git checkout v0.1-fastpt
git clone https://developer.sourcefind.cn/codes/OpenDAS/maskrcnn.git
# 根据编译需要切换分支
```
-
提供2种源码编译方式(进入maskrcnn目录):
```
1. 设置不转码编译环境变量
source /usr/local/bin/fastpt -C
2. 编译whl包并安装
cd NVIDIA/benchmarks/maskrcnn/implementations/pytorch/maskrcnn
python3 setup.py bdist_wheel
pip3
install
dist/maskrcnn
*
python3 setup.py -v bdist_wheel
pip install dist/maskrcnn*
3. 源码编译安装
python3 setup.py install
```
-
验证安装
#### 注意事项
+
若使用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
## 验证
使用时执行
```
shell
source
/usr/local/bin/fastpt
-e
...
...
@@ -51,13 +73,12 @@ Type "help", "copyright", "credits" or "license" for more information.
0.1
>>>
```
版本号与官方版本同步,查询该软件的版本号,例如0.1;
## Known Issue
-
无
## 其他参考
## 参考资料
-
[
README_ORIGIN
](
README_ORIGIN.md
)
-
[
G
it
H
ub
](
https://github
.com/mlcommons/training_results_v3.1
)
-
[
README_zh-CN
](
README_zh-CN.md
)
-
[
https://g
it
h
ub.com/mlcommons/training_results_v3.1
/tree/main/NVIDIA/benchmarks/maskrcnn/implementations/pytorch/maskrcnn
](
https://github.com/mlcommons/training_results_v3.1/tree/main/NVIDIA/benchmarks/maskrcnn/implementations/pytorch/maskrcnn
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment