AddSmarttagTemplate
Adds an analysis template for a smart tagging job.
Operation description
The template added by this operation specifies the analysis algorithms used in a smart tagging job. You can combine different parameters based on your actual business requirements.
QPS limit
The QPS limit for a single user is 100 calls per second. If the limit is exceeded, API calls are throttled, which may affect your business. Make API calls at a reasonable rate. For more information, see QPS limit.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
mts:AddSmarttagTemplate |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| TemplateName |
string |
Yes |
The custom template name. The name can contain Chinese and English characters and must be up to 120 characters in length. |
template-example-**** |
| Industry |
string |
Yes |
The industry of the file to be analyzed. Default value: common (general industry). Select an appropriate industry so that the system can match the algorithm combinations suitable for the industry in the background. Valid values:
|
common |
| Scene |
string |
Yes |
The scenarios of the file to be analyzed. Select appropriate scenarios so that the system can match the applicable algorithm combinations in the background. Valid values:
|
search |
| AnalyseTypes |
string |
Yes |
The analysis types. You can select multiple types and separate them with commas (,). The following types are supported: Note
Make sure that the file to be analyzed contains the results of the selected analysis types. Otherwise, the query result may be empty. For example, if you select ocr as the analysis type but the uploaded image does not contain OCR results, an empty result is returned.
The mapping between analysis types and billable items is as follows: Note
Fees are generated for the analysis types enabled by configuring the smart tagging feature through this operation. For billing standards, see Billable items.
|
ocr |
| FaceCategoryIds |
string |
No |
The IDs of the face libraries used for recognition. You can select multiple IDs and separate them with commas (,). You can specify system face library IDs and custom face library IDs. The system face library IDs are as follows:
For custom face library IDs, see Register custom faces. |
celebrity |
| FaceCustomParamsConfig |
string |
No |
The parameters of the face algorithm in JSON string format. Currently, you can adjust the face detection threshold and face recognition threshold.
|
{ "faceDetThreshold":0.999, "faceRegThreshold":0.9 } |
| ObjectGroupIds |
string |
No |
The IDs of the object libraries used for recognition. You can select multiple IDs and separate them with commas (,). You can specify system object library IDs and custom object library IDs. The system object library IDs are as follows:
For custom object library IDs, see Register custom entities. |
general,item,weapon,animal |
| LandmarkGroupIds |
string |
No |
The IDs of the landmark libraries used for recognition. You can select multiple IDs and separate them with commas (,). You can specify system landmark library IDs and custom landmark library IDs. The system landmark library IDs are as follows:
For custom landmark library IDs, see Register custom entity photos. |
common |
| IsDefault |
boolean |
No |
Specifies whether to set the template as the default template. If the template is set as the default template and no transcoding template is specified during transcoding, the default template is used. Valid values: true and false. Default value: false. An Alibaba Cloud account can have only one default template. An error is reported if you set multiple default templates. |
true |
| LabelType |
string |
No |
The tagging type. The following types are supported:
|
hmi |
| LabelVersion |
string |
No |
The smart tagging version. Default value: 1.0. Valid values:
|
1.0 |
| KnowledgeConfig |
string |
No |
The scope of knowledge graph information fields recognized in the returned tag results in Smart Tagging 2.0 and 2.0-custom modes. For more information about knowledge graph information, see Knowledge graph fields in smart tagging operations. If this parameter is not specified, is empty, or is invalid (not a JSON string), the following fields are returned by default:
|
{ "movie":"name,alias,chnl,genre", "music":"songName,artistName", "person":"name,gender" } |
| KeywordConfig |
string |
No |
The keyword tag configuration. The type field specifies the part-of-speech categories. You can select multiple categories and separate them with commas (,). The following categories are supported:
Note
If KeywordConfig is not passed, the Keyword field is invalid (not a JSON string), KeywordsConfig does not contain the type field, or the type field is invalid, keywords of all types are returned by default. |
"type": "name,location,organization,other" } |
| LabelCustomCategoryIds |
string |
No |
The IDs of the custom tag libraries used for recognition. You can select multiple IDs and separate them with commas (,). |
ab***cd,ef***hi |
| LabelCustomParamsConfig |
string |
No |
The parameter settings for additional custom label libraries. Currently, only threshold settings are supported. {"threshold": xxx} |
{"threshold": 0.4} |
| TemplateConfig |
string |
No |
The smart tagging template configuration, passed as a JSON string. Configuration items include the industry, scenarios, and analysis types. The passed configuration items overwrite the corresponding original configurations in the template. |
{"Industry":"common","Scene":"search","AnalyseTypes":"ocr,asr,nlp"} |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
7B117AF5-2A16-412C-B127-FA6175EDAS3Q |
| TemplateId |
string |
The template ID. We recommend that you save this ID for subsequent calls to other related operations. |
05de22f255284c7a8d2aab535dde**** |
Examples
Success response
JSON format
{
"RequestId": "7B117AF5-2A16-412C-B127-FA6175EDAS3Q",
"TemplateId": "05de22f255284c7a8d2aab535dde****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.