人脸检测mtcnn复现
本文最后更新于:2022年12月11日 晚上
Github: https://github.com/Enderfga/mtCNN_sysu
Joint Face Detection and Alignment using Multi-task Cascaded Convolutional Networks
This repo contains the code, data and trained models for the
paper Joint Face
Detection and Alignment using Multi-task Cascaded Convolutional
Networks. Try out the Gradio Web Demo:
Overview
MTCNN is a popular algorithm for face detection that uses multiple neural networks to detect faces in images. It is capable of detecting faces under various lighting and pose conditions and can detect multiple faces in an image.
We have implemented MTCNN using the pytorch framework. Pytorch is a popular deep learning framework that provides tools for building and training neural networks.
Description of file
1 |
|
Requirements
- numpy==1.21.4
- matplotlib==3.5.0
- opencv-python==4.4.0.42
- torch==1.13.0+cu116
How to Install
1
2conda create -n env python=3.8 -y
conda activate env1
pip install -r requirements.txt
Preprocessing
- download WIDER_FACE face detection data then store it into ./data_set/face_detection
- download CNN_FacePoint face detection and landmark data then store it into ./data_set/face_landmark
Preprocessed Data
1 |
|
How to Run
Train
1 |
|
The checkpoints will be saved in a subfolder of
./model_store/*
.
Finetuning from an existing checkpoint
1 |
|
model path should be a subdirectory in the
./model_store/
directory, e.g.
--load=./model_store/pnet_epoch_20.pt
Evaluate
Use the sh file to test in order
1 |
|
To detect a single image
1 |
|
To detect a video stream from a camera
1 |
|