Spaces:
Sleeping
Download README.md from ZevonLew/Image_Recognition: direct link, hf CLI and curl.
- Browser
- Download file 7.57 kB
-
https://huggingface.co/spaces/ZevonLew/Image_Recognition/resolve/main/README.md
- Command line
-
hf download hf://spaces/ZevonLew/Image_Recognition/README.md
-
curl -L -o README.md https://huggingface.co/spaces/ZevonLew/Image_Recognition/resolve/main/README.md
A newer version of the Gradio SDK is available: 6.32.0
title: AI-Powered Image Recognition
emoji: 👁️
colorFrom: blue
colorTo: indigo
sdk: gradio
sdk_version: 5.49.1
python_version: '3.10'
app_file: app.py
pinned: false
AI-Powered Image Recognition
中文说明
课程入口:https://huggingface.co/spaces/ZevonLew/Image_Recognition。三项任务为人脸一对一验证、有限静态手势识别、英文印刷文字OCR。界面默认英文,独立中文切换;切换界面语言不会增加中文OCR能力。
课程更新20261014-course-3: 图库43例(人脸7、手势18、OCR18),Sample group提供入门、七类姿势、变化、困难与词表外输入。七种命名手势为Open_Palm、Closed_Fist、Victory、Thumb_Up、Thumb_Down、Pointing_Up、ILoveYou。名称是输入意图,运行后才有真实预测;包括遮挡、两手、远手、无手、组照、口罩、手写、相似字符等条件。
基础作业:任选一项任务和内置样例,固定输入、只改一个设置记录两次运行,提交两张截图及四至六句的一页报告。无需账号、编程、安装、部署或训练,结果不变也有效。HTML指南与PDF指南另列六条选做Extension;比较第二种识别器和训练为高级选做,并未集成到网页。
人脸采用face-api.js0.22.2(Tiny Face Detector、68点、128维描述子),距离阈值越低越严格。手势采用MediaPipe Tasks Vision0.10.18,最多两手、21点,分数阈值越高越严格。OCR采用Tesseract.js5.1.1与英文LSTM,布局6/11/7分别对应文本块、稀疏文字、单行。人脸距离、手势分数与OCR置信度不能跨任务排名;输出需要核对。
部署使用原生Gradio5.49.1,app.py启动。完整上传AI-Powered_Image_Recognition_HF_Gradio.zip解压内容;已有正常运行版本可上传AI-Powered_Image_Recognition_HF_Course_Update.zip全部文件,保留samples/目录,新增sample_catalog.js及server.py白名单必须同步。旧四文件补丁不包含新图库,不能用于本轮更新。无需Docker、PRO、改硬件或改Chrome设置。
识别build20261013-gradio-1、启动runtimePatch20261013-zero-1、布局layoutPatch20261013-layout-2保持不变。app.py保留可选CUDA维护函数与显式spaces SDK启动报告,普通课程识别不调用GPU维护。人脸/OCR在浏览器,图形输入不可用时手势由同一task的Space CPU处理,不保存图片,最长边最多1920像素。保留内容自身测高及上传Blob URL修复。
本地测试43例完成,额外核对EN/中文、七类分组、阈值、JSON、OCR上传及同文件重复选择、390px布局和正常图形路径。合成样例不证明真实领域准确率;线上需上传后验证。本轮未发布远程。图片采用本课程原创合成素材,不是真实身份数据。人脸验证不证明身份,静态手势不是手语翻译,OCR重要字符需人工核对。
本地运行:隔离Python环境安装requirements.txt后执行python app.py,默认http://127.0.0.1:7860;可用APP_PORT指定本地端口。保留sdk: gradio、app_file: app.py、spaces0.51.3与平台PyTorch。/api/health不申请GPU,报告SDK、CPU模型状态、runtimePatch、layoutPatch及zeroGpu.startupReported。ZeroGPU启动与本地CPU识别是不同验证层次。
主要文件:app.py为平台入口;index.html/style.css/app.js为界面;sample_catalog.js为原生图片目录和内嵌小预览;samples/library_manifest.json记录43案例的预期与教学边界;recognizers.js/server.py为浏览器识别与Space CPU兼容;models/vendor为固定权重、运行库与许可证。THIRD_PARTY_NOTICES.md记录第三方来源。
English
Course lab: https://huggingface.co/spaces/ZevonLew/Image_Recognition. The three tasks are one-to-one face verification, finite static gesture recognition and printed-English OCR. The UI defaults to English with a separate Chinese switch; UI language does not change OCR language.
Course content build20261014-course-3 contains43 cases:7 face,18 gesture and18 OCR cases. Sample group offers starter, seven named poses, variation, difficult and unsupported inputs. Named gestures are Open_Palm, Closed_Fist, Victory, Thumb_Up, Thumb_Down, Pointing_Up and ILoveYou. Names describe intended inputs rather than guaranteed predictions. Cases include occlusion, two hands, distant/no hand, group portraits, masks, handwriting and similar characters.
The core report uses one task, one built-in input, two runs with one changed setting, two screenshots and four to six sentences on one page. No account, coding, installation, deployment or training is required; unchanged outputs are valid. The HTML guide and PDF guide explain six optional extensions. A second recognizer or training needs separate advanced setup and is not integrated into the site.
Models remain face-api.js0.22.2 (Tiny Face Detector,68 landmarks,128-value descriptors), MediaPipe Tasks Vision0.10.18 (up to two hands,21 landmarks) and Tesseract.js5.1.1 with English LSTM data. Lower face thresholds and higher gesture thresholds are stricter. OCR modes6/11/7 mean a block, sparse text and one line. Distances, gesture scores and OCR confidence cannot rank the three tasks; check actual output.
Use native Gradio5.49.1 with app.py. Upload all extracted files from the complete Gradio archive, or all contents of HF_Course_Update.zip for an existing working deployment, preserving samples/. New sample_catalog.js and the server.py static whitelist must match. The old four-file patch cannot deliver this gallery. No Docker, PRO subscription, hardware change or Chrome setting change is needed.
Recognition build20261013-gradio-1, startup patch20261013-zero-1 and layout patch20261013-layout-2 remain unchanged. app.py retains optional CUDA maintenance registration and the explicit spaces SDK startup report; normal recognition does not call maintenance. Face/OCR stay in the browser. Gesture compatibility uses the same task on the Space CPU, without saving images; inputs are limited proportionally to1920 pixels. Content-height sizing and selected-image Blob lifetime fixes remain.
All43 cases completed in real local Chrome/Gradio runs. Additional checks covered language switching, seven-pose grouping, thresholds, JSON, uploaded/reselected OCR,390px layout and a normal graphics path. Synthetic cases do not establish real-domain accuracy. This update has not been published remotely; verify after upload. Use permitted images, review identity claims and important characters; static poses are not sign-language translation.
For local use install requirements in an isolated environment and run python app.py, default port7860 or APP_PORT. Keep sdk: gradio, app_file: app.py, spaces0.51.3 and platform PyTorch. /api/health uses no GPU and reports runtime/layout patches and startup state. Hosted ZeroGPU startup and local CPU recognition are different validation layers.
app.py is the platform entry; index.html/style.css/app.js own the UI; sample_catalog.js and samples/library_manifest.json own the synthetic gallery; recognizers.js/server.py own model and CPU paths; models/vendor contain fixed assets and notices. Source migration is from wr92-course/test commit9d11aee0c2c539b5a5781e12215136c599b01fb0. Original files, history and instructor backups are retained.