public class AnalyzeFaceRequest extends AbstractModel
Constructor and Description |
---|
AnalyzeFaceRequest() |
AnalyzeFaceRequest(AnalyzeFaceRequest source)
NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
|
Modifier and Type | Method and Description |
---|---|
String |
getFaceModelVersion()
Get Algorithm model version used by the Face Recognition service.
|
String |
getImage()
Get Base64-encoded image data, which cannot exceed 5 MB.
|
Long |
getMode()
Get Detection mode.
|
Long |
getNeedRotateDetection()
Get Whether to enable the support for rotated image recognition.
|
String |
getUrl()
Get Image URL.
|
void |
setFaceModelVersion(String FaceModelVersion)
Set Algorithm model version used by the Face Recognition service.
|
void |
setImage(String Image)
Set Base64-encoded image data, which cannot exceed 5 MB.
|
void |
setMode(Long Mode)
Set Detection mode.
|
void |
setNeedRotateDetection(Long NeedRotateDetection)
Set Whether to enable the support for rotated image recognition.
|
void |
setUrl(String Url)
Set Image URL.
|
void |
toMap(HashMap<String,String> map,
String prefix)
Internal implementation, normal users should not use it.
|
any, fromJsonString, getBinaryParams, getMultipartRequestParams, set, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, toJsonString
public AnalyzeFaceRequest()
public AnalyzeFaceRequest(AnalyzeFaceRequest source)
public Long getMode()
public void setMode(Long Mode)
Mode
- Detection mode. 0: detect all faces that appear; 1: detect the largest face. Default value: 0. The facial feature localization information (facial keypoints) of up to 10 faces can be returned.public String getImage()
public void setImage(String Image)
Image
- Base64-encoded image data, which cannot exceed 5 MB.
The long side cannot exceed 4,000 px for images in JPG format or 2,000 px for images in other formats.
PNG, JPG, JPEG, and BMP images are supported, while GIF images are not.public String getUrl()
public void setUrl(String Url)
Url
- Image URL. The image cannot exceed 5 MB in size after being Base64-encoded.
The long side cannot exceed 4,000 px for images in JPG format or 2,000 px for images in other formats.
Either `Url` or `Image` must be provided; if both are provided, only `Url` will be used.
We recommend storing the image in Tencent Cloud, as a Tencent Cloud URL can guarantee higher download speed and stability.
The download speed and stability of non-Tencent Cloud URLs may be low.
PNG, JPG, JPEG, and BMP images are supported, while GIF images are not.public String getFaceModelVersion()
public void setFaceModelVersion(String FaceModelVersion)
FaceModelVersion
- Algorithm model version used by the Face Recognition service.
Currently, `2.0` and `3.0` are supported.
This parameter is `3.0` by default starting from April 2, 2020. If it is left empty for accounts that used this API, `2.0` will be used by default.
The parameter can be set only to `3.0` for accounts that purchase the service after November 26, 2020.
Different algorithm model versions correspond to different face recognition algorithms. The 3.0 version has a better overall effect than the legacy version and is recommended.public Long getNeedRotateDetection()
public void setNeedRotateDetection(Long NeedRotateDetection)
NeedRotateDetection
- Whether to enable the support for rotated image recognition. 0: no; 1: yes. Default value: 0. When the face in the image is rotated and the image has no EXIF information, if this parameter is not enabled, the face in the image cannot be correctly detected and recognized. If you are sure that the input image contains EXIF information or the face in the image will not be rotated, do not enable this parameter, as the overall time consumption may increase by hundreds of milliseconds after it is enabled.Copyright © 2023. All rights reserved.