@liushiya
2018-11-26T07:57:30.000000Z
字数 3841
阅读 1524
机器学习
实验
点击这里获取中文版本
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.
anaconda3
pytorch 0.4.1
torchvision
opencv-python
tensorflow(only for python 3.4,3.5,3.6)
2018-11-24 8:50-12:15 AM B7-138(Mingkui Tan) B7-238(Qingyao Wu)
2018-12-29 12:00 noon
Complete in group.
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.
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
pip install http://download.pytorch.org/whl/cpu/torch-0.4.1-cp36-cp36m-win_amd64.whl # Windows
pip install http://download.pytorch.org/whl/cpu/torch-0.4.1-cp36-cp36m-linux_x86_64.whl # Linux
pip install torchvision
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.
cd mtcnn_pytorch/
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
cd mtcnn_pytorch
python preprocessing/gen_pnet_data.py
python preprocessing/assemble_pnet_imglist.py
python training/pnet/train.py
train RNet
cd mtcnn_pytorch
python preprocessing/gen_rnet_data.py
python preprocessing/assemble_rnet_imglist.py
python training/rnet/train.py
train ONet
cd mtcnn_pytorch
python preprocessing/gen_landmark_48.py
python preprocessing/gen_onet_data.py
python preprocessing/assemble_onet_imglist.py
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/.
cd mtcnn_pytorch/
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.
The experiment report should contain your comprehension about MTCNN and the result of runing the given codes.
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 |
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.
Any advice or idea is welcome to discuss with teaching assistant in QQ group.