-
Notifications
You must be signed in to change notification settings - Fork 9
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
Update the existing posenet model with pose-detection model #1
Comments
🤖 Hey @shivaylamba, good to see you again! Hope you're doing well and ready to delve into some more ML magic. To replace the existing posenet model with one of the new pose-detection models (Movenet, Blazepost, or PoseNet), you will need to update the Here is a general idea of how you can modify the function to load a new model: async function init(modelName) {
var modelURL;
var metadataURL;
switch(modelName) {
case 'Movenet':
modelURL = 'path/to/movenet/model.json';
metadataURL = 'path/to/movenet/metadata.json';
break;
case 'Blazepost':
modelURL = 'path/to/blazepost/model.json';
metadataURL = 'path/to/blazepost/metadata.json';
break;
case 'PoseNet':
modelURL = 'path/to/posenet/model.json';
metadataURL = 'path/to/posenet/metadata.json';
break;
default:
console.log('Invalid model name');
return;
}
// load the model and metadata
model = await tmPose.load(modelURL, metadataURL);
maxPredictions = model.getTotalClasses();
// ... rest of the function
} In this code, Please note that you will need to replace As for the dependencies, the TensorFlow.js Pose Detection API supports the Movenet and Blazepose models, so you will need to include the TensorFlow.js library in your project if it's not already included. You can do this by adding the following line to your HTML file: <script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs"></script> And then you can load the models using the const model = await tf.loadGraphModel('path/to/model.json'); For more information on how to use the TensorFlow.js Pose Detection API, you can refer to the official documentation. As for comparing the performance between the three models, you can use the Please note that the performance may vary depending on the specific use case and the hardware that the models are run on. Therefore, it's recommended to test the models on the actual devices that will be used by the end users. I hope this helps! If you have any other questions, feel free to ask. -Dosu SourcesThis response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
Posenet model has been deprecated.
Replace the existing model with one of the new pose-detection models:
Compare the performance between the 3 and check how you can solve this.
The text was updated successfully, but these errors were encountered: