360 Secure SkillHub
360 安全技能中心

Tomoviee Image Recognition

核心功能是自动生成图像中物体或区域的掩码,支持边缘、姿态、主体、深度四种识别类型,适用于图像分割、目标提取等图像识别类任务。需通过Python客户端调用异步API,输入待分析图像URL并指定识别类型;创建任务后轮询状态,完成后输出包含掩码文件URL的JSON结果,使用前需获取平台API密钥认证。

wondershare-boop
wondershare-boop
热度 67.80
最近更新 2026-05-11 17:29:21
分类:创作依赖:第三方 API / 代码执行应用场景:图像生成

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add tomoviee-image-recognition
Metadata
name
tomoviee-recognition
description
Auto-generate masks for objects/regions in images. Use when users request image_recognition operations or related tasks.

Tomoviee AI - 图像识别 (Image Recognition)

Overview

Auto-generate masks for objects/regions in images.

API: tm_reference_img2mask

Quick Start

Authentication

python scripts/generate_auth_token.py YOUR_APP_KEY YOUR_APP_SECRET

Python Client

from scripts.tomoviee_image_recognition_client import TomovieeClient

client = TomovieeClient("app_key", "app_secret")

API Usage

Basic Example

task_id = client._make_request({
    image='https://example.com/photo.jpg'
    control_type='2'  # subject/default
})

result = client.poll_until_complete(task_id)
import json
output = json.loads(result['result'])

Parameters

  • image (required): Image URL to analyze
  • control_type: 0=edge, 1=pose, 2=subject, 3=depth

Async Workflow

  1. Create task: Get task_id from API call
  2. Poll for completion: Use poll_until_complete(task_id)
  3. Extract result: Parse returned JSON for output URLs

Status codes:

  • 1 = Queued
  • 2 = Processing
  • 3 = Success (ready)
  • 4 = Failed
  • 5 = Cancelled
  • 6 = Timeout

Resources

scripts/

  • tomoviee_image_recognition_client.py - API client
  • generate_auth_token.py - Auth token generator

references/

See bundled reference documents for detailed API documentation and examples.

External Resources