{"id":5396,"date":"2021-03-31T02:39:02","date_gmt":"2021-03-31T00:39:02","guid":{"rendered":"https:\/\/blogs.mathworks.com\/student-lounge\/?p=5396"},"modified":"2021-04-08T22:30:35","modified_gmt":"2021-04-08T20:30:35","slug":"read-the-room-hacks-for-the-virtual-classroom","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/student-lounge\/2021\/03\/31\/read-the-room-hacks-for-the-virtual-classroom\/","title":{"rendered":"Read the Room &#8211; Hacks for the Virtual Classroom"},"content":{"rendered":"<div class=\"rtcContent\">\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><span style=\"font-style: italic;\">This past year has brought about some fundamental changes in the way education is imparted &#8211; video calls, online group projects, funky virtual backgrounds, not being able to catch up on that extra sleep because you spent the previous night watching cat videos on YouTube, to name a few. In today&#8217;s post, I am pleased to introduce the overall winners of <a href=\"https:\/\/newhacks2020.devpost.com\/\">IEEE of University of Toronto&#8217;s NewHacks 2020<\/a>. NewHacks is an official <a href=\"https:\/\/mlh.io\/\">Major League Hacking (MLH)<\/a> event targeted towards participants with little or no hacking experience. The theme at the hackathon this year was Digital Education and Life Convenience. Our guest bloggers &#8211; <a href=\"https:\/\/www.linkedin.com\/in\/mark-halka-7332ba1ab\/\">Mark Halka<\/a>, <a href=\"https:\/\/www.linkedin.com\/in\/emily-xinyi-chen\/\">Emily Chen<\/a>, <a href=\"https:\/\/www.linkedin.com\/in\/minnie-menezes\/\">Minnie Menezes<\/a>, and <a href=\"https:\/\/www.linkedin.com\/in\/alaa-hatoum-mechanical-engineering\/\">Alaa Hatoum<\/a> will talk about their digital education hack designed to help educators and students improve their experience in the virtual, socially distant classroom of 2020\/2021, over to our guests&#8230;<\/span><\/div>\n<\/div>\n<div><\/div>\n<div class=\"rtcContent\">\n<div><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-5408\" src=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2021\/03\/all-1024x422.jpg\" alt=\"\" width=\"871\" height=\"359\" \/><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">&#8212;<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Online education has become an increasingly important topic in the wake of COVID-19. It was our team&#8217;s mission to help solve some key issues with this new shift towards online learning.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><\/div>\n<h1>Inspiration<\/h1>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Have you ever been in an online lecture and became lost or confused about what the instructor was saying? Traditionally, instructors could look around the classroom and gauge how the class feels about the presented material. For example, the instructor may notice if students are confused and change their presentation on the fly, perhaps explaining a concept in a little more detail or perhaps not explaining a concept if they notice most people understand. This process is called &#8220;reading the room&#8221; and this is the concept which we aim to bring into online education. The problem is clear, a professor simply cannot look at over 50 tiny screens (on a Zoom call for example) to perceive how their class feels about the material in the same way they would in a real-life classroom.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><\/div>\n<h1>Breaking down the problem<\/h1>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Our idea was to use computer vision and machine learning techniques to figure out how each student feels about the material, then convey that information in an easy-to-understand format for the instructor. We do this by passing each student&#8217;s video feed first to a computer vision algorithm to identify faces and then use the extracted features to a machine learning algorithm, which can use their facial expressions to figure out if they are engaged or not. It then calculates the percentage of the class that is engaged and presents that information in a variety of easy to understand plots to the instructor.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><\/div>\n<h1>How did we implement it?<\/h1>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">We decided to implement the machine learning algorithm using MATLAB and create the front end in Unity. All the members of our team, including Emily, who implemented the machine learning algorithm, had very little experience with MATLAB. However, we found the MATLAB toolboxes to be very easy to understand and use. Within a few hours, we already had a fully working prototype. The toolboxes allowed us to think about the problem at a higher level, instead of worrying about the nitty-gritty of each machine learning algorithm. Below we introduce some key lines of code we used in our algorithm, as well as the toolboxes we used should anyone wish to experiment around with them.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Using the Deep Learning Toolbox, we selected a pre-trained model called Squeeze Net and modified its layers and parameters a bit to fit the needs of our data. We then fed the network our dataset &#8211; lots of images of faces that were labelled &#8220;distracted&#8221; or &#8220;focused&#8221; &#8211; and the network taught itself how to distinguish between two. Once the network has finished training, we exported it as an ONNX file\/net so it can be reused, and we imported it to our main script using the first line of the code shown below.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><\/div>\n<div style=\"background-color: #f7f7f7; margin: 10px 0 10px 0;\">\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 1px solid #e9e9e9; border-bottom: 0px none #000000; border-radius: 4px 4px 0px 0px; padding: 6px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"><span style=\"color: #028009;\">% Importing a pre-trained network from the Deep Learning Toolbox is that easy!<\/span><\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">trainedNetwork_1 = importONNXNetwork(<span style=\"color: #aa04f9;\">&#8220;trainedNetwork_1.onnx&#8221;<\/span>, <span style=\"color: #0e00ff;\">&#8230;<\/span><\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"><span style=\"color: #aa04f9;\">&#8216;OutputLayerType&#8217;<\/span>, <span style=\"color: #aa04f9;\">&#8216;classification&#8217;<\/span>, <span style=\"color: #aa04f9;\">&#8220;Classes&#8221;<\/span>, [<span style=\"color: #aa04f9;\">&#8220;Distracted&#8221; &#8220;Focused&#8221;<\/span>]);<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"><span style=\"color: #028009;\">% Create the face detector object.<\/span><\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">faceDetector = vision.CascadeObjectDetector();<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"><span style=\"color: #028009;\">% Here we&#8217;ve omitted the code that finds and detects a face but we have attached the link <\/span><\/span><\/div>\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"><span style=\"color: #028009;\">% that helped us in implementing this feature<\/span><\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">web(<span style=\"color: #aa04f9;\">&#8216;https:\/\/www.mathworks.com\/help\/vision\/ug\/face-detection-and-tracking-using-the-klt-algorithm.html&#8217;<\/span>);<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"><span style=\"color: #028009;\">% We capture the face in videoFrame<\/span><\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"> I = videoFrame;<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"> I = imresize(I, [227 227]);<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"><span style=\"color: #028009;\">% We do a simple classification using our trained network<\/span><\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"> [YPred,probs] = classify(trainedNetwork_1,I);<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 1px solid #e9e9e9; border-radius: 0px 0px 4px 4px; padding: 0px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"> label = YPred;<\/span><\/div>\n<\/div>\n<\/div>\n<div style=\"margin: 10px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Being a virtual hackathon, coordination and teamwork was perhaps more important, as well as more difficult, than ever. While Emily was busy adding the final touches to the machine learning algorithm, Mark was working on the front end in unity, and Alaa and Minnie were creating the slides, script, and video for the final presentation. This, however, was only the final part of the hackathon. The first part of the day involved heavy research into different methods of image processing through MATLAB by all team members and exploration of the toolboxes at our disposal. Thankfully, Emily was able to find toolboxes &#8211; Deep Learning Toolbox and Computer Vision Toolbox which worked best for our situation.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">However, there was the issue of having the correct dataset for the training of the code. Alaa and Minnie took it upon themselves to find a data set well suited for our situation. After a few hours of research and reaching out to research institutions that have access to data sets of faces looking in different directions, they were able to find an extremely effective and useful dataset that we used to train the system. We had our discord group chat, where we were constantly communicating and helping each other solve problems. One of the most important problems we had to deal with was how to connect the MATLAB algorithm with the Unity frontend. Thankfully, this was an easy and painless process, thanks to MATLAB&#8217;s Instrument Control Toolbox. Below we show how this was achieved.<\/div>\n<div><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">First, we start with the MATLAB code:<\/div>\n<div style=\"background-color: #f7f7f7; margin: 10px 0 10px 0;\">\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 1px solid #e9e9e9; border-bottom: 0px none #000000; border-radius: 4px 4px 0px 0px; padding: 6px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"><span style=\"color: #028009;\">% we begin by setting up a TCP client for the MATLAB program<\/span><\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">clc<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">tcpipClient = tcpip(<span style=\"color: #aa04f9;\">&#8216;127.0.0.1&#8217;<\/span>,55001,<span style=\"color: #aa04f9;\">&#8216;NetworkRole&#8217;<\/span>,<span style=\"color: #aa04f9;\">&#8216;Client&#8217;<\/span>);<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">set(tcpipClient,<span style=\"color: #aa04f9;\">&#8216;Timeout&#8217;<\/span>,30);<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"><span style=\"color: #028009;\">% Here, we omit the part where we capture the video frame <\/span><\/span><\/div>\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"><span style=\"color: #028009;\">% and make the prediction on whether the student is focused or not<\/span><\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"><span style=\"color: #028009;\">% here we send the prediction to a server in Unity<\/span><\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">fopen(tcpipClient);<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">a=title;<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">fwrite(tcpipClient,a);<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">fclose(tcpipClient);<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 1px solid #e9e9e9; border-radius: 0px 0px 4px 4px; padding: 0px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><\/div>\n<\/div>\n<\/div>\n<div style=\"margin: 10px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">On the Unity side, we create a server that reads the messages from MATLAB<\/div>\n<div style=\"background-color: #f7f7f7; margin: 10px 0 10px 0;\">\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 1px solid #e9e9e9; border-bottom: 0px none #000000; border-radius: 4px 4px 0px 0px; padding: 6px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">\/\/ We begin by creating a TCP server<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">listener = new TcpListener(55001);<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">listener.Start();<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">\/\/ The Update method runs many times a second and listens for new messages from MATLAB<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">void <span style=\"color: #000000;\">Update()<\/span><\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"> {<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">\/\/ We check if there is a new message or not from MATLAB<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"><span style=\"color: #000000;\">if <\/span>(<span style=\"color: #000000;\">!listener.Pending()<\/span>)<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"> {<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"> }<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"><span style=\"color: #000000;\">else<\/span><\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"> {<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">\/\/ If there is a message, we read it<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"> TcpClient client = listener.AcceptTcpClient();<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"> NetworkStream ns = client.GetStream();<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"> StreamReader reader = new StreamReader(ns);<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"> msg = reader.ReadToEnd();<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\">\u00a0}<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">\/\/ we check if the message indicates that the student is distracted or not<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"><span style=\"color: #000000;\">if <\/span>(msg.Contains(<span style=\"color: #000000;\">&#8220;Distracted&#8221;<\/span>))<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"> {<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">\/\/ here we do some additional logic and processing, and update the graphs for <\/span>the professor.<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\">\u00a0}<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 1px solid #e9e9e9; border-radius: 0px 0px 4px 4px; padding: 0px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><\/div>\n<\/div>\n<\/div>\n<div style=\"margin: 10px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">After this was completed, all that was left was testing, a few improvements here and there, and then the submission (and some much-needed sleep).<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><\/div>\n<h1>Results<\/h1>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Let&#8217;s take a quick look at how a user would use our app. First, they would log in.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: baseline;\" src=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2021\/03\/newHacks_1.png\" alt=\"\" width=\"516\" height=\"392\" \/><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Next, they have the option of viewing past recorded lectures. This allows the user to learn how to improve their lessons. For example, if a professor notices that for all of his classes, they become confused during his explanation of a certain concept, he can revise how he explains that concept, or explain it in more detail for future lessons. Or for example, if he notices that his class becomes bored after about 2 hours, he may choose to shorten his lectures.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: baseline;\" src=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2021\/03\/newHacks_2.png\" alt=\"\" width=\"512\" height=\"383\" \/><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Otherwise, he can start a new lecture. First, he opens zoom, or any other video messaging app. Next, he starts our application. Then, our application will analyze the faces of each student, and visually show that information to the professor, for example in the graph below.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: baseline;\" src=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2021\/03\/newHacks_3.png\" alt=\"\" width=\"355\" height=\"200\" \/> <img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: baseline;\" src=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2021\/03\/newHacks_4.png\" alt=\"\" width=\"358\" height=\"201\" \/><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">We found the accuracy of our MATLAB model to be very high, and it could accurately tell when a student was engaged or not. The TCP interface between MATLAB and Unity also worked flawlessly, allowing the app to update multiple times a second, to provide instant feedback.<\/div>\n<h1>Key Takeaways<\/h1>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Overall, the experience was very fun. It was surprisingly easy to work with and use MATLAB for deep-learning purposes. Despite our intuition of using Python, MATLAB proved to be just as capable and easy to learn. A bonus was their collection of toolboxes, which allowed us to easily add only the features we wanted. Below are a few of our ideas for future improvements and features:<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><\/div>\n<ul>\n<li>Adding detection for more facial features (such as confused, bored, or excited).\n<ul>\n<li>This could be done by training the model on a larger dataset, that contains emotions with all these labels.<\/li>\n<\/ul>\n<\/li>\n<li>Saving the classes current information every few seconds, so the professor could rewatch their lectures, and determine at what point students became confused, to improve for future lectures.\n<ul>\n<li>This could be done by simply saving the current percentage of students who are distracted or engaged along with a timestamp to a CSV file (or any other format).<\/li>\n<\/ul>\n<\/li>\n<li>Adding the ability to track each student&#8217;s level of distraction over multiple lectures, allowing the professor to reach out to specific students that need help.\n<ul>\n<li>This could be done by adding a facial recognition algorithm, which creates a separate file for each student, and keeps track of how distracted\/engaged they are during each lesson.<\/li>\n<li>This could also be used to create an attendance list for each lecture.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">We hope you enjoyed our blog, if you have any questions or comments, please feel free to reach out to us! You can also check out our devpost submission <a href=\"https:\/\/devpost.com\/software\/read-the-room\">here<\/a><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2021\/03\/all.jpg\" class=\"img-responsive attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"\" decoding=\"async\" loading=\"lazy\" \/><\/div>\n<p>\nThis past year has brought about some fundamental changes in the way education is imparted &#8211; video calls, online group projects, funky virtual backgrounds, not being able to catch up on that&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/student-lounge\/2021\/03\/31\/read-the-room-hacks-for-the-virtual-classroom\/\">read more >><\/a><\/p>\n","protected":false},"author":165,"featured_media":5408,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[365,451,6],"tags":[363,104,484,88,486],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts\/5396"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/users\/165"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/comments?post=5396"}],"version-history":[{"count":21,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts\/5396\/revisions"}],"predecessor-version":[{"id":5447,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts\/5396\/revisions\/5447"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/media\/5408"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/media?parent=5396"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/categories?post=5396"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/tags?post=5396"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}