Invoice Anomaly Detection & Vendor Fraud Analysis System
InvoiceShield is an end-to-end system for processing invoices, detecting anomalies, and analyzing vendor risk using OCR, rule-based logic, and machine learning. It provides a usable dashboard for analytics, fraud scoring, and audit-ready reporting.
- Invoice upload (PDF / PNG / JPG)
- OCR-based text extraction (EasyOCR)
- Rule-based + ML anomaly detection
- Vendor behavior clustering (DBSCAN)
- Fraud risk scoring with explanations
- Interactive Streamlit dashboard
- Downloadable PDF invoice reports
- FastAPI backend with Swagger UI
- OCR converts invoices into structured text
- Rules + ML models flag anomalous invoices
- DBSCAN clustering groups vendors by behavior and identifies outliers
- Fraud score (0β100) summarizes invoice risk with explainable reasons
- Results are stored and visualized through a dashboard
InvoiceShield/
βββ src/
β βββ api/
β β βββ main.py
β βββ ocr/
β βββ parser/
β βββ rules/
β βββ fraud/
β βββ reports/
β βββ db/
βββ dashboard/
β βββ app.py
βββ invoices.db
βββ requirements.txt
βββ README.md