UpdateSmarttagTemplate

更新时间:
复制 MD 格式

Updates the analysis template for a smart tag job.

Operation description

This operation updates a template that specifies the analysis algorithms for a smart tag job. You can combine different parameters as needed.

QPS limits

The queries per second (QPS) limit for this operation is 100 calls per second for each user. If you exceed the limit, API calls are subject to rate limiting, which can affect your business. Call this operation at a reasonable rate. For more information, see QPS limits.

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 ID of the template. Obtain this ID from the response of the Add a template operation.

05de22f255284c7a8d2aab535dde****

TemplateName

string

No

The name of the custom template. The name can contain English and Chinese characters and be up to 120 characters long.

template-example-****

Industry

string

No

The industry of the file to be analyzed. The default value is common (general). Select a suitable industry to match the file with the appropriate algorithm combination. Valid values:

  • microVideo: The short-form video industry.

  • common: The general industry.

common

Scene

string

No

The scenario. Select a suitable scenario to match the file with the appropriate algorithm combination. The default value is search. Valid values:

  • search: The search scenario.

  • recommend: The recommendation scenario.

  • The default value is search.

search

AnalyseTypes

string

No

The analysis types. You can select multiple types. Separate them with commas (,). The following types are available:

  • ocr: Recognizes labels from text in images.

  • asr: Recognizes labels from speech in audio.

  • classification: Video classification.

  • shows: Recognizes programs 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 action events in videos.

  • emotion: Recognizes expressions in videos.

  • landmark: Recognizes landmarks in videos.

  • scene: Recognizes scenes in videos.

  • movielp: Recognizes movie and TV intellectual properties (IPs) in videos.

  • subtitle: Caption extraction.

ocr,asr

FaceCategoryIds

string

No

The IDs of the face libraries for recognition. You can specify multiple IDs, separated by commas (,). You can enter the IDs of system face libraries and custom face libraries. The default value is celebrity, politician, and sensitive. The system face library IDs are as follows:

  • celebrity: Celebrities.

  • politician: Political figures.

  • sensitive: Sensitive figures.

  • Default value: celebrity, politician, and sensitive.

Note

For more information about the IDs of custom face libraries, see Custom face library operations.

celebrity

FaceCustomParamsConfig

string

No

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

  • faceDetThreshold: The face detection threshold. The default value is 0.999. This parameter is valid only for the analysis of unrecognized faces.

  • faceRegThreshold: The facial recognition threshold. The default value is 0.9.

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

ObjectGroupIds

string

No

The IDs of the object libraries for recognition. You can specify multiple IDs, separated by commas (,). You can enter the IDs of system object libraries and custom object libraries. The system object library IDs are as follows:

  • general: General.

  • item: Commodity.

  • weapon: Weapon.

  • animal: Animal.

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

general,item,weapon,animal

LandmarkGroupIds

string

No

The IDs of the landmark libraries for recognition. You can specify multiple IDs, separated by commas (,). You can enter the IDs of system landmark libraries and custom landmark libraries. The system landmark library IDs are as follows:

common

IsDefault

boolean

No

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

  • true: The template is the default template.

  • false: The template is not the default template.

The default value is false. Each user can have only one default template.

true

LabelType

string

No

The labeling type. The default value is auto. The following types are supported:

  • auto: Machine-generated labels.

  • hmi: Human-machine collaboration.

hmi

LabelVersion

string

No

Specifies the smart tag version. The default value is "1.0".

  • 1.0: Smart Tag 1.0.

  • 2.0: Smart Tag 2.0 (CPV tags).

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

1.0

KnowledgeConfig

string

No

In Smart Tag 2.0 and 2.0-custom modes, this parameter sets the scope of knowledge graph fields that are returned in the tagging results. For more information about knowledge graph information, see Knowledge graph fields in smart tag operations. If you do not specify this parameter, or if the value of knowledgeConfig is empty or not a valid JSON string, the following fields are returned by default:

  • movie:

    • name: The IP name

    • alias: The IP alias

    • chnl: The category

    • genre: The genre

    • country: The country or region of production

    • language: The language

    • releaseYear: The release year

  • music:

    • songName: The song name

    • artistName: The artist name

    • artistArea: The region of the artist, such as Chinese-speaking, Japan, Korea, Europe and the United States, or Other.

    • albumName: The album name

  • person:

    • name: The name

    • gender: The gender

    • citizenship: The citizenship

    • occupation: The occupation

    • classification: The type

    • nationality: The nationality

    • birthPlace: The place of birth

    • birthDate: The date of birth

  • landmark

    • name: The name

    • nameEn: The English name

    • description: The description

    • address: The address

  • item

    • brandName: The brand

    • finegrainName: The fine-grained description

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

KeywordConfig

string

No

The keyword tag configuration. `type` specifies the part-of-speech categories. You can select multiple categories, separated by commas (,). The following categories are available:

  • name: Person name

  • location: Location name

  • organization: Organization name

  • other: Other

Note

If you do not specify this parameter, or if its value is invalid, all keyword categories are returned by default. A value is invalid if it is not a valid JSON string, is missing the type field, or has an invalid type value.

{ "type": "name,location,organization,other" }

TemplateConfig

string

No

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The ID of the request.

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.