Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available:
6.9.0
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:
- Preprocessing: Converts to grayscale and applies Gaussian blur for noise reduction
- Edge Detection: Canny algorithm identifies shape boundaries (thresholds: 50-150)
- Contour Analysis: Finds and filters significant contours (minimum 500pxΒ² area)
- Shape Classification: Analyzes vertex count and aspect ratios: