ML Vision reimagines classroom attendance using AI and computer vision. Instead of roll calls or manual check-ins, the system continuously analyzes live video, recognizes students, and records attendance automatically, down to the timestamp and confidence level. The platform brings together a modern React interface, a robust Spring Boot backend, and a real-time Python vision service, delivering an intuitive and automated attendance experience for both instructors and students.
- ml-vision-frontend/ — React + Vite UI (Shadcn UI, TailwindCSS)
- ml-vision-backend/ — Spring Boot REST API + PostgreSQL
- python-vision/ — Python Flask recognizer + agent that syncs student photos and performs face matching
cd ml-vision-backend
# configure src/main/resources/application.yaml
mvn spring-boot:runcd ml-vision-frontend
npm install
npm run dev
# requires VITE_API_BASE_URL → e.g. http://localhost:8080/apicd python-vision
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
cp example.env .env # set API_BASE_URL, SESSION_ID, FRAME_SOURCE, etc.
# Flask recognizer server (frontend sends image frames)
python -m python_vision.server # http://localhost:5001/recognize
# Agent mode (continuous camera + direct attendance upload)
python -m python_vision.main --source 0 --session-id <uuid>React Frontend
|
v
Spring Boot API <-----> Postgres
|
v
Python Flask /recognize (face detection + matching)
Core flow
- Frontend captures a video frame every second.
- Frame → Python
/recognize→ returns{ externalId, confidence }. - Frontend sends batch to Spring
/api/attendance/batch. - On session end, frontend triggers
/api/attendance/mark-absentto finalize the report.
Python vision engine
- Syncs all student photos from Spring
- Generates face embeddings with
face_recognition - Matches faces and returns confidence scores
POST /api/attendance/batch?classId&sessionId&sessionStartedAtPOST /api/attendance/mark-absent?classId&sessionId&sessionStartedAtGET /api/attendance/class/{classId}GET /api/attendance/class/{classId}/today
GET/POST/PUT/DELETE /api/classesGET/POST/DELETE /api/classes/{classId}/roster/{externalId}
GET /api/studentsPOST /api/students(multipart; includes photo upload)PUT /api/students/{externalId}DELETE /api/students/{externalId}
- Live Attendance: real-time camera feed + continuous face recognition
- Students Module: add/edit students, upload or capture live photos
- Classes Module: manage rosters, track present/absent counts
- Reports: session-based summaries with CSV export
- Dashboard: today’s attendance rate + latest session activity
- Automatically syncs roster photos from Spring
- Stores images as
{externalId}.jpg /reloadrebuilds embeddings after a student is added or updated- Uses
FaceRecognizerandDeduplicatingRecognizerto avoid duplicate detections
- DB URL, username, password
spring.jackson.time-zone: America/New_York- Optional:
python.reload.url
VITE_API_BASE_URL=http://localhost:8080/api
VITE_VISION_BASE_URL=http://localhost:5001 # optional override
API_BASE_URL=http://localhost:8080/api
SESSION_ID=<uuid>
FRAME_SOURCE=0
ROSTER_DIR=python-vision/roster
- Restart the Spring server after schema or entity changes.
- Restart Python or call
/reloadafter updating student photos. - Use LAN IPs (e.g.
http://192.168.x.x) for mobile testing. - Keep student photo filenames consistent with their
externalId.




