com.aiwiown.face.request.FaceSearchRequest Maven / Gradle / Ivy
package com.aiwiown.face.request;
import com.aiwiown.face.ApiMethod;
import com.aiwiown.face.ApiObject;
import com.aiwiown.face.ApiRequest;
import com.aiwiown.face.internal.util.RequestParamUtils;
import com.aiwiown.face.response.FaceSearchResponse;
import java.util.Map;
/**
* 描述
* 在一个已有的 FaceSet 中找出与目标人脸最相似的一张或多张人脸,返回置信度和不同误识率下的阈值。
*
* 支持传入图片或 face_token 进行人脸搜索。使用图片进行搜索时会选取图片中检测到人脸尺寸最大的一个人脸。
* https://console.faceplusplus.com.cn/documents/4888381
* @ClassName : FaceSearchRequest
* @Description :
* @Author : dbin0123
* @Date: 2020-03-14 20:00
*/
public class FaceSearchRequest implements ApiRequest {
private String apiVersion = "v3";
private static String apiUrl = "/search";
private String bizContent;
private ApiObject bizModel = null;
@Override
public ApiMethod getApiMethod() {
return ApiMethod.POST;
}
@Override
public String getApiUrl() {
return "/" + this.apiVersion + apiUrl;
}
@Override
public Map getTextParams() throws IllegalAccessException {
return RequestParamUtils.getTextParams(this.bizModel);
}
@Override
public Map getByteArrayParams() throws IllegalAccessException {
return RequestParamUtils.getByteArrayParams(this.bizModel);
}
@Override
public Class getResponseClass() {
return FaceSearchResponse.class;
}
@Override
public String getApiVersion() {
return this.apiVersion;
}
@Override
public String getBizContent() {
return this.bizContent;
}
public void setBizModel(ApiObject bizModel) {
this.bizModel = bizModel;
}
@Override
public String signVersion() {
return null;
}
@Override
public String getSignInfo(String apiKey, String secretKey) throws Exception {
return null;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy