README.md 1.49 KB
Newer Older
zhanggezhong's avatar
zhanggezhong committed
1
# <div align="center"><strong>Mask-RCNN</strong></div>
zhanggezhong's avatar
zhanggezhong committed
2

zhanggezhong's avatar
zhanggezhong committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
## 简介

Mask R-CNN 是在 Faster R-CNN 架构的基础上发展而来的,Faster R-CNN 是一种经典的两阶段目标检测算法,主要由骨干网络(Backbone)、区域建议网络(Region Proposal Network, RPN)和检测头(Detection Head)三部分组成。Mask R-CNN 在 Faster R-CNN 的基础上添加了一个用于生成目标掩码(mask)的分支,形成了一个多任务学习框架。

## 安装

### 适用环境

- ubuntu20.04 或 rocky8.6

- Python==3.10

- PyTorch==2.4.1 DTK=25.04

### 源码编译安装

#### 编译环境准备

- 拉取maskrcnn代码

```shell
git clone -b maskrcnn-hcu https://developer.sourcefind.cn/codes/OpenDAS/maskrcnn.git
```

#### 编译安装

- 执行编译命令并安装

```shell
32
33
34
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
zhanggezhong's avatar
zhanggezhong committed
35
36
cd NVIDIA/benchmarks/maskrcnn/implementations/pytorch/maskrcnn
python3  setup.py  bdist_wheel
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
pip3 install dist/maskrcnn*
```
- 验证安装
使用时执行
```shell
source /usr/local/bin/fastpt -e
```

```shell
python3
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 maskrcnn_benchmark
>>> maskrcnn_benchmark.__version__
0.1
>>>
zhanggezhong's avatar
zhanggezhong committed
53
54
55
56
57
58
59
60
61
62
63
```

## Known Issue

-

## 其他参考

- [README_ORIGIN](README_ORIGIN.md)

- [GitHub](https://github.com/mlcommons/training_results_v3.1)