<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Instructional Activity Detection Using Deep Neural Networks</title></titleStmt>
			<publicationStmt>
				<publisher>IEEE</publisher>
				<date>06/11/2023</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10523751</idno>
					<idno type="doi">10.1109/DSP58604.2023.10167935</idno>
					
					<author>Matthew Korban</author><author>Peter Youngs</author><author>Scott T Acton</author><author>Matthew Korban</author><author>Peter Youngs</author><author>Scott T Acton</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[Analyzing instructional videos via computer vision and machine learning holds promise for several tasks, such as assessing teacher performance and classroom climate, evaluating student engagement, and identifying racial bias in instruction. The traditional way of evaluating instructional videos depends on manual observation with human raters, which is time-consuming and requires a trained labor force. Therefore, this paper tests several deep network architectures in the automation of instruc- tional video analysis, where the networks are tailored to recognize classroom activity. Our experimental setup includes a set of 250 hours of primary and middle school videos that are annotated by expert human raters. We present several strategies to handle varying length of instructional activities, a major challenge in the detection of instructional activity. Based on the proposed strategies, we enhance and compare different deep networks for detecting instructional activity.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head>I. INTRODUCTION</head><p>Evaluation of classroom activities is essential for instructors to revise and improve their teaching skills <ref type="bibr">[1]</ref>. As a result, accurate feedback from classroom evaluation drastically affects students' classroom engagement and enhances the quality of education <ref type="bibr">[2]</ref>. Traditionally, providing such feedback requires considerable labor and manual rating from trained experts, which is expensive and time-consuming. Using deep learning models is an efficient and effective solution to this issue as they can automate the evaluation of teacher activities, reducing manual labor work and errors caused by humans <ref type="bibr">[3]</ref>. Therefore, this paper compares several deep network architectures based on their ability to detect instructional activities. Several strategies have also been presented to enhance the effectiveness of deep models in detecting instructional activities. The new strategies include: <ref type="bibr">(1)</ref> an adaptive sampling algorithm for selecting critical frames in classroom videos; <ref type="bibr">(2)</ref> a new loss function incorporating frame-level and sequence-level prediction; (3) a post-processing algorithm for detecting the start and end frames of long actions; (4) a motion enhancement algorithm to make the motion features insensitive to camera movements. The first three strategies address the issue of varying lengths of instructional activities, a significant challenge in detecting instructional activities. The fourth strategy makes the pipeline more reliable under camera movements during capturing instructional videos.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>II. RELATED WORK</head><p>Earlier methods used hand-crafted features such as dense trajectory features <ref type="bibr">[4]</ref> and bag-of-words (BOW) histogram of motion tubelests <ref type="bibr">[5]</ref> combined with traditional classification algorithms including fisher kernels <ref type="bibr">[4]</ref> and Support Vector Machine (SVM) <ref type="bibr">[5]</ref> to detect actions in untrimmed videos. With new advances in deep learning, detecting action has become more effective. <ref type="bibr">[6]</ref> p suggested an algorithm to localize actions based on the maximum sum of frame-wise classification scores in different temporal segments that are processed through a deep Convolutional Neural Network (CNN). <ref type="bibr">[7]</ref> improved it by adding a recurrent mechanism that can better than CNN model the temporal dependencies in action frames. <ref type="bibr">[8]</ref> proposed a more effective approach than <ref type="bibr">[6]</ref>, <ref type="bibr">[7]</ref> using a long-short term transformer that can process longer videos without any bias against older temporal inputs.</p><p>There have been several approaches to detect activities in classroom videos. <ref type="bibr">[9]</ref> suggested using hand-crafted features including elbow angles and movements in the face and hands combined with Primitive-based Coupled Hidden Markov Model (PCHMM) to recognize seven teacher activities. <ref type="bibr">[1]</ref> presented a more effective deep model with a multimodal attention layer to capture long-term semantic dependencies in instructional videos. <ref type="bibr">[10]</ref> suggested that skeleton pose is a more effective modality than RGB images used by others, as the skeleton pose better represents teacher and students' actions in classrooms.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>III. METHODS</head><p>Fig. <ref type="figure">1</ref> shows the overall pipeline of our instructional action detection. Given a sequence of RGB frames, I R = {I r t 2 R H&#8677;W &#8677;3</p><p>, t = 0, 1, ..., T }, the goal is to find the action class scores, P , and the start of the end of action, and &#9999;, respectively. Here, T is the size of the action sequence; and H and W are the height and width of the image, respectively. We first select the keyframes</p><p>, t = 0, 1, ..., T 0 }, which include important frames in the sequence. Here, T 0 is the number of keyframes. Next, the optical flow fields,</p><p>, t = 0, 1, ..., T 0 }, are extracted using a state-of-the-art optical flow estimation algorithm <ref type="bibr">[11]</ref>. Using the motion enhancement algorithm, the optical flow fields are enhanced, making them insensitive to camera movements. The enhanced optical flow fields then are converted to optical flow images</p><p>, t = 0, 1, ..., T 0 } using a color-coding technique <ref type="bibr">[12]</ref>. I K and I K 0 are then converted to RGB features, I F = {I f t 2 R m , t = 0, 1, ..., T 0 } and motion features</p><p>, t = 0, 1, ..., T 0 }, using a pretrained I3D network <ref type="bibr">[13]</ref>, a widely used model for action recognition. Here, m is the size of features. The enhanced baseline model with a revised loss function process I F and I F 0 produces the action class prediction scores. A post-processing algorithm is also utilized to generate the start and end of action instances. .The pipeline of the presented instructional activity detection algorithm.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. Keyframe selection</head><p>The instructional videos are long and often the important events occur sparsely. So, a keyframe selection algorithm is presented the choose the important frames, making the proposed pipeline more efficient and effective in handling long videos. The keyframes are selected when there is a desirable change in videos that are evaluated by measuring the difference between two consecutive frames as follows:</p><p>1</p><p>where T r is a threshold value.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. Motion enhancement</head><p>Camera movement is inevitable in videos captured from classrooms. Such camera movements distort the optical flow fields and reduce the quality of motion features. To solve this we utilize a motion enhancement algorithm. To do such, first Gaussian mixture models (GMMs) are used to model the background motion as P ( ) =</p><p>and K are mean. covariance, mixing coefficient, and the number of distributions, respectively. The background is modeled by optimizing the GMMs parameters using maximum likelihood estimation <ref type="bibr">[14]</ref>. With the assumption that the background is only affected by the camera movements, the camera-insensitive foreground then is recovered by subtracting from the corresponding background parts with respect to the Gaussian models.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C. Baselines</head><p>Three baselines are selected in this paper, including the background suppression network <ref type="bibr">[15]</ref>, multi-label action dependencies <ref type="bibr">[16]</ref>, and long short-term transformer <ref type="bibr">[8]</ref>. All of these networks performed exceptionally well on the THU-MOUS <ref type="bibr">[17]</ref> and ActivityNet <ref type="bibr">[18]</ref> datasets. Our instructional activity datasets share several characteristics with these two datasets, including (1) videos that are long in length; (2) videos are continuous streams, which means they are not segmented;</p><p>(3) several instances of class labeling can occur simultaneously with co-occurring labels in the annotation data. The background suppression network produces weighted scores for background and foreground frames. Such a weighting strategy handles the crowded scenes in classroom videos that may include a significant amount of irrelevant information. The multi-label action dependencies model captures the multi-class dependencies between different action classes. This is useful in our experimental setup since multiple instructional activities may co-occur. The long short-term transformer can capture short and long-term dependencies in action videos. This will help to include the critical temporal dependencies regardless of their temporal distances. This is important in classroom activity detection, where the temporal locations of critical frames may vary based on the size of video sequences.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D. Enhanced loss function</head><p>The instructional videos include both long and short action instances, such as "teacher sitting" and "student raising hand", respectively. To accommodate the videos with varying lengths, we suggest adding a new loss function to enhance the baseline models:</p><p>where y, &#375;, Y , and &#374; are the ground truth per frame, predicted values per action frame, ground truth per action sequence, and predicted values per action sequence, respectively. Moreover, c, C, &#8629;, and are predicted class, the number of classes, and the loss adjustment parameters for frame-level, and loss adjustment parameters for sequence-level, respectively.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>E. Post-processing</head><p>Many instructional activities such as "teaching sitting" are significantly longer than standard actions. So, they cannot be entirely processed within the standard deep learning models to regress the start and end frames as these deep models have limited temporal receive fields. So, we propose a postprocessing algorithm to find the start and end frames of action instances after the frame-level prediction stage.</p><p>Given the action detection scores &#374; 2 R T &#8677;C , the goal is to find the start and end frames of action instances,</p><p>is the number of class instances. Our post-processing algorithm consists of two phases of action scores thresholding and the start and end frames detection as shown in Algorithm 1. We used our post-processing algorithm to visualize the start and end of actions for teachers based on a developed teacher dashboard.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>IV. EXPERIMENTAL RESULTS</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. Implementation details</head><p>The size of RGB and motion features in our experiments for all baselines is 1024. For the background suppression model, six convolutional layers are used. The learning rate is 1e 5 which is decayed by 0.1, for every 1500 iterations. The multi-label dependencies network includes five layers. The temporal length is 132, and the initial learning rate is 1e 4 . The long-short term transformer consists of four layers and 16 heads. Moreover, the learning rate is increased from zero to 5e 5 for half of the training iterations that took 50 epochs. All the experiments are conducted using PyTorch 1.7 on a server PC with dual Nvidia RTX 3090 GPUs (24GB VRAM), AMD Ryzen Threadripper 3990X 64-Core Processor, and 256GB of RAM.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. Dataset.</head><p>An elementary school dataset was collected to analyze instructional activities. 250 hours of instructional activity videos were annotated by a team of nine professional annotators. Fig. <ref type="figure">2</ref> shows the labels for our 24 instructional activity classes. In our experiments, 80% of the data is used for training and 20% for testing. In our experiments, we used the F1 score metric based on frame-level prediction as</p><p>where T P , F P , and F N are true positive, false positive, and false negative predicted frames, respectively.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C. Comparative Results</head><p>Fig. <ref type="figure">3</ref> shows the comparative results of our pipeline based on three baseline models. The average per class performance for the background impression, multi-label dependencies, and long-short term transformer models are 0.47, 0.49, and 0.4, respectively. The average per sample performance for the background impression, multi-label dependencies, and long-short term transformer models are 0.52, 0.57, and 0.47, respectively if &#374;t,c &#10003; then . &#10003; is the detection threshold 6:</p><p>&#374;t,c = 1</p><p>else if &#374;t,c &lt; &#10003; then 8:</p><p>&#374;t,c = 0</p><p>9: end if 10: c c + 1 11: end while 12: t t + 1 13: end while Phase 2 -Start and end frames detection  </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D. Ablation study</head><p>Fig. <ref type="figure">4</ref> illustrates the impact of our proposed strategies, Keyframe Selection (KS), Motion Enhancement (MH), and Enhanced Loss Function (EL) on the total performances of two baseline models. Using our proposed strategies, the average performance for background suppression model has a significant improvement of 0.2, from 0.37 to 0.57. Similarly, for the long-short term transformer, the performance has been increased from 0.52 to 0.65. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>V. CONCLUSION</head><p>This paper proposes several strategies to improve the performance of multiple state-of-the-art action detection networks on instructional activity videos. The presented strategies mainly focus on improving the network in dealing with varying activity sequences and camera movements. Such a enhanced deep learning framework will facilitate teachers to receive feedback more effectively and efficiently than using manual labor. The experimental results have been promising when the enhanced deep models are evaluated on 250 hours of our annotated instructional videos.</p></div></body>
		</text>
</TEI>
