Skip to content

ledaiduongvnth/VILOFACE

Repository files navigation

VILOFACE: A face detector based on You Only Look Once

Thanks to the official implementation of YOLOv7 https://github.com/WongKinYiu/yolov7

Thanks to the initial implementation of YOLOv7-face https://github.com/derronqi/yolov7-face

Prerequisite

  • python 3.9 or higher
  • Ubuntu 18 or higher

Hardware:

  • GPU: 3 x NVIDIA RTX 2080Ti GPUs
  • CPU: 1 x intel core i9 9900K
  • RAM: 128 GB Ram

Data preprocessing

Update

  • 30/10: WiderFace dataset for yolov7-face: Google Drive
  • 29/10: New annotation for YOLOv7 Face (Unofficial)

Raw dataset preparation WIDERFACE

yolov7-face-label

Download both the WIDERFACE dataset and the landmarks annotation for yolov7. Then organize your stuffs following the structure below (Images are taken from WIDERFACE while the equivalent .txt file can be found in yolov7-face-label):

dataset
|-- WIDERFACE_retina
|---- train
|-------- image_name_abcxyz.jpg
|-------- image_name_abcxyz.txt
|---- val
|-------- image_name_abcxyz.jpg
|-------- image_name_abcxyz.txt

Dataset for official YOLOv5-v7 implementation

Unfortunately, the official WIDERFACE Dataset doesn't have landmarks information. However, landmarks annotation can be found at the repository of RetinaFace-Pytorch. After getting a heap of raw datasets, organize your stuffs following the structure below:

dataset
|-- WIDERFACE_retina
|---- train
|-------- images
|-------- label.txt
|---- val
|-------- images
|-------- label.txt

Note: The structure mentioned above is optional.

To create WIDERFACE dataset following YOLOv5-v7 style, just run

python preprocessing.py

Optional Argument:

  • --save_images: (boolean) save images
  • --root_dir: (string) path to the WIDERFACE_retina dataset (default: dataset/WIDERFACE_retina)
  • --write_landmark: (boolean) save annotation having landmark information
  • --saved_folder: (boolean) path to the destination (default: dataset/WIDERFACE_yolov5)

You may have to install widerface python package via script:

pip install python-widerface

Train and test the the YOLOv7 model

The methods of training model are refered from The offical Implementation of YOLOv7. An example of training is given in training_example.sh file (GPU inference is required).

Model weight that achieve 81.45 AP on WiderFace validation hard set [VILOFACE]https://drive.google.com/file/d/19XlfTA9Yn6lo7XTujFeOsKJzXYRLuLza/view?usp=sharing

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages