/MTCNN_face_detection_alignment

Joint Face Detection and Alignment using Multi-task Cascaded Convolutional Neural Networks

Primary LanguageMATLABMIT LicenseMIT

MTCNN_face_detection_alignment

Joint Face Detection and Alignment using Multi-task Cascaded Convolutional Neural Networks


code/MTCNNv1

For normal caffe Matlab interface, the 'data' blob requires the shape [w h c n] with BGR channel mode, which means that image loaded by imread in [h w c] with RGB mode should first switch channels and transpose using permute.

However in MTCNN stage 1, the Matlab input is just the primary imread data and postprocesses the output by switch axies, which means that the stage 1 network data blob is actually unnormally transposed in memory .

For normal caffe Pyhton interface, the 'data' blob requires the shape [n c h w] with BGR channel mode, but for MTCNN image loaded by cv2.imread in [h w c] with BGR mode should first switch channels and transpose using np.swapaxes(img, 0, 2).


Requirement

  1. Caffe: Linux OS: https://github.com/BVLC/caffe. Windows OS: https://github.com/BVLC/caffe/tree/windows or https://github.com/happynear/caffe-windows
  2. Pdollar toolbox: https://github.com/pdollar/toolbox
  3. Matlab 2014b or later
  4. Cuda (if use nvidia gpu)

Results

image image

Face Recognition

Here we strongly recommend Center Face, which is an effective and efficient open-source tool for face recognition.

Citation

@article{7553523,
    author={K. Zhang and Z. Zhang and Z. Li and Y. Qiao}, 
    journal={IEEE Signal Processing Letters}, 
    title={Joint Face Detection and Alignment Using Multitask Cascaded Convolutional Networks}, 
    year={2016}, 
    volume={23}, 
    number={10}, 
    pages={1499-1503}, 
    keywords={Benchmark testing;Computer architecture;Convolution;Detectors;Face;Face detection;Training;Cascaded convolutional neural network (CNN);face alignment;face detection}, 
    doi={10.1109/LSP.2016.2603342}, 
    ISSN={1070-9908}, 
    month={Oct}
}

License

This code is distributed under MIT LICENSE

Contact

Yu Qiao yu.qiao@siat.ac.cn
Kaipeng Zhang kpzhang@cmlab.csie.ntu.edu.tw