AI-powered medicine verification system that helps identify authentic pharmaceutical products and detect potential counterfeits using advanced OCR technology.
- π Advanced OCR Recognition - Extract text from medicine packaging with high accuracy
- π‘οΈ Counterfeit Detection - Identify potential fake medicines using AI comparison
- β‘ Real-time Analysis - Get instant verification results with confidence scoring
- π― Smart Matching - Intelligent fuzzy matching algorithm for best results
- π Quality Validation - Validates image quality and pharmaceutical keywords
- ποΈ Trusted Database - Comprehensive database of verified medicines
- Python 3.11+
- Node.js 18+
- npm or yarn
-
Clone the repository
git clone https://github.com/your-username/aushadhi-ocr.git cd aushadhi-ocr -
Install dependencies
npm run install:all
-
Start development servers
npm run dev
-
Access the application
- Frontend: http://localhost:5173
- Backend API: http://localhost:5001
aushadhi-ocr/
βββ backend/ # Flask API server
β βββ app.py # Main Flask application
β βββ requirements.txt # Python dependencies
β βββ Finally.csv # Medicine database
β βββ Procfile # Deployment configuration
βββ Frontend/ # React frontend
β βββ src/
β β βββ components/ # React components
β β βββ config.js # Configuration
β β βββ App.jsx # Main app component
β βββ package.json # Node dependencies
β βββ vercel.json # Vercel deployment config
βββ README.md
Create a .env file in the Frontend directory:
VITE_API_URL=http://localhost:5001For production, update with your deployed backend URL:
VITE_API_URL=https://your-backend-url.railway.app- Push to GitHub
- Connect repository to Vercel
- Set build directory to
Frontend - Add environment variable:
VITE_API_URL=https://your-backend-url.railway.app
- Connect GitHub repository to Railway
- Set root directory to
backend - Railway will auto-detect Python and install dependencies
- Deploy!
- Create two services on Render:
- Web Service for backend (Python)
- Static Site for frontend (React)
GET /
Returns system status and database information.
GET /api/stats
Returns database statistics and system information.
POST /api/verify
Content-Type: multipart/form-data
Body:
- image: (file) Medicine package image
Response:
{
"status": "success",
"match_found": true,
"confidence": 95.2,
"details": {
"brand_name": "Paracetamol",
"composition": "Paracetamol 500mg",
"id": 1
},
"extracted_text": ["Paracetamol", "500mg", "Tablet"],
"keyword_matches": ["mg", "tablet"],
"verification_notes": "Medicine verified against trusted database."
}- Barcode Verification - Scan barcodes when available
- Packaging Inspection - Check for unusual fonts, colors, or spelling errors
- Physical Appearance - Examine shape and appearance of medicines
- Batch & Expiry Check - Verify batch numbers and expiry dates match
- Price Verification - Compare with usual market prices
- Stay Safe - Always purchase from licensed pharmacies
- Upload Image - Take a photo or upload an image of your medicine package
- AI Analysis - Our AI extracts text and compares it with verified medicine database
- Get Results - Receive instant verification with confidence score and detailed information
- 588+ Medicine Records in Database
- 95% Accuracy Rate
- 24/7 Availability
- 1-2 seconds Average Response Time
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- EasyOCR for text recognition capabilities
- TheFuzz for fuzzy string matching
- React and Framer Motion for the frontend
- Flask for the backend API
- π§ Email: support@aushadhi-ocr.com
- π Issues: GitHub Issues
- π Documentation: Wiki