Skip to main navigation Skip to search Skip to main content

Optimizing Optical Character Recognition Within a Physical - Agentic AI System for Flexible Drug Preparation

  • Mahidol University
  • Tamkang University

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

The conventional camera-based prescription-label reading process used in existing automated systems has notable limitations in both accuracy and latency. These issues stem primarily from Optical Character Recognition (OCR) pipelines that were not optimized for real-world label characteristics-such as varying font complexity, size, and image quality-resulting in misread text and delays that fail to meet operational requirements. To address these shortcomings, this study developed an improved processing pipeline by comparing the performance of EasyOCR and PyTesseract under image-downscaling conditions ranging from 0.1 to 0.9. In parallel, an integrated N8N-AI Agent workflow was designed to enhance both the speed and accuracy of medication-label extraction. The proposed system combines appropriate pre-processing, selective OCR utilization, and the incorporation of reference data directly within the model. This integration leads to more stable label-reading performance, enabling the system to correctly identify medication names while reducing overall processing time compared with the previous approach. Experimental results show that PyTesseract processes images approximately 5-10 times faster than EasyOCR, whereas EasyOCR consistently delivers higher recognition accuracy. When combined with reference data, the workflow using a system-prompt approach proved more than ten times faster than the CSV-based lookup method. Optimizing the OCR for image complexity, minimizing node count, and applying in-memory processing collectively improved both the responsiveness and accuracy of the system. As a result, the new pipeline operates near real time, reduces bottlenecks associated with redundant file operations, and maintains stable performance across diverse medication-label formats-an essential requirement for reliable deployment in medical environments where precision and consistency are critical.

Original languageEnglish
Title of host publication6th Technology Innovation Management and Engineering Science International Conference, TIMES-iCON 2025 - Proceedings
PublisherInstitute of Electrical and Electronics Engineers Inc.
ISBN (Electronic)9798331576783
DOIs
Publication statusPublished - 2025
Event6th Technology Innovation Management and Engineering Science International Conference, TIMES-iCON 2025 - Bangkok, Thailand
Duration: 10 Dec 202512 Dec 2025

Publication series

Name6th Technology Innovation Management and Engineering Science International Conference, TIMES-iCON 2025 - Proceedings

Conference

Conference6th Technology Innovation Management and Engineering Science International Conference, TIMES-iCON 2025
Country/TerritoryThailand
CityBangkok
Period10/12/2512/12/25

Keywords

  • Agentic AI
  • Artificial Intelligence
  • N8N
  • OCR
  • Physical AI

Fingerprint

Dive into the research topics of 'Optimizing Optical Character Recognition Within a Physical - Agentic AI System for Flexible Drug Preparation'. Together they form a unique fingerprint.

Cite this