Skip to content

๐Ÿš€ VisionFusion by Yabix โ€” an AI-powered OCR + QR + Web Intelligence suite built with Streamlit. It seamlessly extracts, cleans, and fuses data from images, PDFs, and websites using Google Gemini and computer vision โ€” generating intelligent Excel reports for real-world automation.

License

Notifications You must be signed in to change notification settings

Ycmmn/VisionFusion_OCR_QR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒŸ If you like this project, give it a โญ on GitHub โ€” it helps more developers discover VisionFusion!

๐Ÿง  Dynamic OCR + QR Intelligence Suite

๐Ÿš€ Smart Document Extraction, QR Decoding, Web Enrichment & Excel Integration

By Yabix โ€” AI-Powered Data Intelligence Platform


๐Ÿ“‚ Project Structure

dynamic_ocr_qr/
โ”‚
โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ ocr_dyn.py          # OCR + Gemini JSON extractor (AI-based text & info extraction)
โ”‚   โ”œโ”€โ”€ qr_dyn.py           # Advanced QR detection & cleaning (multi-engine)
โ”‚   โ”œโ”€โ”€ mix_ocr_qr.py       # Merge OCR and QR data dynamically into unified JSON
โ”‚   โ”œโ”€โ”€ scrap.py            # Intelligent web scraper + Gemini web analyzer + translation
โ”‚   โ”œโ”€โ”€ excel_mode.py       # Excel-based enrichment, merging & deduplication
โ”‚   โ”œโ”€โ”€ final_mix.py        # Final integration: JSON + Excel into clean master dataset
โ”‚
โ”œโ”€โ”€ streamlit_app/
โ”‚   โ””โ”€โ”€ app2.py             # Streamlit-based web interface for interactive use
โ”‚
โ”‚
โ”œโ”€โ”€ requirements.txt        # All Python dependencies
โ”œโ”€โ”€ .gitignore              # Ignore caches, outputs, and private keys
โ”œโ”€โ”€ LICENSE                 # Proprietary License
โ””โ”€โ”€ README.md               # (This file)

โšก Overview

Dynamic OCR + QR Intelligence Suite by Yabix is an AI-powered document automation system that processes images, PDFs, and web data โ€” combining Optical Character Recognition (OCR), QR code extraction, and AI-driven website analysis into one intelligent workflow.

It automatically extracts structured data from scanned documents, decodes embedded QR links, enriches the data by crawling company websites, and delivers a clean, bilingual Excel output.


๐Ÿงฉ Core Functional Modules

๐Ÿง  1. ocr_dyn.py

AI-based OCR using Google Gemini SDK to extract structured JSON data fields from scanned documents.

  • Converts PDFs to images using pdf2image
  • Sends image data to Gemini (gemini-2.5-flash)
  • Extracts addresses, phones, company names, persons, and text
  • Ensures schema-valid JSON output

๐Ÿ“ฆ Output: gemini_output.json


๐Ÿงพ 2. qr_dyn.py

Multi-engine QR code decoder with deep enhancement and smart URL validation.

  • Uses OpenCV, pyzbar, and ZXing for detection
  • Enhances images using CLAHE, sharpening, adaptive thresholding
  • Supports rotated / low-quality / PDF-embedded QR codes
  • Extracts and cleans URLs or vCard fields

๐Ÿ“ฆ Outputs:

  • Raw: final_superqr_v6_raw.json
  • Cleaned: final_superqr_v6_clean.json

๐Ÿ”— 3. mix_ocr_qr.py

Merges OCR and QR results into a single structured dataset.

  • Aligns per-file/page results intelligently
  • Merges OCR JSONs with corresponding QR URLs
  • Handles PDFs with multiple pages

๐Ÿ“ฆ Output: mix_ocr_qr.json


๐ŸŒ 4. scrap.py

Web crawler + Gemini-based AI analyzer + translation engine.

  • Extracts URLs from mix_ocr_qr.json
  • Crawls websites (multi-threaded) up to configurable depth
  • Cleans HTML, extracts business info using Gemini
  • Translates English fields to Persian (ENโ†’FA)
  • Smart SSL handling for domains
  • Generates bilingual Excel report

๐Ÿ“ฆ Outputs:

  • urls_clean.json
  • gemini_scrap_output.json
  • web_analysis.xlsx

๐Ÿ“Š 5. excel_mode.py

AI-driven Excel enrichment mode for bulk processing company URLs.

  • Reads input Excel file containing URLs
  • Crawls and analyzes content with Gemini
  • Translates and merges into enriched dataset
  • Handles duplicate merging and normalization

๐Ÿ“ฆ Output: output_enriched_<timestamp>.xlsx


๐Ÿงฌ 6. final_mix.py

Final-stage integration for unified data output.

  • Merges JSON & Excel datasets
  • Deduplicates by domain, phone, email, or company name
  • Normalizes Persian and English content
  • Generates clean BI-ready Excel export

๐Ÿ“ฆ Output: merged_final_<timestamp>.xlsx


๐Ÿ’ป 7. streamlit_app/app2.py

Modern Streamlit Web Interface for interactive document automation.

  • Upload images, PDFs, or Excel files
  • Run full OCR/QR/Web pipeline directly in browser
  • Monitor logs and processing in real-time
  • View and download structured results

๐Ÿงฐ Setup & Installation

1๏ธโƒฃ Clone Repository

git clone https://github.com/<your-username>/dynamic_ocr_qr.git
cd dynamic_ocr_qr

2๏ธโƒฃ Create Virtual Environment

python -m venv venv
source venv/bin/activate     # macOS/Linux
venv\Scripts\activate        # Windows

3๏ธโƒฃ Install Dependencies

pip install -r requirements.txt

4๏ธโƒฃ Configure Environment

โ€ข Windows:

  • Install Poppler for Windows โ†’ Poppler Releases

  • Set environment variable:

    setx POPPLER_PATH "C:\poppler\Library\bin"

โ€ข API Key:

Set your Google Gemini API key:

setx API_KEY "AIzaSyXXXXXX"

๐Ÿš€ Run the System

Full Automated Pipeline

python app/ocr_dyn.py
python app/qr_dyn.py
python app/mix_ocr_qr.py
python app/scrap.py
python app/final_mix.py

Streamlit Web App

streamlit run streamlit_app/app2.py

๐Ÿ“Š Output Files

Stage File Description
OCR gemini_output.json AI-extracted structured text
QR final_superqr_v6_clean.json Clean URLs from QR
Merge mix_ocr_qr.json Unified JSON (OCR + QR)
Web web_analysis.xlsx Web-enriched bilingual company data
Final merged_final_*.xlsx Master deduplicated dataset

โš™๏ธ Technologies

  • ๐Ÿง  Google Gemini SDK (google-genai)
  • ๐Ÿ–ผ OpenCV, Pillow, Pyzbar, Pyzxing, Pdf2Image
  • ๐ŸŒ Requests, BeautifulSoup4
  • ๐Ÿงพ Pandas, OpenPyXL
  • ๐Ÿš€ Streamlit
  • ๐Ÿงฎ Multithreading & Smart SSL Handler

๐Ÿ’ก Future Improvements

  • Integrated Web Dashboard (with job tracking)
  • Real-time Streamlit pipeline visualization
  • Supabase / Firestore integration
  • Auto-export to Google Sheets

โš–๏ธ License

This project is licensed under a Proprietary License. All rights reserved ยฉ 2025 Yabix. Unauthorized copying, modification, or redistribution of any part of this software is strictly prohibited. For commercial or enterprise licensing, please contact: ๐Ÿ“ง [email protected]


๐ŸŽฅ Live Preview

How to Run the App Yabix OCR+QR Demo

Launch Web App Yabix OCR+QR Demo


โค๏ธ Developed by Yabix

Intelligent Document Automation | AI-Powered Data Extraction | Web Intelligence


About

๐Ÿš€ VisionFusion by Yabix โ€” an AI-powered OCR + QR + Web Intelligence suite built with Streamlit. It seamlessly extracts, cleans, and fuses data from images, PDFs, and websites using Google Gemini and computer vision โ€” generating intelligent Excel reports for real-world automation.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages