解读视频分类模型的预测结果

请求预测后,Vertex AI 会根据您的模型目标返回结果。分类模型中的预测结果会返回根据您自己定义的标签进行分类的视频镜头和片段。每个预测结果都分配有一个置信度分数。

置信度分数传达了模型将每个类列或标签与测试项相关联的强度。该数值越高,模型应用于该项的置信度就越高。您可以决定接受模型的置信度分数为多高。

分数阈值滑块

在 Google Cloud 控制台中,Vertex AI 提供一个滑块,用于调整所有类别或标签或者单个类别或标签的置信度阈值。滑块显示在评估标签页的模型详情页面上。置信度阈值是模型为测试项分配类或标签时必须具有的置信度水平。通过调整阈值,您可以看到模型的精度和召回率变化。较高的阈值通常可以提高精确率,并会降低召回率。

批量预测输出示例

以下示例是在视频中识别猫和狗的模型的预测结果。结果包括片段、镜头和一秒间隔分类。

{
  "instance": {
   "content": "gs://bucket/video.mp4",
    "mimeType": "video/mp4",
    "timeSegmentStart": "1s",
    "timeSegmentEnd": "5s"
  }
  "prediction": [{
    "id": "1",
    "displayName": "cat",
    "type": "segment-classification",
    "timeSegmentStart": "1s",
    "timeSegmentEnd": "5s",
    "confidence": 0.7
  }, {
    "id": "1",
    "displayName": "cat",
    "type": "shot-classification",
    "timeSegmentStart": "1s",
    "timeSegmentEnd": "4s",
    "confidence": 0.9
  }, {
    "id": "2",
    "displayName": "dog",
    "type": "shot-classification",
    "timeSegmentStart": "4s",
    "timeSegmentEnd": "5s",
    "confidence": 0.6
  }, {
    "id": "1",
    "displayName": "cat",
    "type": "one-sec-interval-classification",
    "timeSegmentStart": "1s",
    "timeSegmentEnd": "1s",
    "confidence": 0.95
  }, {
    "id": "1",
    "displayName": "cat",
    "type": "one-sec-interval-classification",
    "timeSegmentStart": "2s",
    "timeSegmentEnd": "2s",
    "confidence": 0.9
  }, {
    "id": "1",
    "displayName": "cat",
    "type": "one-sec-interval-classification",
    "timeSegmentStart": "3s",
    "timeSegmentEnd": "3s",
    "confidence": 0.85
  }, {
    "id": "2",
    "displayName": "dog",
    "type": "one-sec-interval-classification",
    "timeSegmentStart": "4s",
    "timeSegmentEnd": "4s",
    "confidence": 0.6
  }]
}