Eye-X is a distributed attendance and behavioral analytics system designed for educational environments. By leveraging an "Edge-First" architecture, the system performs computationally intensive tasks (face detection and pose estimation) on client devices (smartphones and laptops), significantly reducing server bandwidth requirements and latency.
High-performance WebSocket protocols and Peer-to-Peer (WebRTC) streaming enable real-time monitoring with sub-200ms latency, offering a substantial improvement over traditional RTMP-based solutions.
- Distributed Processing: Facial recognition and behavior logic are decentralized to edge nodes, reducing server load by 95%.
- Real-Time Analytics: Instant feedback on class attendance and student engagement levels (Attentive/Distracted/Sleeping).
- Deterministic AI: Uses a mathematical Head Pose state machine (Yaw/Pitch/Roll) rather than "black box" deep learning for behavior classification, ensuring explainability.
- Security: Implementation of DTLS-SRTP for video encryption and AES-256 for data storage.
- Scalability: Time-series database architecture allows for efficient logging of high-frequency events.
The system operates on a hybrid Client-Server model:
- Signaling Server (Python/FastAPI): Manages WebSocket connections and WebRTC handshakes (SDP Exchange).
- Edge Nodes (Cameras): Mobile devices (Android/iOS) running the capture client. They perform H.264 encoding and hardware-accelerated stream transmission.
- Dashboard Client: The administrative interface that renders video streams, overlays AI metadata, and enables export of attendance reports.
EYE_X/
├── database/ # MongoDB connection and schema definitions
│ └── mongodb.py # Async motor client wrapper
├── services/ # Core business logic
│ ├── behavior_detector.py # Head pose estimation logic
│ └── face_recognition.py # YuNet inference engine
├── static/ # Frontend assets (CSS, JS, Images)
├── templates/ # Jinja2 HTML templates
│ ├── dashboard_new.html # Main admin console
│ └── project_details.html # Engineering documentation
├── app.py # Application entry point (Routes & Sockets)
├── config.py # Environment configuration
└── requirements.txt # Python dependencies
- Python 3.9 or higher
- MongoDB instance (Local or Atlas)
- Webcam (for testing)
-
Clone the Repository
git clone https://github.com/jeet2005/eyeX.git cd eyeX -
Environment Setup
python -m venv venv # Windows .\venv\Scripts\activate # Linux/MacOS source venv/bin/activate
-
Install Dependencies
pip install -r requirements.txt
-
Download AI Models The system requires the YuNet face detection model.
python download_models.py
The application uses a config.py file for settings. You can override these using environment variables.
| Variable | Default | Description |
|---|---|---|
PORT |
8000 | The HTTP/WebSocket port. |
MONGODB_URL |
mongodb://localhost:27017 | Database connection string. |
DEBUG |
True | Enable debug logging. |
The system exposes several REST endpoints for integration:
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/stats |
Returns real-time system metrics. |
GET |
/api/export/daily |
Downloads daily attendance CSV. |
GET |
/api/students |
Lists enrolled student metadata. |
This project is licensed under the MIT License. See the LICENSE file for details.
© 2026 Eye-X Engineering Team.