A timed end-to-end system for tracking student travel times between the library and the hostel using face recognition, a backend, a dashboard, and Arduino-based gate control.
backend/: Flask server (API, Database, Scheduler).face_recog/: Python scripts for Client Laptops (Library & Hostel).dashboard/: Streamlit dashboard for the Warden.arduino/: Arduino sketch for Gate Control.
- Python 3.10
- Arduino IDE (to upload sketch)
- Webcam
- Arduino UNO + Relay (optional, for hardware demo)
-
Clone/Download the project.
-
Install Python Dependencies: It is recommended to use a virtual environment.
# Backend pip install -r backend/requirements.txt # Face Recognition pip install -r face_recog/requirements.txt # Dashboard pip install -r dashboard/requirements.txt
-
Upload Arduino Sketch:
- Open
arduino/gate_control/gate_control.inoin Arduino IDE. - Select your Board and Port.
- Upload.
- Open
-
Create
.envfor configuration:- Create file
.envand copy the contents of.env.exampleinto it - Update as necessary
- Create file
Open a terminal:
cd backend
python app.pyServer runs on http://localhost:5000
Open a new terminal:
python -m streamlit run dashboard/app.pyDashboard opens in your browser.
Open a new terminal:
python -m face_recog.register_face- Enter name.
- Look at the camera and press 's' to save.
Open a new terminal:
python -m face_recog.library_gateOpen a new terminal:
python -m face_recog.hostel_gate- When a face is recognized, the trip starts from Library->Hostel or vice versa.
For late alerts, add NTFY_SRVR and NTFY_TOPIC in .env.
When a student exceeds the time limit, a notification is sent the to the specified ntfy URL.