Animetrics Face Recognition

FREEMIUM
By animetrics | Updated 13 days ago | Media
Health Check

N/A

Back to All Discussions

Set Pose

Rapid account: Edmundherbert
edmundherbert
10 years ago

Hi could you tell me the set pose function, I cannot find it Animetrics Face Recognition.

Regards

Edmund Herbert

Rapid account: Animetrics
animetrics Commented 10 years ago

Hello,

Please see the documentation for the detect_features call
http://api.animetrics.com/functions. You need to use the
selector=SETPOSE parameter.

an example request would look something like the following (using curl):

  1. First make a detect call to find the faces in the image:

curl -F “api_key=YOUR_API_KEY” -F “url=http://api.animetrics.com/img/test/jb.jpg” http://api.animetrics.com/v1/detect

which returns something like:

{“images”:[{“time”:0.29961,“status”:“Complete”,“file”:“http://api.animetrics.com/img/test/jb.jpg",“width”:403,“height”:403,“image_id”:“1a4ef4229617abb213d955ab7f61455b”,“image_expiration”:"2014-04-29 17:33 -0400”,“faces”:[{“topLeftX”:107,“topLeftY”:152,“width”:130,“height”:130,“leftEyeCenterX”:-1,“leftEyeCenterY”:-1,“rightEyeCenterX”:-1,“rightEyeCenterY”:-1,“noseTipX”:-1,“noseTipY”:-1,“noseBtwEyesX”:-1,“noseBtwEyesY”:-1,“chinTipX”:-1,“chinTipY”:-1,“leftEyeCornerLeftX”:-1,“leftEyeCornerLeftY”:-1,“leftEyeCornerRightX”:-1,“leftEyeCornerRightY”:-1,“rightEyeCornerLeftX”:-1,“rightEyeCornerLeftY”:-1,“rightEyeCornerRightX”:-1,“rightEyeCornerRightY”:-1,“rightEarTragusX”:-1,“rightEarTragusY”:-1,“leftEarTragusX”:-1,“leftEarTragusY”:-1,“leftEyeBrowLeftX”:-1,“leftEyeBrowLeftY”:-1,“leftEyeBrowMiddleX”:-1,“leftEyeBrowMiddleY”:-1,“leftEyeBrowRightX”:-1,“leftEyeBrowRightY”:-1,“rightEyeBrowLeftX”:-1,“rightEyeBrowLeftY”:-1,“rightEyeBrowMiddleX”:-1,“rightEyeBrowMiddleY”:-1,“rightEyeBrowRightX”:-1,“rightEyeBrowRightY”:-1,“nostrilLeftHoleBottomX”:-1,“nostrilLeftHoleBottomY”:-1,“nostrilRightHoleBottomX”:-1,“nostrilRightHoleBottomY”:-1,“nostrilLeftSideX”:-1,“nostrilLeftSideY”:-1,“nostrilRightSideX”:-1,“nostrilRightSideY”:-1,“lipCornerLeftX”:-1,“lipCornerLeftY”:-1,“lipLineMiddleX”:-1,“lipLineMiddleY”:-1,“lipCornerRightX”:-1,“lipCornerRightY”:-1,“pitch”:-1,“yaw”:-1,“roll”:-1}]}]}

  1. Then, using the topLeftX, topLeftY, width, height, and image_id,
    construct a request like:

curl -F “api_key=YOUR_API_KEY” -F “image_id=1a4ef4229617abb213d955ab7f61455b” -F “topLeftX=107” -F “topLeftY=152” -F “width=130” -F “height=130” -F “setPitch=0” -F “setYaw=0” -F “setRoll=0” -F “selector=SETPOSE” http://api.animetrics.com/v1/detect_features

which returns the following response containing a temporary url to the
setpose image:

{“images”:[{“time”:1.96966,“status”:“Complete”,“url”:false,“width”:403,“height”:403,“image_id”:“1a4ef4229617abb213d955ab7f61455b”,“image_expiration”:“2014-04-29 17:33 -0400”,“setpose_image”:“http://api.animetrics.com/img/setpose/6fcb2d6e59605caef800904d286df422.jpg",“faces”:[{“topLeftX”:107,“topLeftY”:152,“width”:130,“height”:130,“leftEyeCenterX”:134.625,“leftEyeCenterY”:180.083,“rightEyeCenterX”:203.958,“rightEyeCenterY”:182.25,“noseTipX”:156.694,“noseTipY”:219.606,“noseBtwEyesX”:160.445,“noseBtwEyesY”:181.313,“chinTipX”:-1,“chinTipY”:-1,“leftEyeCornerLeftX”:116.242,“leftEyeCornerLeftY”:178.424,“leftEyeCornerRightX”:147.591,“leftEyeCornerRightY”:181.573,“rightEyeCornerLeftX”:185.474,“rightEyeCornerLeftY”:183.841,“rightEyeCornerRightX”:213.674,“rightEyeCornerRightY”:183.638,“rightEarTragusX”:-1,“rightEarTragusY”:-1,“leftEarTragusX”:-1,“leftEarTragusY”:-1,“leftEyeBrowLeftX”:105.482,“leftEyeBrowLeftY”:170.131,“leftEyeBrowMiddleX”:120.289,“leftEyeBrowMiddleY”:167.315,“leftEyeBrowRightX”:142.647,“leftEyeBrowRightY”:173.837,“rightEyeBrowLeftX”:178.814,“rightEyeBrowLeftY”:174.114,“rightEyeBrowMiddleX”:208.471,“rightEyeBrowMiddleY”:167.353,“rightEyeBrowRightX”:231.913,“rightEyeBrowRightY”:175.049,“nostrilLeftHoleBottomX”:149.614,“nostrilLeftHoleBottomY”:227.245,“nostrilRightHoleBottomX”:171.018,“nostrilRightHoleBottomY”:229.208,“nostrilLeftSideX”:142.884,“nostrilLeftSideY”:225.852,“nostrilRightSideX”:181.309,“nostrilRightSideY”:226.216,“lipCornerLeftX”:132.712,“lipCornerLeftY”:254.851,“lipLineMiddleX”:156.462,“lipLineMiddleY”:254.644,“lipCornerRightX”:192.497,“lipCornerRightY”:258.307,“pitch”:-0.0430869,“yaw”:12.822,"roll”:2.35089}]}]}

Best,
Marc

Join in the discussion - add comment below:

Login / Signup to post new comments