Giter VIP home page Giter VIP logo

ncnn_android_movenet's Introduction

ncnn_Android_MoveNet

Android MoveNet single human pose estimation and multipose by ncnn

this project is a ncnn Android demo for MoveNet, it depends on ncnn library and opencv.
https://github.com/Tencent/ncnn
https://github.com/nihui/opencv-mobile

model support:

1.movenet-singlepose-lightningv4(from tfhub)
2.movenet-singlepose-thunderv4(from tfhub)
3.movenet-multipose-lightning(from tfhub)

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!

result


reference:

https://github.com/nihui/ncnn-android-nanodet
https://tfhub.dev/google/movenet/singlepose/lightning/4
https://tfhub.dev/google/movenet/singlepose/thunder/4
https://tfhub.dev/google/movenet/multipose/lightning/1

ncnn_android_movenet's People

Contributors

feigechuanshu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ncnn_android_movenet's Issues

The speed might not fast as the tflite version?

Hi there, I used the lightning model and the after-treatment from this project and find the fps is about 20 and up to 25 which is not fast as the original tflite version.
I'm not sure the reason, there's my doubt:

  1. the after-treatment cause more computing resources?
  2. there are some opt. in ncnn can be opened, such as vulkan?
  3. the model in ncnn is natively slower than tflite cuz the tflite model is also optimized?
    Could you give some enlightenment about these?
    Thx

Convert .pt to .bin and .param format

I trained my model yolov5 for object detection and now i want to deploy it on android app. Before I tried covert to .tflite format but slowly. I saw in assets folder the format you used is .bin and .param format. What code did you use to convert my model to format .bin and .param ?

How to hide the current camera screen?

Hello,

I want to implement the title function, and pass the value to the U3D painting after obtaining the detection result. How can I hide my current display screen?

gpu cpu两种模式没差别

cpu占用基本一眼,帧率基本一样
设备 amlogic 311D
PID USER PR NI VIRT RES SHR S[%CPU] %MEM TIME+ ARGS
20344 u0_a55 10 -10 1.2G 207M 104M S 284 10.3 32:20.16 com.tencent.ncnnbodypose

20344 u0_a55 10 -10 1.2G 209M 104M S 272 10.4 33:09.35 com.tencent.ncnnbodypose

model convert

thank you for this nice work.Now I want to convert the tensorflow hub's official movenet model to ncnn.
My convert steps as follows:
1、convert pb to onnx;
2、optimize and simplifier onnx model;
3、convert onnx to ncnn;
However there some ops ncnn dont support. Error msg as follows:
Cast not supported yet!

to=1

Unsupported split axis !
ArgMax not supported yet!

axis=1

keepdims=0

Cast not supported yet!

to=6

Cast not supported yet!

to=1

Cast not supported yet!

to=7

GatherND not supported yet!
Cast not supported yet!

to=1

ArgMax not supported yet!

axis=1

keepdims=0

Cast not supported yet!

to=6

Cast not supported yet!

to=1

Cast not supported yet!

to=7

GatherND not supported yet!
Unsupported unsqueeze axes !
Unsupported unsqueeze axes !
Cast not supported yet!

to=7

GatherND not supported yet!
GatherND not supported yet!
Unsupported unsqueeze axes !
Unsupported unsqueeze axes !
Cast not supported yet!

to=1

Unsupported unsqueeze axes !
It will be very nice if you can tell me how do you solve this problem, thank you!

issue about the output of the model

hi
I found that there are 4 outputs of lighting.param and thunder.param which are regress, offset, heatmap and center.
could you give some advice of how to use these outputs to generate the keypoints? cuz I cannot find the code here.
Thx!

横屏时陀螺仪不起作用导致识别不准

机型:红米K30
NDK版本:android-ndk-r21e
camke版本:3.10.2-win64-x64

ALooper_pollAll的返回值一直都是-3,进不去下面的陀螺仪事件里去,导致横屏时识别效果很差,因为图像没旋转的缘故,不知道为什么。

image

但是这里无视这个错误继续进入那个if分支的话好像也没啥问题,横屏时陀螺仪也能正常工作。

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.