-
Notifications
You must be signed in to change notification settings - Fork 0
Inference
sebastEXlabe edited this page Jun 10, 2026
·
1 revision
推理引擎内嵌在 API 服务中 (/inference/*),单端口架构无需独立服务。
从 /api/models/list 获取可用模型列表,通过 /inference/load 加载。
通过 /inference/load/upload 上传 .pt 文件直接加载。
| 模态 | 输入 | 特征提取 | 特征维度 |
|---|---|---|---|
| 文本 | 输入框 | GloVe 词向量 (21,172词) | 300 |
| 音频 | .wav 文件 | librosa MFCC + 频谱特征 | 74 |
| 视频 | .mp4 文件 | OpenCV 逐帧灰度特征 | 35 |
推理时自动检测可用模态:
- 未提供的模态使用零张量填充
- 模态掩码动态标记可用/缺失状态
- 模型 MissingHandler 自动补全缺失模态特征
- 位置:
data/glove_embeddings.pkl - 大小: 26MB, 21,172 词
- 来源: CMU-MOSEI TimestampedWordVectors
- 未登录词: 全零向量占位
{
"sentiment": 1.4622,
"label": "积极 (Positive)",
"confidence": 0.4874,
"modalities_used": ["text"],
"feature_info": {
"text": {"tokens": 13, "embed_dim": 300},
"audio": null,
"video": null
},
"timestamp": "2026-06-11T03:28:15.703697"
}