feat: add TraceArtifacts phase + VLM waits for all key_frame.jpg

- Add TraceArtifacts phase to TkgPhase enum (phase 18)
- Report progress as key_frame.jpg/key_face.jpg are created
- VLM trigger now polls until ALL key_frame.jpg files exist
  (was: started after TKG build, before artifacts were ready)
- Add iron rule to AGENTS.md: ask before removing data

Tested: Gamma 8 (27 traces) → 27/27 VLM summaries completed
This commit is contained in:
Accusys
2026-08-24 19:13:11 +08:00
parent d29b4804af
commit 9f12e835b8
43 changed files with 3993 additions and 491 deletions
@@ -302,7 +302,9 @@ curl -s "$API/api/v1/identity/$IDENTITY_UUID/traces?page=1&page_size=3" \
"last_frame": 38127,
"first_sec": 1519.0,
"last_sec": 1525.1,
"avg_confidence": 0.8254
"avg_confidence": 0.8254,
"avg_capture_quality": 0.6123,
"best_capture_quality": 0.7812
}
]
}
@@ -323,6 +325,8 @@ curl -s "$API/api/v1/identity/$IDENTITY_UUID/traces?page=1&page_size=3" \
| `traces[].first_sec` | float | Start time in seconds |
| `traces[].last_sec` | float | End time in seconds |
| `traces[].avg_confidence` | float | Average detection confidence (0.0–1.0) |
| `traces[].avg_capture_quality` | float | Average frame sharpness quality score (0.0–1.0) |
| `traces[].best_capture_quality` | float | Best frame sharpness quality score (0.0–1.0) |
#### Error Responses
@@ -1101,6 +1105,7 @@ PATCH /api/v1/identity/:identity_uuid
This **replaces** the entire `aliases` array. To add to existing aliases, include all existing entries in the request.
---
---
*Updated: 2026-08-12 — identity traces include capture_quality fields (avg_capture_quality, best_capture_quality)*
*Updated: 2026-07-21 — Fixed bind/unbind TKG update to match both trace_N and face_track_N external_id formats*
*Updated: 2026-06-20 — Added identity files, chunks, faces, status, and JSON endpoints*
+9 -1
View File
@@ -185,7 +185,14 @@ curl -s -X POST "$API/api/v1/file/$FILE_UUID/tkg/nodes" \
"properties": {
"trace_id": 0,
"frame_count": 142,
"avg_confidence": 0.87
"avg_confidence": 0.87,
"best_confidence": 0.92,
"avg_capture_quality": 0.61,
"best_capture_quality": 0.78,
"key_frame": 120,
"key_face": "tkg:face/0:point_xyz",
"avg_bbox": {"x": 200, "y": 150, "width": 60, "height": 60},
"best_bbox": {"x": 210, "y": 155, "width": 62, "height": 60}
}
}
]
@@ -524,3 +531,4 @@ curl -X POST "$API/api/v1/file/$FILE_UUID/trace/16/merge/3" \
---
*Updated: 2026-07-21 01:00:00*
*Updated: 2026-08-12 — face_track node properties now include capture_quality fields (avg/best) and key_frame/key_face are selected by best capture quality*
@@ -1,7 +1,7 @@
# People API
**Version**: 2.0
**Date**: 2026-07-26
**Version**: 2.1
**Date**: 2026-08-12
**Base URL**: `http://localhost:3002`
**Auth**: Requires API key header (`Authorization: Bearer <api_key>`)
**Doc Path**: `/Users/accusys/momentry_core/docs_v1.0/API_WORKSPACE/modules/19_people_api.md`
@@ -123,7 +123,9 @@ People Search 會搜尋以下欄位(ILIKE 模糊比對):
"end_time": null,
"key_frame": "key_frame.jpg",
"key_face": null,
"avg_confidence": 0.694
"avg_confidence": 0.694,
"avg_capture_quality": 0.512,
"best_capture_quality": 0.733
}
],
"total": 18
@@ -146,6 +148,8 @@ People Search 會搜尋以下欄位(ILIKE 模糊比對):
| `key_frame` | string \| null | 關鍵幀圖片路徑 |
| `key_face` | string \| null | 關鍵人臉裁切路徑 |
| `avg_confidence` | float \| null | 平均偵測信心值 |
| `avg_capture_quality` | float \| null | 平均畫面品質分數(清晰度,0~1) |
| `best_capture_quality` | float \| null | 該 trace 最佳畫面品質分數 |
---