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.
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.
| # | 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 |
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
# 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.htmlBENCHMARK 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 β
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)
Vaani Challa β QA Architect | Samsung SRIB | 17+ Years DocScannerBench contributor Β· Innovation Award winner Β· Galaxy S25 + S26 Best Award
MIT Β© Vaani Challa