Skip to content

Ritwick2023/Aushadhi

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

20 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ₯ Aushadhi-OCR v2.0.0

AI-powered medicine verification system that helps identify authentic pharmaceutical products and detect potential counterfeits using advanced OCR technology.

Version License Python React

✨ Features

  • πŸ” 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

πŸš€ Quick Start

Prerequisites

  • Python 3.11+
  • Node.js 18+
  • npm or yarn

Installation

  1. Clone the repository

    git clone https://github.com/your-username/aushadhi-ocr.git
    cd aushadhi-ocr
  2. Install dependencies

    npm run install:all
  3. Start development servers

    npm run dev
  4. Access the application

πŸ—οΈ Project Structure

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

πŸ”§ Configuration

Environment Variables

Create a .env file in the Frontend directory:

VITE_API_URL=http://localhost:5001

For production, update with your deployed backend URL:

VITE_API_URL=https://your-backend-url.railway.app

πŸš€ Deployment

Option 1: Vercel + Railway (Recommended)

Frontend (Vercel)

  1. Push to GitHub
  2. Connect repository to Vercel
  3. Set build directory to Frontend
  4. Add environment variable: VITE_API_URL=https://your-backend-url.railway.app

Backend (Railway)

  1. Connect GitHub repository to Railway
  2. Set root directory to backend
  3. Railway will auto-detect Python and install dependencies
  4. Deploy!

Option 2: All-in-One (Render)

  1. Create two services on Render:
    • Web Service for backend (Python)
    • Static Site for frontend (React)

πŸ“Š API Endpoints

Health Check

GET /

Returns system status and database information.

Get Statistics

GET /api/stats

Returns database statistics and system information.

Verify Medicine

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."
}

πŸ›‘οΈ Safety Guidelines

  1. Barcode Verification - Scan barcodes when available
  2. Packaging Inspection - Check for unusual fonts, colors, or spelling errors
  3. Physical Appearance - Examine shape and appearance of medicines
  4. Batch & Expiry Check - Verify batch numbers and expiry dates match
  5. Price Verification - Compare with usual market prices
  6. Stay Safe - Always purchase from licensed pharmacies

πŸ”¬ How It Works

  1. Upload Image - Take a photo or upload an image of your medicine package
  2. AI Analysis - Our AI extracts text and compares it with verified medicine database
  3. Get Results - Receive instant verification with confidence score and detailed information

πŸ“ˆ Performance

  • 588+ Medicine Records in Database
  • 95% Accuracy Rate
  • 24/7 Availability
  • 1-2 seconds Average Response Time

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • EasyOCR for text recognition capabilities
  • TheFuzz for fuzzy string matching
  • React and Framer Motion for the frontend
  • Flask for the backend API

πŸ“ž Support


⚠️ Disclaimer: This tool is for informational purposes only. Always consult healthcare professionals for medical advice and purchase medicines from licensed pharmacies.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 67.4%
  • Python 15.8%
  • CSS 8.7%
  • Shell 7.5%
  • Other 0.6%