File size: 1,956 Bytes
7a3f3e1
 
28538be
7a3f3e1
28538be
7a3f3e1
b4cd451
7a3f3e1
 
 
 
 
28538be
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
title: Subdivision Plan Analyzer
emoji: 📐
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: 5.32.1
app_file: app.py
pinned: false
license: mit
---

# 📐 Subdivision Plan Analyzer

An AI-powered tool to extract lot information from subdivision plans using OCR and computer vision.

## Features

- **Automatic Lot Detection**: Uses computer vision to identify lot boundaries
- **OCR Text Extraction**: Extracts lot numbers, dimensions, and areas
- **Smart Association**: Matches text to corresponding lot boundaries
- **Visual Annotation**: Shows detected lots with colored overlays
- **Data Export**: Download results as CSV file
- **Summary Statistics**: Provides lot count, total area, and averages

## How to Use

1. **Upload Image**: Upload a subdivision plan in PNG or JPG format
2. **Adjust Settings**: 
   - Scale: Set the plan scale (default 1:1000)
   - Confidence: Adjust OCR confidence threshold (0.5-0.95)
3. **Process**: Click "Extract Lots" to analyze the plan
4. **Review Results**: Check the extracted data in the table
5. **Export**: Download the results as a CSV file

## What Gets Extracted

- **Lot Numbers**: 3-4 digit identifiers (100-9999)
- **Dimensions**: Frontage and depth measurements in meters
- **Areas**: Lot areas in square meters (m²)
- **Lot Types**: Classification as Standard, Corner, or Small lots

## Tips for Best Results

- Use high-resolution images with clear text
- Ensure lot numbers and measurements are legible
- Plans with consistent formatting work best
- Adjust confidence threshold if too many/few items detected

## Technical Details

- **OCR Engine**: EasyOCR with English language model
- **Image Processing**: OpenCV for boundary detection
- **Pattern Matching**: Regular expressions for data extraction
- **UI Framework**: Gradio for web interface

## Note

First run may take a few minutes as the OCR models download (approximately 64MB).

---
Made with ❤️ using Gradio and EasyOCR