Skip to content

I-ML-01: 官方 COCO80 与 PP-OCRv6 CPU 推理及可重建证据 - #12

Merged
SayQuan1 merged 1 commit into
mainfrom
wsq/i-ml01-cpu-evidence
Oct 7, 2026
Merged

SayQuan1 merged 1 commit into
mainfrom
wsq/i-ml01-cpu-evidence

Conversation

@SayQuan1

@SayQuan1 SayQuan1 commented Oct 7, 2026

Copy link
Copy Markdown
Owner

本次交付第31–35批:直接使用已提供的官方D-FINE COCO80 ONNX和PP-OCRv6_small det/rec ONNX,在CPU进行真实质量检查、检测和文字识别。OCR实际识别像素来自共享裁剪配方,可跨进程重建核SHA;补拍或技术失败无部分成功结果。

任务:I-ML-01;关联AI-05/06/07/09/10与UP-02的本地工程子范围,现场评测/完整业务接线/生产批准保持未关闭。

PR顺序

本PR以wsq/i-02-remediation-reports为基线,使第27–30批业务改动保持在独立PR中。先审查并Squash合并整改/报告PR #11,再将本PR基线切到main并同步分支、重新执行检查;不要将两个任务的差异混在同一个审查范围。

变更文件

  • apps/ai_inference/adapters/{dfine,ocrv6,quality}.py:80类、固定制品SHA、张量/provider/数值/几何门禁、真实质量算法与OCR。
  • apps/ai_inference/{cpu,ocr_cpu,pipeline_cpu}.py及CLI:1–3图、有界spawn/kill/join、全批质量门禁、检测/文字各100上限,唯一CPUExecutionProvider。
  • packages/image_evidence/perspective.py:共享perspective-rgb-v1、RGB PNG、源RGB/PNG/识别像素摘要和独立旋转,OCR报告升级v2。
  • tools/design/{dfine_reference,extra_specs,release_specs,...}.py及生成契约:COCO80、ocr_backend=onnxruntime、ocrv6smallcpu runtime profile;不手改生成物。
  • CPU独立依赖/CI、测试、tools/ml smoke和docs/08-delivery/31–35及合成证据同步。

验证

  • 独立AI CPU环境:54项适配/进程/像素测试无跳过通过;协议4项通过。
  • 真实权重三图smoke:中英文字共9个区域正确识别(含3个90°识别旋转),父进程重建PNG与识别像素SHA全部一致,两次子进程重放一致;混黑图整批补拍不加载模型。证据:docs/08-delivery/35-crop-cpu-evidence.json。
  • 业务环境:完整业务/领域/安全/协议1550项通过;fixture/AI配置/持久化单元58 passed、32数值用例skipped,跳过的像素用例另在上述真实CPU环境执行。
  • 生成--check、设计发布43/D-FINE112/readiness148及文档链接、Ruff check/format、pip check与diff检查通过。
  • AI真实环境完整discover缺开发测试依赖httpx,未宣称该发现套件全通过;HTTP fixture用例在业务环境已执行。远程CI分fixture/真实CPU独立环境执行,不上传/下载官方权重。

风险、审批与回滚

COCO四类到80类、Paddle OCR到ONNX OCR和旧runtime profile均为未部署设计的兼容性变化;本地OCR裁剪改为黑色边界,adapter/本地报告升级v2,旧验收证据保留。按CONTRIBUTING.md,模型/契约变更须两位协作者共同确认,独立批准并通过CI后Squash合并。

当前仅CPU、不安装CUDA;HTTP仍mock,真实常驻服务、受控analysis对象读取/版本核验、OCR文字的RPC引用闭包、Worker证据写入、瓶子/化学/日期事实与现场准确率未完成。合成图成绩不能用于安全判断或生产批准。COCO没有label/shelf/cabinet,不伪造这些检测类别。

回滚适配器/生成源与契约/依赖配置,恢复先前development fixture profile;保持生产拒绝未批准bundle。禁止将旧四类/v4制品或报告改名复用。模型、凭据、真实图片、虚拟环境和忽略目录不提交。

Deliver batches 31-35 with the supplied official ONNX artifacts: preserve
all 80 COCO classes, run PP-OCRv6_small on CPU, gate complete image batches
with real quality metrics, and rebuild OCR crops from shared recipes.
Record artifact/runtime hashes and synthetic replay evidence; keep model
weights outside Git. No CUDA or production activation is introduced.

Validation: 54 CPU adapter/process/pixel tests passed without skips;
real three-image inference reproduced all nine evidence crops including
three rotated recognition regions. Contract generation, design validation
and Ruff passed; fixture HTTP tests ran in the business test environment.

Rollback: revert the model adapter/schema/configuration changes and use
the prior development fixture profile. Do not relabel old v4/four-class
manifests or evaluation evidence, and do not activate unapproved bundles.
@SayQuan1
SayQuan1 changed the base branch from wsq/i-02-remediation-reports to main October 7, 2026 11:36

@SayQuan987 SayQuan987 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pass

@SayQuan1
SayQuan1 merged commit 13a854f into main Oct 7, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants