- A desktop application.
- Upload image of backside of medicine blister packet (with label information printed).
- Detailed information about medicine and it's consumption from reliable source.
- Medicine collection from Nepalese Authority.
- Tkinter
- PaddleOCR
- SpaCy
- MySQL
- OpenCV
- Pillow
- Matplotlib
pip install -r requirements.txt
To run the notebooks locally, follow these steps:
-
Clone the repository:
git clone https://github.com/xaxm007/Minor-Project.git cd Minor-Project
-
Install the required dependencies:
Create a conda env:
conda create -n <your-environment-name>
pip install -r requirements.txt
or create conda environment
medsys
using environment.yml file.conda env create -f environment.yml
-
Setup MySQL database:
-
Install MySQL Server on your local machine and start the server.
-
Open MySQL with
--local-infile
enabled:mysql --local-infile=1 -u <your-username> -p
-
Create Database and Load CSV file:
CREATE DATABASE <your-database-name>;
USE <your-database-name>;
CREATE TABLE <your-table-name> ( ID INT PRIMARY KEY, DRUG_NAME TEXT, DOSAGE_FORM_AND_STRENGTH LONGTEXT, INDICATIONS LONGTEXT, CONTRAINDICATIONS_OR_PRECAUTIONS LONGTEXT, DOSAGE_SCHEDULE LONGTEXT, ADVERSE_EFFECTS LONGTEXT, DRUG_AND_FOOD_INTERACTIONS LONGTEXT );
SHOW tables;
DESCRIBE <your-table-name>;
LOAD DATA LOCAL INFILE '/path/to/data.csv' INTO TABLE med_info FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 ROWS;
or create database
medicine
and tablemed-info
using setup.sql file.Note: adjust the CSV file path if necessary
cd Database/sql source setup_db.sql;
or create same database as the actual implementation using database_copy.sql file.
cd Database/sql source database_copy.sql
-
-
Run Python Script:
cd GUI/tkinter-app
Note: Fill your
username
andpassword
in line181
in app.py to run the app.conda activate <your-environment-name> python app.py
Citation: If you use our code or our dataset please cite us.
@software{Medicine Label Extraction and Analysis , author = {Pokharel, A.K and Maharjan, Saksham}, month = {10}, title = {{Medicine Label NER}}, url = {https://github.com/ayyp1/Medicine-Label-analysis-NER}, version = {1.0.1}, year = {2023}