# MTCNN4Android **Repository Path**: huangranrumeng/MTCNN4Android ## Basic Information - **Project Name**: MTCNN4Android - **Description**: MTCNN For Android. Java.Tensorflow.人脸检测.Face Detection. - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-12-15 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # MTCNN4Android MTCNN For Android Java
This project is the Android implementaion of MTCNN face detection. I use the pretrained model in Google's Facenet project and transfrom the the .npy files into one .pb file first. * IDE:Android Studio3.1.2 * Core Class MTCNN (see file MTCNN.Java) * Get Instance : MTCNN mtcnn=new MTCNN(getAssets()) * It is easy to use ,here is the core API: * public Vector detectFaces(Bitmap bitmap,int minFaceSize) * [parameter] bitmap : Image to process * [parameter] minFaceSize: minimum face size in pixels.(The speed will be faster when minFaceSize is bigger) * [Return Value]: Position of All faces(And their correspoinding facial landmarks(2*mouse+1*nose+2*eyes). # MTCNN4Android MTCNN For Android Java
主要参考MTCNN论文和Facenet中MTCNN的实现,纯Java实现。为了方便java调用,我先把npy转为pb。 * 编译环境:Android Studio3.1.2 * 核心类MTCNN用法 (MTCNN.Java) * 类实例化 MTCNN mtcnn=new MTCNN(getAssets()) * 只有1个API:public Vector detectFaces(Bitmap bitmap,int minFaceSize) * 参数bitmap:要处理的图片 * 参数minFaceSize:最小的脸像素值,一般>=40。越大则检测速度越快,但会忽略掉较小的脸 * 返回值:所有的脸的Box,包括left/right/top/bottom/landmark(一共5个点,嘴巴鼻子眼) # Result : ![Alt text](Screenshot_20180626-112620.png)
![Alt text](Screenshot_20180626-112635.png)
![Alt text](Screenshot_20180626-112651.png)