This document provides a comprehensive introduction to the EduVision system, an AI-powered desktop application designed for real-time campus occupancy monitoring and analytics. It covers the high-level architecture, core subsystems, and how they integrate to deliver automated people counting, data visualization, and scheduled snapshot capture.
Universities face a critical challenge: lack of comprehensive data. Without this crucial attendance data, institutions struggle to:
- Predict course demand and optimize class scheduling
- Allocate resources effectively across departments
- Identify patterns in student attendance behavior
- Make data-driven decisions about curriculum planning
- Forecast enrollment trends and capacity needs
EduVision addresses this gap by providing automated, real-time attendance tracking and analytics that enable universities to:
- Build predictive models for future course planning
- Optimize classroom utilization
- Track attendance patterns across different courses and time periods
- Generate insights for academic planning and resource allocation
- Support evidence-based decision making for faculty and administration
EduVision is a desktop application built with PyQt5 that leverages YOLOv8 for real-time people detection in campus environments. The system captures live camera feeds, processes them through a deep learning pipeline, and stores occupancy data for analytics and reporting.
| Capability | Description |
|---|---|
| Real-time Detection | Continuously processes camera feeds using YOLO to count people in rooms |
| Multi-Camera Support | Detects and switches between multiple camera devices |
| Analytics Dashboard | Visualizes occupancy trends with Matplotlib/Seaborn charts |
| Automated Snapshots | Schedules periodic data capture at hourly, daily, or custom intervals |
| Role-Based Access | Implements user authentication with bcrypt password hashing |
| Campus Mapping | Models buildings, rooms, courses, and class schedules in SQLite |
The PeopleCounter class serves as the machine learning inference layer in the EduVision computer vision pipeline. It encapsulates YOLO model initialization, frame-by-frame person detection, visual annotation, and performance monitoring.
| Responsibility | Description |
|---|---|
| Model Management | Load and maintain YOLO model instance with configurable model weights |
| Person Detection | Identify people in video frames using YOLO inference |
| Count Tracking | Maintain current person count from the most recent frame |
| Frame Annotation | Draw bounding boxes and confidence labels on detected persons |
| Performance Monitoring | Calculate and track frames per second (FPS) for performance metrics |
| Use Case | Recommended Model | Rationale |
|---|---|---|
| Initial deployment | yolov8n.pt | Pre-trained, general-purpose, no training required |
| Production campus monitoring | best.pt | Fine-tuned on campus environment, better accuracy |
| Testing/comparison | Both models | Evaluate performance difference |
Fine-tuned Model Performance:
- Accuracy: 90% at 15 epochs
- Training: Custom dataset optimized for campus environments
- Improvement: Better detection accuracy compared to base YOLOv8n model
- Note: Could be trained further for even better performance
Fine-tuning Process:
- Notebook: YOLO Person Recognition on Kaggle
- Dataset: Custom campus environment dataset
- Training: 15 epochs with 90% accuracy achieved
- Model File: Download
best.ptfrom the notebook output
Our fine-tuned model significantly outperforms the original YOLOv8n model in campus environments:
Why Our Fine-tuned Model is Better:
- Campus-Specific Training: Trained on real campus scenarios with diverse lighting, angles, and crowd densities
- Higher Accuracy: 90% accuracy vs ~75% for base YOLOv8n in campus settings
- Better Detection in Crowded Scenes: Improved performance when multiple people are present
- Optimized for Classroom Environments: Specifically tuned for typical classroom layouts and furniture
- Reduced False Positives: Better at distinguishing people from objects in educational settings
- Improved Confidence Scores: More reliable confidence thresholds for attendance tracking
Performance Metrics:
- Detection Accuracy: 90% (vs 75% base model)
- False Positive Rate: 5% (vs 15% base model)
- Processing Speed: Maintains real-time performance
- Campus Environment Accuracy: 95% in typical classroom settings
The Authentication System provides credential verification and role-based access control (RBAC) for the EduVision application. Features include:
- Password Security: bcrypt hashing for secure credential storage
- Role-Based Access: Different permission levels for users
- Session Management: Secure login/logout functionality
- Integration: Seamless connection with Login UI
This document describes the database schema for the course scheduling and room management system. The system manages users, roles, buildings, rooms, courses, class schedules, and raw occupancy data.
Defines user roles and permissions within the system.
| Column | Type | Constraints | Description |
|---|---|---|---|
| role_id | INTEGER | PRIMARY KEY AUTOINCREMENT | Unique identifier for each role |
| name | VARCHAR(45) | NOT NULL UNIQUE | Role name (e.g., Admin, Faculty, Student, Staff) |
Relationships:
- One-to-Many with
usertable
Stores user account information for system authentication and authorization.
| Column | Type | Constraints | Description |
|---|---|---|---|
| user_id | INTEGER | PRIMARY KEY AUTOINCREMENT | Unique identifier for each user |
| username | VARCHAR(100) | NOT NULL UNIQUE | User's login name |
| password | VARCHAR(300) | NOT NULL | Encrypted password for authentication |
| role_id | INTEGER | FOREIGN KEY, NOT NULL | References role table |
Relationships:
- Many-to-One with
roletable (ON DELETE RESTRICT, ON UPDATE CASCADE)
Contains information about campus buildings.
| Column | Type | Constraints | Description |
|---|---|---|---|
| building_id | INTEGER | PRIMARY KEY AUTOINCREMENT | Unique identifier for each building |
| name | VARCHAR(200) | NOT NULL UNIQUE | Building name (e.g., Smith Building, Snow Building) |
Relationships:
- One-to-Many with
roomtable
Stores details about individual rooms within buildings.
| Column | Type | Constraints | Description |
|---|---|---|---|
| room_id | INTEGER | PRIMARY KEY AUTOINCREMENT | Unique identifier for each room |
| number | VARCHAR(20) | NOT NULL | Room number within the building (e.g., "101", "Lab-210") |
| building_id | INTEGER | FOREIGN KEY, NOT NULL | References building table |
| capacity | INTEGER | CHECK(capacity > 0) | Maximum occupancy capacity of the room |
Relationships:
- Many-to-One with
buildingtable (ON DELETE RESTRICT, ON UPDATE CASCADE) - One-to-Many with
class_scheduletable - One-to-Many with
raw_datatable
Additional Constraints:
- UNIQUE constraint on (building_id, number) combination
Contains course information offered by the institution.
| Column | Type | Constraints | Description |
|---|---|---|---|
| course_id | INTEGER | PRIMARY KEY AUTOINCREMENT | Unique identifier for each course |
| course_code | VARCHAR(100) | NOT NULL UNIQUE | Official course code (e.g., CIT 111, MATH 112) |
| name | VARCHAR(100) | NOT NULL | Course name |
| instructor | VARCHAR(200) | Instructor name for the course | |
| department | VARCHAR(200) | Academic department offering the course |
Relationships:
- One-to-Many with
class_scheduletable
Manages scheduled class sessions linking courses to rooms and time slots.
| Column | Type | Constraints | Description |
|---|---|---|---|
| class_schedule_id | INTEGER | PRIMARY KEY AUTOINCREMENT | Unique identifier for each scheduled class |
| room_id | INTEGER | FOREIGN KEY, NOT NULL | References room table |
| course_id | INTEGER | FOREIGN KEY, NOT NULL | References course table |
| day_of_week | VARCHAR(1) | NOT NULL, CHECK(IN 'M','T','W','R','F') | Day when class meets (M=Monday, T=Tuesday, W=Wednesday, R=Thursday, F=Friday) |
| start_time | TIME | NOT NULL | Class start time (format: HH:MM:SS) |
| end_time | TIME | NOT NULL | Class end time (format: HH:MM:SS) |
| semester | VARCHAR(10) | NOT NULL, CHECK(IN 'Fall','Winter','Spring','Summer') | Academic term (Fall, Winter, Spring, Summer) |
| year | INTEGER | NOT NULL | Academic year (e.g., 2024, 2025) |
| start_date | DATE | Semester start date (format: YYYY-MM-DD) | |
| end_date | DATE | Semester end date (format: YYYY-MM-DD) |
Relationships:
- Many-to-One with
roomtable (ON DELETE RESTRICT, ON UPDATE CASCADE) - Many-to-One with
coursetable (ON DELETE RESTRICT, ON UPDATE CASCADE)
Additional Constraints:
- CHECK constraint: start_time < end_time
Stores raw occupancy data collected from sensors or manual counts.
| Column | Type | Constraints | Description |
|---|---|---|---|
| data_id | INTEGER | PRIMARY KEY AUTOINCREMENT | Unique identifier for each data entry |
| room_id | INTEGER | FOREIGN KEY, NOT NULL | References room table |
| room_count | INTEGER | NOT NULL, CHECK(room_count >= 0) | Number of people counted in the room |
| timestamp | DATETIME | NOT NULL, DEFAULT CURRENT_TIMESTAMP | Date and time of the data collection |
Relationships:
- Many-to-One with
roomtable (ON DELETE CASCADE, ON UPDATE CASCADE)
-
User Authentication Flow:
user→role: Each user is assigned one role that determines their permissions
-
Physical Infrastructure:
building→room: Buildings contain multiple rooms
-
Academic Scheduling:
course→class_schedule: Courses are scheduled into specific time slotsroom→class_schedule: Rooms host scheduled classes- Both course and room information combine to create the complete class schedule
-
Occupancy Tracking:
room→raw_data: Rooms have occupancy data collected over time
The automation system provides scheduled data capture and analysis capabilities:
Key Features:
- Scheduled Snapshots: Automated data collection at configurable intervals
- Data Persistence: Long-term storage of attendance patterns
- Analytics Integration: Automatic generation of attendance reports
- Flexible Scheduling: Hourly, daily, or custom interval options
EduVision provides powerful analytics capabilities to help universities make data-driven decisions:
- Real-time Attendance Tracking: Monitor class attendance as it happens
- Historical Data Analysis: Track attendance patterns over time
- Course Performance Metrics: Identify which classes have consistent attendance
- Trend Analysis: Spot patterns in student attendance behavior
- Future Course Planning: Use historical data to predict course demand
- Resource Allocation: Optimize classroom and faculty assignments
- Enrollment Forecasting: Predict which courses will be popular
- Capacity Planning: Determine optimal class sizes and scheduling
- Automated Snapshots: Capture attendance data at scheduled intervals
- Machine Learning Dataset: Build comprehensive datasets for future ML models
- Long-term Analytics: Track attendance trends across semesters and years
The EduVision project includes comprehensive testing utilities for validating computer vision functionality:
| Script | Purpose | Key Features | Usage |
|---|---|---|---|
| simple_camera_compare.py | Compare YOLOv8n vs fine-tuned models | Side-by-side detection comparison, real-time switching, confidence threshold 0.5 | Run directly from command line |
| starter.py | Test integrated people counter | Full PeopleCounter integration, camera switching, counter reset | Run directly from command line |
Both scripts operate independently of the main application and provide keyboard controls for interactive testing.
pip install -r requirements.txt# Run the main application
python main.pypyinstaller main.py --onedir --add-data "database;database" --add-data "best.pt;." --name "EduVision"Default Login Credentials:
- Username: admin2
- Password: 1234
# Test camera functionality
python testing/starter.py
# Compare models (requires best.pt)
python testing/simple_camera_compare.py- Extended Training: Train the fine-tuned model for more epochs to improve accuracy beyond 90%
- Multi-Class Detection: Expand beyond person detection to include objects like laptops, books, etc.
- Real-time Alerts: Implement notifications for unusual attendance patterns
- Mobile Integration: Develop companion mobile app for faculty
- Predictive Analytics: Build ML models to forecast attendance and enrollment
- Integration APIs: Connect with existing university systems (LMS, scheduling)
- Advanced Analytics: Implement time-series analysis for attendance trends
- Scalability: Support for multiple campuses and distributed systems
- AI Insights: Automated recommendations for course scheduling and resource allocation
- Behavioral Analysis: Study patterns in student attendance and engagement
- Optimization Algorithms: Develop algorithms for optimal class scheduling
- Predictive Modeling: Create models to predict course success based on attendance
- Resource Optimization: AI-driven recommendations for facility and faculty allocation
For detailed information about specific subsystems, refer to:
- Frontend GUI architecture: Frontend Architecture
- Computer vision and ML inference: Computer Vision System
- Data persistence and schema: Database Layer
- User authentication and RBAC: Authentication System
- Scheduled snapshot automation: Automation System
- Development workflows and testing: Development and Testing
Christian Mijangos
- Website: heychriss.com
- LinkedIn: linkedin.com/in/christianmijangos5454
- GitHub: github.com/HeyChriss
- Computer Vision & ML Engineering
Roger Galan
- Website: rawwyurr.web.app
- LinkedIn: linkedin.com/feed
- GitHub: github.com/roger18gm
- Full-Stack Development & System Architecture
Vinnicius Castro
- GitHub: github.com/vinniciuscastro
- LinkedIn: linkedin.com/in/vinnicius-castro
- Database and Data Management
We welcome contributions to improve EduVision's capabilities in campus analytics and predictive modeling. Areas of particular interest include:
- Enhanced computer vision models
- Advanced analytics algorithms
- User interface improvements
- Integration with university systems
- Performance optimization
EduVision: Transforming campus data into actionable insights for the future of education.




