[关闭]
@liushiya 2018-11-26T07:57:30.000000Z 字数 3841 阅读 1524

Face Detection Based on Neural Network

机器学习 实验


点击这里获取中文版本

Motivation

  1. Understand the basic theory of face detection using neural network.
  2. Understand the processes of MTCNN and use it in practice.

Dataset for Training

When training PNet and Rnet, we use WiderFace, for face classification and face bounding box regression. When training ONet, we use WiderFace for face classification and face bounding box regression, and use Training Dataset for face feature point regression.

Environment for Experiment

anaconda3
pytorch 0.4.1
torchvision
opencv-python
tensorflow(only for python 3.4,3.5,3.6)

Time and Place

2018-11-24 8:50-12:15 AM B7-138(Mingkui Tan) B7-238(Qingyao Wu)

Submit Deadline

2018-12-29 12:00 noon

Experimental Form

Complete in group.

Experiment Steps

1.read the paper about MTCNN
2.run the given codes
1) get the codes
The complete codes for this experiment is given in MTCNN_pytorch, you can download it directly or using git clone command.

  1. git clone https://github.com/wujiaju/mtcnn_pytorch.git

2) install the environment
1. download anaconda3 for your computer
2. use pip or conda to install pytorch 0.4.1 and torchvision
3. use pip or conda to install opencv-python

  1. pip install http://download.pytorch.org/whl/cpu/torch-0.4.1-cp36-cp36m-win_amd64.whl # Windows
  2. pip install http://download.pytorch.org/whl/cpu/torch-0.4.1-cp36-cp36m-linux_x86_64.whl # Linux
  3. pip install torchvision
  4. pip install opencv-python

3) test the given models
Use the model we have trained before to run on the test dataset, which is under mtcnn_pytorch/data/test_images/ and contains 64 pictures, input the command below and then go to mtcnn_pytorch/data/test_images/ to examine the result.

  1. cd mtcnn_pytorch/
  2. python test_image.py

4) training
NOTE: You should check whether the path of the training dataset is consistent with the path in the code. If not, you must modify the path in the code before you start training.

train PNet

  1. cd mtcnn_pytorch
  2. python preprocessing/gen_pnet_data.py
  3. python preprocessing/assemble_pnet_imglist.py
  4. python training/pnet/train.py

train RNet

  1. cd mtcnn_pytorch
  2. python preprocessing/gen_rnet_data.py
  3. python preprocessing/assemble_rnet_imglist.py
  4. python training/rnet/train.py

train ONet

  1. cd mtcnn_pytorch
  2. python preprocessing/gen_landmark_48.py
  3. python preprocessing/gen_onet_data.py
  4. python preprocessing/assemble_onet_imglist.py
  5. python training/onet/train.py

After finishing training, you can examine the three trained models in mtcnn_pytorch/results/.

5) test your model

Use the given test dataset, which is under mtcnn_pytorch/data/test_images/ and contains 64 pictures, to test your model. Run the commands below and then examine the results in mtcnn_pytorch/data/you_result/.

  1. cd mtcnn_pytorch/
  2. python test_youModel_images.py

NOTE: You should check whether the path of the training dataset is consistent with the path in the code. If not, you must modify the path in the code before you start training.

Finishing experiment report according to result: The template of report can be found in example repository.

Experiment Report

The experiment report should contain your comprehension about MTCNN and the result of runing the given codes.

Evaluation

Item Proportion Description
Attendance 40% Ask for a leave if time conflict
Code availability 20% Complied successfully
Report 30% According to report model
Code specification 10% Mainly consider whether using the readable variable name

Requirement for Submission

Submission process

1.Access222.201.187.50:7001.
2.Click on the corresponding submission entry.
3.Fill in your name, student number, upload pdf format report and zip format code compression package.

Precautions


Any advice or idea is welcome to discuss with teaching assistant in QQ group.

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注