object_detection / README.md
huggingkhalil's picture
Update README.md
3b47e1f verified

A newer version of the Gradio SDK is available: 6.9.0

Upgrade
metadata
title: Geometric Shape Detection
emoji: 🐒
colorFrom: indigo
colorTo: purple
sdk: gradio
sdk_version: 5.38.0
app_file: app.py
pinned: false

πŸ”Ί Geometric Shape Detection

An intelligent computer vision application that automatically detects and classifies geometric shapes in images using advanced OpenCV algorithms and an intuitive Gradio interface.

πŸš€ Try It Out

Upload any image containing geometric shapes and watch as the AI identifies:

  • Triangles (3 vertices)
  • Squares (4 vertices, equal sides)
  • Rectangles (4 vertices, different sides)
  • Circles (curved shapes with >6 approximated vertices)

✨ Key Features

  • 🎯 Instant Detection: Real-time shape identification upon image upload
  • πŸ“Š Detailed Analytics: Get shape count, area measurements, and coordinates
  • 🎨 Visual Annotations: Clear highlighting of detected shapes with labels
  • πŸ“± Mobile Friendly: Responsive design that works on all devices
  • ⚑ Fast Processing: Optimized OpenCV algorithms for quick results

πŸ› οΈ How It Works

The application uses a sophisticated computer vision pipeline:

  1. Preprocessing: Converts to grayscale and applies Gaussian blur for noise reduction
  2. Edge Detection: Canny algorithm identifies shape boundaries (thresholds: 50-150)
  3. Contour Analysis: Finds and filters significant contours (minimum 500pxΒ² area)
  4. Shape Classification: Analyzes vertex count and aspect ratios: