Optical Character Recognition Method Based on YOLO Positioning and Intersection Ratio Filtering

Kai Cui, Qingpo Xu, Yabin Ding, Jiangping Mei, Ying He, Haitao LiuSymmetry 2025 · DOI

TL;DR

This paper introduces a novel three-level deep learning approach for accurately and efficiently extracting information from complex express delivery sheets. By combining enhanced YOLOv5 for localization with PaddleOCR for recognition, and introducing a dynamic spatial-semantic matching mechanism, the method significantly improves accuracy and speed, addressing key challenges in automated logistics.

What Problem Does This Paper Address?

The rapid growth of e-commerce has led to an explosion in express delivery services, making efficient and accurate identification of shipping information crucial for automated sorting systems. Traditional Optical Character Recognition (OCR) methods struggle in this domain due to issues like image distortion, uneven lighting, and overlapping text fields, leading to low accuracy (below 75%) and hindering the advancement of logistics automation. This paper aims to overcome these limitations by developing a more robust and efficient system for extracting key information from these challenging logistics documents.

Methods

The proposed solution employs a three-level collaborative framework:

  1. Regional Positioning and Standardization: This initial stage focuses on correcting geometric distortions. It uses an improved contour detection algorithm and a lightweight MobileNetV3 for directional classification to eliminate background noise, correct perspective distortion, and rotate images, providing a standardized input. YOLOv5 is used for initial document area detection.
  2. Dual-Path Parallel Extraction: This level utilizes a parallel architecture for both positioning and recognition. An enhanced YOLOv5s model is used for precise localization of key areas (like recipient name, address, etc.), while an improved PaddleOCR handles full-text character recognition. This parallel processing speeds up reasoning.
  3. Dynamic Spatial-Semantic Joint Matching: This is the core innovation. It integrates anti-offset Intersection over Union (IoU) metrics and hierarchical semantic regularization constraints. A density-aware adaptive fusion strategy dynamically adjusts weights based on the density of detected fields, and a dynamic threshold determination module adapts to varying layout densities to optimize matching. This mechanism aims to suppress mismatches caused by spatial offsets and semantic ambiguities.

Datasets

The paper constructs two new specialized datasets:

  • Overall Facet Recognition Dataset: Contains 12,000 images capturing various complex scenes, materials, and physical conditions (e.g., stacking, occlusion, wrinkles, tilt) of express sheets.
  • Effective Information Recognition Dataset: Focuses on extracting key information (order number, recipient, address) from express sheets from various companies. This dataset includes 6000 images, augmented with variations in illumination, blurriness, and noise, and includes virtual sheets with additional interference.

Both datasets were cleaned, labeled, and split into training, validation, and test sets at an 8:1:1 ratio.

Key Insights and Ideas

  • The Power of Multi-Level Collaboration: The paper demonstrates that a cascaded approach, combining geometric correction, parallel detection/recognition, and intelligent dynamic matching, is far more effective than single-stage methods for complex logistics documents.
  • Dynamic Matching is Crucial: The key insight is that fixed thresholds and constraints are insufficient for the varied and often messy nature of express sheets. Dynamically adjusting matching strategies based on field density and spatial-semantic relationships is essential for robust performance.
  • YOLOv5s as a Lightweight Powerhouse: The study highlights YOLOv5s's suitability for real-time edge deployment due to its speed and low complexity, especially when enhanced with the proposed dynamic matching.
  • Bridging Spatial and Semantic Gaps: The integration of spatial geometric constraints (like anti-offset IoU) with semantic content constraints (keyword matching, regex) provides a more comprehensive understanding of field relationships, reducing misassociations.

Key Results

  • The proposed method achieved an accuracy of 89.5% and an F1 score of 90.1% on their self-constructed dataset, a 24.2% improvement over traditional OCR methods.
  • The dynamic spatial-semantic joint matching mechanism improved the average accuracy of YOLOv5s from 78.5% to 89.7%, surpassing the Faster R-CNN benchmark.
  • The system maintains a real-time processing efficiency of 76 FPS, significantly faster than Faster R-CNN (15 FPS).
  • The model size is kept lightweight (14.4 MB for YOLOv5s), making it suitable for edge devices.

Limitations and Future Work

  • Limitations in Extreme Cases: The authors acknowledge that in extreme scenarios, such as severe physical damage to sheets or strong reflective materials, text recognition confidence can diminish, leading to semantic constraint failures. Densely stacked parcels can also cause vertex detection offsets. These challenging cases account for only about 3.7% of the test set.
  • Future Work: The paper suggests future research will focus on the "deep adaptation of dynamic matching mechanisms for edge computing devices to further enhance real-time performance in low-resource environments."

Summary updated

Abstract

Driven by the rapid development of e-commerce and intelligent logistics, the volume of express delivery services has surged, making the efficient and accurate identification of shipping information a core requirement for automatic sorting systems. However, traditional Optical Character Recognition (OCR) technology struggles to meet the accuracy and real-time demands of complex logistics scenarios due to challenges such as image distortion, uneven illumination, and field overlap. This paper proposes a three-level collaborative recognition method based on deep learning that facilitates structured information extraction through regional normalization, dual-path parallel extraction, and a dynamic matching mechanism. First, the geometric distortion associated with contour detection and the lightweight direction classification model has been improved. Second, by integrating the enhanced YOLOv5s for key area localization with the upgraded PaddleOCR for full-text character extraction, a dual-path parallel architecture for positioning and recognition has been constructed. Finally, a dynamic space–semantic joint matching module has been designed that incorporates anti-offset IoU metrics and hierarchical semantic regularization constraints, thereby enhancing matching robustness through density-adaptive weight adjustment. Experimental results indicate that the accuracy of this method on a self-constructed dataset is 89.5%, with an F1 score of 90.1%, representing a 24.2% improvement over traditional OCR methods. The dynamic matching mechanism elevates the average accuracy of YOLOv5s from 78.5% to 89.7%, surpassing the Faster R-CNN benchmark model while maintaining a real-time processing efficiency of 76 FPS. This study offers a lightweight and highly robust solution for the efficient extraction of order information in complex logistics scenarios, significantly advancing the intelligent upgrading of sorting systems.
BibTeX
@inproceedings{cui2025optical,
  author = {Kai Cui and Qingpo Xu and Yabin Ding and Jiangping Mei and Ying He and Haitao Liu},
  title = {{Optical Character Recognition Method Based on YOLO Positioning and Intersection Ratio Filtering}},
  booktitle = {Symmetry},
  year = {2025},
  doi = {10.3390/sym17081198},
}
Figure