Comments (12)
Yes, the facemesh sample app simply uses mediapipe original tfjs model.
By default, it runs tfjs with webgl-backend. The performance may increase if it use wasm-backend. (depends on devices)
@gauravgola96
Have you tried wasm-backend instead of webgl-backend ?
You can use the wasm backend just by enabling the following line:
https://github.com/terryky/tfjs_webgl_app/blob/fc404c39ba9a6f834f18a40f546564e94b8fbc69/facemesh/webgl_main.js#L5
from pinto_model_zoo.
I suspect that using the fp16 model will not improve performance because I have tried fp16 model in the tensorflow lite environment but I did not see distinguish performance improvement.
tflite port is here:
https://github.com/terryky/tflite_gles_app/tree/master/gl2facemesh
from pinto_model_zoo.
Does the already committed model not fit your needs?
https://github.com/PINTO0309/PINTO_model_zoo#4-2d3d-face-detection
https://github.com/PINTO0309/PINTO_model_zoo/tree/master/032_FaceMesh/08_tfjs
from pinto_model_zoo.
I tried it for mobile browser for medium/low level devices with decent gpu but got only around 5-6Fps (Webgl backend) . Can you tell what optimization you did in this tfjs model and tfjs facemesh has recently updated with iris support which droped its performance by 5-7fps also.
from pinto_model_zoo.
I don't know what kind of mobile device you're using, but I ran it on Google Chrome on my Pixel 4a and it performed at around 10FPS. I think it's a GPU performance issue.
from pinto_model_zoo.
I am testing on https://www.devicespecifications.com/en/model/8d2f4cea
Getting 5fps.
from pinto_model_zoo.
Hmmm. There doesn't seem to be any significant difference in the performance of your device and mine. Have you tried the following demo?
https://terryky.github.io/tfjs_webgl_app/facemesh
from pinto_model_zoo.
Yes, i tried this only. Getting 5FPS.
from pinto_model_zoo.
I generated and committed a TFJS model of Float16, hoping that the GPU would be used effectively.
https://github.com/PINTO0309/PINTO_model_zoo/tree/master/032_FaceMesh/08_tfjs
@terryky Does your FaceMesh example program use the Float32 model? Have you tried the Float16 model and have you ever tried it? I don't know if it will improve my performance.
from pinto_model_zoo.
From the network calls, it looks like this demo https://terryky.github.io/tfjs_webgl_app/facemesh
is using https://storage.googleapis.com/tfhub-tfjs-modules/mediapipe/tfjs-model/facemesh/1/default/1/model.json
It is not using your quantized model.
from pinto_model_zoo.
@terryky @PINTO0309 Since you have used the original mediapipe tfjs model I tested https://storage.googleapis.com/tfjs-models/demos/facemesh/index.html which is official demo with predicted iris off.
For webgl backend : 5-6 FPS
wasm backend : 4-5 FPS
Can I use the quantized model (float 16 ) version in your demo project somehow?
Also, do I have to also use Blazeface quantized model while using the quantized face mesh model?
from pinto_model_zoo.
However, tried to load your quantized model in facemesh but got this error.
from pinto_model_zoo.
Related Issues (20)
- Script to convert RAFT models HOT 3
- Blazeface onnx model HOT 1
- BodyPix on MacOS - Dilation not supported for AutoPadType::SAME_UPPER or AutoPadType::SAME_LOWER HOT 8
- TOPK operator for RKNN export HOT 1
- InstructIR
- 064_Dense_Depth seems to have wrong dimensions HOT 1
- Midas2 model on coral edge TPU HOT 1
- Difference on model outputs (tflite, openvino IR, and Onnx) in model 227_face-detection-adas-0001 HOT 1
- bad results for 342_ALIKE HOT 1
- Aborted (core dumped) for full quantized tinyhitnet model
- 091_gaze-estimation-adas-0002 network HOT 1
- Release new 303_FAN with heatmaps HOT 3
- dataset HOT 1
- 410_FaceMeshV2 quantized tflite models are not functional HOT 1
- 053_BlazePose / 058_BlazePose_Full_Keypoints source HOT 3
- How to retrain simple MLP (palm_detection_full_inf_post_192x192.onnx) model with custom hand dataset ? HOT 2
- How to retrain simple MLP (palm_detection_full_inf_post_192x192.onnx) model with custom hand dataset ? HOT 2
- MiDaS conversion script to onnx
- Mismatch between BlendshapeV2 TensorFlow and TFLite Model
- 425_Gold-YOLO-Body-Head-Hand cannnot execute demo_goldyolo_onnx_image.py HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pinto_model_zoo.