File size: 10,581 Bytes
e51808a
 
 
 
7e7812a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
## 当前课程入口(2026-10-20)

Space已更名为 [ZevonLew/AI_Powered_Image_Recognition](https://huggingface.co/spaces/ZevonLew/AI_Powered_Image_Recognition);学生指南为 [https://zevonlew-ai-powered-image-recognition.static.hf.space/how-to-start.html](https://zevonlew-ai-powered-image-recognition.static.hf.space/how-to-start.html)。当前Static运行方式和模型不变。下方历史部署记录中的旧仓库名只用于追溯,不能作为现行链接。

## 2026-10-20:当前为Static Space(优先于下方历史记录)

用户明确要求采用 `wr92-course/test` 的静态部署方式,不从Dataset访问图片;此次不改造手势图形兼容。当前发布号 `20261020-static-1`,README为 `sdk: static`、`app_file: index.html`。删除Python/Gradio/ZeroGPU服务入口,图片、原权重和运行库均保存在本Space仓库,通过相对路径和Hub大文件规则分发。三任务均在浏览器中运行,上传图片不发送服务器;手势仍要求WebGL2,不存在CPU回退接口。

首页不预加载识别引擎/权重;人脸双图并行并逐张显示。样例网络等待不锁定任务、样例或上传;20秒图片超时、重试、取消与序号检查避免旧请求覆盖新输入。保留模型机制、阈值含义、CORS、face-api普通Promise连接、上传Blob生命周期、43例目录、英文/中文切换及结果导出。

当前交付为 `AI-Powered_Image_Recognition_HF_Static.zip`;构建入口是外层 `source/package_space.py`,部署步骤见 `DEPLOY_STATIC.md`。旧Gradio/Docker及四文件补丁要求只反映历史,不能据此恢复后端。真实线上版本需要用户上传后再次核对;本轮不推送远程,不修改PPT。

English: the user selected a pure Static Space with assets in this Space repository, no Dataset access and no gesture compatibility rewrite. All recognition runs in the browser; WebGL2 is still required for gestures. The current Static package supersedes backend and patch delivery instructions below. Local tests and hosted deployment are separate evidence layers.

---

## 以下为先前记录,部署事实以当前README和代码为准

# Agent entrypoint

This repository is a public teaching Space. Before changing its learner-facing purpose, copy, or flow, read [docs/wish/LATEST.md](docs/wish/LATEST.md). For navigation, page roles, or a major interaction, also read [docs/wish/DESIGN.md](docs/wish/DESIGN.md).

The Wish records product intent. The current code, Space configuration in `README.md`, and verified Hugging Face behavior own implementation facts. Do not treat [docs/wish/ARCHIVE.md](docs/wish/ARCHIVE.md) as current direction; read it only when tracing an older decision.

## Hugging Face card language convention

Human-facing Hugging Face card content for this project defaults to **Chinese first, English second**.

Apply this ordering to Organization cards, Space cards, Dataset cards, and Model cards unless a specific repository explicitly targets a single-language audience. Preserve the same substantive facts in both language sections; do not let one section silently become newer than the other.

The shared Wish lifecycle is maintained in [WISH_PROTOCOL.md](https://github.com/mykcs/.codex/blob/main/website-governance/WISH_PROTOCOL.md). Keep this file as a short route to the local Wish rather than a second copy of it.

<!-- managed-by: mykcs/.agents/hf-governance-v1:start -->
## Shared Hugging Face governance

- Repository: `wr92-course/test`
- Type: `space`
- Profile: `product-space`
- Core Agent repository: https://github.com/mykcs/.agents
- Hugging Face governance: https://github.com/mykcs/.agents/blob/main/docs/agents/HUGGING_FACE_REPOSITORY_GOVERNANCE.md

- Dev lifecycle: https://github.com/mykcs/.agents/blob/main/docs/agents/DEV_PROTOCOL.md
- Wish lifecycle: https://github.com/mykcs/.agents/blob/main/docs/agents/WISH_PROTOCOL.md



Read local project truth before acting. Shared rules live in `mykcs/.agents`; this repository owns only its local facts and stricter constraints.



Boundary: Code/files plus live Hugging Face runtime own current behavior; governance docs are projections.

<!-- managed-by: mykcs/.agents/hf-governance-v1:end -->



<!-- wr92-course-project-rules-20261012:start -->

## Local authority and routing



Latest UI/OCR repair,2026-10-14: layoutPatch20261013-layout-2 sizes the inner course iframe from its same-origin body content with ResizeObserver, removing its scrollbar without using viewport-relative height. The real HF parent/resizer stays stable in desktop and mobile overlay checks. app.js retains the current uploaded image Blob URL until replacement, because OCR reads it later in a worker; it also clears file inputs so selecting the same file again fires change. index.html preloads default inputs; sample buttons use tiny embedded previews, while inference keeps original images. Face/OCR vendor scripts load on first use. Existing ZeroGPU registration, startup reporting, models and task algorithms remain intact. A running Gradio Space needs the matching four-file patch (app.py, index.html, app.js, recognizers.js) or the complete archive. Verify real HF embedding, not only the direct Space host. Do not upgrade dependencies or rewrite recognition to fix layout.



Current user requirement,2026-10-13: do not use Docker, request a PRO subscription or hardware downgrade. The native Gradio SDK/app.py keeps the same course UI/models. requirements.txt/packages.txt install automatically. ZeroGPU also requires a decorated function AND startup reporting: startup patch20261013-zero-1 registers an optional real CUDA maintenance API and explicitly calls spaces.zero.startup once in the parent lifespan, since mounted Gradio bypasses Blocks.launch. Normal recognition never calls the GPU diagnostic; face/OCR remain in-browser and gestures fall back to the same Space CPU model. Pin spaces0.51.3 for this startup-interface integration; retain platform PyTorch. APP_PORT controls local binding; do not bind a ZeroGPU proxy PORT. The UI discloses gesture transfer without persistence. Verify SDK startup reporting separately from CPU/browser inference; do not claim local mocked reports prove hosted CUDA. Deliver one current complete Gradio archive plus the latest four-file UI/OCR patch; earlier startup/layout patches are retired. Earlier Docker/Static descriptions below are history.

Profile: product-space; role: AI-Powered Image Recognition browser-based pretrained teaching Space (face verification, static hand gestures, and English OCR).

The user explicitly authorized this local course migration on 2026-10-13. The prior object-detection purpose is historical. The current intent is recorded in docs/wish/LATEST.md and docs/wish/DESIGN.md. The user later deployed https://huggingface.co/spaces/ZevonLew/Image_Recognition and requested a browser-runtime fix. Inference and error-recovery testing are authorized implementation work and do not establish scientific results. The fix was validated with local response overlays on live Space resources; the user must upload the updated files to change the public version. No upstream push has been performed by this workflow.



Before changing this repository, read AGENTS.md, README.md, docs/wish/README.md, docs/wish/LATEST.md, docs/wish/DESIGN.md, docs/dev/README.md, docs/dev/LATEST.md, docs/dev/DESIGN.md, then inspect the actual live HF revision and source files.



Private GitHub is the editable source, requirements, teacher delivery, and PR/Issue authority: https://github.com/mykcs/szu_whs_class_20260907. Cross-course requirements: https://github.com/mykcs/szu_whs_class_20260907/blob/main/docs/COURSE_REQUIREMENTS_INDEX.md. Image Generation requirements: https://github.com/mykcs/szu_whs_class_20260907/blob/main/courses/image-generation/docs/REQUIREMENTS_REGISTER.md.



Human-facing HF README cards use Chinese-first then English sections; STUDENT APPLICATION UI defaults to English with separate EN / Chinese switching. Do not conflate the two independent language rules or put both languages in one UI paragraph.



## Student and hosting boundary



This is a CPU/static teaching and navigation Space, with no HF ZeroGPU consumption for local browser/static actions. Browser, model download and network constraints still exist. The two optional free GPU Space repositories remain owned by miyuki17, linked from WR92 Course; do not claim all five are organization-owned.



Dev/CI: DEPLOY_ONLY. Do not create CI, paid GPU, perform inference or claim new scientific results merely to maintain governance files. Preserve real source and hash receipts; keep all previous versions and privacy unchanged.

Shared protocols: https://github.com/mykcs/.agents/blob/main/docs/agents/HUGGING_FACE_REPOSITORY_GOVERNANCE.md ; https://github.com/mykcs/.agents/blob/main/docs/agents/WISH_PROTOCOL.md ; https://github.com/mykcs/.agents/blob/main/docs/agents/DEV_PROTOCOL.md.

<!-- wr92-course-project-rules-20261012:end -->





## 2026-10-14:62页课程与43案例图库更新



用户要求恢复参考稿六类Extension、合并重复页、三类真实模型框架和更多原创正常/困难图。课程目录contentBuild20261014-course-3扩展到43例(7face/18gesture/18OCR),默认英文与中文切换不变。基础作业仍为一个任务、两次运行、一页报告;四条简单Extension用现有控件与人工核对,比较额外方法/训练是高级选做。



index.html/app.js/style.css新增分组与目录,sample_catalog.js包含原创小预览;server.py仅新增静态公开白名单。app.py、recognizers.js、权重、依赖、ZeroGPU启动登记、测高和Blob修复保持原样。现版本须上传完整课程更新包或完整Gradio包,旧四文件UI/OCR包不足。43例实际本地Chrome/Gradio测试及上传、分组、语言、390px、JSON回归完成;不推断总体准确率,未发布远程。

English:62-slide teaching revision restores six optional extensions and three source-checked model frameworks. The43-case synthetic gallery adds grouping and real recorded difficulties. The beginner core, native Gradio, startup/model contracts and prior fixes remain. Deployment needs all gallery/update files; no remote publication or scientific performance claim is implied.


Latest course update overrides historical four-file delivery advice: include sample_catalog.js, samples/, style.css, guides, README and server.py whitelist with the UI. Preserve startup/inference behavior.