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.extractor import GraphExtractor
import json

try:
    vision_engine = GraphExtractor()
    
    # Path to your test image
    image_to_test = "hbar2.png" 
    
    # Run the extraction
    result = vision_engine.extract_data(image_to_test)
    
    print("\n✅ Extraction Successful!")
    print(json.dumps(result, indent=4))

except Exception as e:
    print(f"\n❌ Error during testing: {e}")

📄 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.12.tar.gz (9.6 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.12-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: graphvision_ai-0.1.12.tar.gz
  • Upload date:
  • Size: 9.6 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.12.tar.gz
Algorithm Hash digest
SHA256 0aefbcb3e64c2666947fa1247affd666d55668bc78e95683a32d1cd8ebb634fa
MD5 bd9067ec8a9a2598106b1ec73c7edf81
BLAKE2b-256 d08977fea289cd62e1b7823b19fc1a501c50503e390f7c80e161c0d15992dc9a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for graphvision_ai-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 c9d479bf398d816dfc833ed36018a06aa59c6e4b4f4fc55acd2854ee78bd2825
MD5 a603520a5c9ae8139a13d550b8d85d22
BLAKE2b-256 e15bcd5927cd8a78af9092a813a62c91c87f68c26883c807677a3dc5d27c77f8

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