GithubHelp home page GithubHelp logo

woonyee28 / project-ases Goto Github PK

View Code? Open in Web Editor NEW

This project forked from neo-zenith/ases-automated-student-engagement-system

0.0 0.0 0.0 69.17 MB

A hackathon project which aims to build an application which is capable of detecting engagement level of students based on eye aspect ratio (EAR).

License: BSD 3-Clause "New" or "Revised" License

Python 77.96% PowerShell 0.80% HTML 20.19% Batchfile 1.05%

project-ases's Introduction

Project aSESTM: Automated Student Engagement System

ases-banner

๐Ÿ—บ๏ธ Background

"The Smart Nation is an initiative by the Government of Singapore to harness Infocomm technologies, networks and big data to create tech-enabled solutions."

In this Hackathon, we aim to develop AI models that help to solve industrial or social problems in the new stage of social development.

In line with the seven National AI Projects that address Key Challenges in Singapore, we decided to focus on the Education section. Our objective is to provide personalised education for students by enhancing the learning experience for both teachers and students.

A study showed that 64% of students struggle to maintain focus and discipline over online learning. Due to the Covid Pandemic, the trend of class settings shift to online mode aligning with the advancement of technology. While students trying to adapt to the new learning style, teachers are also struggling to track the level of engagement of all students.

If teachers knew how engaged and focused their students are in class, they can improve their teaching methods by:

  • Adjusting their teaching pace
  • Putting more emphasis on harder topics

โ“ Problem Statement

How might we harness AI to help teachers determine the level of engagement of students in online learning?

๐Ÿ’ก Solution

A computer-vision based system that tracks students level of engagement in real-time during an online class session.

Comparing to traditional image processing method which is complex and required certqain combination of models training, our solution using Eye Aspect Ratio (EAR) which is more more elegant, efficient and easy to implement* as it just requires simple calculation based on the ratio of distances between Facial Landmarks of eyes.

โšก Technology of Our Solution

(A) Method:

  • OpenCV with dlib as our main machine learning libraries.
  • Detect face using "HOG-based" face detector from dlib
  • Predict Facial Landmarks using dlib and obtain Facial Landmarks index for both eyes using module face_utils
  • Live video streamming through USB/webcam/Raspberry Pi camera using module VideoStream in library imutils

Note: As our project requires datasets of people's images (which are mostly inaccessible to protect privacy), we resort to using pre-trained model in dlib and imutils to detect face and predict Facial Landmarks.

(B) Calculation of Eye Aspect Ratio (EAR):

  • The 2D facial landmark locations of each eye is represented by 6 $(x,y)$-coordinates starting from the left-corner of eyes (from the perspective of 3rd party), and ploting it clockwise evenly for the remaining region.

The Eye Aspect Ratio (EAR) equation: $$EAR = \frac{\parallel{p_2-p_6}\parallel + \parallel{p_3-p_5}\parallel}{2||p_1-p_4||}$$

  • Numerator: Distance between the vertical eye landmarks
  • Denominator: Distance between the horizontal eye landmarks (tiwce the Denominator because there is only one set of horizontal points but two sets of vertical points)
  • Eyes open: $\text{EAR} \approx \text{constant}$
    Eyes closed: $\text{EAR} = 0$
  • For the first 5 seconds, we calibrate the average of EAR of the student.
  • Sets a threshold of 90% of average EAR to signify closed eyes.

(C) API:

  • Storing and querying of student's engagement level is done using API built under Django's REST framework
  • Data is stored on an SQLite database.

(D) Interface:

  • Student-side interface is built using streamlit.
  • Professor-side interface is built using Django's template engine.

๐Ÿ‘จโ€๐ŸŽ“ How It Works for Students

Key in relevant info via Welcome to aSES page, the system can be run on the students devices via USB/webcame/Raspberry Pi camera and track their engagements during online classes. image

  • The videos are not being recorded, only data such as Engagement of student in binary form will be saved into database

  • After class, the results will be uploaded to cloud database.

  • Based on Eye Aspect Ratio measurement and face detection

    • The student is categorised as engaged or disengaged every second based on their eye movements image

    • Disengaged โ€”โ€” when the studentโ€™s face is undetected OR their eyes are closed/ partially closed for a fixed period of time (2 seconds). image

๐Ÿ‘จโ€๐Ÿซ How It Works for Professor

Receive information regarding student engagement via Automated Student Engagement System (aSES) , where they get feedback on the amount of time students spent disengaged and the engagement level over time by querying their names, course, module, group.

  • Category:
    • Individual student (by querying the student's matriculation number)
    • The entire class (by leaving matriculation number section blank)

image image

๐Ÿšซ Challenges

  • Cloud-based database is not free for this Hackathon.
  • Public datasets specific to our project's aim is not accessible due to privacy concerns.

๐Ÿฅ‡ Accomplishments

  • Successfully developed a computer-vision based AI model under 72 hours using OpenCV and dlib.
  • Successfully developed a simple fullstack application for our system using Django and JavaScript.

๐Ÿ”ฎ Future Ahead

  • Eye detection algorithm can be improved for greater accuracy
  • Presentation of live statistic to teachers when class ongoing, and use AI for recommendation on how teachers should react
  • Dependencies can be built into a client program for easier installation
  • Solution can be expanded to include facial recognition with multiple users in the field of vision
    • Applicable to in-person learning in lecture theatres/ classrooms
  • Solution can be applied in other fields such as transportation (tracking driver's attention), media (advertising) and medical industry (research on attention-related disorders).

๐Ÿ’ผ Business Impact

Our project is built entirely on open-source libraries, frameworks, and languages. The most common benefit of open source software is cost saving; it implies that we are not obligated to pay for the use of software, making our project's overall budget cost extremely low. The quality of open-source projects is high, too, because the community is constantly improving the software. To inherit the excellent trait of an open-source project, we have decided to release our project as open source to allow other people to build on top of our project and constantly improve it until one day we receive enough funding from angel investors. After receiving the grant, we will turn the project into private, hire sophisticated software programmers to improve on top of the base, then release the product on a subscription basis for the general public.

As a student, we solve problems in our daily lives, so we came up with the idea of tracking the engagement status of students in class. With aSES, we allow the professor to receive student engagement reports so that they will get feedback on the number of time students spent disengaged. However, on second thought, we think our project will benefit the student community and the general public. For example, detecting the engagement status of a bus driver on a long ride to ensures the passenger's safety.

๐Ÿ–Š๏ธ Authors

โญ Acknowledgements

  • This project uses Django which is licensed under BSD-3 license for all backend programming logic and frontend template rendering.
  • This project uses Charts.js which is licensed under MIT license for the visual display of charts on frontend.
  • This project uses OpenCV which is licensed under Apache 2 license for the machine learning logic.

๐Ÿ“– Reference

Below are some links that we have used as references throughout the project:


๐Ÿ’ฅ How to Use

  1. Begin by cloning this repository to your working directory:
git clone https://github.com/Neo-Zenith/MLDA-Deep-Learning-Week.git
  1. Run setup.bat. This will install Python virtual environment and all the dependcies required.

    • Note that installation of dlib will take some time. It is normal that your CPU and/or RAM usage will spike to 100% during this period.
  2. Run server.bat to initialize the server.

  3. Run client.bat to initialize the client application.

project-ases's People

Contributors

neo-zenith avatar woonyee28 avatar danieltantwofficial avatar perfectsquare123 avatar wph12 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.