This a demo of BlazeFace infer by ncnn

Overview

ncnn_Android_blazeface

The BlazeFace face detection demo infer by ncnn.
The model from PaddleDetection BlazeFace-FPN-SSH.

This is a sample ncnn android project, it depends on ncnn library and opencv

https://github.com/Tencent/ncnn

https://github.com/nihui/opencv-mobile

how to build and run

step1

https://github.com/Tencent/ncnn/releases

  • Download ncnn-YYYYMMDD-android-vulkan.zip or build ncnn for android yourself
  • Extract ncnn-YYYYMMDD-android-vulkan.zip into app/src/main/jni and change the ncnn_DIR path to yours in app/src/main/jni/CMakeLists.txt

step2

https://github.com/nihui/opencv-mobile

  • Download opencv-mobile-XYZ-android.zip
  • Extract opencv-mobile-XYZ-android.zip into app/src/main/jni and change the OpenCV_DIR path to yours in app/src/main/jni/CMakeLists.txt

step3

  • Open this project with Android Studio, build it and enjoy!

some notes

  • Android ndk camera is used for best efficiency
  • Crash may happen on very old devices for lacking HAL3 camera interface
  • All models are manually modified to accept dynamic input shape
  • Most small models run slower on GPU than on CPU, this is common
  • FPS may be lower in dark environment because of longer camera exposure time

screenshot

reference

1.https://github.com/PaddlePaddle/PaddleDetection/blob/release/2.3/configs/face_detection/README.md
2.https://github.com/nihui/ncnn-android-scrfd

You might also like...
ncnn demo of DocTr: Document Image Transformer for Geometric Unwarping and Illumination Correction
ncnn demo of DocTr: Document Image Transformer for Geometric Unwarping and Illumination Correction

DocTr-ncnn ncnn demo of DocTr: Document Image Transformer for Geometric Unwarping and Illumination Correction model support: 1.Document Segmentation 2

segformer semantic segmentation infer by tengine
segformer semantic segmentation infer by tengine

Segformer-tengine Segformer semantic segmentation infer by tengine 前言: 记录一下Segformer部署在tengine上的折腾过程 - 小飞飞的文章 - 知乎 https://zhuanlan.zhihu.com/p/397735

model infer framework with multithreads based on PaddleX
model infer framework with multithreads based on PaddleX

model_infer_multiThreads (最近更新:2021-10-28 增加了原生的所有api接口,支持clas/det/seg/mask) 该repo基于PaddleX模型推理动态链接库的接口代码进行修改,支持多线程并行访问。大部分代码均来自paddleX的model_infer.cp

Deep Learning API and Server in C++11 support for Caffe, Caffe2, PyTorch,TensorRT, Dlib, NCNN, Tensorflow, XGBoost and TSNE

Open Source Deep Learning Server & API DeepDetect (https://www.deepdetect.com/) is a machine learning API and server written in C++11. It makes state

the C++ version of solov2 with ncnn
the C++ version of solov2 with ncnn

the C++ version of SOLOV2 with ncnn

Android hand detect and pose estimation by ncnn
Android hand detect and pose estimation by ncnn

ncnn_nanodet_hand 1.hand detect:用nanode-m训练了个hand detect模型, 2.hand pose:用CMU的数据集训练了个ghostnet作为backbone模仿pfld的handpose模型 3.推理:handpose.cpp单独检测pose,nano

Portrait segmentation in your web browser with ncnn and webassembly

ncnn-webassembly-portrait-segmentation open https://nihui.github.io/ncnn-webassembly-portrait-segmentation and enjoy build and deploy Install emscript

The SCRFD face detection, depends on ncnn library and opencv
The SCRFD face detection, depends on ncnn library and opencv

The SCRFD face detection, depends on ncnn library and opencv

Android face detect and segmentation by ncnn
Android face detect and segmentation by ncnn

Android face detect and segmentation by ncnn

Comments
  • faster face detection using TNN optimized models?

    faster face detection using TNN optimized models?

    TNN Model links :

    "https://raw.githubusercontent.com/darrenyao87/tnn-models/master/face-detector/version-slim-320_simplified.bin"
    "https://raw.githubusercontent.com/darrenyao87/tnn-models/master/face-detector/version-slim-320_simplified.param"

    opened by GeorvityLabs 1
  • Real-time face recognition using MobileFaceNet model?

    Real-time face recognition using MobileFaceNet model?

    Project link + TFLite Model : https://github.com/estebanuri/face_recognition/tree/master/android

    Documentation : https://medium.com/@estebanuri/real-time-face-recognition-with-android-tensorflow-lite-14e9c6cc53a5

    This project has real-time face recognition feature using TFLite model.

    Hope you can make an NCNN version of this.

    opened by GeorvityLabs 0
  • How do you get the face_mesh.bin and face_mesh.param ?

    How do you get the face_mesh.bin and face_mesh.param ?

    Hello, thanks for sharing this project ! I am curious how do you get the face_mesh.bin and face_mesh.param, do you convert it from tflite ? If so, could you please teach me how to convert it ? Thanks !

    opened by wwdok 0
  • E/ACameraManager: getCameraCharacteristics: Camera ID  does not exist!

    E/ACameraManager: getCameraCharacteristics: Camera ID does not exist!

    您好,我在模拟器上测试,没有问题 ,使用移远的SC20报如下错误,app之间显示 blazeface has stooped,请问是什么原因导致的,谢谢 E/ACameraManager: getCameraCharacteristics: Camera ID does not exist! openCamera: cannot get camera characteristics for camera . err -10001 E/NdkCameraDevice: ACameraDevice_createCaptureRequest: invalid argument! device 0x0 request 0x99b7b430 A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x4 in tid 14121 (t.blazefacencnn)

    opened by liuweixue001 3
Owner
FeiGeChuanShu
FeiGeChuanShu
Android CrowdCounting demo infer by ncnn

ncnn_Android_CrowdCounting This is a sample CrowdCounting Android demo infer by ncnn, it depends on ncnn library and opencv https://github.com/Tencent

FeiGeChuanShu 10 Jul 2, 2022
M-LSD Android demo infer by ncnn

ncnn_Android_mlsd The Android demo of M-LSD: Towards Light-weight and Real-time Line Segment Detection This is a sample ncnn android project, it depen

FeiGeChuanShu 17 Jun 22, 2022
A mediapipe-hand demo infer by ncnn

The Android demo of Mediapipe Hand infer by ncnn Please enjoy the mediapipe hand demo on ncnn You can try this APK demo https://pan.baidu.com/s/1ArAMH

FeiGeChuanShu 48 Dec 22, 2022
SSAT Makeup/Makeup Transfer infer by ncnn

ncnn_MakeupTransfer SSAT Makeup/Makeup Transfer infer by ncnn The ncnn demo of SSAT: A Symmetric Semantic-Aware Transformer Network for Makeup Transfe

FeiGeChuanShu 11 Dec 26, 2022
This is a sample ncnn android project, it depends on ncnn library and opencv

This is a sample ncnn android project, it depends on ncnn library and opencv

null 248 Jan 6, 2023
GFPGAN-ncnn - a naive NCNN implementation of GFPGAN aims at developing Practical Algorithms for Real-world Face Restoration

GFPGAN-ncnn a naive ncnn implementation of GFPGAN aims at developing Practical Algorithms for Real-world Face Restoration model support: 1.GFPGANClean

FeiGeChuanShu 42 Dec 10, 2022
RealSR-NCNN-Android is a simple Android application that based on Realsr-NCNN & Real-ESRGAN.

RealSR-NCNN-Android Real-ESRGAN is a Practical Algorithms for General Image Restoration. RealSR-NCNN-Android is a simple Android application that base

null 272 Jan 3, 2023
Android hair/human segmentation demo by ncnn

ncnn_Android_human Android hair/human segmentation demo by ncnn PS:performance maybe poor.it's just a demo:) Reference: 1.https://github.com/Tencent/n

null 23 May 23, 2022
ncnn Android demo of PP-TinyPose

ncnn_Android_PP-TinyPose ncnn Android demo of PP-TinyPose this project is a ncnn Android demo for PP-TinyPose, it depends on ncnn library and opencv.

FeiGeChuanShu 20 Nov 25, 2022
Ncnn version demo of [CVPR21] LightTrack: Finding Lightweight Neural Network for Object Tracking via One-Shot Architecture Search

LightTrack: Finding Lightweight Neural Networks for Object Tracking via One-Shot Architecture Search (ncnn) The official implementation by pytorch: ht

null 34 Dec 26, 2022