Spaces:
Sleeping
Sleeping
Commit History
-
v38: Revert to single Korean OCR engine - fix cpu-basic timeout
Root cause: dual-engine (Korean + English) doubled model downloads, memory usage, and processing time, exceeding HF Spaces cpu-basic limits. Reverted to working v32 architecture: - Single Korean PaddleOCR engine (synchronous warmup at startup) - PP-Structure layout engine loads lazily on first OCR request - No background threads, no race conditions - Kept v33 improvements: bbox extraction, Korean fuel, VIN year, date Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>9d3eed6 -
v37: Fix race condition - thread-safe OCR engine initialization
Background warmup thread and request thread were racing to initialize the same engine instance, causing 'engine disabled' state. Added threading.Lock with double-checked locking pattern to both LocalPaddleEngine and LayoutEngine singletons. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>0737038 -
v34: Dual OCR engine (Korean + English) for character-type-aware recognition
- PaddleOCR per-language singleton: korean engine for Korean text fields (차명, 업체명, 차종), en engine for alphanumeric fields (VIN, engine codes, dimensions, weight) - Field-type-aware merge: _merge_dual_ocr() selects best result per field - VIN: prefers engine whose result passes ISO 3779 validation - Numeric fields: prefers engine with more digit content - Korean fields: always uses korean engine - Both engines warmed up at startup to avoid first-request timeout Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>a3bcb73 -
v33: Improve OCR accuracy - bbox extraction, Korean fuel types, VIN year, date
1. PaddleOCR 3.x bbox extraction: v3 API now returns ocr_results with bounding box coordinates, enabling coordinate-based field extraction that was previously only working on 2.x 2. Fuel type output unified to Korean: 'Gasoline'→'휘발유', 'Diesel'→'경유', 'Electric'→'전기', etc. Matches Korean UI/Excel headers 3. VIN model year decoding: When model year is not found by text parsing, decode it from VIN position 10 (ISO 3779 year code) 4. Registration date extraction: Prefer dates near '최초등록일' label instead of blindly picking the earliest date in the document Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>fe7f243 -
v32: Disable OCR in PP-Structure to reduce startup time
PP-Structure ocr=True downloads unnecessary models (LaTeX OCR etc.) causing HF Spaces startup timeout. Set ocr=False since we only need layout/table structure detection - text recognition uses PaddleOCR korean. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>89da6fa -
v29: Fix PP-Structure lang error - use 'ch' instead of 'korean' for layout
PP-Structure layout models only support 'en' and 'ch' languages. Using 'korean' caused runtime error on HF Spaces that crashed OCR requests. Changed to 'ch' since CJK layout models handle Korean document structure. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>732efb9 -
v28: Add PP-Structure layout analysis engine for form-aware OCR
Introduce 3-role dev management (Orchestrator/Dev/QAQC) and PP-Structure layout analysis to improve vehicle registration certificate recognition. - Add layout_engine.py: PP-Structure wrapper (singleton, 2.x/3.x compat) - Add form_parser.py: form-aware field extraction from tables + spatial proximity - Integrate ensemble pipeline in processor.py (layout supplements text parsing) - Graceful degradation when PP-Structure unavailable - 14 new tests, all passing - ENABLE_LAYOUT_ANALYSIS env var for toggling Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>a6c2f2d
-
v24: Port OCR_Vehicle_02 algorithms - preprocessing, bbox extraction, standards
1. Image preprocessing (from OCR_Vehicle_02): - CLAHE contrast enhancement (LAB color space, L-channel only) - Deskew via Hough Line Transform (±15° detection) - Gaussian denoise (3x3 kernel) - DPI increased to 300 2. Coordinate-based field extraction: - PaddleOCR 2.x now returns bounding boxes - Y%/X% zone mapping for model_name, owner, vehicle_type - Supplements text-based regex when it fails 3. Standards-based validation (자동차관리법): - Fuel type OCR corrections (수소전키→수소전기, etc.) - Vehicle type dimension ranges (19 types) - Noise pattern filtering (47 patterns) - Out-of-range values nullified Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>99bdf7f -
fix: add debug diagnostics for PaddleOCR 3.x result format (v13)
Surface PaddleOCR result structure info in error messages so we can diagnose the exact format returned on HF Spaces. Also fix Gradio 5.x gr.update() deprecation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>63d0d3e -
fix: robust PaddleOCR 3.x result parsing with multi-strategy fallback (v11)
The _detect_text_v3 method was failing with "No text detected" because it assumed a single result format. Now tries 4 parsing strategies to handle different PaddleOCR 3.x versions, with debug logging to diagnose format. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>12c1d47
-
fix: auto-detect PaddleOCR version and use correct API
Support both 2.x (ocr()) and 3.x (predict()) APIs. Add detailed OCR logging for debugging. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>75ae9f5
-
chore: remove unused files and __pycache__ from tracking
Remove Google Vision engine, hybrid engine, local engine duplicate, Google Sheets storage, VIN CSV logger, debug tools, and unused parsers. Remove __pycache__ bytecode and processed CSV files from git tracking. Prepare for HuggingFace Spaces deployment with PaddleOCR only. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>5e08aaf
-
Downgrade PaddleOCR from 3.3+ to 2.x API
esketch +1: Claude Opus 4.5- Change from predict() to ocr() method - Update configuration parameters for 2.x compatibility - Adjust result parsing for 2.x format Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>0d94afd
-
Migrate to local OCR (PaddleOCR) and add speed optimizations
- Replace Google Vision API with PaddleOCR 3.3+ for zero cloud costs - Add LocalOCREngine using PaddleOCR with Korean language support - Optimize processing speed (70-80s -> 11-12s per file, ~7x faster) - Use mobile detection model (PP-OCRv5_mobile_det) - Add image size limits and lower thresholds - Add parallel processing with multiprocessing (process_local_fast.py) - Fix document verification for PaddleOCR's spaced text output - Use temp directory for resized files instead of source directory - Add file copy feature: output files named as 차량번호_연료유형.ext Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>f3dce36
-
Initial commit
c5ce945