Skip to content

Instantly share code, notes, and snippets.

@RomainMaillot13
Created November 2, 2018 13:31
Show Gist options
  • Save RomainMaillot13/cb06f5ae834c62448806a4151e0c97ae to your computer and use it in GitHub Desktop.
Save RomainMaillot13/cb06f5ae834c62448806a4151e0c97ae to your computer and use it in GitHub Desktop.
Algorithm several persons
const imageScaleFactor = 0.50;
const flipHorizontal = false;
const outputStride = 16;
// get up to 5 poses
const maxPoseDetections = 5;
// minimum confidence of the root part of a pose
const scoreThreshold = 0.5;
// minimum distance in pixels between the root parts of poses
const nmsRadius = 20;
const imageElement = document.getElementById('cat');
// load posenet
const net = await posenet.load();
const poses = await net.estimateMultiplePoses(
imageElement, imageScaleFactor, flipHorizontal, outputStride,
maxPoseDetections, scoreThreshold, nmsRadius);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment