Files
momentry_core/test_charade_qa.sh
Accusys c39805bb8e feat: Phase 2.5 gaze_trace and lip_trace Qdrant migration + Charade Q&A test
Phase 2.5.1: gaze_trace_nodes from Qdrant
- build_gaze_trace_nodes_from_qdrant()
- Read trace_id, frame, bbox from Qdrant payload
- Compute gaze stats (yaw, pitch, roll, gaze direction, blink)
- No PostgreSQL face_detections dependency

Phase 2.5.2: lip_trace_nodes from Qdrant + face.json
- build_lip_trace_nodes_from_qdrant()
- Match trace_id using Qdrant embeddings + face.json bbox
- Compute lip stats (openness, variance, speaking frames)
- Fixed face.json bbox structure (x,y,width,height not bbox object)

Test results:
- 23 gaze_trace nodes from Qdrant
- 23 lip_trace nodes from Qdrant + face.json
- 51 lip_sync edges created
- Charade Q&A: 20 identities, 75 relationship chunks

Docs:
- TKG_PHASE2_NONFACE_MIGRATION_V1.0.md (migration plan)
- 2026-06-21_charade_qa_test.md (Q&A test report)
2026-06-21 02:17:08 +08:00

34 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
# Charade Q&A Test Example
API_KEY="muser_68600856036340bcafc01930eb4bd839_1774418104_97221b69"
BASE_URL="http://localhost:3003"
echo "=== Charade 问答测试示例 ==="
echo ""
# 1. 查询人物身份
echo "Q1: Who is Louis Viret?"
curl -s "$BASE_URL/api/v1/identities" \
-H "X-API-Key: $API_KEY" 2>&1 | jq '.identities[] | select(.name == "Louis Viret") | {id, name, source}'
echo ""
# 2. 查询视频中的 face traces
echo "Q2: What face traces exist in the video?"
curl -s -X POST "$BASE_URL/api/v1/file/d3f9ae8e471a1fc4d47022c66091b920/tkg/rebuild" \
-H "X-API-Key: $API_KEY" 2>&1 | jq '.result | {face_trace_nodes, gaze_trace_nodes, lip_trace_nodes}'
echo ""
# 3. 查询关系
echo "Q3: What relationship chunks exist?"
curl -s -X POST "$BASE_URL/api/v1/file/d3f9ae8e471a1fc4d47022c66091b920/rule2" \
-H "X-API-Key: $API_KEY" 2>&1 | jq '{success, rule2_chunks}'
echo ""
# 4. 查询 face embeddings
echo "Q4: How many face embeddings in Qdrant?"
curl -s "$BASE_URL/api/v1/file/d3f9ae8e471a1fc4d47022c66091b920/tkg/stats" \
-H "X-API-Key: $API_KEY" 2>&1 | jq '.'
echo ""
echo "=== 测试完成 ==="