Inspiration

Counterfeit medicines are a growing global health crisis — the WHO estimates that 1 in 10 medical products in low- and middle-income countries is substandard or falsified. We wanted to build a tool that lets anyone verify their medicine's authenticity using just a smartphone photo.

What it does

Medicine Authenticity Checker is a multi-agent AI system that inspects a photo of a medicine strip or box and flags possible counterfeit or expired stock. It runs four specialized agents in sequence:

  1. OCR Agent — extracts drug name, manufacturer, batch number, and expiry date from the image using vision LLMs
  2. Compliance Agent — checks expiry validity, fuzzy-matches the manufacturer against a verified database, and validates batch number format
  3. Visual Forensics Agent — independently inspects the same photo for print-quality and packaging anomalies
  4. Report Agent — combines all findings into a single risk verdict: Safe, Caution, or High Risk

How we built it

  • Backend: Python + FastAPI orchestrating four agents, each powered by Groq's fast LLM inference API
  • Frontend: A single-page HTML/CSS/JS interface with a two-column card layout for uploading photos and viewing results
  • Compliance Database: CSV-based manufacturer registry with fuzzy string matching and regex-based batch format validation
  • Architecture: Pipeline pattern — each agent processes independently, and the Report Agent aggregates everything into a user-friendly verdict

Challenges we ran into

  • OCR accuracy on foil strips — glossy, curved medicine strips are difficult for vision models. Lighting and angle matter a lot.
  • Manufacturer name variations — the name printed on a strip (e.g., "Alkem Health Science") often differs from the registered corporate name ("Alkem Laboratories"). We solved this with alias matching and substring containment checks.
  • Batch format data — real manufacturer batch-numbering formats aren't publicly documented. Our patterns are demo placeholders — we've clearly labeled this in the project.

What we learned

  • Multi-agent architectures are powerful for breaking complex verification into specialized, independently testable steps
  • Fuzzy matching with confidence thresholds is more honest than binary pass/fail for real-world OCR data
  • Being transparent about limitations (like the demo compliance database) builds more trust than overpromising

What's next

  • Expand the manufacturer database with verified real-world batch patterns
  • Add a mobile-optimized camera capture flow for on-the-spot verification
  • Integrate with public drug registry APIs (like India's CDSCO) for live manufacturer verification

Built With

Share this project:

Updates

Submission history