基于 Flask + Plotly 的书法轨迹交互可视化应用。
cd /workspace/Trajectory-visualization
uv sync
uv run python app.py启动后访问:
http://127.0.0.1:8000
页面提供以下控制项:
time_start滑条:设置时间窗口起点(0%~100%)。time_end滑条:设置时间窗口终点(0%~100%)。time_forcing滑条:设置高亮时刻(默认跟随开始时间)。pen_length:笔长参数,用于尾部延伸预测笔尖。contact_threshold:桌面接触阈值。smooth+smooth_window:轨迹平滑选项(滑动平均)用于缓解采集噪声。- 新增右手手部 3D 轨迹图:读取
sample/preds_world.jsonl(pred3d/pred3d_world),独立展示 right 手运动轨迹。
默认读取:
sample/meta.jsonsample/pen_data.jsonlsample/20260226151623.txt
uv run python -m compileall app.py src
uv run python - <<'PY'
from app import app
c = app.test_client()
print(c.get('/').status_code)
print(c.get('/?start_pct=10&end_pct=60&forcing_pct=20&smooth=on&smooth_window=7').status_code)
PY