Remove numbered labels from error and change markers
Yaz Hobooti
223bf48
- Remove red_labels parameter from draw_boxes_multi() function
- Remove label rendering code that added numbers to difference boxes
- Clean up function calls to remove unused labels parameter
- Difference boxes now show without numbered labels for cleaner display
- Maintains all other functionality (red boxes for differences, cyan for misspellings, green for barcodes)
Improve spell checking to reduce false positives
Yaz Hobooti
507d05e
- Add _is_likely_word() function to filter out non-words
- Filter tokens that are mostly non-letter characters (<60% letters)
- Detect and filter keyboard patterns (qwerty, asdfgh, etc.)
- Filter excessive consonant clusters that look like random typing
- Improve word boundary recognition with \b regex anchors
- Better text normalization with whitespace handling
- Filter tokens during extraction to only process likely words
- Reduce false positives by not flagging non-words as misspellings
- Enhanced space and word boundary recognition
Add ChatGPT-recommended barcode debug function
Yaz Hobooti
9a98b3f
- Add debug_scan_pdf() function for comprehensive barcode detection diagnostics
- Renders PDF pages at 600/900/1200 DPI for resolution analysis
- Tests multiple variants: original, grayscale, binarized, and rotations
- Scans embedded images (XObjects) for barcodes
- Saves debug PNGs to inspect bar width and quality
- Helps identify if barcodes are too thin/low resolution
- Includes helper functions _binarize() and _decode_once()
- Comprehensive diagnostic tool for troubleshooting barcode detection issues
FORCE UPDATE: 2025-09-17T20:41:27Z
Yaz Hobooti
170c264
Force rebuild: Enhanced barcode detection deployed - 2025-09-17T20:36:18Z
Yaz Hobooti
fb9aa77
Fix barcode detection bugs and improve robustness
Yaz Hobooti
b050288
- Fix decode_with_variants() unreachable code bug (results was defined after return)
- Add robust decode variants: grayscale, scale-up, rotations (90°, 180°, 270°)
- Use LANCZOS resampling for better quality in newer Pillow versions
- Improve UPC-A/EAN-13 validation with leading zero normalization
- Remove arbitrary coordinate offset (+ page_num * 1000) for cleaner positioning
- Add comprehensive error handling and fallbacks
- Enhanced barcode detection with multiple image processing variants
Implement PDF-based barcode/QR code detection
Yaz Hobooti
8cec543
- Add extract_pdf_images() function to extract images directly from PDF using PyMuPDF
- Add find_barcode_boxes_and_info_from_pdf() function for PDF-based barcode detection
- Update compare_pdfs() to use PDF-based barcode detection instead of rasterized images
- Add proper coordinate mapping from PDF space to image space
- Maintain fallback to legacy rasterized image detection
- Add debug output for barcode detection results
- Barcode detection now operates on original PDF for better accuracy and performance
AGGRESSIVE FORCE REBUILD: 2025-09-17T20:13:49Z
Yaz Hobooti
47f3477
Force rebuild: Coordinate mapping fix deployed - 2025-09-17T20:12:30Z
Yaz Hobooti
a8cf250
Fix coordinate mapping for text-based spell checking
Yaz Hobooti
93954b8
- Add image_size parameter to find_misspell_boxes_from_text()
- Convert PDF coordinates to image coordinates using scale factors
- Pass image dimensions from compare_pdfs() to spell checking function
- Add debug output to track spell check results
- Ensure spell checking boxes align with rasterized image coordinates
Fix Box constructor parameter names in text-based spell checking
Yaz Hobooti
0b957fa
- Changed from top/left/bottom/right to y1/x1/y2/x2 parameters
- Box class expects (y1, x1, y2, x2, area) constructor arguments
- Fixed both coordinate mapping and fallback placeholder boxes
Force rebuild: Text-based spell checking deployed - 2025-09-17T18:50:08Z
Yaz Hobooti
6eab7c3
Implement text-based spell checking using PDF text extraction
Yaz Hobooti
ad98b73
- Add extract_pdf_text() function to extract text directly from PDFs using PyMuPDF
- Add find_misspell_boxes_from_text() function that analyzes PDF text with coordinate mapping
- Update compare_pdfs() to use text-based spell checking instead of OCR
- Maintain fallback to OCR-based approach if needed
- Fix missing return statement in decode_with_variants() function
- Spell checking now operates on original PDF text for better accuracy and performance
Force rebuild: 2025-09-17T15:42:00Z
Yaz Hobooti
7f42e9a
AGGRESSIVE FORCE REBUILD: Deploy OCR improvements to HF Space
Overwrite pdf_comparator.py with new Gradio comparison tool
Yaz Hobooti
d4324ba
Update .gitignore: ignore helper script and duplicate file
Yaz Hobooti
cc9bdee
Add .gitignore and Hugging Face model card
Yaz Hobooti
c328680
Update pdf_comparator.py: latest changes
Yaz Hobooti
fa64916
Update to Gradio-based PDF comparison tool with advanced features
Yaz Hobooti
37c62cf
- Replace Flask app with modern Gradio interface
- Add comprehensive PDF analysis features:
- Visual difference detection with bounding boxes
- OCR and spell checking capabilities
- Barcode/QR code detection and validation
- CMYK color analysis for print workflows
- Update dependencies for compatibility
- Add detailed README for Hugging Face Space