File size: 2,517 Bytes
f1bed27 165ffff f1bed27 165ffff |
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 |
---
title: Computervisionobjectdetection
emoji: β‘
colorFrom: purple
colorTo: pink
sdk: gradio
sdk_version: 5.31.0
app_file: app.py
pinned: false
---
# π·β¨ Object Detection Demo
[](https://huggingface.co/spaces/your-username/object-detection-demo)
[](https://gradio.app)
[](https://huggingface.co/facebook/detr-resnet-50)
[](LICENSE)
---
## π Overview
Experience **real-time, Transformer-powered object detection** entirely on CPU.
Upload any image and instantly see **bounding boxes**, **labels**, and **confidence scores**βall wrapped in a sleek Gradio interface.
> **Core technologies:**
> β’ **DETR** (DEtection TRansformer) for end-to-end CV pipelines
> β’ **Hugging Face Transformers** for model orchestration
> β’ **Gradio Blocks** for interactive web UI
> β’ **Pillow (PIL)** for image annotation
---
## β¨ Key Features
| π Feature | π Description |
|----------------------------|--------------------------------------------------------------|
| **β‘ Transformer CV** | Uses DETR + ResNet-50 backbone for state-of-the-art accuracy |
| **π Real-Time Inference** | Sub-second CPU performance on typical images |
| **π¨ Annotated Output** | Red boxes + text overlays for clear visual feedback |
| **π Detection Table** | Interactive DataFrame of labels & confidence scores |
| **βοΈ Cloud-Native Deploy** | One-click deploy on free Hugging Face Spaces |
| **π§ Modular Architecture** | Swap models or add filters with minimal code changes |
---
## ποΈ Architecture & Workflow
1. **Image Upload**
User drops in any JPEG/PNG.
2. **DETR Pipeline**
`pipeline("object-detection", model="facebook/detr-resnet-50")`
3. **Post-processing**
Draws bounding boxes + labels via PIL.
4. **UI Rendering**
Gradio displays the annotated image and a label/score table.
---
## π οΈ Quick Start (Local)
```bash
git clone https://github.com/your-username/object-detection-demo.git
cd object-detection-demo
python3 -m venv venv && source venv/bin/activate
pip install -r requirements.txt
python app.py
|