Spaces:
Running
Running
Download index.html from wr92-course/test: direct link, hf CLI and curl.
- Browser
- Download file 13.8 kB
-
https://huggingface.co/spaces/wr92-course/test/resolve/main/index.html
- Command line
-
hf download hf://spaces/wr92-course/test/index.html
-
curl -L -o index.html https://huggingface.co/spaces/wr92-course/test/resolve/main/index.html
13.8 kB
| <html lang="en" data-wr92-course="det"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | |
| <meta | |
| name="description" | |
| content="AI-Powered Object Detection mini-lab using COCO examples and a pretrained model" | |
| /> | |
| <title>AI-Powered Object Detection</title> | |
| <link | |
| rel="icon" | |
| href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🔎</text></svg>" | |
| /> | |
| <link rel="stylesheet" href="./style.css" /> | |
| <link rel="stylesheet" href="./wr92-language.css"> | |
| <link rel="stylesheet" href="./wr92-theme.css"> | |
| <script defer src="./wr92-language.js"></script> | |
| </head> | |
| <body> | |
| <header class="wr92-shell"> | |
| <div class="wr92-shell-inner"> | |
| <a class="wr92-brand" href="https://wr92-course-readme.static.hf.space/"><span class="wr92-brand-mark" aria-hidden="true">W·</span><span>WR92 <span class="wr92-brand-light">COURSE</span></span></a> | |
| <nav class="wr92-site-links" aria-label="Course navigation"> | |
| <div class="wr92-nav-group"> | |
| <span class="wr92-nav-label"><span class="wr92-en">01 / LEARN</span><span class="wr92-zh">01 / 学习</span></span> | |
| <div class="wr92-nav-items"> | |
| <a href="https://wr92-course-readme.static.hf.space/"><span class="wr92-en">Home</span><span class="wr92-zh">首页</span></a> | |
| <a href="https://wr92-course-object-detection-lab.static.hf.space/" aria-current="page"><span class="wr92-en">Object detection</span><span class="wr92-zh">目标检测</span></a> | |
| <a href="https://wr92-course-image-generation-lab.static.hf.space/"><span class="wr92-en">Image generation</span><span class="wr92-zh">图像生成</span></a> | |
| </div> | |
| </div> | |
| <div class="wr92-nav-group"> | |
| <span class="wr92-nav-label"><span class="wr92-en">02 / LIVE TOOLS</span><span class="wr92-zh">02 / 在线工具</span></span> | |
| <div class="wr92-nav-items"> | |
| <a href="https://huggingface.co/spaces/miyuki17/creative-technology-image-generation">SDXL Turbo</a> | |
| <a href="https://huggingface.co/spaces/miyuki17/creative-technology-sana-sprint">SANA-Sprint</a> | |
| </div> | |
| </div> | |
| <div class="wr92-nav-group wr92-nav-project"> | |
| <span class="wr92-nav-label"><span class="wr92-en">03 / APPLY</span><span class="wr92-zh">03 / 综合实践</span></span> | |
| <div class="wr92-nav-items"> | |
| <a class="wr92-feature-link" href="https://wr92-course-object-detection-lab.static.hf.space/detect-create.html"><span class="wr92-en">Detect → Create</span><span class="wr92-zh">检测 → 生成</span></a> | |
| </div> | |
| </div> | |
| </nav> | |
| <div class="wr92-language-toolbar" role="group" aria-label="Language / 语言"> | |
| <button type="button" data-wr92-lang="en" aria-pressed="true" disabled>EN</button> | |
| <button type="button" data-wr92-lang="zh" aria-pressed="false" disabled>中文</button> | |
| </div> | |
| </div> | |
| </header> | |
| <main class="page-shell"> | |
| <p class="wr92-course-note"><span class="wr92-en"><strong>No Hugging Face GPU needed</strong> · Detection runs in your browser and does not use HF GPU minutes or generation calls. Device, network and model downloads can still limit it.</span><span class="wr92-zh"><strong>目标检测不消耗 Hugging Face GPU</strong> · 检测在本机浏览器完成,没有 ZeroGPU 分钟或生成次数限制,但仍受设备、网络和模型下载影响。</span> <a href="https://huggingface.co/docs/hub/spaces-zerogpu" target="_blank" rel="noopener noreferrer"><span class="wr92-en">ZeroGPU policy →</span><span class="wr92-zh">ZeroGPU 官方规则 →</span></a></p> | |
| <nav class="guide-linkbar" aria-label="Course guide"> | |
| <span>Building your own AI mini app?</span> | |
| <a href="./how-to-start.html">How to Start <span aria-hidden="true">→</span></a> | |
| <a href="https://wr92-course-object-detection-lab.static.hf.space/" target="_blank" rel="noopener noreferrer">Official course page <span aria-hidden="true">→</span></a> | |
| <a href="https://wr92-course-image-generation-lab.static.hf.space/" rel="noopener noreferrer">Image Generation <span aria-hidden="true">→</span></a> | |
| </nav> | |
| <!-- ========================================================= | |
| HERO | |
| ========================================================== --> | |
| <header class="hero wr92-detection-hero"> | |
| <div class="wr92-lesson-copy"> | |
| <p class="eyebrow"> | |
| Creative Technology · Computer Vision | |
| </p> | |
| <h1> | |
| AI-Powered<br /> | |
| Object Detection | |
| </h1> | |
| <p class="lede"> | |
| Pick a COCO example or upload your own image. | |
| Then choose a pretrained detector and let AI answer: | |
| <strong> | |
| what objects are here, and where are they? | |
| </strong> | |
| </p> | |
| <div | |
| class="lesson-strip" | |
| aria-label="Mini-lab overview" | |
| > | |
| <span> | |
| <b>Task</b> | |
| Object detection | |
| </span> | |
| <span> | |
| <b>Data</b> | |
| COCO validation examples | |
| </span> | |
| <span> | |
| <b>Models</b> | |
| RT-DETR · DETR · YOLOS Tiny | |
| </span> | |
| </div> | |
| </div> | |
| <figure class="wr92-lesson-visual"> | |
| <img src="./examples/000000189806.jpg" alt="Real COCO example input showing a cat and dog indoors, before running object detection" width="640" height="425" fetchpriority="high"> | |
| <figcaption><strong><span class="wr92-en">REAL IMAGE INPUT</span><span class="wr92-zh">真实输入图片</span></strong><span><span class="wr92-en">COCO val2017 · 000000189806 · not model output</span><span class="wr92-zh">COCO val2017 · 000000189806 · 不是模型预测图</span></span></figcaption> | |
| </figure> | |
| </header> | |
| <!-- ========================================================= | |
| MAIN WORKSPACE | |
| ========================================================== --> | |
| <section | |
| class="workspace" | |
| aria-label="Object detection mini-lab" | |
| > | |
| <!-- ======================================================= | |
| LEFT: CONTROLS | |
| ======================================================== --> | |
| <div class="controls card"> | |
| <!-- STEP 1 --> | |
| <div class="step"> | |
| <span class="step-number"> | |
| 1 | |
| </span> | |
| <div> | |
| <p class="control-label sample-title"> | |
| Choose an image | |
| </p> | |
| <p class="helper"> | |
| Start with a tested COCO example, | |
| or try a photo of your own. | |
| </p> | |
| </div> | |
| </div> | |
| <!-- COCO EXAMPLES --> | |
| <div class="sample-head coco-head"> | |
| <div> | |
| <p class="input-kicker"> | |
| Start here · COCO examples | |
| </p> | |
| <p class="helper"> | |
| Four images are drawn at random | |
| from 100 bundled COCO validation examples. | |
| </p> | |
| </div> | |
| <button | |
| id="shuffle-examples" | |
| class="shuffle-button" | |
| type="button" | |
| > | |
| Shuffle | |
| </button> | |
| </div> | |
| <div | |
| id="sample-grid" | |
| class="sample-grid" | |
| aria-label="COCO example images" | |
| ></div> | |
| <!-- OR --> | |
| <div class="or-row"> | |
| <span> | |
| or try your own | |
| </span> | |
| </div> | |
| <!-- IMAGE UPLOAD --> | |
| <label | |
| class="control-label" | |
| for="image-input" | |
| > | |
| Upload an image | |
| </label> | |
| <p class="helper"> | |
| Useful for seeing where the model | |
| generalizes well—and where it does not. | |
| </p> | |
| <input | |
| id="image-input" | |
| class="file-input" | |
| type="file" | |
| accept="image/*" | |
| /> | |
| <div class="divider"></div> | |
| <!-- STEP 2 --> | |
| <div class="step"> | |
| <span class="step-number"> | |
| 2 | |
| </span> | |
| <div class="grow"> | |
| <label | |
| class="control-label" | |
| for="model-select" | |
| > | |
| Choose detector | |
| </label> | |
| <select | |
| id="model-select" | |
| class="model-select" | |
| ></select> | |
| <p | |
| id="model-note" | |
| class="helper" | |
| > | |
| RT-DETR is the recommended classroom default. | |
| </p> | |
| </div> | |
| </div> | |
| <div class="divider"></div> | |
| <!-- STEP 3 --> | |
| <div class="step"> | |
| <span class="step-number"> | |
| 3 | |
| </span> | |
| <div class="grow"> | |
| <div class="slider-row"> | |
| <label | |
| class="control-label" | |
| for="threshold" | |
| > | |
| Confidence threshold | |
| </label> | |
| <output | |
| id="threshold-value" | |
| for="threshold" | |
| > | |
| 0.50 | |
| </output> | |
| </div> | |
| <input | |
| id="threshold" | |
| type="range" | |
| min="0.10" | |
| max="0.95" | |
| value="0.50" | |
| step="0.05" | |
| /> | |
| <p class="helper"> | |
| Higher values only keep predictions | |
| the model is more confident about. | |
| </p> | |
| </div> | |
| </div> | |
| <!-- RUN BUTTON --> | |
| <button | |
| id="run-button" | |
| class="run-button" | |
| type="button" | |
| disabled | |
| > | |
| Run AI Detection | |
| </button> | |
| <!-- STATUS --> | |
| <p | |
| id="status" | |
| class="status" | |
| aria-live="polite" | |
| > | |
| Choose a COCO example or upload your own image. | |
| </p> | |
| <!-- PROGRESS --> | |
| <div | |
| id="progress-wrap" | |
| class="progress-wrap" | |
| hidden | |
| > | |
| <div | |
| id="progress-bar" | |
| class="progress-bar" | |
| ></div> | |
| </div> | |
| </div> | |
| <!-- ======================================================= | |
| RIGHT: RESULT | |
| ======================================================== --> | |
| <div class="result card"> | |
| <div class="result-head"> | |
| <div> | |
| <p class="section-kicker"> | |
| AI prediction | |
| </p> | |
| <h2> | |
| What did the detector find? | |
| </h2> | |
| </div> | |
| <span | |
| id="runtime-badge" | |
| class="badge" | |
| > | |
| Waiting | |
| </span> | |
| </div> | |
| <!-- RESULT CANVAS --> | |
| <div | |
| id="canvas-wrap" | |
| class="canvas-wrap empty" | |
| > | |
| <canvas | |
| id="result-canvas" | |
| aria-label="Detection result" | |
| ></canvas> | |
| <p id="canvas-placeholder"> | |
| Choose an image first. | |
| The original image appears here before detection. | |
| </p> | |
| </div> | |
| <!-- SUMMARY --> | |
| <div | |
| id="summary" | |
| class="summary" | |
| > | |
| No detections yet. | |
| </div> | |
| <!-- DETECTION TABLE --> | |
| <div class="table-wrap"> | |
| <table> | |
| <thead> | |
| <tr> | |
| <th>Object</th> | |
| <th>Confidence</th> | |
| <th>Bounding box</th> | |
| </tr> | |
| </thead> | |
| <tbody id="detections-body"> | |
| <tr class="empty-row"> | |
| <td colspan="3"> | |
| Run the detector to see details. | |
| </td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- ========================================================= | |
| EXPLANATION | |
| ========================================================== --> | |
| <section class="explain card"> | |
| <p class="section-kicker"> | |
| What you are doing | |
| </p> | |
| <h2 class="explain-title"> | |
| Use a learned AI capability instead of rebuilding | |
| the traditional task from scratch. | |
| </h2> | |
| <p class="explain-copy"> | |
| COCO contains everyday-object images with annotations. | |
| The selected pretrained detector has already learned | |
| the object-detection task from labeled data. | |
| In this mini-lab, you can switch models and compare | |
| how their predictions differ on the same image. | |
| </p> | |
| <div | |
| class="flow" | |
| aria-label="Object detection flow" | |
| > | |
| <span> | |
| COCO example or your image | |
| </span> | |
| <span class="arrow"> | |
| → | |
| </span> | |
| <span> | |
| Selected pretrained detector | |
| </span> | |
| <span class="arrow"> | |
| → | |
| </span> | |
| <span> | |
| Boxes + labels + confidence | |
| </span> | |
| </div> | |
| <p class="extension-note"> | |
| <strong> | |
| Compare models: | |
| </strong> | |
| keep the image fixed, | |
| switch detector, | |
| and observe how predictions, | |
| confidence, | |
| and speed change. | |
| </p> | |
| </section> | |
| <!-- ========================================================= | |
| FOOTER | |
| ========================================================== --> | |
| <footer> | |
| Hosted as a Hugging Face Static Space · | |
| Powered by Transformers.js | |
| </footer> | |
| </main> | |
| <!-- =========================================================== | |
| APP | |
| ============================================================ --> | |
| <script | |
| type="module" | |
| src="./app.js" | |
| ></script> | |
| </body> | |
| </html> | |