public class DetectFaceRequest extends AbstractModel
header, skipSign
Constructor and Description |
---|
DetectFaceRequest() |
DetectFaceRequest(DetectFaceRequest 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 |
getMaxFaceNum()
Get Maximum number of processable faces.
|
Long |
getMinFaceSize()
Get Minimum height and width of face in px.
|
Long |
getNeedFaceAttributes()
Get Whether the face attribute information (FaceAttributesInfo) needs to be returned.
|
Long |
getNeedQualityDetection()
Get Whether to enable quality detection.
|
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 |
setMaxFaceNum(Long MaxFaceNum)
Set Maximum number of processable faces.
|
void |
setMinFaceSize(Long MinFaceSize)
Set Minimum height and width of face in px.
|
void |
setNeedFaceAttributes(Long NeedFaceAttributes)
Set Whether the face attribute information (FaceAttributesInfo) needs to be returned.
|
void |
setNeedQualityDetection(Long NeedQualityDetection)
Set Whether to enable quality detection.
|
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, GetHeader, getMultipartRequestParams, getSkipSign, set, SetHeader, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, setSkipSign, toJsonString
public DetectFaceRequest()
public DetectFaceRequest(DetectFaceRequest source)
public Long getMaxFaceNum()
public void setMaxFaceNum(Long MaxFaceNum)
MaxFaceNum
- Maximum number of processable faces. Default value: 1 (i.e., detecting only the face with the largest size in the image). Maximum value: 120.
This parameter is used to control the number of faces in the image to be detected. The smaller the value, the faster the processing.public Long getMinFaceSize()
public void setMinFaceSize(Long MinFaceSize)
MinFaceSize
- Minimum height and width of face in px.
Default value: 34. We recommend keeping it at or above 34.
Faces below the `MinFaceSize` value will not be detected.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 Long getNeedFaceAttributes()
public void setNeedFaceAttributes(Long NeedFaceAttributes)
NeedFaceAttributes
- Whether the face attribute information (FaceAttributesInfo) needs to be returned. 0: no; 1: yes. Default value: 0.
If the value is not 1, it will be deemed as no need to return, and `FaceAttributesInfo` is meaningless in this case.
The face attribute information of up to 5 largest faces in the image will be returned, and `FaceAttributesInfo` of the 6th and rest faces is meaningless.
Extracting face attribute information is quite time-consuming. If face attribute information is not required, we recommend disabling this feature to speed up face detection.public Long getNeedQualityDetection()
public void setNeedQualityDetection(Long NeedQualityDetection)
NeedQualityDetection
- Whether to enable quality detection. 0: no; 1: yes. Default value: 0.
If the value is not 1, it will be deemed not to perform quality detection.
The face quality score information of up to 30 largest faces in the image will be returned, and `FaceQualityInfo` of the 31st and rest faces is meaningless.
We recommend enabling this feature for the face adding operation.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 © 2024. All rights reserved.