public class DetectFaceAttributesRequest extends AbstractModel
Constructor and Description |
---|
DetectFaceAttributesRequest() |
DetectFaceAttributesRequest(DetectFaceAttributesRequest 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 |
getFaceAttributesType()
Get Whether to return attributes such as age, gender, and emotion.
|
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 |
getNeedRotateDetection()
Get Whether to enable the support for rotated image recognition.
|
String |
getUrl()
Get Image URL.
|
void |
setFaceAttributesType(String FaceAttributesType)
Set Whether to return attributes such as age, gender, and emotion.
|
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 |
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 DetectFaceAttributesRequest()
public DetectFaceAttributesRequest(DetectFaceAttributesRequest 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 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 getFaceAttributesType()
public void setFaceAttributesType(String FaceAttributesType)
FaceAttributesType
- Whether to return attributes such as age, gender, and emotion.
Valid values (case-insensitive): None, Age, Beauty, Emotion, Eye, Eyebrow, Gender, Hair, Hat, Headpose, Mask, Mouth, Moustache, Nose, Shape, Skin, Smile.
`None` indicates that no attributes need to be returned, which is the default value; that is, if the `FaceAttributesType` attribute is empty, the values of all attributes will be `0`.
You need to combine the attributes into a string and separate them by comma. The sequence of the attributes is not limited.
For more information on the attributes, see the output parameters as described below.
The face attribute information of up to 5 largest faces in the image will be returned, and `AttributesInfo` of the 6th and rest faces is meaningless.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 is not rotated, do not enable this parameter, as the overall time consumption may increase by hundreds of milliseconds after it is enabled.public String getFaceModelVersion()
public void setFaceModelVersion(String FaceModelVersion)
FaceModelVersion
- Algorithm model version used by the Face Recognition service. You can enter only `3.0` for this API.Copyright © 2023. All rights reserved.