-
Notifications
You must be signed in to change notification settings - Fork 907
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Facemesh not working locally #1254
Comments
Hi @geneticmoo thanks for opening this issue. I think it would be cool to work on the offline functionality, but at the moment this is not supported in ml5.js. If you dig deeper into Tensorflow.js, you could make it work. Cheers, |
I'm developing pose estimation for 1) exhibitions and 2) overseas online courses. The exhibitions may be long (say 3 months) and the local internet may be slow / intermittent and I would be happier if all the models were local. I will try and understand how the posenet and bodypix models work locally on the link you've suggested For the online courses I'd like it if all the models required could be included with the test code. The course is in China, where access to some online javascript/json/google libraries are restricted. Thanks |
Gotcha! As I mentioned this is not supported at the moment, but if you find out a workaround please share it here. Also thanks for the issue in the other repo. (ml5js/ml5-data-and-models-server#12) |
Hi @geneticmoo! - Thanks for starting this discussion here! I haven't been able to work on ml5 in a long time, but this is a good reminder that it might be time to think about how to update to some of the more recent tensorflow versions (latest is 3.14 we are currently running 1.2.9 😬 ). Facemesh is no longer a package that is being maintained and has been archived -- https://www.npmjs.com/package/@tensorflow-models/facemesh#this-repository-has-been-archived-in-favor-of-tfjs-modelsface-landmarks-detection-and-will-no-longer-be-updated -- in favor of the face-landmarks-detection model -- https://www.npmjs.com/package/@tensorflow-models/face-landmarks-detection. If we do end up updating our tf versions to some of the more recent versions, then it looks like in the latest face-landmarks-detection lib we can specify where our model files should be loaded from -- https://github.com/tensorflow/tfjs-models/tree/master/face-landmarks-detection/src/mediapipe#create-a-detector -- which, in this case, would be somewhere on a local server. |
Moved the issue to ml5js/ml5-next-gen#16 |
Facemesh doesn't work locally when including the ml5.js library.
Posenet works OK.
The code to call up face predictions is
In the Chrome browser the following error message is reported when not connected to the internet :
There is also a second error message which looks the same but instead of trying to get the file
https://tfhub.dev/tensorflow/tfjs-model/blazeface/1/default/1/model.json?tfjs-format=file
it is looking for
https://tfhub.dev/mediapipe/tfjs-model/facemesh/1/default/1/model.json?tfjs-format=file
To fix this I though maybe I could just download these json models and include them in my local folder alongside the ml5.js file. But then in the ml5.js code I have no idea how to point the code at these local files.
Please has anyone solved this and got Facemesh running completely locally?
Thanks
The text was updated successfully, but these errors were encountered: