Skip to main content

Automatic Graph Classification and Data Extraction

Project description

GraphVision AI 📊👁️

GraphVision AI is a lightweight, powerful computer vision library for automatic graph classification and structured data extraction.

Built with PyTorch and EasyOCR, it is designed to look at an image of a chart, instantly recognize what kind of graph it is, and extract its labels and values into a clean, developer-friendly JSON format.


✨ Key Features

🚀 Zero-Configuration

Models and weights are automatically downloaded from Hugging Face the first time you run it. No manual weight management required.

🧠 Intelligent Routing

Automatically classifies the input image (Pie, Vertical Bar, Horizontal Bar, Line, etc.) and routes it to the correct extraction algorithm.

🖼 Robust Input Handling

Pass a file path (String), an OpenCV image (NumPy array), or a PIL Image directly into the analyzer.

🔍 Smart OCR Masking

Uses contrast filtering and spatial mapping to accurately match text labels with their corresponding graphical data points.


📦 Installation

Install directly from PyPI:

pip install graphvision-ai

🚀 Quick Start

Extracting data from a graph takes less than 5 lines of code:

from graphvision.analyzer import GraphAnalyzer
import json

# 1. Initialize the AI (Auto-downloads weights on first run)
analyzer = GraphAnalyzer()

# 2. Pass an image to the analyzer
image_path = "path/to/your/pie_chart.png"
result = analyzer.analyze(image_path)

# 3. View your structured data!
print(json.dumps(result, indent=4))

📄 Example Output

{
    "type": "pie",
    "title": "Favorite Programming Languages",
    "data": {
        "Python": 45.2,
        "JavaScript": 25.1,
        "C++": 15.4,
        "Java": 14.3
    }
}

📈 Supported Graph Types

Currently, GraphVision AI supports high-accuracy extraction for:

  • pie — Pie Charts
  • vbar_categorical — Vertical Bar Charts
  • hbar_categorical — Horizontal Bar Charts

Line and Dot-Line charts coming soon.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

graphvision_ai-0.1.3.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

graphvision_ai-0.1.3-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file graphvision_ai-0.1.3.tar.gz.

File metadata

  • Download URL: graphvision_ai-0.1.3.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for graphvision_ai-0.1.3.tar.gz
Algorithm Hash digest
SHA256 861318d0637276c785d5c27cb7eace0fcd441f373b8d0cb5da62c41ff2ead2c8
MD5 823bc97b5738edaf86e16924e3d16079
BLAKE2b-256 8b8fa20ae7aee0f507a6db0929aa285c7ece3e3d74f4b722478770d784fe7f80

See more details on using hashes here.

File details

Details for the file graphvision_ai-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: graphvision_ai-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for graphvision_ai-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bc794845f76c0b32c4ab60a3fcd3d69f64b271033ed76dcd7d3912d805caa860
MD5 175f4ac625dda287cf15058294ff3ae2
BLAKE2b-256 53de47d1ec555256862cdb5371e6d24981cdb045fd5febb02b7e32f8f3138d8b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page