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
ModelZoo
CenterFace_pytorch
Commits
2fef4e64
Commit
2fef4e64
authored
Jul 05, 2024
by
Rayyyyy
Browse files
Add icon and SCNet
parent
cc1bb604
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
33 deletions
+20
-33
README.md
README.md
+19
-29
docker/Dockerfile
docker/Dockerfile
+1
-4
icon.png
icon.png
+0
-0
No files found.
README.md
View file @
2fef4e64
...
...
@@ -30,29 +30,25 @@ CenterFace模型是一种基于单阶段人脸检测算法,作者借鉴了Cent
-v 路径、docker_name和imageID根据实际情况修改
```
docker pull image.sourcefind.cn:5000/dcu/admin/base/pytorch:1.13.1-centos7.6-dtk-23.04-py38-latest
```
bash
docker pull image.sourcefind.cn:5000/dcu/admin/base/pytorch:2.1.0-centos7.6-dtk23.10.1-py38
docker run
-it
-v
/path/your_code_data/:/path/your_code_data/
--shm-size
=
32G
--privileged
=
true
--device
=
/dev/kfd
--device
=
/dev/dri/
--group-add
video
--name
docker_name imageID bash
cd
/your_code_path/centerface_pytorch/
pip3
install
-r
requirements.txt
```
### Dockerfile(方法二)
-v 路径、docker_name和imageID根据实际情况修改
```
```
bash
cd
./docker
cp ../requirements.txt requirements.txt
docker build
--no-cache
-t
centerface:latest
.
docker run
-it
-v
/path/your_code_data/:/path/your_code_data/
--shm-size
=
32G
--privileged
=
true
--device
=
/dev/kfd
--device
=
/dev/dri/
--group-add
video
--name
docker_name imageID bash
cd
/your_code_path/centerface_pytorch/
pip3
install
-r
requirements.txt
```
### Anaconda(方法三)
...
...
@@ -60,9 +56,9 @@ docker run -it -v /path/your_code_data/:/path/your_code_data/ --shm-size=32G --p
1、关于本项目DCU显卡所需的特殊深度学习库可从光合开发者社区下载安装: https://developer.hpccube.com/tool/
```
DTK软件栈:dtk23.
04
DTK软件栈:dtk23.
10.1
python:python3.8
torch:
1
.1
3.1
torch:
2
.1
.0
torchvision:0.14.1
```
`Tips:以上dtk驱动、python、paddle等DCU相关工具版本需要严格一一对应`
...
...
@@ -75,7 +71,7 @@ pip3 install -r requirements.txt
## 数据集
WIDER_FACE
:
http://
shuoyang1213.me/WIDERFACE/index.html
[
WIDER_FACE
](
http://
113.200.138.88:18080/aidatasets/project-dependency/wider_face
)
<div
align=
center
>
<img
src=
"./doc/datasets.png"
/>
...
...
@@ -100,12 +96,12 @@ WIDER_FACE:http://shuoyang1213.me/WIDERFACE/index.html
│ ├── ........
│ └── 61--Street_Battle: 对应该类别的所有图片
│ ├── WIDER_val: 验证集解压后的文件目录
│ └──
images:
│ └── images:
│ ├── 0--Parade: 对应该类别的所有图片
│ ├── ........
│ └── 61--Street_Battle: 对应该类别的所有图片
│ ├── WIDER_test: 训练集解压后的文件目录
│ └──
images:
│ └── images:
│ ├── 0--Parade: 对应该类别的所有图片
│ ├── ........
│ └── 61--Street_Battle: 对应该类别的所有图片
...
...
@@ -153,8 +149,7 @@ x, y, w, h, left_eye_x, left_eye_y, flag, right_eye_x, right_eye_y, flag, nose_x
```
3.
生成训练所需的json格式标注数据:
```
```
bash
cd
./datasets
python gen_data.py
```
...
...
@@ -163,27 +158,23 @@ python gen_data.py
## 训练
默认训练模型保存在./exp/下,如需修改为自己的路径,可以对centerface_pytorch/src/lib/opts_pose.py的284行进行修改
默认训练模型保存在./exp/下,如需修改为自己的路径,可以对
`centerface_pytorch/src/lib/opts_pose.py`
的284行进行修改
### 单机单卡
```
```
bash
cd
./src
bash train.sh
```
### 单机多卡
```
```
bash
cd
./src
bash train_multi.sh
```
## 推理
#### 单卡推理
```
```
bash
cd
lib/external/
bash make.sh
cd
../../
...
...
@@ -191,19 +182,18 @@ python test_wider_face.py
```
## result
<div
align=
center
>
<img
src=
"./doc/draw_img.jpg"
/>
</div>
### 精度
WIDER_FACE验证集上的测试结果如下
WIDER_FACE验证集上的测试结果如下
:
|
Method
| Easy(AP) | Medium(AP) | Hard(AP)|
|
Device
| Easy(AP) | Medium(AP) | Hard(AP)|
| :------: | :------: | :------: | :------: |
|
ours(one scale)
| 0.9264 | 0.9133 | 0.7479 |
|
original
| 0.922 | 0.911 | 0.782|
|
Z100L
| 0.9264 | 0.9133 | 0.7479 |
|
V100S
| 0.922 | 0.911 | 0.782|
## 应用场景
### 算法类别
...
...
docker/Dockerfile
View file @
2fef4e64
FROM
image.sourcefind.cn:5000/dcu/admin/base/pytorch:1.13.1-centos7.6-dtk-23.04-py38-latest
RUN
source
/opt/dtk/env.sh
COPY
requirments.txt requirments.txt
RUN
pip3
install
-r
requirements.txt
FROM
image.sourcefind.cn:5000/dcu/admin/base/pytorch:2.1.0-centos7.6-dtk23.10.1-py38
icon.png
0 → 100644
View file @
2fef4e64
77.3 KB
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