How vardanagarwal/proctoring-ai works
Project Type and Purpose
• The project is an automated proctoring system designed to monitor exam-takers through both the webcam (vision) and microphone (audio).
• Vision functionalities include eye tracking, mouth opening detection, face detection and landmarks, head pose estimation, person and mobile phone detection, as well as face spoofing.
• The audio module records speech via the microphone, converts it to text (using Google’s speech recognition API), and then applies NLP (using NLTK) to compare with an exam script.
• The README clearly emphasizes both vision and audio pipelines along with usage instructions, prerequisites, and performance metrics (FPS).
File Structure
• Notice file-level separation: There are standalone scripts (e.g., main.py, audio_part.py) and directories such as face_detection, eye_tracking, and models.
• The “face_detection” directory contains various detection models (dlib, dnn, haar, mtcnn, etc.), indicating that different approaches for face detection are available.
• The “eye_tracking” folder contains a separate README, CSV or video files for testing, and sample outputs.
• The “coco models” folder contains TensorFlow Lite models for detection (used for person and mobile phone detection).
• There are dedicated scripts for head pose estimation, face spoofing, and mouth opening detection, hinting that each functionality has been decoupled into a separate module.
• Configuration files are provided (such as requirements.txt) to set up the environment.
Main Components of the System
a. Input Devices:
• Webcam (providing video stream)
• Microphone (providing audio stream)
b. Vision Pipeline:
• Face Detection Module (e.g., face_detector.py and models in face_detection and models directories)
• Eye Tracking Module (e.g., eye_tracker.py inside eye_tracking directory)
• Facial Landmarks Detection (implemented in face_landmarks.py)
• Mouth Opening Detection (mouth_opening_detector.py)
• Head Pose Estimation (head_pose_estimation.py)
• Person Counting & Mobile Phone Detection (person_and_phone.py using models like YOLOv3 and TFLite models)
• Face Spoofing Detection (face_spoofing.py)
c. Audio Pipeline:
• Audio Capture and Speech-to-Text Service (handled in audio_part.py using libraries like pyaudio and speech_recognition)
• Text Processing and Comparison (using NLTK to process and compare exam content)
d. Integration & Coordination:
• The main entry point (main.py) which likely coordinates data intake and bridges between the vision and audio components.
Relationships and Data Flows
• Input from the webcam is sent to multiple parallel vision modules:
– A face detection module that feeds the face landmarks detection, eye tracking, and head pose modules.
– Other vision modules operate on the same video feed to detect mouth opening or count persons/mobile devices.
• Audio input is streamed to the speech recognition module, which outputs text that gets processed by NLP functions to compare with an exam script.
• There is potential integration in the main control script (main.py) that aggregates outputs from the different modules and possibly logs or reports the candidate’s status.
Architectural Patterns and Design Principles
• Modular Design: Each functionality (e.g., eye tracking, face detection, audio transcription) is implemented in its own module—which makes the system easier to maintain, test, and extend.
• Separation of Concerns: Clear division between vision and audio pipelines ensures that changes in one part won’t affect the other.
• Extensibility: With directories for different models (various face detection approaches) and clear "to do" items, the design allows easy replacement or enhancements.
• Parallel Processing: Consideration is given to using multithreading (as noted in the audio component) so that the recording thread does not block continuous processing.
Final Recommendations
• Modularity, clarity of data flow, and the separation between vision and audio pipelines.
• The main driver (main.py) should be highlighted to show integration.