An enterprise-grade AI solution for high-accuracy pharmaceutical identification and packaging verification.
Portfolio Note: This repository serves as a professional showcase of architecture, design, and technical implementation. The source code is proprietary and not included in this repository.
| Tablet | Capsule | Box |
|---|---|---|
![]() |
![]() |
![]() |
| Blister | Ampoule | Vial |
![]() |
![]() |
![]() |
As the core developer, I was tasked with building a real-time Pill Identification system from the ground up. The project's initial scope of identifying tablets and capsules was quickly expanded, challenging me to create a more ambitious system capable of recognizing a diverse range of items including medicine boxes, blisters, ampoules, and vials. I was responsible for the entire technical execution, from research and data collection to model development and backend engineering.
My key challenges and responsibilities included:
- Custom Dataset Curation: No public dataset existed for this specific task. I single-handedly addressed this by photographing, processing, and labeling a comprehensive dataset from medicines provided by the company, forming the foundation of the AI's accuracy.
- AI Engine Development: I developed the core computer vision engine using YOLO (Ultralytics) to detect and classify all specified medicine forms, from simple pills to complex packaging.
- Integrating Diverse Object Recognition: The mid-project expansion from pills to packaging was a major technical hurdle. This required me to re-architect the computer vision pipeline, moving it beyond simple shape and color analysis to a more complex system capable of identifying fundamentally different features, such as printed text on boxes, the transparency of ampoules, and the unique structure of blister packs.
- Full-Stack System Architecture: I designed the end-to-end system workflow and built a robust backend with Django. This included creating a functional frontend interface used for crucial debugging and visual validation of the AI engine's performance.
- Mobile API Integration: I engineered and provided a real-time WebSocket API to the mobile development team, enabling them to integrate the AI's identification results seamlessly into the production user-facing application.
This project was a fantastic opportunity to take a complex idea from a concept to a high-fidelity prototype, which was successfully demonstrated at two major public technology events.
- AI & Computer Vision: Python, YOLO (Ultralytics), OpenCV
- Backend: Django
- Frontend: HTML, CSS, JavaScript, Tailwind CSS
- Databases & Caching: SQLite, Redis
The system processes images to identify various forms of medicine in real-time, providing the following capabilities:
- Multi-Form Identification: Identifies medicine in various forms including tablets, capsules, boxes, blisters, ampoules, and vials.
- Flexible Image Analysis: The system is designed to process images at any orientation. For optimal accuracy with tablets and capsules, the items must not be stacked or overlapping.
- Robust Tablet Recognition: Accurately identifies tablets even in challenging scenarios, such as when a package contains a non-uniform mix of pills (different sizes, colors, or shapes) or includes broken tablets.
- Fine-Grained Recognition: Distinguishes between medicines with very similar visual appearances. For example, it can successfully differentiate between two types of ampoules in transparent bottles that both contain transparent liquid and feature similar green labels—a task that is challenging for the human eye.
- Standardized Identification: Utilizes the Thai Medicines Terminology (TMT) number as a unique identifier, specifically focusing on the Trade Product Unit (TPU) category. This links every identification to a national standard, with data referenced from the official TMT portal.
This section provides visual examples of the system's identification performance.
Note on Output: The following results are shown as simplified JSON to represent the raw data extracted by the backend identification engine. This is not the final user-facing output.
The system can successfully identify a wide range of medicine types from a single image.
The following examples demonstrate the system's robustness in more complex situations.
The system can correctly identify pills even when they are damaged or incomplete.
The system can detect anomalies when a package contains pills that should be uniform but have different sizes.
Similarly, the system can distinguish between tablets based on color.
This showcases the fine-grained recognition capability, where the system tells apart items that look nearly identical.












