Skip to content

Commit 96ccaa9

Browse files
author
Tasha Kim
committed
testing posenet
1 parent 1b0f58a commit 96ccaa9

File tree

1,896 files changed

+266273
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,896 files changed

+266273
-0
lines changed

myposenet.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const posenet = require('@tensorflow-models/posenet');
2+
3+
async function estimatePoseOnImage(imageElement) {
4+
// load the posenet model from a checkpoint
5+
const net = await posenet.load();
6+
7+
const pose = await net.estimateSinglePose(imageElement, {
8+
flipHorizontal: false
9+
});
10+
return pose;
11+
}
12+
/*
13+
const imageElement = document.getElementById('cat');
14+
15+
const pose = estimatePoseOnImage(imageElement);
16+
17+
console.log(pose);
18+
*/
19+
20+
posenet.load();

0 commit comments

Comments
 (0)