A comprehensive AI-powered attendance management system that uses facial recognition technology to automatically track student attendance in educational institutions.
SupVision-Venom is a dual-service architecture consisting of:
- Main Application (
supvision/) - Flask-based REST API for managing students, schedules, attendance, and user authentication - Model Server (
model_server/) - Dedicated service for face recognition processing using advanced AI models
- π― Automated Face Recognition - Uses InsightFace and FAISS for high-accuracy student identification
- π Attendance Management - Track and manage student attendance with detailed records
- π₯ Student Management - Complete CRUD operations for student data
- π Schedule Management - Class scheduling and timetable management
- π User Authentication - Secure user management with bcrypt encryption
- πΈ Image Processing - Upload and process class photos for attendance
- ποΈ MongoDB Integration - Scalable data storage with GridFS for image files
- π³ Docker Support - Easy deployment with Docker Compose
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Main App β β Model Server β β MongoDB β
β (Port 5000) βββββΊβ (Port 8000) βββββΊβ (Port 27017) β
β β β β β β
β β’ Student Mgmt β β β’ Face Analysis β β β’ Student Data β
β β’ Attendance β β β’ Recognition β β β’ Images (GridFS)β
β β’ Schedules β β β’ FAISS Index β β β’ Attendance β
β β’ Authenticationβ β β’ Image Process β β β’ Schedules β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
- Flask - Web framework
- MongoDB - Database
- PyMongo/MongoEngine - Database ODM
- GridFS - File storage for images
- InsightFace - Face analysis and recognition
- FAISS - Vector similarity search
- OpenCV - Image processing
- NumPy - Numerical computations
- Docker - Containerization
- Docker Compose - Multi-service orchestration
- Gunicorn - WSGI server
- Docker and Docker Compose
- Python 3.8+ (for local development)
- MongoDB (if running locally)
-
Clone the repository
git clone <repository-url> cd supVision-venom
-
Start all services
docker-compose up --build
-
Access the services
- Main API: http://localhost:5000
- Model Server: http://localhost:8000
- MongoDB: localhost:27017
-
Install dependencies
# Main application cd supvision pip install -r requirements.txt # Model server cd ../model_server pip install -r requirements.txt
-
Start MongoDB
# Using Docker docker run -d -p 27017:27017 --name mongo mongo:6.0 # Or install MongoDB locally
-
Run the services
# Terminal 1 - Main application cd supvision python app.py # Terminal 2 - Model server cd model_server python app.py
GET /api/v1/students- Get all studentsPOST /api/v1/students- Create studentGET /api/v1/students/<id>- Get student by IDPUT /api/v1/students/<id>- Update studentDELETE /api/v1/students/<id>- Delete student
GET /api/v1/attendance- Get attendance recordsPOST /api/v1/attendance- Create attendance recordGET /api/v1/attendance/<id>- Get attendance by ID
POST /api/v1/recognition/process- Process face recognitionPOST /api/v1/recognition/upload- Upload student imagesGET /api/v1/recognition/status- Get recognition status
POST /api/v1/images/upload- Upload imagesGET /api/v1/images/<id>- Get image by ID
POST /api/valid_face/process- Process face recognitionPOST /api/valid_face/initialize- Initialize face recognition system
POST /api/files/upload- Upload files to GridFSGET /api/files/<id>- Download file by ID
{
"name": "Ashutosh Saha",
"roll_number": "18700124043",
"email": "ashutosh.saha.cse.2024@tint.edu.in",
"phone": "9883319587",
"section": "A",
"semester": "3",
"batch": "2024",
"course": "B.Tech",
"branch": "CSE",
"face_embedding": "<binary_data>"
}{
"subject_code": "PCCCS301",
"subject_name": "Data Structure and Algorithm",
"associative_fac_id": "68c319d6ad4b6fded6908977",
"branch": "CSE",
"semester": "3",
"section": "A",
"day": "Wednesday",
"time": "09:30 AM"
}# MongoDB
MONGO_URI=mongodb://localhost:27017/venom
# Flask
FLASK_ENV=development
FLASK_APP=app.py
DEBUG=TrueThe docker-compose.yml file configures:
- MongoDB service with persistent volume
- Main application service
- Model server service
- Network connectivity between services
- Setup Students: Add student records with face embeddings
- Create Schedule: Define class schedules and subjects
- Upload Class Photos: Upload images of the class
- Process Attendance: Use face recognition to identify students
- View Reports: Access attendance records and analytics
- Image Upload: Class photos are uploaded to the system
- Face Detection: InsightFace detects faces in the images
- Feature Extraction: Face embeddings are extracted and normalized
- Matching: FAISS performs similarity search against student database
- Attendance Marking: Students are identified and marked present/absent
- Password hashing with bcrypt
- Secure file upload validation
- CORS configuration for cross-origin requests
- Input validation and sanitization
- The system uses FAISS for efficient vector similarity search
- Face embeddings are stored as binary data in MongoDB
- Images are stored using GridFS for scalability
- The model server can be scaled independently
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License.
For issues and questions:
- Check the existing issues
- Create a new issue with detailed description
- Include logs and error messages
SupVision-Venom - Making attendance management intelligent and automated! πβ¨