枚举与类型
本章列出 AIMage SDK 中所有的枚举类型和结构化数据模型。
枚举类型
AIClassificationStatus
AI 分类处理状态。
from aimage.search.models.type import AIClassificationStatus
| 值 |
说明 |
UNCLASSIFIED |
未分类 |
CLASSIFIED |
已分类 |
IN_PROGRESS |
处理中 |
FAILED |
处理失败 |
SearchMode
搜索模式。
from aimage.search.models.type import SearchMode
| 值 |
说明 |
SCENE |
场景搜索(基于画面语义) |
SUBTITLE |
台词搜索(基于字幕文本) |
SceneType
场景类型。
from aimage.search.models.type import SceneType
| 值 |
说明 |
NORMAL |
正常场景 |
OP |
片头曲 |
ED |
片尾曲 |
OTHER |
其他 |
CameraShotAngle
拍摄角度。
from aimage.search.models.type import CameraShotAngle
| 值 |
说明 |
EYE_LEVEL |
平视角度 |
LOW_ANGLE |
仰拍角度 |
HIGH_ANGLE |
俯拍角度 |
DUTCH_ANGLE |
荷兰角(倾斜) |
OTHER |
其他 |
CameraWork
运镜方式。
from aimage.search.models.type import CameraWork
| 值 |
说明 |
FIX |
固定镜头 |
RIGHT_PAN |
右摇 |
LEFT_PAN |
左摇 |
UP_PAN |
上摇 |
DOWN_PAN |
下摇 |
ZOOM_IN |
推镜头 |
ZOOM_OUT |
拉镜头 |
TRACKING |
跟踪镜头 |
OTHER |
其他 |
ObjectSize
景别大小。
from aimage.search.models.type import ObjectSize
| 值 |
说明 |
LONG_SHOT |
远景 |
MEDIUM_SHOT |
中景 |
CLOSE_SHOT |
近景/特写 |
OTHER |
其他 |
IndoorOutdoor
室内/室外。
from aimage.search.models.type import IndoorOutdoor
| 值 |
说明 |
INDOOR |
室内 |
OUTDOOR |
室外 |
AMBIGUOUS |
不确定 |
SentimentType
对话情感类型。
from aimage.search.models.type import SentimentType
| 值 |
说明 |
POSITIVE |
积极 |
NEGATIVE |
消极 |
NEUTRAL |
中性 |
MIXED |
混合 |
UNKNOWN |
未知 |
RelationType
剧本对齐关系类型。
from aimage.search.models.type import RelationType
| 值 |
说明 |
exact_match |
精确匹配 |
fragment |
片段匹配 |
merge |
合并匹配 |
overlap |
重叠匹配 |
non_script |
非剧本内容 |
Confidence
置信度等级。
from aimage.search.models.type import Confidence
| 值 |
说明 |
high |
高置信度 |
medium |
中等置信度 |
low |
低置信度 |
ResourceRole
视频资源角色。
from aimage.search.models.type import ResourceRole
| 值 |
说明 |
script |
剧本 |
screenplay |
脚本 |
prop_list |
香盘表 |
other |
其他 |
ReferenceImageCategory
参考图片分类。
from aimage.search.models.type import ReferenceImageCategory
| 值 |
说明 |
background_art |
背景美术 |
prop_design |
道具设计 |
other |
其他 |
元数据分类类型。
from aimage.search.models.type import MetadataCategoryType
结构化数据模型
以下模型基于 Pydantic BaseModel,用于解析 API 返回的结构化数据。
ScriptData (剧本数据)
from aimage.search.models.type import ScriptData
| 属性 |
类型 |
说明 |
title |
str |
剧本标题 |
staffs |
list[Staff] |
制作人员列表 |
characters |
list[str] |
角色名列表 |
scripts |
list[Script] |
剧本内容列表 |
Staff
| 属性 |
类型 |
说明 |
name |
str |
人员姓名 |
role |
str |
职务 |
Script
| 属性 |
类型 |
说明 |
cut |
int | str |
Cut 编号 |
screen |
str |
画面描述 |
audio |
str |
音频/台词描述 |
Koubanhyou (香盘表)
from aimage.search.models.type import Koubanhyou
| 属性 |
类型 |
说明 |
cut |
list[Cut] |
Cut 列表 |
Cut
| 属性 |
类型 |
说明 |
part |
str | int | None |
分场编号 |
cut_ids |
str | int | ClipRange | list[...] |
Cut ID |
is_bank |
bool |
是否为 Bank(素材库复用) |
bank_source |
str | int | ClipRange | list[...] | None |
Bank 来源 |
locations |
list[Location] |
场景列表 |
environment |
list[Environment] |
环境信息 |
lighting |
list[Lighting] |
灯光信息 |
characters |
list[Character] |
角色列表 |
props |
list[Prop] |
道具列表 |
notes |
str | None |
备注 |
missed_information |
dict[str, str] | None |
遗漏信息 |
Location
| 属性 |
类型 |
说明 |
id |
str | int | None |
场景 ID |
name |
str | None |
场景名称 |
original_name |
str | None |
原始名称 |
sub |
list[str] | None |
子场景 |
original_sub |
list[str] | None |
原始子场景 |
effect |
str | None |
特效 |
ref_or_note |
str | None |
参考/备注 |
Environment
| 属性 |
类型 |
说明 |
weather |
str | None |
天气 |
season |
str | None |
季节 |
period |
str | None |
时间段 |
Lighting
| 属性 |
类型 |
说明 |
id |
str | int | None |
灯光 ID |
name |
str | None |
灯光名称 |
original_name |
str | None |
原始名称 |
ref_or_note |
str | None |
参考/备注 |
Character (type.py)
命名区分
此 Character 是 type.py 中用于香盘表的简化角色模型,与 character.py 中的完整 Character 模型不同。
| 属性 |
类型 |
说明 |
id |
str | int | None |
角色 ID |
name |
str | None |
角色名称 |
original_name |
str | None |
原始名称 |
costume |
str | None |
服装描述 |
original_costume |
str | None |
原始服装名称 |
ref_or_note |
str | None |
参考/备注 |
Prop
| 属性 |
类型 |
说明 |
id |
str | int | None |
道具 ID |
name |
str | None |
道具名称 |
original_name |
str | None |
原始名称 |
ref_or_note |
str | None |
参考/备注 |
ClipRange
| 属性 |
类型 |
说明 |
start |
str | int |
起始 Cut |
end |
str | int |
结束 Cut |
Clip 相关模型
以下模型用于描述片段(Clip)的标签、元数据等结构。
CharacterInventory
角色库存信息。
from aimage.search.models.type import CharacterInventory
| 属性 |
类型 |
说明 |
character_id |
int |
角色 ID |
description |
str |
描述 |
expression |
str |
表情 |
pose |
str |
姿势 |
ClipCustomTag
自定义标签。
from aimage.search.models.type import ClipCustomTag
| 属性 |
类型 |
说明 |
category |
str |
标签分类 |
value |
str |
标签值 |
project_id |
str |
所属项目 ID |
ClipAITag
AI 自动为每个片段生成的标签信息。
from aimage.search.models.type import ClipAITag
角色相关
| 属性 |
类型 |
说明 |
character |
str | None |
主要角色描述 |
character_number |
int | None |
角色数量 |
characters |
list[str] | None |
角色名列表 |
detected_characters |
str | None |
检测到的角色 |
画面分析
| 属性 |
类型 |
说明 |
face_expression |
str | None |
面部表情 |
action |
str | None |
动作描述 |
character_composition |
str | None |
角色构图 |
镜头信息
| 属性 |
类型 |
说明 |
camera_angle |
str | None |
镜头角度描述 |
camera_work |
CameraWork | None |
运镜方式 |
camera_shot_angle |
CameraShotAngle | None |
拍摄角度 |
object_size |
ObjectSize | None |
景别大小 |
场景信息
| 属性 |
类型 |
说明 |
scene_type |
SceneType | None |
场景类型 |
indoor_outdoor |
IndoorOutdoor | None |
室内/室外 |
time |
str | None |
时间段 |
situation |
str | None |
场景描述 |
color |
str | None |
画面色调 |
location |
str | None |
场景地点 |
情感与对话
| 属性 |
类型 |
说明 |
dialog_sentiment |
SentimentType | None |
对话情感 |
sentiment_intensity |
float | None |
情感强度 |
物品与附加信息
| 属性 |
类型 |
说明 |
props |
list[str] | None |
道具列表 |
objects |
str | None |
物体描述 |
voice_analysis |
str | None |
语音分析 |
episode_meta_info |
str | None |
集元信息 |
notes |
str | None |
备注 |
ClipTag
继承自 ClipAITag,表示经过人工确认的标签,属性与 ClipAITag 完全一致。
from aimage.search.models.type import ClipTag
ClipScriptInfo
描述片段与剧本的对齐关系。
from aimage.search.models.type import ClipScriptInfo
| 属性 |
类型 |
说明 |
cut_ids |
list[int|str] | None |
对应的 Cut ID 列表 |
confidence |
Confidence | None |
对齐置信度(high / medium / low) |
relation_type |
RelationType | None |
对齐关系类型 |
script_audio |
str | None |
剧本中的音频部分 |
script_screen |
str | None |
剧本中的画面部分 |
alignment_reason |
str | None |
对齐原因说明 |
片段的元数据信息。
from aimage.search.models.type import ClipMetadata
| 属性 |
类型 |
说明 |
video_id |
str | None |
所属视频 ID |
season_number |
int | None |
季号 |
episode_number |
int | None |
集号 |
clip_number |
int | None |
片段编号 |
character |
str | None |
角色描述 |
character_number |
int | None |
角色数量 |
face_expression |
str | None |
面部表情 |
action |
str | None |
动作描述 |
camera_angle |
str | None |
镜头角度 |
camera_work |
str | None |
运镜方式 |
character_composition |
str | None |
角色构图 |
time |
str | None |
时间段 |
situation |
str | None |
场景描述 |
color |
str | None |
画面色调 |
location |
str | None |
场景地点 |
characters |
list[str] | None |
角色名列表 |
props |
list[str] | None |
道具列表 |
notes |
str | None |
备注 |
scene_type |
str | None |
场景类型 |
script_info |
ClipScriptInfo | None |
剧本对齐信息 |
Character 相关模型
以下模型用于描述角色的关联信息。
角色关联信息。
from aimage.search.models.type import CharacterRelatedInfo
| 属性 |
类型 |
说明 |
id |
str |
关联信息 ID |
message |
str |
信息内容 |
subject |
str | None |
主题 |
updated_at |
str |
更新时间 |
VideoCharacter
视频与角色的关联关系。
from aimage.search.models.type import VideoCharacter
| 属性 |
类型 |
说明 |
video_id |
str |
视频 ID |
character_id |
str |
角色 ID |