Intelligent Reading for Multi-Scale Engineering Drawings based on Adaptive Object Detection and Optical Character Recognition

Rui Yao, Xin Cheng, Zhilei Hui, Zexin Li, Zhaoe Min, M Liao, B Shi, X Bai, X Wang, W Liu, J Ma, W Shao, H Ye, L Wang, H Wang, Y Zheng, X Xue, Y Dai, Z Huang, Y Gao, Y Xu, K Chen, J Guo, W Qiu, Z Wan, C Yao, C Moreno-Garca, P Johnston, B Garkuwa, R Girshick, J Donahue, T Darrell, J Malik, J Redmon, S Divvala, A Farhadi, H Allioui, M Sadgal, A FazzikiProceedings of WCSE 2022 Spring Event: 2022 9th International Conference on Industrial Engineering and Applications 2022

Abstract

Extracting technical information from engineering drawings (EDs) is challenging due to the mix of text and symbols and the extreme variation in drawing scales. This paper proposes an intelligent reading scheme combining YOLO v5 for symbol detection with a specialized OCR stack (DB+CRNN). By implementing adaptive preprocessing and a "secure redundancy segmentation" strategy, the system handles oversized drawings without memory issues. Experimental results show a 0.98 mAP for object detection and a highly efficient lightweight OCR model suitable for mobile deployment.

Introduction: The Challenge of Engineering Drawings

Engineering drawings are dense, information-rich documents that present two primary hurdles for standard computer vision:

  1. Symbol Complexity: Beyond standard text, EDs contain non-textual signs like wiring boxes that carry critical technical meaning. Standard OCR engines often fail to distinguish these from background noise.
  2. The Multi-Scale Trap: EDs vary wildly in resolution. Downsampling a massive drawing to fit a neural network's input makes text unreadable, while processing them at full scale often leads to "memory explosions" that crash hardware.

Proposed Methodology

The authors propose a multi-stage pipeline that unifies object detection and OCR to address these challenges.

The multi-stage pipeline for intelligent engineering drawing recognition.

Adaptive Preprocessing and Scale Management

The system first converts PDFs to JPEGs and uses an angle classifier for orientation. To handle scale:

  • Small Drawings: These are scaled up and padded with "black trim" to meet a standard input size (3488x2560) without distorting features.
  • Oversized Drawings: A "Secure Redundancy Segmentation Strategy" splits large images into overlapping pieces. A 300x300 pixel redundant block ensures that symbols or text lines falling on a seam appear fully intact in at least one segment.

The Model Stack: YOLO and OCR

The core of the recognition engine uses a dual-path approach:

  • YOLO v5: Specifically tasked with detecting technical symbols and patterns, such as wiring boxes.
  • OCR Stack (DB + CRNN): Differentiable Binarization (DB) handles text line segmentation, while a Convolutional Recurrent Neural Network (CRNN) performs line-level recognition.
Visualization of the hybrid approach: YOLO v5 for object detection and DB+CRNN for text recognition.

To enable mobile deployment, the authors utilized knowledge distillation, where a high-performance "teacher" model trains an ultra-lightweight "student" model.

Key Results and Insights

The study utilized a dataset of 84 secondary-wiring drawings, expanded to 211 high-resolution annotated samples through preprocessing.

  • High Reliability: YOLO v5 achieved a nearly perfect [email protected] score of 0.98 for wiring box detection.
  • Extreme Efficiency: The OCR model was compressed to just 4.7% of its original volume (from 46.6MB to 2.2MB) while maintaining an F1 score of 0.648—only a 3% performance drop from the large model.
  • Robustness: The segmentation strategy successfully prevented system crashes on drawings exceeding 10,000 pixels while maintaining uniform performance across all scales.

Conclusion

This framework demonstrates that combining adaptive segmentation with distilled deep learning models allows for the robust digitization of complex industrial drawings. Future work will focus on using GANs for data augmentation and testing the pipeline on engineering drawings from diverse technical fields.

Summary updated

BibTeX
@inproceedings{yao2022intelligent,
  author = {Rui Yao and Xin Cheng and Zhilei Hui and Zexin Li and Zhaoe Min and M Liao and B Shi and X Bai and X Wang and W Liu and J Ma and W Shao and H Ye and L Wang and H Wang and Y Zheng and X Xue and Y Dai and Z Huang and Y Gao and Y Xu and K Chen and J Guo and W Qiu and M Liao and Z Wan and C Yao and K Chen and X Bai and B Shi and X Bai and C Yao and C Moreno-Garca and P Johnston and B Garkuwa and R Girshick and J Donahue and T Darrell and J Malik and J Redmon and S Divvala and R Girshick and A Farhadi and H Allioui and M Sadgal and A Fazziki},
  title = {{Intelligent Reading for Multi-Scale Engineering Drawings based on Adaptive Object Detection and Optical Character Recognition}},
  booktitle = {Proceedings of WCSE 2022 Spring Event: 2022 9th International Conference on Industrial Engineering and Applications},
  year = {2022},
  doi = {10.18178/wcse.2022.04.171},
}
Figure