PoseEstimator
scalacv.PoseEstimator
object PoseEstimator
Human-pose (skeleton) estimation over a keypoint network run through Dnn.
MediaPipe's models ship as TFLite; OpenCV's inference path — and therefore scalacv's — is ONNX, so this is built the way FaceDetect and Dnn are: you bring the model (Dnn.fromOnnx), and scalacv provides the typed result and the decode. The two common output layouts are both handled (PoseEstimator.decode), so a MoveNet or an OpenPose export drops in by naming its KeypointLayout and PoseTopology.
// With a caller-loaded Net (see Dnn):
val pose = Dnn.blobFromImage(image.mat, size = Some(Size(192, 192)), swapRB = true).use { blob =>
Dnn.forward(net, blob).use { out =>
PoseEstimator.decode(out.mat, image.size, KeypointLayout.Regression)
}
}
For hand and head pose see PoseTopology.Hand21 and HeadPose.
Attributes
- Source
- Pose.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
PoseEstimator.type
Members list
In this article