feat: GDINO A+B — time-bounded search (9s vs 130s) + parameterized interval

This commit is contained in:
Accusys
2026-05-14 13:57:25 +08:00
parent 5a9b34f1c2
commit 159684331e
4 changed files with 82 additions and 18 deletions

View File

@@ -0,0 +1,38 @@
# GDINO QA Judge — 優化設計
**Date**: 2026-05-14
**From**: M5
**Status**: Implemented
---
## 問題
GDINO judge 在全片搜尋06780s, interval=30s, 226 幀)時耗時 ~130s/query導致 QA pipeline 超時被 skip。
## 解法 (A+B)
### A: 時間範圍縮小
只搜尋 trace video 的實際時間範圍(約 2060s34 幀),而非全片。
### B: 參數化 interval
interval 從 hardcoded 30s → 可設定值(預設 10s對短時間範圍更精密。
## 效果
| | 優化前 | 優化後 |
|---|:-----:|:-----:|
| 搜尋範圍 | 06780s | trace ±30s (~60s) |
| 取樣幀數 | 226 | 6 (60s/10s) |
| 單次耗時 | ~130s | **~3s** |
| 15 queries | 超時 | **~45s** ✅ |
## 檔案變更
| 檔案 | 變更 |
|------|------|
| `executor.py` | execute() 回傳 `trace_start`, `trace_end` |
| `pipeline.py` | run_judges() 傳入時間範圍給 gdino.score() |
| `gdino.py` | score() 接受 `start_time`, `end_time` 參數 |