Coder Social home page Coder Social logo

666dzy666 / ncnn_example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mirroryuchen/ncnn_example

0.0 1.0 0.0 37.61 MB

ncnn example: face detection: retinaface&&mtcnn&&centerface, landmark: zqcnn, recognize: mobilefacenet

C++ 99.01% CMake 0.99%

ncnn_example's Introduction

ncnn_106landmarks:

I promise i'll update this project forever!

1. add landmark

(1). the original model comes from repositories:

(2). the process of converting mxnet model to ncnn formate is:

(3). new landmark model: landmark_big.param && landmark_big.bin has also uploaded, input size: 48x48

you can change the model name in the test code to test the model:

change "landmark.param", "landmark.bin" to "landmark_big.param" && "landmark_big.bin"

(4). add input size: 96x96 model:

you need to change the input size 48 x 48 to 96 x 96:

ncnn::Mat ncnn_in = ncnn::Mat::from_pixels_resize(img_src.data,

ncnn::Mat::PIXEL_BGR, img_src.cols, img_src.rows, 48, 48);

To:

ncnn::Mat ncnn_in = ncnn::Mat::from_pixels_resize(img_src.data,

ncnn::Mat::PIXEL_BGR, img_src.cols, img_src.rows, 96, 96);

(5).add input size: 112x112 model:

the most effect model.

2. add retinaface detection

the code refer to the repositories:

model comes from:

result:

ๅ›พ็‰‡

3.add jetson nano project based on vulkan

(1). build vulkan ncnn:

(2). build the project:

>mkdir build && cd build && cmake .. && make -j3

>./main

4.add mobilefacenet

5.use openmp to optimize for loops

test result:

do not use vulkan:

' start face detect. 4 faces detected. start keypoints extract. keypoints extract end. start keypoints extract. keypoints extract end. start keypoints extract. keypoints extract end. start keypoints extract. keypoints extract end. time cost: 137.495ms '

use vulkan:

' [0 NVIDIA Tegra X1 (nvgpu)] queueC=0[16] queueT=0[16] memU=2 memDL=2 memHV=2 [0 NVIDIA Tegra X1 (nvgpu)] fp16p=1 fp16s=1 fp16a=0 int8s=1 int8a=0 start face detect. 4 faces detected. start keypoints extract. keypoints extract end. start keypoints extract. keypoints extract end. start keypoints extract. keypoints extract end. start keypoints extract. keypoints extract end. time cost: 553.328ms '

why so strange?

6.add face alignment interface

the interface refer to the project insightface:

and the issue:

7.refactor the project

reduce the coupling of modules

8.add mtcnn

You only need to change line 14 of face_engine.cpp to change face detector.

For Example:

detector_(new Mtcnn()) To detector_(new RetinaFace())

9.optimize the structure of the project

10.add centerface:

please update ncnn to newest version, speed will impove a lot.

TODO:

  • [x]. add face recognize database
  • [x]. add face track

ncnn_example's People

Contributors

mirroryuchen avatar qaz734913414 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.