Examples:
Example: To add a face to a collection
resp = client.index_faces({
collection_id: "myphotos",
detection_attributes: [
],
external_image_id: "myphotoid",
image: {
s3_object: {
bucket: "mybucket",
name: "myphoto",
},
},
})
{
face_records: [
{
face: {
bounding_box: {
height: 0.33481481671333313e0,
left: 0.31888890266418457e0,
top: 0.4933333396911621,
width: 0.25,
},
confidence: 99.9991226196289,
face_id: "ff43d742-0c13-5d16-a3e8-03d3f58e980b",
image_id: "465f4e93-763e-51d0-b030-b9667a2d94b1",
},
face_detail: {
bounding_box: {
height: 0.33481481671333313e0,
left: 0.31888890266418457e0,
top: 0.4933333396911621,
width: 0.25,
},
confidence: 99.9991226196289,
landmarks: [
{
type: "eyeLeft",
x: 0.3976764678955078,
y: 0.6248345971107483,
},
{
type: "eyeRight",
x: 0.4810936450958252,
y: 0.6317117214202881,
},
{
type: "noseLeft",
x: 0.41986238956451416e0,
y: 0.7111940383911133,
},
{
type: "mouthDown",
x: 0.40525302290916443e0,
y: 0.7497701048851013,
},
{
type: "mouthUp",
x: 0.4753248989582062,
y: 0.7558549642562866,
},
],
pose: {
pitch: -9.713645935058594,
roll: 4.707281112670898,
yaw: -0.24438663482666016e2,
},
quality: {
brightness: 29.23358917236328,
sharpness: 80,
},
},
},
{
face: {
bounding_box: {
height: 0.32592591643333435e0,
left: 0.5144444704055786,
top: 0.15111111104488373e0,
width: 0.24444444477558136e0,
},
confidence: 99.99950408935548,
face_id: "8be04dba-4e58-520d-850e-9eae4af70eb2",
image_id: "465f4e93-763e-51d0-b030-b9667a2d94b1",
},
face_detail: {
bounding_box: {
height: 0.32592591643333435e0,
left: 0.5144444704055786,
top: 0.15111111104488373e0,
width: 0.24444444477558136e0,
},
confidence: 99.99950408935548,
landmarks: [
{
type: "eyeLeft",
x: 0.6006892323493958,
y: 0.290842205286026,
},
{
type: "eyeRight",
x: 0.6808141469955444,
y: 0.29609042406082153e0,
},
{
type: "noseLeft",
x: 0.6395332217216492,
y: 0.3522595763206482,
},
{
type: "mouthDown",
x: 0.5892083048820496,
y: 0.38689887523651123e0,
},
{
type: "mouthUp",
x: 0.674560010433197,
y: 0.394125759601593,
},
],
pose: {
pitch: -4.683138370513916,
roll: 0.21029529571533203e1,
yaw: 6.716655254364014,
},
quality: {
brightness: 0.34951698303222656e2,
sharpness: 160,
},
},
},
],
orientation_correction: "ROTATE_0",
}
Request syntax with placeholder values
resp = client.index_faces({
collection_id: "CollectionId", image: { bytes: "data",
s3_object: {
bucket: "S3Bucket",
name: "S3ObjectName",
version: "S3ObjectVersion",
},
},
external_image_id: "ExternalImageId",
detection_attributes: ["DEFAULT"], max_faces: 1,
quality_filter: "NONE", })
Response structure
resp.face_records resp.face_records[0].face.face_id resp.face_records[0].face.bounding_box.width resp.face_records[0].face.bounding_box.height resp.face_records[0].face.bounding_box.left resp.face_records[0].face.bounding_box.top resp.face_records[0].face.image_id resp.face_records[0].face.external_image_id resp.face_records[0].face.confidence resp.face_records[0].face_detail.bounding_box.width resp.face_records[0].face_detail.bounding_box.height resp.face_records[0].face_detail.bounding_box.left resp.face_records[0].face_detail.bounding_box.top resp.face_records[0].face_detail.age_range.low resp.face_records[0].face_detail.age_range.high resp.face_records[0].face_detail.smile.value resp.face_records[0].face_detail.smile.confidence resp.face_records[0].face_detail.eyeglasses.value resp.face_records[0].face_detail.eyeglasses.confidence resp.face_records[0].face_detail.sunglasses.value resp.face_records[0].face_detail.sunglasses.confidence resp.face_records[0].face_detail.gender.value resp.face_records[0].face_detail.gender.confidence resp.face_records[0].face_detail.beard.value resp.face_records[0].face_detail.beard.confidence resp.face_records[0].face_detail.mustache.value resp.face_records[0].face_detail.mustache.confidence resp.face_records[0].face_detail.eyes_open.value resp.face_records[0].face_detail.eyes_open.confidence resp.face_records[0].face_detail.mouth_open.value resp.face_records[0].face_detail.mouth_open.confidence resp.face_records[0].face_detail.emotions resp.face_records[0].face_detail.emotions[0].type resp.face_records[0].face_detail.emotions[0].confidence resp.face_records[0].face_detail.landmarks resp.face_records[0].face_detail.landmarks[0].type resp.face_records[0].face_detail.landmarks[0].x resp.face_records[0].face_detail.landmarks[0].y resp.face_records[0].face_detail.pose.roll resp.face_records[0].face_detail.pose.yaw resp.face_records[0].face_detail.pose.pitch resp.face_records[0].face_detail.quality.brightness resp.face_records[0].face_detail.quality.sharpness resp.face_records[0].face_detail.confidence resp.orientation_correction resp.face_model_version resp.unindexed_faces resp.unindexed_faces[0].reasons resp.unindexed_faces[0].reasons[0] resp.unindexed_faces[0].face_detail.bounding_box.width resp.unindexed_faces[0].face_detail.bounding_box.height resp.unindexed_faces[0].face_detail.bounding_box.left resp.unindexed_faces[0].face_detail.bounding_box.top resp.unindexed_faces[0].face_detail.age_range.low resp.unindexed_faces[0].face_detail.age_range.high resp.unindexed_faces[0].face_detail.smile.value resp.unindexed_faces[0].face_detail.smile.confidence resp.unindexed_faces[0].face_detail.eyeglasses.value resp.unindexed_faces[0].face_detail.eyeglasses.confidence resp.unindexed_faces[0].face_detail.sunglasses.value resp.unindexed_faces[0].face_detail.sunglasses.confidence resp.unindexed_faces[0].face_detail.gender.value resp.unindexed_faces[0].face_detail.gender.confidence resp.unindexed_faces[0].face_detail.beard.value resp.unindexed_faces[0].face_detail.beard.confidence resp.unindexed_faces[0].face_detail.mustache.value resp.unindexed_faces[0].face_detail.mustache.confidence resp.unindexed_faces[0].face_detail.eyes_open.value resp.unindexed_faces[0].face_detail.eyes_open.confidence resp.unindexed_faces[0].face_detail.mouth_open.value resp.unindexed_faces[0].face_detail.mouth_open.confidence resp.unindexed_faces[0].face_detail.emotions resp.unindexed_faces[0].face_detail.emotions[0].type resp.unindexed_faces[0].face_detail.emotions[0].confidence resp.unindexed_faces[0].face_detail.landmarks resp.unindexed_faces[0].face_detail.landmarks[0].type resp.unindexed_faces[0].face_detail.landmarks[0].x resp.unindexed_faces[0].face_detail.landmarks[0].y resp.unindexed_faces[0].face_detail.pose.roll resp.unindexed_faces[0].face_detail.pose.yaw resp.unindexed_faces[0].face_detail.pose.pitch resp.unindexed_faces[0].face_detail.quality.brightness resp.unindexed_faces[0].face_detail.quality.sharpness resp.unindexed_faces[0].face_detail.confidence
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4