Skip to content

Instantly share code, notes, and snippets.

@zaleslaw
Created June 9, 2022 09:45
Show Gist options
  • Save zaleslaw/6569d9b28d16856914bf4cc01744629b to your computer and use it in GitHub Desktop.
Save zaleslaw/6569d9b28d16856914bf4cc01744629b to your computer and use it in GitHub Desktop.
Pose detection
model.use { poseDetectionModel ->
val imageFile = …
val detectedPose = poseDetectionModel.detectPose(imageFile = imageFile)
detectedPose.poseLandmarks.forEach {
println("Found ${it.poseLandmarkLabel} with probability ${it.probability}")
}
detectedPose.edges.forEach {
println("The ${it.poseEdgeLabel} starts at ${it.start.poseLandmarkLabel} and ends with ${it.end.poseLandmarkLabel}")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment