Back to Projects page

Building a Smarter Way to Recognize Medicines with OCR and React Native

Started October 2024 - Ended October 2024
React Native
React Native
Expo
Expo
Flask
Flask
Python
Python
TypeScript
TypeScript
JavaScript
JavaScript
React
React
Gradle
Gradle
EasyOCR
EasyOCR
GitHub
GitHub
Git
Git
Visual Studio Code
Visual Studio Code
OCR Medicine Mobile App
A mobile app that identifies medicines using OCR, built with React Native and a Flask backend, designed to make medicine recognition more efficient and accurate.

Introduction

This project came to life from a very practical need—helping people identify medicines quickly and accurately. Whether it's a busy pharmacist, a caregiver, or someone managing their own medications, the ability to instantly recognize and understand medicine labels can make a huge difference. I decided to build a mobile app using Optical Character Recognition (OCR) technology to scan labels and provide users with instant feedback. Leveraging React Native for its cross-platform capabilities, I focused on creating an intuitive experience for both Android and iOS users. Meanwhile, the backend was built with Flask, chosen for its lightweight yet powerful nature, to support OCR functionality. For me, this wasn’t just another development project—it was a chance to merge my passion for technology with a meaningful solution to a common problem.

Objectives

At the heart of this project was a straightforward goal: create an app that could reliably identify text on medicine labels. I used EasyOCR, a robust open-source OCR library, as the foundation for this feature. However, this wasn’t just about getting OCR to work—it had to handle real-world variables like inconsistent fonts, multiple languages, and various lighting conditions. Beyond that, I wanted to push myself to master React Native for building smooth, dynamic user interfaces and Flask for backend API development. Another key objective was learning how to secure API communication effectively, especially when moving from development to production. Ultimately, the goal was to provide a practical, user-friendly tool while deepening my understanding of modern technologies and frameworks.

Challenges

One of the toughest parts of this project was getting EasyOCR to perform well under varying real-world conditions. Medicine labels come in all shapes and sizes, with text that isn’t always easy to read—fancy fonts, small sizes, and poor lighting all posed challenges. Another significant hurdle was managing API security. In the development phase, it was tempting to bypass certain security measures for faster iterations, but transitioning to a production-ready app meant learning how to handle SSL certificates and implement proper encryption. Additionally, designing a mobile app that worked equally well on Android and iOS without sacrificing performance or usability required meticulous attention to detail.

Overcoming Challenges

To improve OCR accuracy, I experimented with image preprocessing techniques like resizing, grayscale conversion, and noise reduction. This significantly boosted EasyOCR’s performance. For the API security concerns, I tackled them by introducing SSL certification and token-based authentication in the production environment, ensuring secure communication between the app and backend. Debugging API responses while keeping everything secure was a learning curve, but ultimately rewarding. On the mobile app side, React Native’s flexibility allowed me to refine the UI and test it rigorously to make sure it delivered a seamless experience on both major platforms. It was a process of trial and error, but each step taught me something new.

Technology Used

This project combined several powerful tools and frameworks. React Native and Expo were my go-to for building the mobile app, offering both flexibility and a great developer experience. Flask provided the backbone for the backend APIs, handling OCR integration and secure communication. EasyOCR was the star of the show, enabling the app to accurately interpret medicine labels. Supporting technologies like Gradle helped streamline the Android build process, while GitHub kept everything organized and version-controlled. Visual Studio Code was my development hub, where all the pieces came together. Each tool played a crucial role in transforming the idea into a functioning app.

Skills Learned and Demonstrated

This project pushed me out of my comfort zone and helped me grow as a developer. I became more confident in mobile app development, learning how to leverage React Native’s capabilities to build responsive and dynamic interfaces. I deepened my understanding of backend development with Flask, particularly around designing REST APIs and securing data communication. Working with OCR technology was an entirely new challenge, and I gained hands-on experience in preprocessing images to improve text recognition. Beyond technical skills, I learned the importance of debugging, iterative testing, and breaking complex problems into manageable tasks. Overall, this project was a crash course in handling real-world complexities and delivering a polished product.

Conclusion

What started as a simple idea turned into a fully functional prototype that I’m proud of. The OCR Medicine Mobile App not only recognizes text from medicine labels but also presents it in a clean, user-friendly interface. The process taught me how to bring different technologies together to solve a real-world problem. It also opened my eyes to the potential for further development—adding features like multi-language support or improving the UI to make it even more accessible. This project wasn’t just about writing code; it was about creating something meaningful and practical that can make people’s lives easier. Looking back, it’s clear how much I’ve learned and how far I’ve come.

More Projects

Events Management System

Events Management System

Explore Project
Events Tabulation System

Events Tabulation System

Explore Project