Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tanjinprity4/177d727502793f587195bff73252686b to your computer and use it in GitHub Desktop.
Save tanjinprity4/177d727502793f587195bff73252686b to your computer and use it in GitHub Desktop.
KeyPoint, Position, and BodyPart classes in details.
// KeyPoint class holds information about each bodyPart, position, and score.
class KeyPoint {
var bodyPart: BodyPart = BodyPart.NOSE
var position: Position = Position()
var score: Float() = 0.0f
}
// Position class contains the x and y coordinates of a key point on the bitmap.
class Position {
var x: Int = 0
var y: Int = 0
}
// BodyPart class holds the names of seventeen body parts.
enum class BodyPart {
NOSE,
LEFT_EYE,
RIGHT_EYE,
...
RIGHT_ANKLE
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment