https://github.com/jianzhnie/pyramidbox_pytorch
pytorch实现的Pyramidbox 人脸检测模型, 对原来代码的部分模块进行了修改,更简洁高效
https://github.com/jianzhnie/pyramidbox_pytorch
facedetection pyramidbox pytorch ssd
Last synced: 9 months ago
JSON representation
pytorch实现的Pyramidbox 人脸检测模型, 对原来代码的部分模块进行了修改,更简洁高效
- Host: GitHub
- URL: https://github.com/jianzhnie/pyramidbox_pytorch
- Owner: jianzhnie
- Created: 2019-11-17T08:23:53.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-12-08T11:58:35.000Z (over 5 years ago)
- Last Synced: 2024-12-29T13:45:22.892Z (over 1 year ago)
- Topics: facedetection, pyramidbox, pytorch, ssd
- Language: Python
- Homepage:
- Size: 73.7 MB
- Stars: 22
- Watchers: 5
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## A PyTorch Implementation of PyramidBox ##
[PyramidBox: A Context-assisted Single Shot Face Detector.](https://arxiv.org/abs/1803.07737)
### Description
I train pyramidbox with pytorch and the result approaches the original paper result,the pretrained model can be downloaded in [vgg](https://pan.baidu.com/s/1Q-YqoxJyqvln6KTcIck1tQ),the final model can be downloaded in [Pyramidbox](https://pan.baidu.com/s/1VtzgB9srkJY4SUtVM3n8tw).the AP in WIDER
FACE as following:
| | Easy MAP | Medium MAP | hard MAP |
| -------- | ---------|------------| --------- |
| origin paper| 0.960 | 0.948 | 0.888 |
| this repo | 0.948 | 0.938 | 0.880 |
the AP in AFW,PASCAL,FDDB as following:
| AFW | PASCAL | FDDB |
| --------- |-----------| ---------|
| 99.65 | 99.02 | 0.983 |
the gap is small with origin paper,I train 120k batch_size 4 which is different from paper,which maybe cause the gap,if you have more gpu ,the final result maybe better.
### Requirement
* pytorch 1.3
* opencv
* numpy
* easydict
### Prepare data
1. download WIDER face dataset
2. modify data/config.py
3. ``` python tools/prepare_wider_data.py```
### Train
```
python main.py --batch_size 4
--lr 5e-4
```
### Evalution
according to yourself dataset path,modify data/config.py
1. Evaluate on AFW.
```
python tools/afw_test.py
```
2. Evaluate on FDDB
```
python tools/fddb_test.py
```
3. Evaluate on PASCAL face
```
python tools/pascal_test.py
```
4. test on WIDER FACE
```
python tools/wider_test.py
```
### Demo
you can test yourself image
```
python demo.py
```
### Result
### References
* [PyramidBox: A Context-assisted Single Shot Face Detector](https://arxiv.org/abs/1803.07737)
* [PyramidBox model](https://github.com/PaddlePaddle/models/tree/develop/fluid/PaddleCV/face_detection)
* [S3FD_pytorch](https://github.com/jianzhnie/S3FD_pytorch)
* [ssd.pytorch](https://github.com/amdegroot/ssd.pytorch)