How krishnakumaragrawal/artificial-intelligence-based-online-exam-proctoring-system works
Project Type and Purpose
• This is a full-stack, AI-powered online exam proctoring system built as a monolithic Flask application in Python.
• Purpose: Monitor test-takers in real time via computer-vision and audio modules, detect suspicious behavior (face, eyes, mouth, head pose, object movements, audio anomalies), log all activity to “activity.txt,” and store summary/session data in an SQL database.
File Structure Analysis
• Top-level scripts (app.py, server.py, main.py, temp.py) – entry points and orchestration logic.
• backend/ – database schema (database.sql) and helper (db_helper.py).
• detection modules at root (blink_detection.py, eye_tracker.py, mouth_tracking.py, head_pose_estimation.py, facial_detections.py, object_detection.py, audio_detection.py).
• object_detection_model/ – YOLO configs, weights, labels.
• shape_predictor_model/ – Dlib’s face landmarks model.
• static/ & templates/ – frontend (HTML, CSS, JS) for the exam UI.
• activity.txt – runtime log of all detection events.
README Insights
• Confirms technologies: Python, OpenCV, Dlib, PyAudio, Flask, HTML/CSS/JS, SQL.
• Lists key features aligning to modules in code.
a. Main Components
• User’s Browser (UI)
• Flask Application Server
• Detection Modules (face, eyes, mouth, blink, head, audio, object)
• Machine-Learning Models (Dlib shape_predictor, YOLO configs & weights)
• Database (SQL)
• Activity Log File
• External Devices (Webcam, Microphone)
b. Relationships & Interactions
1. Browser ↔ Flask Server (HTTPS requests for login, quiz pages, real-time video/audio streams)
2. Server invokes appropriate detection module(s) per frame/audio chunk
3. Detection modules load ML models and process streams from Webcam/Microphone
4. Detection results → Server → persisted to Database & appended to activity.txt
5. Server sends alerts or flags back to UI (optional real-time feedback)
c. Architectural Patterns / Design Principles
• MVC-style: Templates (View), server routes/controllers (Controller), backend/db (Model)
• Modular design: each detection as separate Python module
• Single monolith vs microservices: monolithic for simplicity
d. Key Technologies & Frameworks
• Flask: HTTP server, routing, template rendering
• OpenCV & Dlib: image processing, facial landmarks
• YOLO (via object_detection_model): object detection
• PyAudio & Winsound: audio capture & event signaling
• SQLite/MySQL (backend/database.sql) via db_helper.py
• HTML/CSS/JS: client-side quiz interface