This project provides a full suite software setup for every logistic task involving examination centres- starting from Image capture/verification Kiosks, candidate ID checks, Impersonation Checks using OCR and Computer Vision, along with Biometric Auditing, Hall-Ticket Generation, Exam Centre Allocation and Candidate Report Detail PDF Generation.
Automated examination centre operations platform with real-time candidate verification, aadhar/pan/hall-ticket OCR processing, live facial biometric capture, and comprehensive audit trails. Combines computer vision preprocessing, deep learning face matching, fuzzy similarity algorithms, and centralized dashboards for efficient, fraud/impersonation proof setup, This project eliminates the time-consuming manual verification processes and reduces impersonation fraud through biometric validation.
- Backend: Python, Flask
- Database: SQLite with SQLAlchemy ORM
- Computer Vision: OpenCV (cv2)
- OCR: Tesseract (pytesseract)
- Image Processing: Pillow (PIL)
- Text Matching: RapidFuzz (fuzzy string matching)
- PDF (Hallpass) Generation: Html, xhtml2pdf
- Image Embedding/Quality Processing: numpy, base64
Candidate Face Verification/Live web camera capture/ OCR and ID verification kiosk + Computer vision pipeline
Traditional examination centre entry procedures involve extensive manual checks of identity documents and hall tickets, leading to:
- Long queues and significant delays
- Human errors in verification
- Difficulty handling large volumes of candidates
- Increased risk of malpractice due to inadequate scrutiny
- π Automated OCR Text Extraction: Extracts candidate information from hall tickets, Aadhaar cards, and other ID documents using Tesseract OCR
- π€ Facial Recognition: Compares live candidate photos with reference images stored in the database
- π Real-time Verification Dashboard: Web-based interface for managing candidate records and verification status
- ποΈ Centralized Database: SQLite-based storage for candidate records, verification attempts, and audit logs
- π Secure & Audit-Friendly: All verification attempts are logged with timestamps for traceability
- β‘ Fast Processing: Reduces verification time from minutes to seconds per candidate
- π― Fuzzy Matching: Handles OCR errors using similarity metrics (RapidFuzz/Levenshtein) for robust text matching
The system follows a multi-stage verification pipeline:
- Image Capture: ID documents and live photos captured via camera/webcam
- Preprocessing: Image enhancement, denoising, and preparation using OpenCV
- Text Extraction: OCR engine extracts text from preprocessed ID images
- Data Normalization: Fuzzy text correction handles spelling errors and formatting
- Facial Recognition: Features extracted from live photo and compared with stored data
- Database Verification: Cross-references extracted data with SQLite records
- Decision & Logging: Returns ACCEPTED/REJECTED status with audit trail
This guide covers how to set up, configure, and run the mod1 application.
- Python 3.8 or higher
- PowerShell Terminal on VS Code
- SQLite3
Install all dependencies using pip:
pip install flask sqlalchemy pytesseract pillow opencv-python rapidfuzzOr use the requirements file:
pip install -r requirements.txtIf you encounter execution policy restrictions on Windows, run:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypassgit clone https://github.com/biga-codes/mod1.git
cd mod1pip install https://github.com/Gourieff/Assets/raw/main/Insightface/insightface-0.7.3-cp313-cp313-win_amd64.whl
pip install -r requirements.txtInitialize the local SQLite databases from the root directory before the first run:
python website/create_db2.py
python website/create_verify_db.py
python website/migrate_verify_db.pyThis creates:
*.db- Local SQLite instances storing verification records and user data
# Navigate into the website folder
cd website
# Launch the Flask server
python app.py- Access the UI at: http://127.0.0.1:5000/
- The application runs on port 5000 by default
| File/Folder | Description |
|---|---|
website/app.py |
Main Flask entry point and API route definitions |
website/templates/ |
Jinja2 templates for the Home, Candidate, and Report views |
website/static/ |
Contains the futuristic CSS style.css and local assets |
uploads/ocr/ |
Storage for sensitive candidate documents |
*.db |
Local SQLite instances storing verification records and user data |
-
Navigate to the website directory:
cd website -
Start the application:
python app.py
-
Open your browser and navigate to:
http://127.0.0.1:5000/ -
Test the following features:
- Home page loads correctly
- Candidate verification functionality
- Document upload and OCR processing
- Report generation
You can test the API endpoints using tools like:
- cURL
- Postman
- HTTPie
Example:
curl http://127.0.0.1:5000/api/endpoint1. Module Not Found Error
ModuleNotFoundError: No module named 'flask'
Solution: Install dependencies:
pip install flask sqlalchemy pytesseract pillow opencv-python rapidfuzz2. Template Not Found Error
TemplateNotFoundError: template.html
Solution: Make sure you're running python app.py from the website/ directory:
cd website
python app.py3. Database Error
sqlite3.OperationalError: no such table
Solution: Initialize databases from the root directory:
cd .. # Go back to root
python website/create_db.py
python website/create_verify_db.py4. Port Already in Use
OSError: [Errno 48] Address already in use
Solution: Kill the process using port 5000 or change the port in app.py
- Ensure proper access controls are in place for production deployments
- Never commit sensitive documents or database files to version control
- Make changes to the code
- Navigate to website directory:
cd website - Run the application:
python app.py - Test your changes in the browser
- Stop the server: Press
Ctrl+C
- Flask Documentation: https://flask.palletsprojects.com/
- SQLAlchemy Documentation: https://docs.sqlalchemy.org/
- Tesseract OCR: https://github.com/tesseract-ocr/tesseract
For issues or questions, please open an issue on the GitHub repository: https://github.com/biga-codes/mod1/issues