--- title: Computervisionobjectdetection emoji: ⚑ colorFrom: purple colorTo: pink sdk: gradio sdk_version: 5.31.0 app_file: app.py pinned: false --- # πŸ“·βœ¨ Object Detection Demo [![Hugging Face Space](https://img.shields.io/badge/HuggingFace-Spaces-blue?logo=huggingface)](https://huggingface.co/spaces/your-username/object-detection-demo) [![Gradio UI](https://img.shields.io/badge/Gradio-5.31.0-green?logo=gradio)](https://gradio.app) [![Model](https://img.shields.io/badge/Model-DETR--ResNet50-yellow)](https://huggingface.co/facebook/detr-resnet-50) [![License](https://img.shields.io/badge/License-MIT-lightgrey)](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