From bf0319660befd0fd4364fa905b3ae4bfedd1aba5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E9=BB=98=E6=B6=B5?= <21739308@qq.com> Date: Wed, 23 Sep 2026 10:00:02 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E8=AE=B0=E5=BD=95=E6=B5=8F=E8=A7=88?= =?UTF-8?q?=E5=99=A8=E8=BF=90=E5=8A=A8=E4=BC=B0=E8=AE=A1=E5=AE=9E=E9=AA=8C?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...09-23-tracking-motion-estimation-design.md | 129 ++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 docs/superpowers/specs/2026-09-23-tracking-motion-estimation-design.md diff --git a/docs/superpowers/specs/2026-09-23-tracking-motion-estimation-design.md b/docs/superpowers/specs/2026-09-23-tracking-motion-estimation-design.md new file mode 100644 index 0000000..7f38084 --- /dev/null +++ b/docs/superpowers/specs/2026-09-23-tracking-motion-estimation-design.md @@ -0,0 +1,129 @@ +# 浏览器运动估计 Spike 设计 + +日期:2026-09-23。层级:单 SDK 实验能力。状态:待用户审阅。关联 SDK:`web-sdk-PP-Tracking`。 + +## 背景与决策 + +PP-Tracking 当前的 BoT-SORT 接口接收调用方提供的相机运动矩阵。它不会从图片、视频或摄像头自动估计运动。本阶段先建立独立的运动估计实验入口,用相邻帧验证浏览器端估计是否值得进入后续跟踪流程,再决定是否扩展 BoT-SORT。 + +首版只验证 Windows 11、Chromium 153、CPU/main 环境。它是实验能力,不能写成手机、Worker、GPU、NPU、Safari 或 Firefox 的兼容承诺,也不改变当前 `0.2.0-rc.1` 的稳定行为。 + +## 目标 + +- 接收相邻图像帧,输出可审计的平移或仿射运动结果。 +- 在同一组输入上比较纯平移基线、稀疏光流和特征匹配的质量、耗时与失败率。 +- 记录输入帧身份、矩阵、置信度、内点数、残差、阶段耗时和失败原因,便于复现和评估。 +- 为 Demo 提供独立实验页面或实验面板,明确结果不会自动注入默认跟踪流程。 +- 用合成场景和少量有许可的真实帧建立可重复的验证证据。 + +## 非目标 + +- 不自动替换或修改 BoT-SORT 的默认运动输入,也不为失败结果静默补造恒等矩阵。 +- 不实现完整视频播放器、摄像头调度、录制、转码或上传服务。 +- 不声明手机、Web Worker、WebGPU、NPU/WebNN、Safari、Firefox 或跨浏览器支持。 +- 不在本阶段接入多 SDK Workflow、门户组合流程或其他 SDK 的推理 runtime。 +- 不把实验结果发布为 stable/latest;若需要分发,只能使用单独的实验标签并保留限制。 + +## 候选算法与比较顺序 + +### 纯平移基线 + +以相邻帧的稳定特征或亮度变化估计 `dx/dy`,输出二维平移矩阵。它实现简单、包体和耗时最低,适合作为失败率和收益的基线;无法表达缩放、旋转和一般仿射变化。 + +### 稀疏光流 + +在前一帧选取角点,在当前帧追踪这些点并用鲁棒拟合得到平移或仿射矩阵。它适合短时间、纹理充足的小到中等相机运动;低纹理、遮挡、大位移和快速亮度变化可能导致匹配不足或数值不稳定。 + +### 特征匹配可行性对照 + +使用可在浏览器 CPU/main 运行的特征描述与匹配方案评估大位移能力。它可能提高大位移成功率,但会增加包体、预处理和匹配耗时。本阶段只要求证明可行性与代价,不承诺将其作为默认算法。 + +比较顺序固定为:纯平移基线 → 稀疏光流 → 特征匹配对照。每个算法必须使用同一输入集、相同图像尺寸和相同计时口径。 + +## 实验接口 + +实现可以在最终代码中拆分模块,但语义必须等价于以下框架: + +```ts +type MotionEstimateInput = { + previous: ImageData | VideoFrame + current: ImageData | VideoFrame + imageSize: { width: number; height: number } + frameId: number + timestampMs: number +} + +type MotionEstimateResult = { + status: 'estimated' | 'identity' | 'failed' + matrix: AffineMatrix + confidence: number + inlierCount: number + residual?: number + timings: { + preprocessMs: number + estimateMs: number + totalMs: number + } + reason?: MotionEstimateFailureReason +} +``` + +具体输入类型、导出名称和矩阵字段可以在实施计划中微调,但必须遵守以下契约: + +- 两帧尺寸必须一致,宽高为正整数;`imageSize` 必须与实际输入一致。 +- `frameId` 和 `timestampMs` 必须是有限数;相邻帧关系必须可追溯。非递增或跳过的帧要返回明确输入错误,不得继续估计。 +- 输入可以是 `ImageData` 或 `VideoFrame`,实现必须声明实际支持的类型。若消费方把 `VideoFrame` 的所有权交给估计器,估计器负责在完成后关闭;若不拥有所有权,必须文档化由调用方关闭,不能重复关闭。 +- `estimated` 只表示通过质量门限的估计;`identity` 只允许调用方或明确的静止基线策略显式选择,不能把算法失败伪装成 identity。 +- `failed` 必须带有稳定的失败原因;失败不推进任何内部状态,不影响下一次独立调用。 +- 不得静默切换算法、来源或输入帧。矩阵的坐标系、行列布局和作用方向必须在 API 文档及导出数据中固定。 +- 置信度、内点数和残差没有可靠值时应省略或标记未知,不得填充常数。 +- 首选无状态纯函数;如果为性能引入可复用上下文,必须有显式 `reset`/`dispose`,并证明输入序列不会污染下一次实验。 + +建议的失败原因枚举为:`invalid-input`、`frame-order`、`size-mismatch`、`unsupported-input`、`insufficient-texture`、`insufficient-matches`、`numerical-instability`、`quality-threshold` 和 `runtime-error`。最终实现不得使用含义不清的未分类状态或空字符串代替这些原因。 + +## BoT-SORT 边界 + +实验入口与 `createTracker({ algorithm: 'botsort' })` 解耦。实验页面可以把估计结果显示为回执,并提供与外部矩阵的并排比较;默认播放、导出和当前公开 API 继续要求调用方显式提供运动信息。只有在 Spike 通过质量、耗时和失败门限,并完成新的 API 设计与回归验证后,才另行评估自动接入。 + +## Demo 设计 + +沿用 PP-Tracking 当前品牌栏、左侧控制区、中央画面和可折叠详情的布局;不把实验面板做成门户目录。建议提供独立 `/motion` 入口或等价实验页,包含: + +- 输入帧对、尺寸、帧号和时间戳; +- 算法选择与运行/重置控制; +- 当前矩阵、状态、置信度、内点数、残差和三段耗时; +- 纯平移、光流和特征匹配的同组对比表; +- “实验能力,结果不会自动接入默认跟踪”提示; +- 原始输入、估计结果和失败原因的 JSON 导出。 + +页面必须保留中文默认、英文切换、390px 宽度不横向溢出,并使用标准 `data-sdk-runtime-info`、`data-sdk-timing` 和状态复位标记。实验结果与当前四算法 Demo 的 tracking 状态分开,切换实验算法不会重置或改写已有跟踪序列。 + +## 验证矩阵 + +### 输入场景 + +1. 合成纯平移:水平、垂直、小位移、中位移和大位移。 +2. 合成缩放、旋转和一般仿射变化。 +3. 静止帧、低纹理、重复纹理、局部遮挡和前景运动。 +4. 亮度变化、轻度噪声、裁剪边界和尺寸不一致。 +5. 少量真实公开视频帧或已有合法本地样本;记录来源、日期和许可,禁止把未经核实的素材纳入发布证据。 + +### 指标 + +- 矩阵参数误差:平移、尺度、旋转和仿射项分别统计绝对误差。 +- 跟踪影响:把矩阵用于离线框预测时记录预测框中心误差和 IoU 变化;不把该离线结果当成自动接入证据。 +- 成功率、失败率和各失败原因占比。 +- `preprocessMs`、`estimateMs`、`totalMs` 的 p50/p95;首次运行与重复运行分开。 +- 不同分辨率下的峰值内存、输入像素数和包体增量。 + +### 环境边界 + +记录操作系统、浏览器版本、CPU、分辨率、输入类型和日期。当前只形成 Windows 11 + Chromium 153 + CPU/main 的 dated evidence;任何其他环境必须标为未验证。 + +## 发布与治理 + +Spike 通过前不改 `latest`、稳定版本或门户兼容承诺。若需要 npm/GitHub Release,使用独立预发布标签(例如后续 `0.2.0-rc.2`),在 README、manifest、Demo 和变更记录中标注实验状态、已验证环境和已知限制。门户只登记“运动估计实验”及证据链接,不把它写成 PP-Tracking 默认能力。 + +## 通过门槛与后续决策 + +实施完成后必须同时提供:可复现输入集、三算法对比报告、浏览器实验页面、运行时和计时证据、失败用例、包体/内存记录以及 API/许可说明。只有当结果满足预先记录的质量与耗时门槛、失败原因可解释且没有静默降级时,才进入下一份“自动运动接入 BoT-SORT”设计;否则保留为独立实验,并记录不接入的原因。 From 7bbcccc20ebaaf02c1c7ed60aefa7b7cd3d53a9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E9=BB=98=E6=B6=B5?= <21739308@qq.com> Date: Wed, 23 Sep 2026 10:36:13 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E5=88=B6=E5=AE=9A=E6=B5=8F=E8=A7=88?= =?UTF-8?q?=E5=99=A8=E8=BF=90=E5=8A=A8=E4=BC=B0=E8=AE=A1=E5=AE=9E=E9=AA=8C?= =?UTF-8?q?=E8=AE=A1=E5=88=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2026-09-23-tracking-motion-estimation.md | 298 ++++++++++++++++++ ...09-23-tracking-motion-estimation-design.md | 2 +- 2 files changed, 299 insertions(+), 1 deletion(-) create mode 100644 docs/superpowers/plans/2026-09-23-tracking-motion-estimation.md diff --git a/docs/superpowers/plans/2026-09-23-tracking-motion-estimation.md b/docs/superpowers/plans/2026-09-23-tracking-motion-estimation.md new file mode 100644 index 0000000..e54b8d5 --- /dev/null +++ b/docs/superpowers/plans/2026-09-23-tracking-motion-estimation.md @@ -0,0 +1,298 @@ +# 浏览器运动估计 Spike 实施计划 + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development(推荐)或 superpowers:executing-plans 执行本计划。每个任务使用复选框跟踪,并在独立测试通过后提交。 + +**目标:** 在独立的 PP-Tracking SDK 中实现 CPU/main 的相邻帧运动估计实验入口,比较纯平移、稀疏光流和特征匹配,并提供可复现的浏览器实验页与 dated evidence;不自动接入 BoT-SORT 默认流程。 + +**架构:** SDK 新增独立 `web-sdk-pp-tracking/motion` 子入口,公开无状态 `estimateMotion` 异步函数;包根和 BoT-SORT API 保持不变。输入统一转换为灰度图,三个算法共享尺寸/帧序/质量校验、矩阵约束和计时边界;算法失败返回不含矩阵的显式 `failed` 结果,结构性输入错误抛出独立 `MotionEstimateError`。Demo 以 `motion.html` 作为静态独立入口,读取本地图片或原创合成帧,显示单算法及三算法对比,不复制门户 runtime。门户只记录实验状态和证据链接。 + +**技术栈:** TypeScript、DOM `ImageData`/`VideoFrame`、React Demo、Vite、Vitest、Playwright;不新增生产依赖,不使用 Worker、WebGPU、NPU 或摄像头 API。 + +**规格:** [浏览器运动估计 Spike 设计](../specs/2026-09-23-tracking-motion-estimation-design.md) + +## 全局约束 + +- SDK 工作树:`C:/Users/chenm/.codex/worktrees/tracking-motion`;门户工作树:`C:/Users/chenm/.codex/worktrees/tracking-motion-portal`;F 盘主工作树保持不变。 +- 文档、注释、提交信息使用中文;约定的英文镜像文档继续保留英文。 +- 只声明并验证 Windows 11 + Chromium 153 + CPU/main;不声明手机、Worker、GPU、NPU/WebNN、Safari、Firefox、视频或摄像头兼容。 +- `estimateMotion` 只从 `web-sdk-pp-tracking/motion` 导入,只接受相邻帧并返回估计回执;不改包根或 `createTracker({ algorithm: 'botsort' })` 的输入契约,不把失败静默变成恒等矩阵。 +- 纯平移、稀疏光流、特征匹配使用同一输入集、图像尺寸、计时口径和输出坐标系;所有失败必须带稳定原因。 +- 不新增外部图像/光流包;不复制来源义务不明的 PaddleDetection 或其他跟踪实现。 +- 使用 pnpm 时统一执行 `pnpm --config.verify-deps-before-run=false --config.manage-package-manager-versions=false ...`。 +- 修改 SDK 前后运行门户 checker:`pnpm --config.verify-deps-before-run=false --config.manage-package-manager-versions=false sdk:check -- --repo C:/Users/chenm/.codex/worktrees/tracking-motion --format json --out `。 +- 本阶段只准备本地实验候选,不 push、不开 PR、不改 npm `latest`;通过后再单独确认是否制作 `0.2.0-rc.2` 发布。 + +## 文件与职责映射 + +**SDK:** + +- Create `src/motion/types.ts`:运动输入、算法、状态、失败原因、矩阵和计时结果的公开类型;`AffineMatrix` 由此成为运动模块的公共类型来源,BoT-SORT 类型继续在既有根入口 re-export 以保持兼容。 +- Create `src/motion/errors.ts`:`MotionEstimateErrorCode` 与 `MotionEstimateError`,区分结构性输入错误和算法质量失败。 +- Create `src/motion/input.ts`:`ImageData`/`VideoFrame` 结构校验、灰度转换和 `VideoFrame.copyTo` 读取;不关闭调用方拥有的 `VideoFrame`。 +- Create `src/motion/math.ts`:梯度、角点、 patch 误差、最小二乘、median/MAD、RANSAC 与矩阵约束等纯数学工具。 +- Create `src/motion/translation.ts`:固定网格 patch 的局部搜索和稳健平移拟合。 +- Create `src/motion/sparse-flow.ts`:角点选择、局部 Lucas–Kanade 迭代和鲁棒平移/仿射拟合。 +- Create `src/motion/feature-match.ts`:归一化 patch 描述、比值匹配和仿射 RANSAC。 +- Create `src/motion/index.ts`:`web-sdk-pp-tracking/motion` 的唯一公共入口,导出 `estimateMotion`、公开类型和错误;不从包根导出,不引入 React 或 ORT。 +- Modify `src/botsort/types.ts`:从 `src/motion/types.ts` re-export `AffineMatrix`,保持既有 `CameraMotion` 类型的导入路径。 +- Create `tests/motion.test.ts`:失败优先的结构校验、三个算法、矩阵误差、失败原子性和资源语义测试。 +- Create `tests/motion-browser.mjs`:Motion Demo 的 Playwright 桌面/390px/语言/对比/导出 smoke test。 +- Create `scripts/motion-benchmark.mjs`:运行合成矩阵并写 JSON 结果,不访问网络、不使用真实隐私图片。 +- Create `reports/2026-09-23-motion-estimation/README.md` 与 `metrics.json`:记录输入生成器、版本、环境、指标、失败原因、内存/包体和限制。 +- Modify `README.md`、`README.en.md`、`docs/zh-CN/api.md`、`docs/en/api.md`、`docs/zh-CN/compatibility.md`、`docs/en/compatibility.md`、`docs/zh-CN/performance.md`、`docs/en/performance.md`、`CHANGELOG.md`、`sdk-manifest.yaml`:登记实验入口、计时字段解释、`motion.html` 地址、限制和本地候选版本;不把实验写成稳定支持。 +- Modify `package.json`、`scripts/build.mjs`、`scripts/check-package.mjs` 和 Vite 输入配置:增加 `./motion` 的 ESM/CJS/NodeNext 子入口、本地 `0.2.0-rc.2` 候选和静态 Motion Demo 构建;保持包根与 `./reid` 消费不变。 +- Create `demo/motion.html`、`demo/src/motion-main.tsx`、`demo/src/MotionApp.tsx`、必要的 `demo/src/motion.css`;复用 `ui-tokens.json`,提供图片对/合成帧、算法选择、运行/重置、结果对比和 JSON 导出。 +- Modify `demo/vite.config.ts`、`package.json` scripts:让 `index.html` 和 `motion.html` 作为 Vite 多页入口一起构建。 + +**门户:** + +- Modify `docs/superpowers/plans/2026-08-17-web-model-sdk-portal-roadmap.md` 和 `docs/superpowers/plans/2026-09-13-pp-detection-multi-model-roadmap.md`:加入当前实验阶段、限制和后续决策,不改稳定 registry 文案。 +- Create `reports/tracking/2026-09-23-motion-estimation/README.md` 与 `report.json`:引用 SDK 证据、checker 前后结果和未验证平台。 +- 不复制 SDK runtime,不把门户条目改成自动运动估计已兼容。 + +--- + +### 任务 1:标准检查、失败优先的公共契约 + +**文件:** + +- Test: SDK `tests/motion.test.ts` +- Create: SDK `src/motion/types.ts`, `src/motion/errors.ts`, `src/motion/index.ts` +- Modify: SDK `src/index.ts`, `src/botsort/types.ts` +- Evidence: 门户工作树 `reports/sdk-standard/2026-09-23-motion-before.json` + +**接口:** + +```ts +export type MotionAlgorithm = 'translation' | 'sparse-flow' | 'feature-match' +export type MotionEstimateStatus = 'estimated' | 'identity' | 'failed' +export type MotionEstimateFailureReason = + | 'invalid-input' | 'frame-order' | 'size-mismatch' | 'unsupported-input' + | 'insufficient-texture' | 'insufficient-matches' | 'numerical-instability' + | 'quality-threshold' | 'runtime-error' + +export interface MotionFrame { + image: ImageData | VideoFrame + frameId: number + timestampMs: number +} + +export interface MotionEstimateInput { + previous: MotionFrame + current: MotionFrame + imageSize: { width: number; height: number } +} + +export interface MotionEstimateOptions { + algorithm?: MotionAlgorithm + identityWhenStatic?: boolean + maxSearchRadius?: number + minInliers?: number +} + +export interface MotionEstimateResult { + status: 'estimated' | 'identity' + matrix: AffineMatrix + confidence: number + inlierCount: number + residual?: number + timings: { preprocessMs: number; estimateMs: number; totalMs: number } + algorithm: MotionAlgorithm + reason?: MotionEstimateFailureReason +} | { + status: 'failed' + confidence: 0 + inlierCount: 0 + timings: { preprocessMs: number; estimateMs: number; totalMs: number } + algorithm: MotionAlgorithm + reason: MotionEstimateFailureReason +} + +export async function estimateMotion( + input: MotionEstimateInput, + options?: MotionEstimateOptions, +): Promise +``` + +- [ ] **步骤 1:先运行 checker 并保留缺口证据。** + +运行: + +```powershell +pnpm --config.verify-deps-before-run=false --config.manage-package-manager-versions=false sdk:check -- --repo C:/Users/chenm/.codex/worktrees/tracking-motion --format json --out reports/sdk-standard/2026-09-23-motion-before.json +``` + +预期:检查器输出带日期报告;历史所需项通过,任何已有提示原样保留,不覆盖 `reports/sdk-standard/picodet-series-after.json`。 + +- [ ] **步骤 2:写失败测试。** 断言空输入、非有限帧号、`current.frameId !== previous.frameId + 1`、时间不递增、尺寸不一致、非正尺寸、未知算法和非 `ImageData`/`VideoFrame` 输入抛出 `MotionEstimateError`;断言 API 类型只能从 `web-sdk-pp-tracking/motion` 导入,包根导入保持原有导出集合。 + +```ts +const makeInput = (overrides: { currentFrameId?: number; lowTexture?: boolean } = {}) => ({ + previous: { image: makeImageData(overrides.lowTexture === true), frameId: 0, timestampMs: 0 }, + current: { image: makeImageData(overrides.lowTexture === true), frameId: overrides.currentFrameId ?? 1, timestampMs: 33 }, + imageSize: { width: 64, height: 48 }, +}) +await expect(estimateMotion({} as MotionEstimateInput, { algorithm: 'translation' })).rejects.toThrow(MotionEstimateError) +await expect(estimateMotion(makeInput({ currentFrameId: 0 }))).rejects.toMatchObject({ code: 'FRAME_ORDER' }) +const failed = await estimateMotion(makeInput({ lowTexture: true })) +expect(failed).toMatchObject({ status: 'failed', reason: 'insufficient-texture' }) +expect('matrix' in failed).toBe(false) +``` + +- [ ] **步骤 3:运行单测确认失败。** + +运行:`pnpm --config.verify-deps-before-run=false --config.manage-package-manager-versions=false exec vitest run tests/motion.test.ts`。 + +预期:测试因模块和类型尚未实现而失败;将完整输出保存到 SDK `.tmp/motion/contract-red.log`。 + +- [ ] **步骤 4:实现最小公共类型和错误类。** `MotionEstimateError` 的 code 至少包含 `INVALID_INPUT`、`FRAME_ORDER`、`SIZE_MISMATCH`、`UNSUPPORTED_INPUT`、`INVALID_OPTIONS`;质量失败只由不含 `matrix` 的 `status: 'failed'` 结果表达,不抛异常。`estimateMotion` 初步只做校验后返回 `failed`,不得把失败伪造成 `identity`。 + +- [ ] **步骤 5:实现根导出并保持兼容。** `src/botsort/types.ts` re-export `AffineMatrix`;现有 BoT-SORT 导入路径和既有测试必须继续通过。 + +- [ ] **步骤 6:运行契约测试并提交。** + +运行:`pnpm --config.verify-deps-before-run=false --config.manage-package-manager-versions=false exec vitest run tests/motion.test.ts tests/botsort-motion.test.ts`。 + +预期:公共契约测试通过,算法质量测试仍保持待实现;提交:`定义运动估计公共契约`。 + +### 任务 2:图像输入和纯数学工具 + +**文件:** + +- Create: `src/motion/input.ts`, `src/motion/math.ts` +- Modify: `tests/motion.test.ts` + +**接口:** + +- `readMotionImage(image, expectedSize): Promise` 将 `ImageData` 的 RGBA 转为 `[0,1]` 灰度;`VideoFrame` 使用 `copyTo` 读取可用的 `RGBA` 平面,调用方所有权不变。 +- `validateAndReadInput` 先验证两帧尺寸、帧序和时间,再返回两个独立灰度缓冲区;任何失败均不缓存输入。 +- `median`, `mad`, `solveLeastSquares`, `fitAffineRansac`, `clampAffine` 为无 DOM 依赖的纯函数。 + +- [ ] **步骤 1:写输入和数学失败测试。** 使用结构化 `ImageData` 测试帧生成器,覆盖灰度值范围、尺寸 mismatch、RGBA alpha 不影响灰度、角点边界和奇异矩阵拒绝。 +- [ ] **步骤 2:运行测试确认失败并保存 `.tmp/motion/input-red.log`。** +- [ ] **步骤 3:实现输入读取和数学函数。** 灰度公式固定为 `0.299*r + 0.587*g + 0.114*b`;所有中间值有限,RANSAC 使用固定 seed 或确定性采样,避免同输入结果漂移。 +- [ ] **步骤 4:运行 `vitest run tests/motion.test.ts`,确认输入/数学测试通过。** +- [ ] **步骤 5:提交 `实现运动估计输入与数学工具`。** + +### 任务 3:纯平移基线 + +**文件:** + +- Create: `src/motion/translation.ts` +- Modify: `src/motion/index.ts`, `tests/motion.test.ts` + +**算法契约:** 在 8×5 的内部网格中跳过边界 patch,对每个 patch 在 `maxSearchRadius` 内以归一化 SSD 搜索位移,使用中位数和 MAD 去除前景/遮挡异常。至少 8 个有效 patch 且 MAD 不超过 2.5 像素时返回平移矩阵 `[1,0,dx,0,1,dy]`;静止且 `identityWhenStatic` 为真时返回 `identity`,否则返回 `estimated` 的零平移。纹理不足、匹配不足或残差超门限返回 `failed` 并写原因。 + +- [ ] **步骤 1:添加失败优先测试。** 合成水平/垂直/大位移、静止、低纹理、局部遮挡和亮度变化;断言矩阵误差、状态、置信度范围、内点数、残差和失败原因。 +- [ ] **步骤 2:运行 `vitest run tests/motion.test.ts -t translation`,确认新增测试失败并保存 `.tmp/motion/translation-red.log`。** +- [ ] **步骤 3:实现 `estimateTranslation(previous, current, options)`,只返回候选,不修改全局状态。** +- [ ] **步骤 4:接入 `estimateMotion` 分派和独立三段计时;质量失败统一构造不含 `matrix` 的 `status:'failed'`、`reason`、`confidence:0`、`inlierCount:0` 结果,Demo 和调用方只能在 `estimated`/`identity` 分支读取矩阵。** +- [ ] **步骤 5:运行翻译测试和既有跟踪测试,提交 `加入纯平移运动估计基线`。** + +### 任务 4:稀疏光流 + +**文件:** + +- Create: `src/motion/sparse-flow.ts` +- Modify: `src/motion/math.ts`, `src/motion/index.ts`, `tests/motion.test.ts` + +**算法契约:** 使用 Shi–Tomasi 风格角点评分,最多 120 个角点;每个角点用 5×5 窗口做最多 6 次 Lucas–Kanade 迭代,拒绝病态梯度和越界点;用 MAD/RANSAC 拟合平移或局部仿射,至少 6 个有效点、至少 `minInliers`(默认 6)才可 `estimated`。输出矩阵必须通过与 BoT-SORT 相同的正行列式、尺度、旋转和位移约束;不通过则 `failed`。 + +- [ ] **步骤 1:写平移、旋转、缩放、仿射、遮挡和低纹理的失败优先测试;测试重复调用结果完全一致。** +- [ ] **步骤 2:运行 `vitest run tests/motion.test.ts -t sparse-flow`,确认失败并保存 `.tmp/motion/sparse-flow-red.log`。** +- [ ] **步骤 3:实现角点、迭代和鲁棒拟合;不引入图像库,不读取其他仓库的光流代码。** +- [ ] **步骤 4:接入算法分派,确认输入校验失败不推进任何可复用状态。** +- [ ] **步骤 5:运行 `vitest run tests/motion.test.ts tests/botsort-motion.test.ts`,提交 `加入稀疏光流运动估计`。** + +### 任务 5:特征匹配可行性对照 + +**文件:** + +- Create: `src/motion/feature-match.ts` +- Modify: `src/motion/math.ts`, `src/motion/index.ts`, `tests/motion.test.ts` + +**算法契约:** 从角点周围提取 9×9 归一化灰度 patch 描述,按 SSD 最近邻/次近邻比值匹配;至少 4 个互相一致匹配,通过确定性 RANSAC 拟合仿射矩阵。比值、内点数、残差和矩阵范围均纳入质量门限。大位移成功率是对照指标,不因此改变默认算法或 BoT-SORT。 + +- [ ] **步骤 1:写大位移、旋转、重复纹理、局部遮挡、无纹理和亮度变化测试;断言不足匹配返回 `insufficient-matches`,数值异常返回 `numerical-instability`。** +- [ ] **步骤 2:运行 `vitest run tests/motion.test.ts -t feature-match`,确认失败并保存 `.tmp/motion/feature-match-red.log`。** +- [ ] **步骤 3:实现描述子、匹配和 RANSAC;固定采样顺序,拒绝镜像/奇异/过大仿射。** +- [ ] **步骤 4:运行全量运动单测,提交 `加入特征匹配运动估计对照`。** + +### 任务 6:对比脚本和 dated evidence + +**文件:** + +- Create: `scripts/motion-benchmark.mjs`, `reports/2026-09-23-motion-estimation/metrics.json`, `reports/2026-09-23-motion-estimation/README.md` +- Modify: `package.json` scripts + +**固定输入和门槛:** 生成 320×180 与 640×360 两种尺寸,覆盖纯平移 5 档、缩放/旋转/仿射各 3 档、静止、低纹理、重复纹理、遮挡、亮度变化和超范围运动;每种固定 seed。报告矩阵参数误差、成功/失败率、失败原因、p50/p95 三段耗时、峰值 JS 堆(可测时)和构建包体。比较门槛记录为:纯平移在支持范围内 95% 成功且平移中位误差 ≤2px;稀疏光流在局部仿射集 80% 成功且中心误差 ≤3px;特征匹配在大位移集 70% 成功;三个算法 640×360 `totalMs` p95 均 ≤100ms。门槛只用于 Spike 是否值得继续,不构成跨设备性能承诺。 + +- [ ] **步骤 1:写 benchmark 失败测试,确保输出包含版本、seed、输入集、环境和三算法字段,不允许缺少失败原因。** +- [ ] **步骤 2:实现脚本和 `npm run benchmark:motion`,先运行生成报告。** +- [ ] **步骤 3:核对报告只使用合成数据、无网络和无个人图片;记录未达门槛项,不调整参数隐藏失败。** +- [ ] **步骤 4:提交 `记录运动估计对比证据`。** + +### 任务 7:独立 Motion Demo + +**文件:** + +- Create: `demo/motion.html`, `demo/src/MotionApp.tsx`, `demo/src/motion.css`, `tests/motion-browser.mjs` +- Modify: `demo/src/main.tsx`, `demo/vite.config.ts`, `package.json` + +**页面行为:** `motion.html` 显示中文默认和 English 切换;提供原创合成场景、上一帧/当前帧图片上传、算法下拉、运行全部、重置、JSON 导出;中央显示前后帧缩略图和矩阵/置信度/内点/残差/三段耗时;详情明确“实验能力,不自动接入默认跟踪”。不提供摄像头、视频播放器、手机专属控件或 NPU 选项。页面使用共享 token 和当前 PP-Tracking 顶栏风格,390px 不横向溢出。 + +- [ ] **步骤 1:先写 `tests/motion-browser.mjs` 失败流程。** 打开 `motion.html`,断言标题、三算法选项、CPU/JavaScript/Main、状态复位标记、单算法运行、全部对比、失败原因、中文/英文切换、JSON 导出和 390px 宽度。 +- [ ] **步骤 2:运行 `npm run build:demo` 后执行浏览器脚本,确认页面尚未存在并保存 `.tmp/motion/motion-browser-red.log`。** +- [ ] **步骤 3:实现 MotionApp 和静态入口,合成图片使用与 benchmark 相同 seed;上传图片通过 `createImageBitmap` + canvas 转 `ImageData`,释放 bitmap,不上传网络。** +- [ ] **步骤 4:复用 `data-sdk-runtime-info`、`data-sdk-timing`、`data-sdk-algorithm-info`、`data-sdk-state-reset`;实验页显示 `CPU / JavaScript / Main`,不伪造模型缓存或推理耗时。** +- [ ] **步骤 5:运行 `npm run build:demo`、`node tests/motion-browser.mjs`,保存截图和报告,提交 `增加运动估计实验 Demo`。** + +### 任务 8:文档、manifest、版本和门户登记 + +**文件:** 见“文件与职责映射”中的双语文档、`sdk-manifest.yaml`、`CHANGELOG.md` 和门户路线/报告。 + +- [ ] **步骤 1:更新中英文 API。** 写出 `MotionFrame` 嵌套帧身份、输入尺寸、`estimateMotion` async 调用、错误码、`failed` sentinel 不可应用、VideoFrame 所有权和 reset/无状态语义;示例必须使用 `status === 'estimated'` 才读取矩阵。 + +```ts +const result = await estimateMotion({ previous, current, imageSize }, { algorithm: 'sparse-flow' }) +if (result.status === 'estimated') tracker.update({ ...frame, motion: { status: 'estimated', matrix: result.matrix, source: 'motion-spike', confidence: result.confidence, from, to } }) +``` + +- [ ] **步骤 2:更新兼容性、性能和变更记录。** 明确只验证 Windows 11 + Chromium 153 + CPU/main;`preprocessMs`/`estimateMs`/`totalMs` 属于实验结果,跟踪标准的五项 timing 不变;记录三算法 Spike 不改变默认 ByteTrack/BoT-SORT。 +- [ ] **步骤 3:将 SDK 本地版本统一到 `0.2.0-rc.2` 候选;顶层 hybrid manifest 继续保留算法模块 `cpu/main` 与 ReID 模块 `wasm/webgpu/main` 的既有实际声明,另在文档中明确 motion 子入口仅验证 `cpu/main`;不添加 WebGPU/NPU/Worker 证据,不把 motion 写成新模型或 Workflow。** +- [ ] **步骤 4:门户新增 dated report 和路线当前段,稳定 `src/content/models/pp-tracking.yaml` 继续写 rc.1/稳定 0.1.0 事实,只添加实验链接与“未默认接入”限制。** +- [ ] **步骤 5:运行双语链接、YAML/schema 和 checker 测试,提交 SDK `记录运动估计实验文档与候选版本`、门户 `登记运动估计实验阶段`。** + +### 任务 9:整体验收与本地收口 + +**文件:** SDK `.tmp/motion/`、门户 `reports/sdk-standard/2026-09-23-motion-after.json` 和最终检查日志。 + +- [ ] **步骤 1:运行 SDK 完整验证。** + +```powershell +pnpm --config.verify-deps-before-run=false --config.manage-package-manager-versions=false install --frozen-lockfile +pnpm --config.verify-deps-before-run=false --config.manage-package-manager-versions=false run verify +pnpm --config.verify-deps-before-run=false --config.manage-package-manager-versions=false run benchmark:motion +``` + +预期:构建、类型、既有跟踪单测、运动单测、包消费、Demo 构建、Vanilla/React 构建、既有浏览器流程和 Motion 浏览器流程通过;若环境缺少 Chromium,只记录安装/环境失败,不声称浏览器通过。 + +- [ ] **步骤 2:运行门户检查和相关测试。** + +```powershell +pnpm --config.verify-deps-before-run=false --config.manage-package-manager-versions=false sdk:check -- --repo C:/Users/chenm/.codex/worktrees/tracking-motion --format json --out reports/sdk-standard/2026-09-23-motion-after.json +pnpm --config.verify-deps-before-run=false --config.manage-package-manager-versions=false test +pnpm --config.verify-deps-before-run=false --config.manage-package-manager-versions=false build +``` + +- [ ] **步骤 3:运行 `git diff --check`、扫描常见占位词和未分类英文占位符,核对历史报告和主工作树未被覆盖;报告列出通过项、失败项、未验证平台和下一步是否值得设计 BoT-SORT 自动接入。** +- [ ] **步骤 4:执行最终独立审查清单。** 检查根包 ESM/CJS/NodeNext 可导入,`VideoFrame` 所有权文档准确,失败结果不会被 Demo 或 BoT-SORT 当成矩阵,网页无网络请求和 390px 无溢出,门户没有把实验写成稳定兼容。 +- [ ] **步骤 5:两仓分别提交本地变更,不 push、不开 PR;记录提交 SHA 和本地报告路径,等待用户决定是否发布 rc.2 或继续改进。** + +## 交付后的决策点 + +当任务 9 完成后,根据报告逐项决定: + +1. 三算法达到记录门槛且失败原因可解释:另写“自动运动接入 BoT-SORT”设计,仍需用户批准后实现。 +2. 仅部分算法达到门槛:保留独立实验,文档标出适用场景,不接入默认跟踪。 +3. 质量或耗时均未达门槛:停止自动接入,保留证据和失败原因,优先改进输入/采样或转向其他跟踪路线。 diff --git a/docs/superpowers/specs/2026-09-23-tracking-motion-estimation-design.md b/docs/superpowers/specs/2026-09-23-tracking-motion-estimation-design.md index 7f38084..a8a201f 100644 --- a/docs/superpowers/specs/2026-09-23-tracking-motion-estimation-design.md +++ b/docs/superpowers/specs/2026-09-23-tracking-motion-estimation-design.md @@ -1,6 +1,6 @@ # 浏览器运动估计 Spike 设计 -日期:2026-09-23。层级:单 SDK 实验能力。状态:待用户审阅。关联 SDK:`web-sdk-PP-Tracking`。 +日期:2026-09-23。层级:单 SDK 实验能力。状态:已获用户批准,待实施。关联 SDK:`web-sdk-PP-Tracking`。 ## 背景与决策 From e87d5f17513bededaad3e1a7d421bc781980893d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E9=BB=98=E6=B6=B5?= <21739308@qq.com> Date: Wed, 23 Sep 2026 12:27:48 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E7=99=BB=E8=AE=B0=E8=BF=90=E5=8A=A8?= =?UTF-8?q?=E4=BC=B0=E8=AE=A1=E5=AE=9E=E9=AA=8C=E9=98=B6=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...2026-08-17-web-model-sdk-portal-roadmap.md | 2 + ...-09-13-pp-detection-multi-model-roadmap.md | 2 + .../2026-09-23-tracking-motion-estimation.md | 90 +++--- .../sdk-standard/2026-09-23-motion-after.json | 278 ++++++++++++++++++ .../2026-09-23-motion-before.json | 277 +++++++++++++++++ .../2026-09-23-motion-estimation/README.md | 20 ++ .../2026-09-23-motion-estimation/report.json | 43 +++ src/content/models/pp-tracking.yaml | 1 + 8 files changed, 668 insertions(+), 45 deletions(-) create mode 100644 reports/sdk-standard/2026-09-23-motion-after.json create mode 100644 reports/sdk-standard/2026-09-23-motion-before.json create mode 100644 reports/tracking/2026-09-23-motion-estimation/README.md create mode 100644 reports/tracking/2026-09-23-motion-estimation/report.json diff --git a/docs/superpowers/plans/2026-08-17-web-model-sdk-portal-roadmap.md b/docs/superpowers/plans/2026-08-17-web-model-sdk-portal-roadmap.md index f38077f..a0526a7 100644 --- a/docs/superpowers/plans/2026-08-17-web-model-sdk-portal-roadmap.md +++ b/docs/superpowers/plans/2026-08-17-web-model-sdk-portal-roadmap.md @@ -10,6 +10,8 @@ readiness, not by the number of models mentioned in the catalog. ## 当前优先级(2026-09-19 证据更新) +**2026-09-23 运动估计 Spike:** Tracking 本地 `0.2.0-rc.2` 候选新增独立 `web-sdk-pp-tracking/motion` 子入口和 `/motion.html` 实验页,比较纯平移、稀疏光流与特征匹配。合成 Node 基准中 640×360 p95 约为 34/170/466 ms,低纹理均显式失败;当前成本和验证矩阵不足以自动接入 BoT-SORT,继续保留外部矩阵契约、ByteTrack 默认和线上 rc.1。见[阶段回执](../../../reports/tracking/2026-09-23-motion-estimation/README.md)。不扩展视频/摄像头、手机、Worker、GPU/NPU、Safari/Firefox 或 Workflow。 + **2026-09-22 rc.1 已发布:** Tracking `0.2.0-rc.1` 已接入 BoT-SORT 根工厂、严格运动类型、四算法 Demo 和版本化运动序列导入导出,见[集成回执](../../../reports/tracking/2026-09-22-botsort-integration/README.md)及[发布回执](../../../reports/tracking/2026-09-22-botsort-integration/release-receipt.md)。SDK PR #6 与门户 PR #50 已合并;不可变标签、GitHub Release、npm `next`、provenance 和线上 Demo 均已回读,`latest` 保持 0.1.0。下一阶段设计可选浏览器自动运动估计,先验证矩阵质量、失败策略和总成本;不扩展视频/摄像头、手机或 Workflow。 **2026-09-22 外部运动矩阵核心完成:** Tracking 同包本地 `0.2.0-rc.0+botsort-core.1` 已实现严格帧/时间/矩阵契约、显式失败和可选外观融合;208项测试、候选双格式/类型消费、完整05浏览器及原Demo回归通过,见[阶段回执](../../../reports/tracking/2026-09-22-botsort-core/README.md)。固定七段5316帧三配置各运行两次,轨迹逐字对齐前期探针,CMC/CMC+外观IDF1仍54.5850%/55.3487%,09仍退步。仅平移消融也退步,后续估计器须验证近静止策略,当前不调参或替换默认。下一阶段将候选接入公开根工厂、版本/manifest、四算法双语Demo和导入导出,再做发布验收;本轮无远程发布。自动图像估计、视频/摄像头和Workflow继续独立后置。以下“下一步”为历史,以本段为准。 diff --git a/docs/superpowers/plans/2026-09-13-pp-detection-multi-model-roadmap.md b/docs/superpowers/plans/2026-09-13-pp-detection-multi-model-roadmap.md index f843dc2..d9dcb46 100644 --- a/docs/superpowers/plans/2026-09-13-pp-detection-multi-model-roadmap.md +++ b/docs/superpowers/plans/2026-09-13-pp-detection-multi-model-roadmap.md @@ -4,6 +4,8 @@ **目标:** 明确 PP-Detection 单 SDK 的模型边界,并完成下一阶段 2D 检测模型兼容性评估,选择一个有证据支持的候选进入后续移植。 +**2026-09-23 Tracking 运动估计更新:** 独立 `motion` 子入口和实验 Demo 已进入本地 `0.2.0-rc.2` 候选;三算法合成结果证明纯平移较快,但稀疏光流和特征匹配在 640×360 的 p95 约 170/466 ms,且低纹理需失败。当前不自动接入 BoT-SORT、不改变 ByteTrack 默认或线上 rc.1,见[阶段回执](../../../reports/tracking/2026-09-23-motion-estimation/README.md)。这仍属于 Tracking 单 SDK,不是门户 Workflow。 + **2026-09-22 Tracking集成更新:** [本地rc.1回执](../../../reports/tracking/2026-09-22-botsort-integration/README.md)完成 BoT-SORT 公开根入口、四算法Demo和完整运动导入导出,保持 ByteTrack 默认与独立SDK边界。220项测试、实际包消费、18组桌面浏览器流程及固定输入结果对齐通过,09退步保留。下一步是候选预发布及线上回读,再设计浏览器自动运动估计;本轮无远程写入,不扩展媒体、手机和Workflow。后文早期“下一步”保留为历史。 **2026-09-22 Tracking核心更新:** [外部运动矩阵候选](../../../reports/tracking/2026-09-22-botsort-core/README.md)已实现并通过208项测试、候选包消费及桌面浏览器验收。七段5316帧三配置两次输出一致且对齐前期研究,CMC收益与09退步都保留;未将第四算法写入公开清单。下一阶段为根工厂、版本/manifest、四算法Demo与导入导出的公开集成和发布验收;本轮不发布。单任务同包/独立SDK边界不变,图像估计、媒体与Workflow仍后置。 diff --git a/docs/superpowers/plans/2026-09-23-tracking-motion-estimation.md b/docs/superpowers/plans/2026-09-23-tracking-motion-estimation.md index e54b8d5..738ca8c 100644 --- a/docs/superpowers/plans/2026-09-23-tracking-motion-estimation.md +++ b/docs/superpowers/plans/2026-09-23-tracking-motion-estimation.md @@ -90,7 +90,7 @@ export interface MotionEstimateOptions { minInliers?: number } -export interface MotionEstimateResult { +export type MotionEstimateResult = { status: 'estimated' | 'identity' matrix: AffineMatrix confidence: number @@ -114,7 +114,7 @@ export async function estimateMotion( ): Promise ``` -- [ ] **步骤 1:先运行 checker 并保留缺口证据。** +- [x] **步骤 1:先运行 checker 并保留缺口证据。** 运行: @@ -124,7 +124,7 @@ pnpm --config.verify-deps-before-run=false --config.manage-package-manager-versi 预期:检查器输出带日期报告;历史所需项通过,任何已有提示原样保留,不覆盖 `reports/sdk-standard/picodet-series-after.json`。 -- [ ] **步骤 2:写失败测试。** 断言空输入、非有限帧号、`current.frameId !== previous.frameId + 1`、时间不递增、尺寸不一致、非正尺寸、未知算法和非 `ImageData`/`VideoFrame` 输入抛出 `MotionEstimateError`;断言 API 类型只能从 `web-sdk-pp-tracking/motion` 导入,包根导入保持原有导出集合。 +- [x] **步骤 2:写失败测试。** 断言空输入、非有限帧号、`current.frameId !== previous.frameId + 1`、时间不递增、尺寸不一致、非正尺寸、未知算法和非 `ImageData`/`VideoFrame` 输入抛出 `MotionEstimateError`;断言 API 类型只能从 `web-sdk-pp-tracking/motion` 导入,包根导入保持原有导出集合。 ```ts const makeInput = (overrides: { currentFrameId?: number; lowTexture?: boolean } = {}) => ({ @@ -139,17 +139,17 @@ expect(failed).toMatchObject({ status: 'failed', reason: 'insufficient-texture' expect('matrix' in failed).toBe(false) ``` -- [ ] **步骤 3:运行单测确认失败。** +- [x] **步骤 3:运行单测确认失败。** 运行:`pnpm --config.verify-deps-before-run=false --config.manage-package-manager-versions=false exec vitest run tests/motion.test.ts`。 预期:测试因模块和类型尚未实现而失败;将完整输出保存到 SDK `.tmp/motion/contract-red.log`。 -- [ ] **步骤 4:实现最小公共类型和错误类。** `MotionEstimateError` 的 code 至少包含 `INVALID_INPUT`、`FRAME_ORDER`、`SIZE_MISMATCH`、`UNSUPPORTED_INPUT`、`INVALID_OPTIONS`;质量失败只由不含 `matrix` 的 `status: 'failed'` 结果表达,不抛异常。`estimateMotion` 初步只做校验后返回 `failed`,不得把失败伪造成 `identity`。 +- [x] **步骤 4:实现最小公共类型和错误类。** `MotionEstimateError` 的 code 至少包含 `INVALID_INPUT`、`FRAME_ORDER`、`SIZE_MISMATCH`、`UNSUPPORTED_INPUT`、`INVALID_OPTIONS`;质量失败只由不含 `matrix` 的 `status: 'failed'` 结果表达,不抛异常。`estimateMotion` 初步只做校验后返回 `failed`,不得把失败伪造成 `identity`。 -- [ ] **步骤 5:实现根导出并保持兼容。** `src/botsort/types.ts` re-export `AffineMatrix`;现有 BoT-SORT 导入路径和既有测试必须继续通过。 +- [x] **步骤 5:实现根导出并保持兼容。** `src/botsort/types.ts` re-export `AffineMatrix`;现有 BoT-SORT 导入路径和既有测试必须继续通过。 -- [ ] **步骤 6:运行契约测试并提交。** +- [x] **步骤 6:运行契约测试并提交。** 运行:`pnpm --config.verify-deps-before-run=false --config.manage-package-manager-versions=false exec vitest run tests/motion.test.ts tests/botsort-motion.test.ts`。 @@ -168,11 +168,11 @@ expect('matrix' in failed).toBe(false) - `validateAndReadInput` 先验证两帧尺寸、帧序和时间,再返回两个独立灰度缓冲区;任何失败均不缓存输入。 - `median`, `mad`, `solveLeastSquares`, `fitAffineRansac`, `clampAffine` 为无 DOM 依赖的纯函数。 -- [ ] **步骤 1:写输入和数学失败测试。** 使用结构化 `ImageData` 测试帧生成器,覆盖灰度值范围、尺寸 mismatch、RGBA alpha 不影响灰度、角点边界和奇异矩阵拒绝。 -- [ ] **步骤 2:运行测试确认失败并保存 `.tmp/motion/input-red.log`。** -- [ ] **步骤 3:实现输入读取和数学函数。** 灰度公式固定为 `0.299*r + 0.587*g + 0.114*b`;所有中间值有限,RANSAC 使用固定 seed 或确定性采样,避免同输入结果漂移。 -- [ ] **步骤 4:运行 `vitest run tests/motion.test.ts`,确认输入/数学测试通过。** -- [ ] **步骤 5:提交 `实现运动估计输入与数学工具`。** +- [x] **步骤 1:写输入和数学失败测试。** 使用结构化 `ImageData` 测试帧生成器,覆盖灰度值范围、尺寸 mismatch、RGBA alpha 不影响灰度、角点边界和奇异矩阵拒绝。 +- [x] **步骤 2:运行测试确认失败并保存 `.tmp/motion/input-red.log`。** +- [x] **步骤 3:实现输入读取和数学函数。** 灰度公式固定为 `0.299*r + 0.587*g + 0.114*b`;所有中间值有限,RANSAC 使用固定 seed 或确定性采样,避免同输入结果漂移。 +- [x] **步骤 4:运行 `vitest run tests/motion.test.ts`,确认输入/数学测试通过。** +- [x] **步骤 5:提交 `实现运动估计输入与数学工具`。** ### 任务 3:纯平移基线 @@ -183,11 +183,11 @@ expect('matrix' in failed).toBe(false) **算法契约:** 在 8×5 的内部网格中跳过边界 patch,对每个 patch 在 `maxSearchRadius` 内以归一化 SSD 搜索位移,使用中位数和 MAD 去除前景/遮挡异常。至少 8 个有效 patch 且 MAD 不超过 2.5 像素时返回平移矩阵 `[1,0,dx,0,1,dy]`;静止且 `identityWhenStatic` 为真时返回 `identity`,否则返回 `estimated` 的零平移。纹理不足、匹配不足或残差超门限返回 `failed` 并写原因。 -- [ ] **步骤 1:添加失败优先测试。** 合成水平/垂直/大位移、静止、低纹理、局部遮挡和亮度变化;断言矩阵误差、状态、置信度范围、内点数、残差和失败原因。 -- [ ] **步骤 2:运行 `vitest run tests/motion.test.ts -t translation`,确认新增测试失败并保存 `.tmp/motion/translation-red.log`。** -- [ ] **步骤 3:实现 `estimateTranslation(previous, current, options)`,只返回候选,不修改全局状态。** -- [ ] **步骤 4:接入 `estimateMotion` 分派和独立三段计时;质量失败统一构造不含 `matrix` 的 `status:'failed'`、`reason`、`confidence:0`、`inlierCount:0` 结果,Demo 和调用方只能在 `estimated`/`identity` 分支读取矩阵。** -- [ ] **步骤 5:运行翻译测试和既有跟踪测试,提交 `加入纯平移运动估计基线`。** +- [x] **步骤 1:添加失败优先测试。** 合成水平/垂直/大位移、静止、低纹理、局部遮挡和亮度变化;断言矩阵误差、状态、置信度范围、内点数、残差和失败原因。 +- [x] **步骤 2:运行 `vitest run tests/motion.test.ts -t translation`,确认新增测试失败并保存 `.tmp/motion/translation-red.log`。** +- [x] **步骤 3:实现 `estimateTranslation(previous, current, options)`,只返回候选,不修改全局状态。** +- [x] **步骤 4:接入 `estimateMotion` 分派和独立三段计时;质量失败统一构造不含 `matrix` 的 `status:'failed'`、`reason`、`confidence:0`、`inlierCount:0` 结果,Demo 和调用方只能在 `estimated`/`identity` 分支读取矩阵。** +- [x] **步骤 5:运行翻译测试和既有跟踪测试,提交 `加入纯平移运动估计基线`。** ### 任务 4:稀疏光流 @@ -198,11 +198,11 @@ expect('matrix' in failed).toBe(false) **算法契约:** 使用 Shi–Tomasi 风格角点评分,最多 120 个角点;每个角点用 5×5 窗口做最多 6 次 Lucas–Kanade 迭代,拒绝病态梯度和越界点;用 MAD/RANSAC 拟合平移或局部仿射,至少 6 个有效点、至少 `minInliers`(默认 6)才可 `estimated`。输出矩阵必须通过与 BoT-SORT 相同的正行列式、尺度、旋转和位移约束;不通过则 `failed`。 -- [ ] **步骤 1:写平移、旋转、缩放、仿射、遮挡和低纹理的失败优先测试;测试重复调用结果完全一致。** -- [ ] **步骤 2:运行 `vitest run tests/motion.test.ts -t sparse-flow`,确认失败并保存 `.tmp/motion/sparse-flow-red.log`。** -- [ ] **步骤 3:实现角点、迭代和鲁棒拟合;不引入图像库,不读取其他仓库的光流代码。** -- [ ] **步骤 4:接入算法分派,确认输入校验失败不推进任何可复用状态。** -- [ ] **步骤 5:运行 `vitest run tests/motion.test.ts tests/botsort-motion.test.ts`,提交 `加入稀疏光流运动估计`。** +- [x] **步骤 1:写平移、旋转、缩放、仿射、遮挡和低纹理的失败优先测试;测试重复调用结果完全一致。** +- [x] **步骤 2:运行 `vitest run tests/motion.test.ts -t sparse-flow`,确认失败并保存 `.tmp/motion/sparse-flow-red.log`。** +- [x] **步骤 3:实现角点、迭代和鲁棒拟合;不引入图像库,不读取其他仓库的光流代码。** +- [x] **步骤 4:接入算法分派,确认输入校验失败不推进任何可复用状态。** +- [x] **步骤 5:运行 `vitest run tests/motion.test.ts tests/botsort-motion.test.ts`,提交 `加入稀疏光流运动估计`。** ### 任务 5:特征匹配可行性对照 @@ -213,10 +213,10 @@ expect('matrix' in failed).toBe(false) **算法契约:** 从角点周围提取 9×9 归一化灰度 patch 描述,按 SSD 最近邻/次近邻比值匹配;至少 4 个互相一致匹配,通过确定性 RANSAC 拟合仿射矩阵。比值、内点数、残差和矩阵范围均纳入质量门限。大位移成功率是对照指标,不因此改变默认算法或 BoT-SORT。 -- [ ] **步骤 1:写大位移、旋转、重复纹理、局部遮挡、无纹理和亮度变化测试;断言不足匹配返回 `insufficient-matches`,数值异常返回 `numerical-instability`。** -- [ ] **步骤 2:运行 `vitest run tests/motion.test.ts -t feature-match`,确认失败并保存 `.tmp/motion/feature-match-red.log`。** -- [ ] **步骤 3:实现描述子、匹配和 RANSAC;固定采样顺序,拒绝镜像/奇异/过大仿射。** -- [ ] **步骤 4:运行全量运动单测,提交 `加入特征匹配运动估计对照`。** +- [x] **步骤 1:写大位移、旋转、重复纹理、局部遮挡、无纹理和亮度变化测试;断言不足匹配返回 `insufficient-matches`,数值异常返回 `numerical-instability`。** +- [x] **步骤 2:运行 `vitest run tests/motion.test.ts -t feature-match`,确认失败并保存 `.tmp/motion/feature-match-red.log`。** +- [x] **步骤 3:实现描述子、匹配和 RANSAC;固定采样顺序,拒绝镜像/奇异/过大仿射。** +- [x] **步骤 4:运行全量运动单测,提交 `加入特征匹配运动估计对照`。** ### 任务 6:对比脚本和 dated evidence @@ -227,10 +227,10 @@ expect('matrix' in failed).toBe(false) **固定输入和门槛:** 生成 320×180 与 640×360 两种尺寸,覆盖纯平移 5 档、缩放/旋转/仿射各 3 档、静止、低纹理、重复纹理、遮挡、亮度变化和超范围运动;每种固定 seed。报告矩阵参数误差、成功/失败率、失败原因、p50/p95 三段耗时、峰值 JS 堆(可测时)和构建包体。比较门槛记录为:纯平移在支持范围内 95% 成功且平移中位误差 ≤2px;稀疏光流在局部仿射集 80% 成功且中心误差 ≤3px;特征匹配在大位移集 70% 成功;三个算法 640×360 `totalMs` p95 均 ≤100ms。门槛只用于 Spike 是否值得继续,不构成跨设备性能承诺。 -- [ ] **步骤 1:写 benchmark 失败测试,确保输出包含版本、seed、输入集、环境和三算法字段,不允许缺少失败原因。** -- [ ] **步骤 2:实现脚本和 `npm run benchmark:motion`,先运行生成报告。** -- [ ] **步骤 3:核对报告只使用合成数据、无网络和无个人图片;记录未达门槛项,不调整参数隐藏失败。** -- [ ] **步骤 4:提交 `记录运动估计对比证据`。** +- [x] **步骤 1:写 benchmark 失败测试,确保输出包含版本、seed、输入集、环境和三算法字段,不允许缺少失败原因。** +- [x] **步骤 2:实现脚本和 `npm run benchmark:motion`,先运行生成报告。** +- [x] **步骤 3:核对报告只使用合成数据、无网络和无个人图片;记录未达门槛项,不调整参数隐藏失败。** +- [x] **步骤 4:提交 `记录运动估计对比证据`。** ### 任务 7:独立 Motion Demo @@ -241,33 +241,33 @@ expect('matrix' in failed).toBe(false) **页面行为:** `motion.html` 显示中文默认和 English 切换;提供原创合成场景、上一帧/当前帧图片上传、算法下拉、运行全部、重置、JSON 导出;中央显示前后帧缩略图和矩阵/置信度/内点/残差/三段耗时;详情明确“实验能力,不自动接入默认跟踪”。不提供摄像头、视频播放器、手机专属控件或 NPU 选项。页面使用共享 token 和当前 PP-Tracking 顶栏风格,390px 不横向溢出。 -- [ ] **步骤 1:先写 `tests/motion-browser.mjs` 失败流程。** 打开 `motion.html`,断言标题、三算法选项、CPU/JavaScript/Main、状态复位标记、单算法运行、全部对比、失败原因、中文/英文切换、JSON 导出和 390px 宽度。 -- [ ] **步骤 2:运行 `npm run build:demo` 后执行浏览器脚本,确认页面尚未存在并保存 `.tmp/motion/motion-browser-red.log`。** -- [ ] **步骤 3:实现 MotionApp 和静态入口,合成图片使用与 benchmark 相同 seed;上传图片通过 `createImageBitmap` + canvas 转 `ImageData`,释放 bitmap,不上传网络。** -- [ ] **步骤 4:复用 `data-sdk-runtime-info`、`data-sdk-timing`、`data-sdk-algorithm-info`、`data-sdk-state-reset`;实验页显示 `CPU / JavaScript / Main`,不伪造模型缓存或推理耗时。** -- [ ] **步骤 5:运行 `npm run build:demo`、`node tests/motion-browser.mjs`,保存截图和报告,提交 `增加运动估计实验 Demo`。** +- [x] **步骤 1:先写 `tests/motion-browser.mjs` 失败流程。** 打开 `motion.html`,断言标题、三算法选项、CPU/JavaScript/Main、状态复位标记、单算法运行、全部对比、失败原因、中文/英文切换、JSON 导出和 390px 宽度。 +- [x] **步骤 2:运行 `npm run build:demo` 后执行浏览器脚本,确认页面尚未存在并保存 `.tmp/motion/motion-browser-red.log`。** +- [x] **步骤 3:实现 MotionApp 和静态入口,合成图片使用与 benchmark 相同 seed;上传图片通过 `createImageBitmap` + canvas 转 `ImageData`,释放 bitmap,不上传网络。** +- [x] **步骤 4:复用 `data-sdk-runtime-info`、`data-sdk-timing`、`data-sdk-algorithm-info`、`data-sdk-state-reset`;实验页显示 `CPU / JavaScript / Main`,不伪造模型缓存或推理耗时。** +- [x] **步骤 5:运行 `npm run build:demo`、`node tests/motion-browser.mjs`,保存截图和报告,提交 `增加运动估计实验 Demo`。** ### 任务 8:文档、manifest、版本和门户登记 **文件:** 见“文件与职责映射”中的双语文档、`sdk-manifest.yaml`、`CHANGELOG.md` 和门户路线/报告。 -- [ ] **步骤 1:更新中英文 API。** 写出 `MotionFrame` 嵌套帧身份、输入尺寸、`estimateMotion` async 调用、错误码、`failed` sentinel 不可应用、VideoFrame 所有权和 reset/无状态语义;示例必须使用 `status === 'estimated'` 才读取矩阵。 +- [x] **步骤 1:更新中英文 API。** 写出 `MotionFrame` 嵌套帧身份、输入尺寸、`estimateMotion` async 调用、错误码、`failed` sentinel 不可应用、VideoFrame 所有权和 reset/无状态语义;示例必须使用 `status === 'estimated'` 才读取矩阵。 ```ts const result = await estimateMotion({ previous, current, imageSize }, { algorithm: 'sparse-flow' }) if (result.status === 'estimated') tracker.update({ ...frame, motion: { status: 'estimated', matrix: result.matrix, source: 'motion-spike', confidence: result.confidence, from, to } }) ``` -- [ ] **步骤 2:更新兼容性、性能和变更记录。** 明确只验证 Windows 11 + Chromium 153 + CPU/main;`preprocessMs`/`estimateMs`/`totalMs` 属于实验结果,跟踪标准的五项 timing 不变;记录三算法 Spike 不改变默认 ByteTrack/BoT-SORT。 -- [ ] **步骤 3:将 SDK 本地版本统一到 `0.2.0-rc.2` 候选;顶层 hybrid manifest 继续保留算法模块 `cpu/main` 与 ReID 模块 `wasm/webgpu/main` 的既有实际声明,另在文档中明确 motion 子入口仅验证 `cpu/main`;不添加 WebGPU/NPU/Worker 证据,不把 motion 写成新模型或 Workflow。** -- [ ] **步骤 4:门户新增 dated report 和路线当前段,稳定 `src/content/models/pp-tracking.yaml` 继续写 rc.1/稳定 0.1.0 事实,只添加实验链接与“未默认接入”限制。** -- [ ] **步骤 5:运行双语链接、YAML/schema 和 checker 测试,提交 SDK `记录运动估计实验文档与候选版本`、门户 `登记运动估计实验阶段`。** +- [x] **步骤 2:更新兼容性、性能和变更记录。** 明确只验证 Windows 11 + Chromium 153 + CPU/main;`preprocessMs`/`estimateMs`/`totalMs` 属于实验结果,跟踪标准的五项 timing 不变;记录三算法 Spike 不改变默认 ByteTrack/BoT-SORT。 +- [x] **步骤 3:将 SDK 本地版本统一到 `0.2.0-rc.2` 候选;顶层 hybrid manifest 继续保留算法模块 `cpu/main` 与 ReID 模块 `wasm/webgpu/main` 的既有实际声明,另在文档中明确 motion 子入口仅验证 `cpu/main`;不添加 WebGPU/NPU/Worker 证据,不把 motion 写成新模型或 Workflow。** +- [x] **步骤 4:门户新增 dated report 和路线当前段,稳定 `src/content/models/pp-tracking.yaml` 继续写 rc.1/稳定 0.1.0 事实,只添加实验链接与“未默认接入”限制。** +- [x] **步骤 5:运行双语链接、YAML/schema 和 checker 测试,提交 SDK `记录运动估计实验文档与候选版本`、门户 `登记运动估计实验阶段`。** ### 任务 9:整体验收与本地收口 **文件:** SDK `.tmp/motion/`、门户 `reports/sdk-standard/2026-09-23-motion-after.json` 和最终检查日志。 -- [ ] **步骤 1:运行 SDK 完整验证。** +- [x] **步骤 1:运行 SDK 完整验证。** ```powershell pnpm --config.verify-deps-before-run=false --config.manage-package-manager-versions=false install --frozen-lockfile @@ -277,7 +277,7 @@ pnpm --config.verify-deps-before-run=false --config.manage-package-manager-versi 预期:构建、类型、既有跟踪单测、运动单测、包消费、Demo 构建、Vanilla/React 构建、既有浏览器流程和 Motion 浏览器流程通过;若环境缺少 Chromium,只记录安装/环境失败,不声称浏览器通过。 -- [ ] **步骤 2:运行门户检查和相关测试。** +- [x] **步骤 2:运行门户检查和相关测试。** ```powershell pnpm --config.verify-deps-before-run=false --config.manage-package-manager-versions=false sdk:check -- --repo C:/Users/chenm/.codex/worktrees/tracking-motion --format json --out reports/sdk-standard/2026-09-23-motion-after.json @@ -285,9 +285,9 @@ pnpm --config.verify-deps-before-run=false --config.manage-package-manager-versi pnpm --config.verify-deps-before-run=false --config.manage-package-manager-versions=false build ``` -- [ ] **步骤 3:运行 `git diff --check`、扫描常见占位词和未分类英文占位符,核对历史报告和主工作树未被覆盖;报告列出通过项、失败项、未验证平台和下一步是否值得设计 BoT-SORT 自动接入。** -- [ ] **步骤 4:执行最终独立审查清单。** 检查根包 ESM/CJS/NodeNext 可导入,`VideoFrame` 所有权文档准确,失败结果不会被 Demo 或 BoT-SORT 当成矩阵,网页无网络请求和 390px 无溢出,门户没有把实验写成稳定兼容。 -- [ ] **步骤 5:两仓分别提交本地变更,不 push、不开 PR;记录提交 SHA 和本地报告路径,等待用户决定是否发布 rc.2 或继续改进。** +- [x] **步骤 3:运行 `git diff --check`、扫描常见占位词和未分类英文占位符,核对历史报告和主工作树未被覆盖;报告列出通过项、失败项、未验证平台和下一步是否值得设计 BoT-SORT 自动接入。** +- [x] **步骤 4:执行最终独立审查清单。** 检查根包 ESM/CJS/NodeNext 可导入,`VideoFrame` 所有权文档准确,失败结果不会被 Demo 或 BoT-SORT 当成矩阵,网页无网络请求和 390px 无溢出,门户没有把实验写成稳定兼容。 +- [x] **步骤 5:两仓分别提交本地变更,不 push、不开 PR;记录提交 SHA 和本地报告路径,等待用户决定是否发布 rc.2 或继续改进。** ## 交付后的决策点 diff --git a/reports/sdk-standard/2026-09-23-motion-after.json b/reports/sdk-standard/2026-09-23-motion-after.json new file mode 100644 index 0000000..f9af0c6 --- /dev/null +++ b/reports/sdk-standard/2026-09-23-motion-after.json @@ -0,0 +1,278 @@ +{ + "standardVersion": "1.3.0", + "repositories": [ + { + "standardVersion": "1.3.0", + "repository": "tracking-motion", + "summary": { + "requiredPassed": 21, + "requiredFailed": 0, + "requiredSkipped": 4, + "requiredUnknown": 0, + "requiredNotApplicable": 0, + "recommendedPassed": 3, + "recommendedFailed": 0, + "labs": 1, + "status": "locally-compliant" + }, + "findings": [ + { + "id": "ALGORITHM-001", + "level": "required", + "status": "pass", + "message": "算法清单声明身份、家族、来源、许可、输入输出与有状态语义", + "remediation": "按 sdk-manifest.algorithm.yaml 填写 algorithm 字段并记录状态生命周期。", + "path": "sdk-manifest.yaml", + "evidence": "sdk-manifest.yaml" + }, + { + "id": "CACHE-001", + "level": "required", + "status": "pass", + "message": "Cache storage, versioning, estimate, and cleanup are declared", + "remediation": "Add cache contract fields and expose cleanup controls in the Demo.", + "path": "sdk-manifest.yaml", + "evidence": "sdk-manifest.yaml" + }, + { + "id": "DEMO-001", + "level": "required", + "status": "pass", + "message": "A runnable standalone Demo entry exists", + "remediation": "Add a Demo app with a documented start/build command.", + "path": "demo/index.html", + "evidence": "demo/index.html" + }, + { + "id": "DEMO-002", + "level": "required", + "status": "pass", + "message": "Demo declares Chinese as its initial language", + "remediation": "Set lang or default language state to zh-CN.", + "path": "demo/index.html", + "evidence": "demo/index.html, demo/motion.html, demo/src/App.tsx, demo/src/MotionApp.tsx, examples/vanilla/index.html" + }, + { + "id": "DEMO-003", + "level": "required", + "status": "pass", + "message": "Demo provides an in-page Chinese/English toggle", + "remediation": "Add a language toggle that does not alter inference state.", + "path": "demo/src/App.tsx", + "evidence": "demo/src/App.tsx, demo/src/MotionApp.tsx, demo/src/ReIdWorkspace.tsx" + }, + { + "id": "DEMO-004", + "level": "required", + "status": "pass", + "message": "Demo exposes current-model and global cache cleanup controls", + "remediation": "Wire clear-current and clear-all actions to the SDK cache API.", + "path": ".github/workflows/ci.yml", + "evidence": ".github/workflows/ci.yml" + }, + { + "id": "DEMO-005", + "level": "required", + "status": "pass", + "message": "Demo 展示当前模型或算法的信息、运行信息和耗时", + "remediation": "模型使用 data-sdk-model-info,算法使用 data-sdk-algorithm-info;混合类型同时提供两者,且全部保留 data-sdk-runtime-info 和 data-sdk-timing。", + "path": "demo/src/App.tsx", + "evidence": "demo/src/App.tsx, demo/src/MotionApp.tsx, demo/src/ReIdWorkspace.tsx" + }, + { + "id": "DEMO-006", + "level": "required", + "status": "pass", + "message": "算法 Demo 提供状态复位操作", + "remediation": "使用 data-sdk-state-reset 标记复位控件,并按状态生命周期契约连接 reset。", + "path": "demo/src/App.tsx", + "evidence": "demo/src/App.tsx, demo/src/MotionApp.tsx, demo/src/ReIdWorkspace.tsx" + }, + { + "id": "DEPLOY-001", + "level": "required", + "status": "skip", + "message": "The live Demo has a reproducible HTTPS deployment from protected source with least-privilege credentials", + "remediation": "Configure and verify a deployment that meets standards/v1/repository-governance-contract.md, then record its commit and deployment evidence.", + "evidence": "Requires read-only remote-api verification; offline sdk:check did not evaluate this rule." + }, + { + "id": "DOC-001", + "level": "required", + "status": "pass", + "message": "Chinese-default and English README files link to one another", + "remediation": "Add README.md and README.en.md with reciprocal language links.", + "path": ".github/workflows/ci.yml", + "evidence": ".github/workflows/ci.yml" + }, + { + "id": "DOC-002", + "level": "required", + "status": "pass", + "message": "Chinese and English documentation directories are present", + "remediation": "Provide equivalent docs/zh-CN and docs/en quick-start/API guidance.", + "path": ".github/workflows/ci.yml", + "evidence": ".github/workflows/ci.yml" + }, + { + "id": "DOC-003", + "level": "required", + "status": "pass", + "message": "README or package metadata exposes GitHub, npm, and live Demo links", + "remediation": "Add repository, package, and Demo URLs to README and manifest.", + "path": "README.md", + "evidence": "README.md" + }, + { + "id": "EXAMPLE-001", + "level": "required", + "status": "pass", + "message": "Vanilla TypeScript/DOM portability example exists", + "remediation": "Add examples/vanilla with a runnable README.", + "path": "examples/vanilla/README.en.md", + "evidence": "examples/vanilla/README.en.md" + }, + { + "id": "EXAMPLE-002", + "level": "required", + "status": "pass", + "message": "React reference example exists", + "remediation": "Add examples/react or explicitly record a migration exception.", + "path": "examples/react/README.en.md", + "evidence": "examples/react/README.en.md" + }, + { + "id": "EXAMPLE-003", + "level": "recommended", + "status": "pass", + "message": "Declared target surfaces have runnable examples or explicit unsupported status", + "remediation": "Align examples with manifest target surfaces.", + "path": "examples/vanilla/README.en.md", + "evidence": "examples/vanilla/README.en.md, examples/react/README.en.md" + }, + { + "id": "GOV-001", + "level": "required", + "status": "skip", + "message": "The default branch has an active least-privilege Ruleset for pull requests, current CI checks, resolved conversations, deletion, and force-push protection", + "remediation": "Configure an active default-branch Ruleset using standards/v1/repository-governance-contract.md and capture dated GitHub API evidence.", + "evidence": "Requires read-only github-api verification; offline sdk:check did not evaluate this rule." + }, + { + "id": "GOV-002", + "level": "required", + "status": "skip", + "message": "Release tags are immutable under an active tag Ruleset", + "remediation": "Protect the documented release tag pattern against updates and deletion, minimize bypass, and capture dated GitHub API evidence.", + "evidence": "Requires read-only github-api verification; offline sdk:check did not evaluate this rule." + }, + { + "id": "HYBRID-001", + "level": "required", + "status": "pass", + "message": "混合清单的算法与可选模型模块具有可用且彼此独立的包导出入口", + "remediation": "使用 1.3.0 混合模板,并让 modules.algorithm.entry 与 modules.model.entry 指向 package.exports 中真实存在的不同文件。", + "path": "package.json", + "evidence": "package.json" + }, + { + "id": "LABS-001", + "level": "labs", + "status": "skip", + "message": "Experimental backends and NPU claims have explicit evidence and limits", + "remediation": "Mark WebNN/NPU as labs unless a dated verification matrix exists.", + "evidence": "Labs rule is informational" + }, + { + "id": "META-001", + "level": "required", + "status": "pass", + "message": "SDK manifest is present and declares the v1 contract", + "remediation": "Copy standards/v1/templates/sdk-manifest.yaml and fill every required field.", + "path": "sdk-manifest.yaml", + "evidence": "sdk-manifest.yaml" + }, + { + "id": "META-002", + "level": "required", + "status": "pass", + "message": "package.json declares a public package identity and version", + "remediation": "Add a non-private package with a semver version and repository metadata.", + "path": ".github/workflows/ci.yml", + "evidence": ".github/workflows/ci.yml" + }, + { + "id": "MODEL-001", + "level": "required", + "status": "pass", + "message": "Manifest declares model identity, precision, size, source, license, and checksum", + "remediation": "Complete the model and asset fields in sdk-manifest.yaml.", + "path": "sdk-manifest.yaml", + "evidence": "sdk-manifest.yaml" + }, + { + "id": "PAGES-001", + "level": "required", + "status": "skip", + "message": "A GitHub Pages Demo deploys through GitHub Actions with scoped permissions, environment binding, HTTPS, and concurrency control", + "remediation": "Configure Pages and its deployment workflow using standards/v1/repository-governance-contract.md and capture dated GitHub API evidence.", + "evidence": "Requires read-only github-api verification; offline sdk:check did not evaluate this rule." + }, + { + "id": "PERF-001", + "level": "required", + "status": "pass", + "message": "声明当前 SDK 类型所需的标准耗时字段", + "remediation": "模型保留下载、缓存、校验、会话、推理和总耗时;算法声明 validationMs、predictionMs、associationMs、updateMs、totalMs;混合类型按模块分别声明并在顶层取并集。", + "path": "sdk-manifest.yaml", + "evidence": "sdk-manifest.yaml" + }, + { + "id": "RELEASE-001", + "level": "required", + "status": "pass", + "message": "CI workflow runs verification before release", + "remediation": "Add .github/workflows/ci.yml with tests, typecheck, and build.", + "path": ".github/workflows/ci.yml", + "evidence": ".github/workflows/ci.yml" + }, + { + "id": "RELEASE-002", + "level": "required", + "status": "pass", + "message": "GitHub Release workflow exists", + "remediation": "Add a tag-triggered release workflow and publish notes.", + "path": ".github/workflows/release.yml", + "evidence": ".github/workflows/release.yml" + }, + { + "id": "RELEASE-003", + "level": "recommended", + "status": "pass", + "message": "Changelog documents user-visible SDK and Demo changes", + "remediation": "Add CHANGELOG.md with the current release entry.", + "path": ".github/workflows/ci.yml", + "evidence": ".github/workflows/ci.yml" + }, + { + "id": "RUNTIME-001", + "level": "required", + "status": "pass", + "message": "Requested/actual backend and execution mode are declared", + "remediation": "Add runtime backends, execution modes, and actual backend reporting.", + "path": "sdk-manifest.yaml", + "evidence": "sdk-manifest.yaml" + }, + { + "id": "UI-001", + "level": "recommended", + "status": "pass", + "message": "Demo styling references the shared token vocabulary", + "remediation": "Import or copy standards/v1/ui-tokens.json values without introducing conflicting status colors.", + "path": "standards/v1/ui-tokens.json", + "evidence": "standards/v1/ui-tokens.json" + } + ] + } + ] +} diff --git a/reports/sdk-standard/2026-09-23-motion-before.json b/reports/sdk-standard/2026-09-23-motion-before.json new file mode 100644 index 0000000..cc21c52 --- /dev/null +++ b/reports/sdk-standard/2026-09-23-motion-before.json @@ -0,0 +1,277 @@ +{ + "standardVersion": "1.3.0", + "repositories": [ + { + "standardVersion": "1.3.0", + "repository": "motion-before", + "summary": { + "requiredPassed": 20, + "requiredFailed": 1, + "requiredSkipped": 4, + "requiredUnknown": 0, + "requiredNotApplicable": 0, + "recommendedPassed": 3, + "recommendedFailed": 0, + "labs": 1, + "status": "partial" + }, + "findings": [ + { + "id": "ALGORITHM-001", + "level": "required", + "status": "pass", + "message": "算法清单声明身份、家族、来源、许可、输入输出与有状态语义", + "remediation": "按 sdk-manifest.algorithm.yaml 填写 algorithm 字段并记录状态生命周期。", + "path": "sdk-manifest.yaml", + "evidence": "sdk-manifest.yaml" + }, + { + "id": "CACHE-001", + "level": "required", + "status": "pass", + "message": "Cache storage, versioning, estimate, and cleanup are declared", + "remediation": "Add cache contract fields and expose cleanup controls in the Demo.", + "path": "sdk-manifest.yaml", + "evidence": "sdk-manifest.yaml" + }, + { + "id": "DEMO-001", + "level": "required", + "status": "pass", + "message": "A runnable standalone Demo entry exists", + "remediation": "Add a Demo app with a documented start/build command.", + "path": "demo/index.html", + "evidence": "demo/index.html" + }, + { + "id": "DEMO-002", + "level": "required", + "status": "pass", + "message": "Demo declares Chinese as its initial language", + "remediation": "Set lang or default language state to zh-CN.", + "path": "demo/index.html", + "evidence": "demo/index.html, demo/src/App.tsx, examples/vanilla/index.html" + }, + { + "id": "DEMO-003", + "level": "required", + "status": "pass", + "message": "Demo provides an in-page Chinese/English toggle", + "remediation": "Add a language toggle that does not alter inference state.", + "path": "demo/src/App.tsx", + "evidence": "demo/src/App.tsx, demo/src/ReIdWorkspace.tsx" + }, + { + "id": "DEMO-004", + "level": "required", + "status": "pass", + "message": "Demo exposes current-model and global cache cleanup controls", + "remediation": "Wire clear-current and clear-all actions to the SDK cache API.", + "path": ".github/workflows/ci.yml", + "evidence": ".github/workflows/ci.yml" + }, + { + "id": "DEMO-005", + "level": "required", + "status": "pass", + "message": "Demo 展示当前模型或算法的信息、运行信息和耗时", + "remediation": "模型使用 data-sdk-model-info,算法使用 data-sdk-algorithm-info;混合类型同时提供两者,且全部保留 data-sdk-runtime-info 和 data-sdk-timing。", + "path": "demo/src/App.tsx", + "evidence": "demo/src/App.tsx, demo/src/ReIdWorkspace.tsx" + }, + { + "id": "DEMO-006", + "level": "required", + "status": "pass", + "message": "算法 Demo 提供状态复位操作", + "remediation": "使用 data-sdk-state-reset 标记复位控件,并按状态生命周期契约连接 reset。", + "path": "demo/src/App.tsx", + "evidence": "demo/src/App.tsx, demo/src/ReIdWorkspace.tsx" + }, + { + "id": "DEPLOY-001", + "level": "required", + "status": "skip", + "message": "The live Demo has a reproducible HTTPS deployment from protected source with least-privilege credentials", + "remediation": "Configure and verify a deployment that meets standards/v1/repository-governance-contract.md, then record its commit and deployment evidence.", + "evidence": "Requires read-only remote-api verification; offline sdk:check did not evaluate this rule." + }, + { + "id": "DOC-001", + "level": "required", + "status": "pass", + "message": "Chinese-default and English README files link to one another", + "remediation": "Add README.md and README.en.md with reciprocal language links.", + "path": ".github/workflows/ci.yml", + "evidence": ".github/workflows/ci.yml" + }, + { + "id": "DOC-002", + "level": "required", + "status": "pass", + "message": "Chinese and English documentation directories are present", + "remediation": "Provide equivalent docs/zh-CN and docs/en quick-start/API guidance.", + "path": ".github/workflows/ci.yml", + "evidence": ".github/workflows/ci.yml" + }, + { + "id": "DOC-003", + "level": "required", + "status": "pass", + "message": "README or package metadata exposes GitHub, npm, and live Demo links", + "remediation": "Add repository, package, and Demo URLs to README and manifest.", + "path": "README.md", + "evidence": "README.md" + }, + { + "id": "EXAMPLE-001", + "level": "required", + "status": "pass", + "message": "Vanilla TypeScript/DOM portability example exists", + "remediation": "Add examples/vanilla with a runnable README.", + "path": "examples/vanilla/README.en.md", + "evidence": "examples/vanilla/README.en.md" + }, + { + "id": "EXAMPLE-002", + "level": "required", + "status": "pass", + "message": "React reference example exists", + "remediation": "Add examples/react or explicitly record a migration exception.", + "path": "examples/react/README.en.md", + "evidence": "examples/react/README.en.md" + }, + { + "id": "EXAMPLE-003", + "level": "recommended", + "status": "pass", + "message": "Declared target surfaces have runnable examples or explicit unsupported status", + "remediation": "Align examples with manifest target surfaces.", + "path": "examples/vanilla/README.en.md", + "evidence": "examples/vanilla/README.en.md, examples/react/README.en.md" + }, + { + "id": "GOV-001", + "level": "required", + "status": "skip", + "message": "The default branch has an active least-privilege Ruleset for pull requests, current CI checks, resolved conversations, deletion, and force-push protection", + "remediation": "Configure an active default-branch Ruleset using standards/v1/repository-governance-contract.md and capture dated GitHub API evidence.", + "evidence": "Requires read-only github-api verification; offline sdk:check did not evaluate this rule." + }, + { + "id": "GOV-002", + "level": "required", + "status": "skip", + "message": "Release tags are immutable under an active tag Ruleset", + "remediation": "Protect the documented release tag pattern against updates and deletion, minimize bypass, and capture dated GitHub API evidence.", + "evidence": "Requires read-only github-api verification; offline sdk:check did not evaluate this rule." + }, + { + "id": "HYBRID-001", + "level": "required", + "status": "fail", + "message": "混合清单的算法与可选模型模块具有可用且彼此独立的包导出入口", + "remediation": "使用 1.3.0 混合模板,并让 modules.algorithm.entry 与 modules.model.entry 指向 package.exports 中真实存在的不同文件。", + "path": ".github/workflows/ci.yml" + }, + { + "id": "LABS-001", + "level": "labs", + "status": "skip", + "message": "Experimental backends and NPU claims have explicit evidence and limits", + "remediation": "Mark WebNN/NPU as labs unless a dated verification matrix exists.", + "evidence": "Labs rule is informational" + }, + { + "id": "META-001", + "level": "required", + "status": "pass", + "message": "SDK manifest is present and declares the v1 contract", + "remediation": "Copy standards/v1/templates/sdk-manifest.yaml and fill every required field.", + "path": "sdk-manifest.yaml", + "evidence": "sdk-manifest.yaml" + }, + { + "id": "META-002", + "level": "required", + "status": "pass", + "message": "package.json declares a public package identity and version", + "remediation": "Add a non-private package with a semver version and repository metadata.", + "path": ".github/workflows/ci.yml", + "evidence": ".github/workflows/ci.yml" + }, + { + "id": "MODEL-001", + "level": "required", + "status": "pass", + "message": "Manifest declares model identity, precision, size, source, license, and checksum", + "remediation": "Complete the model and asset fields in sdk-manifest.yaml.", + "path": "sdk-manifest.yaml", + "evidence": "sdk-manifest.yaml" + }, + { + "id": "PAGES-001", + "level": "required", + "status": "skip", + "message": "A GitHub Pages Demo deploys through GitHub Actions with scoped permissions, environment binding, HTTPS, and concurrency control", + "remediation": "Configure Pages and its deployment workflow using standards/v1/repository-governance-contract.md and capture dated GitHub API evidence.", + "evidence": "Requires read-only github-api verification; offline sdk:check did not evaluate this rule." + }, + { + "id": "PERF-001", + "level": "required", + "status": "pass", + "message": "声明当前 SDK 类型所需的标准耗时字段", + "remediation": "模型保留下载、缓存、校验、会话、推理和总耗时;算法声明 validationMs、predictionMs、associationMs、updateMs、totalMs;混合类型按模块分别声明并在顶层取并集。", + "path": "sdk-manifest.yaml", + "evidence": "sdk-manifest.yaml" + }, + { + "id": "RELEASE-001", + "level": "required", + "status": "pass", + "message": "CI workflow runs verification before release", + "remediation": "Add .github/workflows/ci.yml with tests, typecheck, and build.", + "path": ".github/workflows/ci.yml", + "evidence": ".github/workflows/ci.yml" + }, + { + "id": "RELEASE-002", + "level": "required", + "status": "pass", + "message": "GitHub Release workflow exists", + "remediation": "Add a tag-triggered release workflow and publish notes.", + "path": ".github/workflows/release.yml", + "evidence": ".github/workflows/release.yml" + }, + { + "id": "RELEASE-003", + "level": "recommended", + "status": "pass", + "message": "Changelog documents user-visible SDK and Demo changes", + "remediation": "Add CHANGELOG.md with the current release entry.", + "path": ".github/workflows/ci.yml", + "evidence": ".github/workflows/ci.yml" + }, + { + "id": "RUNTIME-001", + "level": "required", + "status": "pass", + "message": "Requested/actual backend and execution mode are declared", + "remediation": "Add runtime backends, execution modes, and actual backend reporting.", + "path": "sdk-manifest.yaml", + "evidence": "sdk-manifest.yaml" + }, + { + "id": "UI-001", + "level": "recommended", + "status": "pass", + "message": "Demo styling references the shared token vocabulary", + "remediation": "Import or copy standards/v1/ui-tokens.json values without introducing conflicting status colors.", + "path": "standards/v1/ui-tokens.json", + "evidence": "standards/v1/ui-tokens.json" + } + ] + } + ] +} diff --git a/reports/tracking/2026-09-23-motion-estimation/README.md b/reports/tracking/2026-09-23-motion-estimation/README.md new file mode 100644 index 0000000..dbfc01d --- /dev/null +++ b/reports/tracking/2026-09-23-motion-estimation/README.md @@ -0,0 +1,20 @@ +# Tracking 浏览器运动估计实验阶段回执 + +日期:2026-09-23。层级:单 SDK 实验能力。SDK 工作树:`C:/Users/chenm/.codex/worktrees/tracking-motion`。 + +## 交付 + +- 新增独立 `web-sdk-pp-tracking/motion` 子入口;包根、ReID 子入口和 BoT-SORT API 保持原边界。 +- 支持相邻 `ImageData`/`VideoFrame`,提供纯平移、稀疏光流和特征匹配;结构错误抛出独立错误,质量失败返回不含矩阵的显式回执。 +- 新增 `/motion.html`,中文默认、英文切换、三算法对比、状态复位、JSON 导出和 390px 桌面视口验证。 +- 新增固定 seed 合成脚本和 SDK 双语报告;无网络、外部图像或模型权重。 + +## 证据与裁定 + +SDK 原始指标位于 `reports/2026-09-23-motion-estimation/metrics.json`。Node 合成基准的 640×360 p95:纯平移约 15.5 ms、稀疏光流约 71.8 ms、特征匹配约 191.1 ms;对应成功率为 41.7%、33.3%、41.7%。低纹理、重复纹理和超范围运动均显式失败,失败结果不带矩阵。这支持保留纯平移为快速基线,但不足以把三算法自动接入 BoT-SORT。 + +线上 npm `next`、GitHub Release 和 Demo 仍是 `0.2.0-rc.1`,稳定 `latest` 仍是 `0.1.0`。本地 `0.2.0-rc.2` 不代表发布。手机、Worker、GPU/NPU、Safari、Firefox、视频、摄像头和 Workflow 未验证或不在本阶段。 + +## 验证 + +SDK checker before(基线)报告为 `reports/sdk-standard/2026-09-23-motion-before.json`,有 20 项 required 通过、1 项混合导出规则失败;after 报告为 `reports/sdk-standard/2026-09-23-motion-after.json`,required 规则 21 项通过、0 项失败,4 项远程规则按离线检查跳过。SDK 和门户验证结果汇总于本目录 `report.json`。若未来考虑自动接入,必须先扩充真实合法帧、仿射场景、浏览器实际耗时和跟踪框误差证据,再提交独立设计。 diff --git a/reports/tracking/2026-09-23-motion-estimation/report.json b/reports/tracking/2026-09-23-motion-estimation/report.json new file mode 100644 index 0000000..ea8f234 --- /dev/null +++ b/reports/tracking/2026-09-23-motion-estimation/report.json @@ -0,0 +1,43 @@ +{ + "schemaVersion": 1, + "date": "2026-09-23", + "stage": "单 SDK 浏览器运动估计实验", + "sdkWorktree": "C:/Users/chenm/.codex/worktrees/tracking-motion", + "sdkVersion": "0.2.0-rc.2", + "publication": { + "status": "local-only", + "push": false, + "pullRequest": false, + "npm": "线上 next 仍为 0.2.0-rc.1,latest 仍为 0.1.0" + }, + "evidence": { + "checkerAfter": "reports/sdk-standard/2026-09-23-motion-after.json", + "sdkMetrics": "C:/Users/chenm/.codex/worktrees/tracking-motion/reports/2026-09-23-motion-estimation/metrics.json", + "sdkBrowserReport": "C:/Users/chenm/.codex/worktrees/tracking-motion/.tmp/motion/browser-report.json", + "sdkBrowserScreenshot": "C:/Users/chenm/.codex/worktrees/tracking-motion/.tmp/motion/motion-390.png" + }, + "checker": { + "before": { + "report": "reports/sdk-standard/2026-09-23-motion-before.json", + "requiredPassed": 20, + "requiredFailed": 1, + "failure": "HYBRID-001:基线没有独立可用的 motion 导出" + }, + "requiredPassed": 21, + "requiredFailed": 0, + "requiredSkipped": 4, + "status": "locally-compliant" + }, + "motion640x360": { + "translation": { "successRate": 0.4166666667, "totalMsP95Observed": 15.5239 }, + "sparse-flow": { "successRate": 0.3333333333, "totalMsP95Observed": 71.7657 }, + "feature-match": { "successRate": 0.4166666667, "totalMsP95Observed": 191.1161 } + }, + "verification": { + "sdkVerify": "通过:236 个 Vitest 测试、包消费、Demo/Vanilla/React 构建和三组 Chromium smoke;页面错误 0", + "portalTest": "通过:136 个测试", + "portalBuild": "通过:Astro check 0 errors、0 warnings,静态构建 21 页" + }, + "decision": "三算法保留为独立实验,不自动接入 BoT-SORT;失败结果不含矩阵。", + "unverified": ["手机", "Worker", "GPU/NPU", "Safari", "Firefox", "视频", "摄像头", "跨 SDK Workflow"] +} diff --git a/src/content/models/pp-tracking.yaml b/src/content/models/pp-tracking.yaml index e2d8a8a..467288d 100644 --- a/src/content/models/pp-tracking.yaml +++ b/src/content/models/pp-tracking.yaml @@ -34,6 +34,7 @@ limitations: - 本条包版本、算法、后端和无权重元数据对应稳定 latest 0.1.0;仅消费已有检测,不含检测模型、视频解码、摄像头、ReID 或相机运动补偿。轨迹 ID 不是个人身份。 - 预发布使用 npm install web-sdk-pp-tracking@next;rc.1 默认 ByteTrack,OC-SORT/DeepSORT/BoT-SORT 显式可选。人体 ReID 子入口需可选 onnxruntime-web@1.27.0,模型默认 ModelScope,可选 Hugging Face;特征提取为 WASM/WebGPU,关联始终 CPU。ReID 保留实验状态,不提升稳定版声明。 - rc.1 发布说明与模型身份、许可及验证边界见 https://github.com/chenmohan123/web-sdk-PP-Tracking/releases/tag/v0.2.0-rc.1 。在线 Demo 为 rc.1;390px 仅桌面视口,双源/双后端仅在注明的 Windows/Chromium 环境验证。 + - 2026-09-23 本地 rc.2 仅新增独立相邻帧运动估计实验,尚未发布,也不会自动接入 BoT-SORT。合成成本与低纹理失败见门户阶段回执;生产条目、npm next 和在线 Demo 继续对应 rc.1。 - 2026-09-19 固定 MOT17 七段 FRCNN 训练序列 5316 帧,默认 IDF1 48.2922%、IDSW 1101、MOTA 44.4010%、FP 4169、FN 57166;不是测试集成绩或官方 ByteTrack 排名。 - 低分消融 IDF1 48.3465%、IDSW 1066;默认低分续接减少漏检但增加误检和切 ID,不承诺普遍精度提升或可靠跨遮挡身份。 - 状态保存在实例内,seek 或图像尺寸改变前须 reset 并顺序重放;dispose 后不可继续更新。 From 319492b822b0e6cb38e270e77955a09b03c25aec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E9=BB=98=E6=B6=B5?= <21739308@qq.com> Date: Wed, 23 Sep 2026 12:28:51 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E6=A0=A1=E5=87=86=E8=BF=90=E5=8A=A8?= =?UTF-8?q?=E4=BC=B0=E8=AE=A1=E9=98=B6=E6=AE=B5=E6=8C=87=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plans/2026-08-17-web-model-sdk-portal-roadmap.md | 2 +- .../plans/2026-09-13-pp-detection-multi-model-roadmap.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/superpowers/plans/2026-08-17-web-model-sdk-portal-roadmap.md b/docs/superpowers/plans/2026-08-17-web-model-sdk-portal-roadmap.md index a0526a7..244e68f 100644 --- a/docs/superpowers/plans/2026-08-17-web-model-sdk-portal-roadmap.md +++ b/docs/superpowers/plans/2026-08-17-web-model-sdk-portal-roadmap.md @@ -10,7 +10,7 @@ readiness, not by the number of models mentioned in the catalog. ## 当前优先级(2026-09-19 证据更新) -**2026-09-23 运动估计 Spike:** Tracking 本地 `0.2.0-rc.2` 候选新增独立 `web-sdk-pp-tracking/motion` 子入口和 `/motion.html` 实验页,比较纯平移、稀疏光流与特征匹配。合成 Node 基准中 640×360 p95 约为 34/170/466 ms,低纹理均显式失败;当前成本和验证矩阵不足以自动接入 BoT-SORT,继续保留外部矩阵契约、ByteTrack 默认和线上 rc.1。见[阶段回执](../../../reports/tracking/2026-09-23-motion-estimation/README.md)。不扩展视频/摄像头、手机、Worker、GPU/NPU、Safari/Firefox 或 Workflow。 +**2026-09-23 运动估计 Spike:** Tracking 本地 `0.2.0-rc.2` 候选新增独立 `web-sdk-pp-tracking/motion` 子入口和 `/motion.html` 实验页,比较纯平移、稀疏光流与特征匹配。合成 Node 基准中 640×360 p95 约为 15.5/71.8/191.1 ms,成功率约 41.7%/33.3%/41.7%,复杂运动与歧义纹理均显式失败;当前质量和验证矩阵不足以自动接入 BoT-SORT,继续保留外部矩阵契约、ByteTrack 默认和线上 rc.1。见[阶段回执](../../../reports/tracking/2026-09-23-motion-estimation/README.md)。不扩展视频/摄像头、手机、Worker、GPU/NPU、Safari/Firefox 或 Workflow。 **2026-09-22 rc.1 已发布:** Tracking `0.2.0-rc.1` 已接入 BoT-SORT 根工厂、严格运动类型、四算法 Demo 和版本化运动序列导入导出,见[集成回执](../../../reports/tracking/2026-09-22-botsort-integration/README.md)及[发布回执](../../../reports/tracking/2026-09-22-botsort-integration/release-receipt.md)。SDK PR #6 与门户 PR #50 已合并;不可变标签、GitHub Release、npm `next`、provenance 和线上 Demo 均已回读,`latest` 保持 0.1.0。下一阶段设计可选浏览器自动运动估计,先验证矩阵质量、失败策略和总成本;不扩展视频/摄像头、手机或 Workflow。 diff --git a/docs/superpowers/plans/2026-09-13-pp-detection-multi-model-roadmap.md b/docs/superpowers/plans/2026-09-13-pp-detection-multi-model-roadmap.md index d9dcb46..1467f46 100644 --- a/docs/superpowers/plans/2026-09-13-pp-detection-multi-model-roadmap.md +++ b/docs/superpowers/plans/2026-09-13-pp-detection-multi-model-roadmap.md @@ -4,7 +4,7 @@ **目标:** 明确 PP-Detection 单 SDK 的模型边界,并完成下一阶段 2D 检测模型兼容性评估,选择一个有证据支持的候选进入后续移植。 -**2026-09-23 Tracking 运动估计更新:** 独立 `motion` 子入口和实验 Demo 已进入本地 `0.2.0-rc.2` 候选;三算法合成结果证明纯平移较快,但稀疏光流和特征匹配在 640×360 的 p95 约 170/466 ms,且低纹理需失败。当前不自动接入 BoT-SORT、不改变 ByteTrack 默认或线上 rc.1,见[阶段回执](../../../reports/tracking/2026-09-23-motion-estimation/README.md)。这仍属于 Tracking 单 SDK,不是门户 Workflow。 +**2026-09-23 Tracking 运动估计更新:** 独立 `motion` 子入口和实验 Demo 已进入本地 `0.2.0-rc.2` 候选;三算法合成结果证明纯平移较快,但 640×360 成功率仅约 41.7%/33.3%/41.7%,p95 约 15.5/71.8/191.1 ms,复杂运动和歧义纹理需失败。当前不自动接入 BoT-SORT、不改变 ByteTrack 默认或线上 rc.1,见[阶段回执](../../../reports/tracking/2026-09-23-motion-estimation/README.md)。这仍属于 Tracking 单 SDK,不是门户 Workflow。 **2026-09-22 Tracking集成更新:** [本地rc.1回执](../../../reports/tracking/2026-09-22-botsort-integration/README.md)完成 BoT-SORT 公开根入口、四算法Demo和完整运动导入导出,保持 ByteTrack 默认与独立SDK边界。220项测试、实际包消费、18组桌面浏览器流程及固定输入结果对齐通过,09退步保留。下一步是候选预发布及线上回读,再设计浏览器自动运动估计;本轮无远程写入,不扩展媒体、手机和Workflow。后文早期“下一步”保留为历史。 From 0ee238e91ade9b98231901fdb6b55c646bae7ab6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E9=BB=98=E6=B6=B5?= <21739308@qq.com> Date: Wed, 23 Sep 2026 12:38:26 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E7=99=BB=E8=AE=B0=20rc.2=20=E5=80=99?= =?UTF-8?q?=E9=80=89=E5=8C=85=E8=AF=81=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reports/tracking/2026-09-23-motion-estimation/report.json | 1 + 1 file changed, 1 insertion(+) diff --git a/reports/tracking/2026-09-23-motion-estimation/report.json b/reports/tracking/2026-09-23-motion-estimation/report.json index ea8f234..fff052f 100644 --- a/reports/tracking/2026-09-23-motion-estimation/report.json +++ b/reports/tracking/2026-09-23-motion-estimation/report.json @@ -13,6 +13,7 @@ "evidence": { "checkerAfter": "reports/sdk-standard/2026-09-23-motion-after.json", "sdkMetrics": "C:/Users/chenm/.codex/worktrees/tracking-motion/reports/2026-09-23-motion-estimation/metrics.json", + "candidatePackage": "C:/Users/chenm/.codex/worktrees/tracking-motion/reports/2026-09-23-motion-estimation/candidate-package.json", "sdkBrowserReport": "C:/Users/chenm/.codex/worktrees/tracking-motion/.tmp/motion/browser-report.json", "sdkBrowserScreenshot": "C:/Users/chenm/.codex/worktrees/tracking-motion/.tmp/motion/motion-390.png" },