Skip to content

Latest commit

Β 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“„ DocScan Gallery Benchmark

Document Scanner Quality Benchmarking Platform

10-metric automated quality pipeline for document scanning apps

πŸ“– Metrics Β· πŸš€ Quick Start Β· πŸ“Š Reports


πŸ“Œ What Is This?

A Python-based benchmark platform that automatically evaluates the output quality of document scanning applications (Samsung Notes Scanner, Microsoft Lens, Google PhotoScan, Adobe Scan). It runs 10 quality metrics on scanned document images and generates a comparative report.

Used to benchmark document scanner quality across 3 apps on 50 real-world documents.


🎯 Why This Exists

Document scanners are judged subjectively β€” "this looks better." This tool makes quality measurable and comparable using computer vision metrics, giving QA teams objective pass/fail criteria.


πŸ“ Quality Metrics (10)

# Metric What It Measures
1 OCR Accuracy Text recognition via Tesseract β€” character error rate
2 SSIM Structural similarity vs ground truth scan
3 PSNR Signal-to-noise ratio β€” image fidelity
4 Perspective Correction Geometric distortion after de-warping
5 Shadow Removal Shadow detection and elimination quality
6 Contrast Enhancement Text readability improvement score
7 Edge Sharpness Laplacian variance β€” text edge clarity
8 Background Whiteness Page background normalization quality
9 Noise Level High-frequency artifact detection
10 Color Accuracy Ξ”E2000 vs reference document colors

πŸ—οΈ Architecture

doc-scan-gallery/
β”‚
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ core/
β”‚   β”‚   β”œβ”€β”€ benchmark_engine.py    ← Orchestrates all metrics
β”‚   β”‚   β”œβ”€β”€ ocr_engine.py          ← Tesseract OCR integration
β”‚   β”‚   β”œβ”€β”€ visual_validator.py    ← SSIM, PSNR, edge metrics
β”‚   β”‚   β”œβ”€β”€ scoring_engine.py      ← Weighted score calculation
β”‚   β”‚   β”œβ”€β”€ semantic_validator.py  ← Content preservation check
β”‚   β”‚   └── report_generator.py   ← HTML + PDF report output
β”‚   β”‚
β”‚   β”œβ”€β”€ database/
β”‚   β”‚   └── db_manager.py          ← SQLite results storage
β”‚   β”‚
β”‚   β”œβ”€β”€ models/
β”‚   β”‚   └── data_models.py         ← ScanResult, BenchmarkReport
β”‚   β”‚
β”‚   └── resources/
β”‚       └── styles/
β”‚           └── dark_theme.qss     ← UI theme
β”‚
β”œβ”€β”€ test_documents/                ← 50 ground truth documents
β”œβ”€β”€ scan_inputs/                   ← App-scanned versions
β”œβ”€β”€ reports/                       ← Generated benchmark reports
β”œβ”€β”€ requirements.txt
└── README.md

πŸš€ Quick Start

# Clone
git clone https://github.com/vanichalla24/doc-scan-gallery-.git
cd doc-scan-gallery-

# Install
pip install -r requirements.txt

# Add test documents
cp your_documents/* test_documents/
cp your_scans/* scan_inputs/

# Run benchmark
python -m app.core.benchmark_engine --input scan_inputs/ --output reports/

# View report
open reports/benchmark_report.html

πŸ“Š Output Report

BENCHMARK RESULTS β€” Samsung Notes Scanner vs Microsoft Lens
────────────────────────────────────────────────────────────
Metric              Samsung Notes    Microsoft Lens   Winner
────────────────────────────────────────────────────────────
OCR Accuracy        94.2%            91.8%            Samsung βœ…
SSIM Score          0.891            0.867            Samsung βœ…
Perspective Corr.   97.1%            95.4%            Samsung βœ…
Shadow Removal      88.3%            92.1%            Lens    βœ…
Edge Sharpness      82.4             79.1             Samsung βœ…
────────────────────────────────────────────────────────────
OVERALL SCORE       91.4/100         89.2/100         Samsung βœ…

πŸ”§ Requirements

opencv-python>=4.8.0
pytesseract>=0.3.10
scikit-image>=0.21.0
numpy>=1.24.0
Pillow>=10.0.0
reportlab>=4.0.0
sqlite3 (built-in)

πŸ‘©β€πŸ’» Author

Vaani Challa β€” QA Architect | Samsung SRIB | 17+ Years DocScannerBench contributor Β· Innovation Award winner Β· Galaxy S25 + S26 Best Award


πŸ“„ License

MIT Β© Vaani Challa

About

πŸ“„ Document scanner quality benchmark platform β€” 10-metric automated pipeline (OCR accuracy, SSIM, perspective correction, shadow removal) comparing Samsung Notes, Microsoft Lens, Google PhotoScan

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages