Spaces:
Sleeping
Sleeping
Commit History
-
v43: Improve VIN extraction with Korean transliteration and bbox zone detection
Korean PaddleOCR often misreads Latin VIN characters as Korean jamo or garbles them with spaces. This adds three new extraction strategies: - Korean→Latin character transliteration (ㅋ→K, ㅁ→M, etc.) - Bbox-based VIN zone detection (Y:19.5-23%, X:17-70% on cert) - Aggressive zone text cleanup with prefix-based matching Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>b821cb1
-
v40: Add purchase price (출고가격) field extraction
Extract '자동차출고(취득)가격(부가세제외)' from OCR text. Handles spaced-out Korean characters from OCR. Added to Excel output as '출고가격(원)' column. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>e10c4da -
v39: Add model-spec lookup for dimension fill/correction
Known vehicle models (대형승합, 중형승합, 화물 etc.) have fixed specs. When model name is recognized, fill missing fields and correct OCR values that deviate >20% from the standard specification. Models: 슈퍼에어로시티, 일렉시티, 유니버스, 그린시티, 카운티, 마이티, 파비스, 엑시언트, BS106, BS110, FX116, FX120, 레스타 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>babe376 -
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 -
v35: Skip English engine warmup to prevent startup timeout on cpu-basic
Only pre-init Korean OCR + layout engine at startup. English OCR engine initializes lazily on first request to stay within HF Spaces boot timeout. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>9e7a67d -
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 -
v30: Fix connection timeout - warmup engines at startup, restore ssr=False
Pre-initialize PaddleOCR and PP-Structure engines at app import time instead of lazy-loading on first request, preventing timeout on HF Spaces cpu-basic tier. Also restores ssr=False that was accidentally removed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>2a75ff5 -
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 -
feat: improve VIN extraction and show OCR debug in summary (v17)
- Add near-valid VIN matching (15-17 chars with Korean prefix) - Add multi-line ⑥ marker patterns for VIN detection - Show OCR text preview and parsed fields in summary output - Increase PDF DPI from 150 to 200 for better OCR quality Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>5d1a454 -
fix: broaden document type verification and show OCR preview on skip (v15)
- Add more keyword variants: 자동차등록증서, 등록번호, 차량등록, etc. - Add flexible patterns for: 최초등록일, 제원관리, 원동기형식, 승차정원 - Accept documents with Korean VIN pattern (K + 16 chars) - Show OCR text preview in skip message for debugging Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>4629f65 -
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: show detailed error messages in UI for debugging
Display per-file error/skip reasons in summary text. Add traceback logging for better debugging on HF Spaces. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>63491a7 -
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
-
feat: add core processing pipeline (processor.py) and tests
Create src/processor.py orchestrating image preprocessing, PaddleOCR, parsing, validation, and Excel row conversion. Add unit tests with mocked OCR engine for the pipeline. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>bce6acc