I cannot interpret pose classification model structure plz help
See original GitHub issueHello!
I make React Native Home Training application with tfjs-react-native and I want to classify my poses.
I already estimated poses by using tfjs-posenet module. But, when I input pose coordinates, I got error message
Error: Error when checking : expected dense_Dense1_input to have shape [null,14739] but got array with shape [34,1].
So I guess many time to interpret what is mean of 14739, But I cannot get anything.
I read this code(https://github.com/googlecreativelab/teachablemachine-community/blob/master/libraries/pose/src/teachable-posenet.ts)
this.model = tf.sequential({
layers: [
// Layer 1.
tf.layers.dense({
inputShape: [inputSize],
units: params.denseUnits,
activation: 'relu',
kernelInitializer: varianceScaling, // 'varianceScaling'
useBias: true
}),
// Layer 2 dropout
tf.layers.dropout({rate: 0.5}),
// Layer 3. The number of units of the last layer should correspond
// to the number of classes we want to predict.
tf.layers.dense({
units: this.numClasses,
kernelInitializer: varianceScaling, // 'varianceScaling'
useBias: false,
activation: 'softmax'
})
]
});
// const optimizer = tf.train.adam(params.learningRate);
const optimizer = tf.train.rmsprop(params.learningRate);
this.model.compile({
optimizer,
loss: 'categoricalCrossentropy',
metrics: ['accuracy']
});
and I know that 14739 is inputSize. but I just know that inputSize is related with the number of datas and still cannot interpret what is 14739.
// Inputs for posenet
const inputSize = this.examples[0][1].length;
public async addExample(className: number, sample: Float32Array) {
// TODO: Do I need to normalize or flip image?
// const cap = isTensor(sample) ? sample : capture(sample);
// const example = this.posenet.predict(cap) as tf.Tensor;
// const embeddingsArray = await this.predictPosenet(sample);
// save samples of each class separately
this.examples[className].push(sample);
// increase our sample counter
// this.totalSamples++;
}
PLZ HELP ME 😭
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Human Pose Classification with MoveNet and TensorFlow Lite
This notebook teaches you how to train a pose classification model using MoveNet and TensorFlow Lite. The result is a new TensorFlow Lite ......
Read more >Pose Classification Using Three-Dimensional Atomic ...
We address the pose classification problem by leveraging ... it cannot always be assumed that the pose of the ligand model with the...
Read more >Human Pose Estimation: Deep Learning Approach [2022 Guide]
Human pose estimation is the task of detecting and segmenting human figures in images. Learn how to do human pose estimation using different...
Read more >Pose classification options | ML Kit - Google Developers
With the ML Kit Pose Detection API, you can derive meaningful interpretations of a pose by checking the relative positions of various body ......
Read more >Build your First Image Classification Model in just 10 Minutes!
Data is gold as far as deep learning models are concerned. Your image classification model has a far better chance of performing well...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@irealva Trying to figure this out as well two years later. Your link to the poseOutputsToAray function was very helpful.
However, when trying to set this up for my use:
I am finding that the linear shape is 4131 and not the required 14739. What else needs to be done in order to prepare to pass the posenet data to the pose estimation system? Thanks for any insight.
No worries @irealva and as I said your previous link was very helpful. I’ll keep trying on my side but hopefully another maintainer can chime in.