UpdateSmarttagTemplate

Updated at:

Updates the analysis template of a smart tag job.

Operation description

The template updated by this operation specifies the analysis algorithm for a smart tag job. You can combine different parameters based on your 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 services. Make API calls at a reasonable frequency. For more information, see QPS limit.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

mts:UpdateSmarttagTemplate

update

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

TemplateId

string

Yes

The template ID. You can obtain the ID from the response parameters of the Add template operation.

05de22f255284c7a8d2aab535dde****

TemplateName

string

No

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

No

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 combination applicable to the industry in the background. Valid values:

  • microVideo: short video industry.

  • common: general industry.

common

Scene

string

No

The scenario. Select an appropriate scenario so that the system can match the applicable algorithm combination in the background. Valid values:

  • search: search scenario.

  • recommend: recommendation scenario.

  • Default value: search.

search

AnalyseTypes

string

No

The analysis types. You can specify multiple types and separate them with commas (,). Valid values:

  • ocr: recognizes labels from text in images.

  • asr: recognizes labels from audio speech.

  • classification: video categorization.

  • shows: recognizes TV shows in videos.

  • face: recognizes faces in videos.

  • role: recognizes character roles in videos.

  • object: recognizes objects in videos.

  • tvstation: recognizes TV station logos in videos.

  • action: recognizes actions and events in videos.

  • emotion: recognizes facial expressions in videos.

  • landmark: recognizes landmarks in videos.

  • scene: recognizes scenarios in videos.

  • movielp: recognizes movie IPs in videos.

  • subtitle: the caption fetch feature.

ocr,asr

FaceCategoryIds

string

No

The IDs of the face libraries used for recognition. You can specify 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:

  • celebrity: celebrities.

  • politician: politicians.

  • sensitive: sensitive figures.

Default value: celebrity, politician, and sensitive.

Note

For more information about custom face library IDs, see Custom face API description.

celebrity

FaceCustomParamsConfig

string

No

The parameters for the face algorithm in JSON string format. Currently, the face detection threshold and face recognition threshold are supported.

  • faceDetThreshold: the face detection threshold. Default value: 0.999. This parameter takes effect only for unknown face analysis.

  • faceRegThreshold: the face recognition threshold. Default value: 0.9.

{ "faceDetThreshold":0.999, "faceRegThreshold":0.9 }

ObjectGroupIds

string

No

The IDs of the object libraries used for recognition. You can specify 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:

  • general: general.

  • item: commodities.

  • weapon: weapons.

  • animal: animals.

  • For more information about custom object library IDs, see the description of the Register custom entity operation.

general,item,weapon,animal

LandmarkGroupIds

string

No

The IDs of the landmark libraries used for recognition. You can specify 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:

  • common: general.

  • For more information about custom landmark library IDs, see the description of the Register custom entity photo operation.

common

IsDefault

boolean

No

Specifies whether the template is the default template. Valid values:

  • true: yes.

  • false: no.

Default value: false. A user can have only one default template.

true

LabelType

string

No

The tagging type. Default value: auto. Valid values:

  • auto: machine tagging.

  • hmi: human-machine collaboration.

hmi

LabelVersion

string

No

The smart tag version. Default value: 1.0. Valid values:

  • 1.0: Smart Tag 1.0.

  • 2.0: Smart Tag 2.0 (CPV tags).

  • 2.0-custom: Smart Tag 2.0-custom (custom model for CPV tags).

1.0

KnowledgeConfig

string

No

The field scope of the knowledge graph information recognized in the returned tag results in Smart Tag 2.0 and 2.0-custom modes. For more information about the knowledge graph, see Description of knowledge graph fields in smart tag 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: IP name

    • alias: IP alias

    • chnl: category

    • genre: genre

    • country: producing country or region

    • language: language

    • releaseYear: release year

  • music:

    • songName: song name

    • artistName: artist name

    • artistArea: artist region, such as Chinese, Japanese, Korean, European and American, or other

    • albumName: album name

  • person:

    • name: name

    • gender: gender

    • citizenship: nationality

    • occupation: occupation

    • classification: category

    • nationality: ethnicity

    • birthPlace: birthplace

    • birthDate: date of birth

  • landmark:

    • name: name

    • nameEn: English name

    • description: description

    • address: address

  • item:

    • brandName: brand

    • finegrainName: fine-grained description

{ "movie":"name,alias,chnl,genre", "music":"songName,artistName", "person":"name,gender" }

KeywordConfig

string

No

The keyword tag configuration. The type parameter specifies the part-of-speech categories. You can specify multiple categories and separate them with commas (,). Valid values:

  • name: person name

  • location: location name

  • organization: organization name

  • other: other

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" }

TemplateConfig

string

No

The smart tag template configuration in JSON character string format. 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.

5210DBB0-E327-4D45-ADBC-0B83C8796E26

Examples

Success response

JSON format

{
  "RequestId": "5210DBB0-E327-4D45-ADBC-0B83C8796E26"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.