Topic4APIR / docs /wish /DESIGN.md
ZevonLew's picture
Upload 97 files
7e7812a verified
|
Raw History Blame Contribute Delete
5.65 kB
## 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和代码为准
# 设计说明 / Design
基础作业路径(2026-10-14):直接打开最终课程网页,选择内置样例,运行、只改一个现有设置、再次运行,再提交一页比较。学生无需从部署开始,也不必证明一次改进或制造失败。how-to-start.html/PDF与课件、讲稿采用相同四步和同一Space入口。
Beginner path: open the final lab, select a supplied input, run, change one existing control, run again, and submit a one-page comparison. Deployment and code changes are optional extensions. The student guide and slides share this path and course URL.
当前启动设计:Gradio入口承载同源课程页面,学生仍按输入—运行—观察—控制变量—导出的顺序操作。改启动方式不替换三任务模型和阈值语义。无WebGL时使用同模型Space CPU手势路径;数据去向继续明确提示。上传一个完整Gradio包即由平台安装依赖并启动,不给教师增加Docker/硬件/订阅设置。
兼容版不改变学生操作顺序:选择图片、点击Run recognition、读取真实结果。手势图形不可用时自动切到Space CPU;运行按钮上方说明数据去向,结果与JSON标明后端。模型类别和阈值含义保持不变,但比较实验需固定后端与处理尺寸。上传补丁即可获得后端,无需自行设计。
The compatibility version preserves the learner flow. CPU fallback is automatic for gesture graphics failures, with input-time disclosure and backend labels in the result/JSON. Keep the backend and processed dimensions fixed in comparisons. The current Gradio package includes the backend without Docker setup.
课程主线:问题 → 输入输出 → 必要模型机制 → 实际运行 → 控制变量 → 证据。
- 首页三个任务标签,左侧输入/设置,右侧结果,下方实验提示。
- 人脸:恰好一张脸的参考/待比较图片,距离阈值越小越严格。
- 手势:图片模式,最多两手;候选、分数与接受标签分开。
- OCR:英文LSTM,文字布局模式6、11、7;输出需核对原图。
- 参数改变立即清除旧输出,避免混淆实验条件。
- 结果导出不含人脸描述子,不持久保存输入与结果。
- `how-to-start.html`与PDF指南同源导出。
The page follows the lesson: question, inputs and outputs, model mechanism, real execution, one-variable comparison, and evidence. Task-specific parameters keep their own meanings. Layout, sample selection and error messages support explanation. The editable HTML guide is the source of its matching PDF.
## 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.