gpt4 book ai didi

javascript - 无法从 skybiometry 获取数据

转载 作者:行者123 更新时间:2023-11-29 21:39:44 25 4
gpt4 key购买 nike

我正在尝试从 SkyBiometry 中获取照片的 tid在如下所示的回调函数中,但它不起作用。

function callback(data) {
drawFaces($("#conent_demo_image"), data.photos[0], true);
var tid = data.photos[0].tags[0].tid;

$("#tid").text(tid);
}

html:

<div id="tid">
tid:
</div>

最佳答案

根据SkyBiometry Demo的来源它应该是这样的:

{
"RawData": "...",
"Status": 0,
"photos": [{
"url": "https://skybiometry.com/Content/Samples/one_i.jpg",
"pid": "F@0ae0deaf6994b85e751943ae2166ec27_24412177fed2f",
"width": 480,
"height": 480,
"tags": [{
"tid": "TEMP_F@0ae0deaf6994b85e751943ae012b00ab_24412177fed2f_62.29_35.62_0_1",
"recognizable": true,
"uids": [],
"label": null,
"confirmed": false,
"manual": false,
"width": 20.83,
"height": 20.83,
"center": {"x": 62.29, "y": 35.62},
"eye_left": {"x": 68.54, "y": 30.42, "confidence": 57, "id": 449},
"eye_right": {"x": 56.67, "y": 30.42, "confidence": 55, "id": 450},
"mouth_center": {"x": 62.5, "y": 42.92, "confidence": 54, "id": 615},
"nose": {"x": 63.33, "y": 37.71, "confidence": 51, "id": 403},
"yaw": -6.0,
"roll": -1.0,
"pitch": 0.0,
"attributes": {
"face": {"value": true, "confidence": 70},
"gender": {"Value": 1, "value": "female", "confidence": 75},
"glasses": {"value": false, "confidence": 81},
"dark_glasses": {"value": false, "confidence": 58},
"smiling": {"value": true, "confidence": 100},
"age_est": {"value": 16, "confidence": 50},
"mood": {"Value": 2, "value": "happy", "confidence": 76},
"lips": {"Value": 1, "value": "parted", "confidence": 100},
"eyes": {"Value": 0, "value": "open", "confidence": 87},
"neutral_mood": {"value": false, "confidence": 0},
"anger": {"value": false, "confidence": 45},
"disgust": {"value": false, "confidence": 1},
"fear": {"value": false, "confidence": 0},
"happiness": {"value": true, "confidence": 76},
"sadness": {"value": false, "confidence": 2},
"surprise": {"value": false, "confidence": 6}
},
"points": null,
"similarities": null
}]
}],
"status": "success",
"usage": {
"ResetTime": "2015-11-07T20:02:54Z",
"used": 21633,
"reset_time_text": "Sat, 7 November 2015 20:02:54 +0000",
"remaining": 78367,
"namespace_used": 0,
"limit": 100000,
"namespace_remaining": 0,
"reset_time": 1446926574,
"namespace_limit": 0
},
"operation_id": "c869d8e95f364f979dd62277810b299c"
}

关于javascript - 无法从 skybiometry 获取数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33477820/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com