rainofmine/Face_Attention_Network
소개
얼굴 어텐션 네트워크의 PyTorch 구현
시스템 및 인프라측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalFace Attention Network
Pytorch implementation of face attention network as described in Face Attention Network: An Effective Face Detector for the Occluded Faces. The baseline is RetinaNet followed by this repo.

Requirements
- Python3
- Pytorch0.4
- torchvision
- tensorboardX
Installation
Install packages.
sudo apt-get install tk-dev python-tk
pip install cffi
pip install cython
pip install pandas
pip install tensorboardX
Build NMS.
cd Face_Attention_Network/lib
sh build.sh
Create folders.
cd Face_Attention_Network/
mkdir ckpt mAP_txt summary weight
Datasets
You should prepare three CSV or TXT files including train annotations file, valid annotations file and label encoding file.
Annotations format
Two examples are as follows:
$image_path/img_1.jpg x1 y1 x2 y2 label
$image_path/img_2.jpg . . . . .
Images with more than one bounding box should use one row per box. When an image does not contain any bounding box, set them '.'.
Label encoding file
A TXT file (classes.txt) is needed to map label to ID. Each line means one label name and its ID. One example is as follows:
face 0
Pretrained Model
We use resnet18, 34, 50, 101, 152 as the backbone. You should download them and put them to /weight.
- resnet18: https://download.pytorch.org/models/resnet18-5c106cde.pth
- resnet34: https://download.pytorch.org/models/resnet34-333f7ec4.pth
- resnet50: https://download.pytorch.org/models/resnet50-19c8e357.pth
- resnet101: https://download.pytorch.org/models/resnet101-5d3b4d8f.pth
- resnet152: https://download.pytorch.org/models/resnet152-b121ed2d.pth
Training
python train.py --csv_train <$path/train.txt> --csv_val <$path/val.txt> --csv_classes <$path/classes.txt> --depth <50> --pretrained resnet50-19c8e357.pth --model_name <model name to save>
Visualization Result
Detection result

Attention map at different level (P3~P7)

Reference
관련 프로젝트 살펴보기
불러오는 중…