Spaces:
Sleeping
Download docs/dev/LATEST.md from ZevonLew/Image_Recognition_Static: direct link, hf CLI and curl.
- Browser
- Download file 10.7 kB
-
https://huggingface.co/spaces/ZevonLew/Image_Recognition_Static/resolve/main/docs/dev/LATEST.md
- Command line
-
hf download hf://spaces/ZevonLew/Image_Recognition_Static/docs/dev/LATEST.md
-
curl -L -o LATEST.md https://huggingface.co/spaces/ZevonLew/Image_Recognition_Static/resolve/main/docs/dev/LATEST.md
A newer version of the Gradio SDK is available: 6.32.0
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.
先前记录(按原日期保留)
当前开发状态 / Current development
2026-10-14教学内容修订:学生指南明确无需账号、编程、安装、部署或训练,作业仅用内置样例完成两次控制变量运行及一页报告;课程资料加入论文、官方文档、仓库。最终入口为ZevonLew/Image_Recognition。只修改指南与说明文件,识别模型、运行库、app.py/server.py/app.js/recognizers.js均保留。线上状态通过公开Space API核对为RUNNING;本轮未提交远程,指南更新需上传对应文档。
最新UI/OCR修复20261013-layout-2:线上layout-1版本已RUNNING,但固定高度导致课程内部出现第二根滚动条。本地app.py改为Gradio加载时观察同源课程body高度,让iframe跟随内容;不使用父页面vh,实际HF App外层响应覆盖验证桌面和390px窄屏高度稳定,内部滚动差为0。上传OCR的Blob URL此前被立即释放,导致示例可用而上传图点击运行报Failed to fetch;app.js保留当前URL至替换时,并清空文件控件以允许重复选择同一文件。首页延迟加载face-api/Tesseract库,样例按钮使用内嵌小缩略图,只下载实际选中原图并提前请求默认输入。16次本地真实模型运行/5组检查通过,含OCR上传与重复文件选择;无需改依赖、模型或ZeroGPU流程。四文件补丁与完整包同步;未写入远程。
Layout patch20261013-layout-2 follows the child course body's intrinsic height, removing the second scrollbar while retaining the earlier fix for the HF outer-frame growth loop. An uploaded image's Blob URL stays valid until replaced so the OCR worker can fetch it on Run. Libraries load on first use and default sample images are preloaded. The running Space needs the matching four-file patch or the complete archive. Local real-model and actual HF parent-overlay tests passed; remote publication is not implied.
最新启动补丁20261013-zero-1:HF提交435ecd3086e2a0a8f67899e2db7fa7c1676b5283已是Gradio,但请求zero-a10g;应用CPU模型成功加载后,被平台以No @spaces.GPU function detected during startup关闭。修复app.py注册真实、隐藏、按需CUDA维护回调,父lifespan调用一次spaces.zero.startup;挂载式Uvicorn入口未调用Blocks.launch,原生报告钩子此前没有执行。spaces固定0.51.3,PyTorch使用平台预装版;应用不绑定可能属于代理的PORT。识别代码、模型、前端版本保留。下面CPU运行证据不能证明ZeroGPU已启动;专项SDK模拟报告与真正HF部署需区分。没有远程推送。
Startup patch20261013-zero-1 fixes missing registration/reporting on existing ZeroGPU hardware. A genuine optional CUDA diagnostic is bound to a hidden Gradio API; the parent lifespan explicitly reports startup once because Uvicorn/mount_gradio_app bypasses Blocks.launch. Normal recognition never invokes that API. spaces0.51.3 is pinned for the inspected integration; use platform PyTorch. APP_PORT controls application binding. Keep recognition models/files unchanged. Local SDK-report mocks do not establish hosted CUDA or successful remote deployment.
当前版本20261013-gradio-1:根据用户“不用Docker、上传即可运行”的明确要求,改为原生Gradio5.49.1 SDK/Python3.10入口app.py,packages.txt安装系统依赖,requirements.txt固定兼容版本。现有课程界面和模型不变,通过官方mount_gradio_app接口启动同源页面/CPU服务,不调用GPU。可以保留现有ZeroGPU硬件,不要求PRO或降级。
本轮本地实际Gradio首页13次模型运行与4组检查通过,含完全禁用HTML/Offscreen WebGL的人脸/四手势/OCR、上传、阈值、空结果、错误恢复、JSON、中文切换、390px布局及图形可用路径,页面脚本错误0。证据位于外层validation/gradio_validation.json与gradio_linux_dependencies.json。课件启动页/资料页及双语文档同步;没有推送远程。
Native Gradio5.49.1/Python3.10 is now the deployment target. app.py mounts the same UI and CPU compatibility service; models/settings are unchanged. Dependencies install automatically. The app requests no GPU execution and needs no Docker/PRO/hardware change. Local checks passed13 actual model runs/4 check groups with no page errors; a later HF deployment requires verification after upload. The older Docker records below are history.
2026-10-13用户明确同意清理test:已备份并移出旧detector.js、wr92-language.js/.css、101个COCO样例/索引与4张旧指南截图,共108文件、16,488,545字节。当前应用没有引用这些文件;识别代码、模型、运行库、许可证、Git记录与治理文件保留。备份在外层backup/20261013-191024,明细与验证在validation/test_cleanup.json。清理仅影响本地目录,没有修改远程Space。
The user authorized cleanup:108 unreferenced legacy files were backed up and moved out of test. Active recognition code/models/runtimes/licenses and Git/project guidance remain. Receipts are in the teacher validation/test_cleanup.json; no remote mutation or new inference result is implied.
最新恢复版 20261013-recovery-1:线上18:29上传49文件覆盖16:42的3文件修复,识别模块与初版hash相同,SDK仍Static、CPU部署文件缺失。已复现旧人脸挂起与手势失败。保留CORS和显式原生Promise人脸阶段、同模型CPU回退,增加HTML/界面/模型/健康接口版本对齐与旧文件阻止运行。唯一推荐日期恢复ZIP含52当前文件;旧Static包退出交付目录。新14次兼容运行9组检查 + 13次线上资源覆盖回归8组检查通过、页面错误0。对应外层validation/hf_recovery_inspection.json、gesture_cpu_validation.json、space_recovery_live_validation.json。没有发布远程。
Recovery build20261013-recovery-1 keeps the verified face/CORS fixes and same-model CPU gesture fallback. The live49-file upload restored initial broken code and did not deploy the CPU backend. Matching HTML/interface/model/health build IDs prevent mixed releases. Upload the complete dated52-file recovery package; old Static archives are withdrawn. Current tests cover14 compatibility runs/9 checks and13 live-resource overlays/8 checks, without page errors. No remote publication is implied.
2026-10-13无WebGL兼容:用户要求采取方便且无需自行设计的解决方案。新增server.py + Dockerfile + requirements.txt,将部署SDK改为Docker CPU Basic。图形可用时保持浏览器识别,手势WebGL2/activeTexture/上下文失败自动调用同一MediaPipe 0.10.18与同一task模型的CPU接口。人脸/OCR仍在浏览器运行。页面明确手势图片会发送到本Space,服务仅在内存处理、不保存;JSON记录backend和尺寸。9文件补丁与完整CPU部署包可直接上传。
验证证据:validation/gesture_cpu_validation.json(位于外层课程目录)覆盖14次真实浏览器运行和7组检查:两类画布WebGL入口均不可用、四手势、严格阈值、无手、大图、API故障恢复、正常图形、activeTexture自动CPU回退、HF线上资源响应覆盖、并发锁、禁用WebGL的人脸/OCR。无页面脚本错误;故障注入的HTTP/网络console错误保留在记录中。未推送远程,HF Linux容器尚待上传构建;本机无Docker命令。
CPU compatibility: the supplied Docker CPU backend uses the same gesture model when browser graphics fail; face/OCR remain local. The input panel discloses gesture-image transfer and the server does not save images/results. The teacher validation record covers14 real browser runs and7 check groups, with no page errors. Local response overlays use actual HF resources without publishing. Upload all9 patch files, including README, to activate Docker on the hosted Space; its Linux container build is not claimed as tested here.
2026-10-13:根据用户要求改造为AI-Powered Image Recognition。来源HF提交:9d11aee0c2c539b5a5781e12215136c599b01fb0。
2026-10-13后续运行修复:用户已部署ZevonLew/Image_Recognition,故障版提交ce897dbf675f752c77281e079caa8a57f8382fb1。Chrome中复现人脸45秒未返回及手势跨域纹理错误。Static Space图片重定向至CDN,旧Image加载缺少CORS。修复图片读取、face-api旧thenable错误传播、MediaPipe独立画布及失效缓存;使用线上资源覆盖本地修复进行回归,不直接写远程仓库。
已实现:静态浏览器三任务、英文/中文切换、原创样例、加载与错误状态、结果叠加和JSON导出。固定依赖及权重在本地目录,减少运行时外部网络依赖。
验证:本地Edge/Chromium真实推理、阈值方向、无手/无人脸、JSON下载、加载失败、390px布局。详细记录位于外层课程validation/browser_results.json。不创建CI,不使用付费GPU,不推送HF,不改全局Git设置。
Implemented: three static-browser tasks, language switching, generated inputs, loading/error states, overlays and export. The user deployed ZevonLew/Image_Recognition. The later CORS/Promise/canvas fix was tested in Chrome against live resources with local response overrides; it has not been pushed by this workflow. Detailed evidence is in the teacher package. The original detector files remain inactive source history.