MedsRecognition is a Django-based application designed to extract text from uploaded images using EasyOCR and identify active ingredients in medications by querying public APIs such as RxNav and OpenFDA. The application also integrates with Supabase for efficient data storage and management.
⚠️ Note: This project is a work in progress. Some features may not yet be fully implemented or finalized.
- Upload images to extract text seamlessly.
- Supports multiple image formats (e.g., JPEG, PNG).
- Utilizes EasyOCR for highly accurate text recognition.
- Matches recognized text with active ingredients using RxNav and OpenFDA APIs.
- Integrates with Supabase for centralized storage and data management.
- Python 3.8+
- Pip (Python package manager)
- Supabase account and project configuration
-
Clone the Repository:
git clone https://github.com/SPerekrestova/MedsRecognition.git cd MedsRecognition
-
Install Dependencies:
pip install -r requirements.txt
-
Set Up Supabase:
- Create a Supabase project here.
- Note your API key and project URL from the Supabase dashboard.
- Add these values to your
.env
file:SUPABASE_URL=<your-supabase-url> SUPABASE_API_KEY=<your-supabase-api-key>
-
Apply Migrations (if applicable):
python manage.py migrate
-
Run the Django Server:
python manage.py runserver
- Users upload images containing text via the web interface. Supported formats include JPEG, PNG, and more.
- The uploaded image is processed using EasyOCR, which extracts text with support for multiple languages.
- Extracted text is matched against a list of active ingredients fetched in real-time using the RxNav API and OpenFDA API.
- Recognized text, extracted active ingredients, and associated metadata are securely stored in a Supabase database.
- This allows for centralized data management and retrieval for analytics or future use.
- Matched active ingredients are displayed in a user-friendly interface, allowing for easy review and further use.
-
RxNav API:
- Provides a comprehensive database of active ingredients in medications.
- Official documentation: RxNav API.
-
OpenFDA API:
- Offers access to FDA drug, device, and food databases for additional validation and matching.
- Official documentation: OpenFDA API.
- Supabase is used to store:
- Uploaded image metadata
- Recognized text
- Matched active ingredients
- User interaction history (optional)
- Learn more: Supabase Documentation.
-
Start the Django server:
python manage.py runserver
-
Open your web browser and navigate to:
http://localhost:8000/
-
Upload an image containing text.
-
View the extracted text, matched active ingredients, and metadata.
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.
Author: Svetlana Perekrestova
Email: [email protected]
Feel free to reach out with questions, suggestions, or feedback!