You've already forked FrameTour-BE
百度云接口调整
This commit is contained in:
@ -144,7 +144,7 @@ public class BceFaceBodyAdapter implements IFaceBodyAdapter {
|
||||
AipFace client = getClient();
|
||||
HashMap<String, String> options = new HashMap<>();
|
||||
options.put("user_info", extData);
|
||||
options.put("quality_control", "LOW");
|
||||
// options.put("quality_control", "LOW");
|
||||
options.put("action_type", "REPLACE");
|
||||
try {
|
||||
addEntityLimiter.acquire();
|
||||
@ -275,7 +275,12 @@ public class BceFaceBodyAdapter implements IFaceBodyAdapter {
|
||||
JSONObject response = client.search(faceUrl, "URL", dbName, options);
|
||||
if (response.getInt("error_code") == 0) {
|
||||
resp.setOriginalFaceScore(100f);
|
||||
JSONArray userList = response.getJSONArray("user_list");
|
||||
JSONObject resultObj = response.getJSONObject("result");
|
||||
if (resultObj == null) {
|
||||
resp.setFirstMatchRate(0f);
|
||||
return resp;
|
||||
}
|
||||
JSONArray userList = resultObj.getJSONArray("user_list");
|
||||
List<SearchFaceResultItem> result = new ArrayList<>();
|
||||
for (int i = 0; i < userList.length(); i++) {
|
||||
JSONObject user = userList.getJSONObject(i);
|
||||
|
Reference in New Issue
Block a user