# Classroom Expression Recognition Based on Deep Learning
## 3 Theoretical Framework of Facial Expression Recognition
### Construction of Face Data Enhancement Model Based on Generative Adversarial Network  
To address the issues of insufficient data volume and uneven data types in current datasets, this paper proposes a data augmentation method based on Generative Adversarial Networks (GANs). First, the highly efficient StarGAN network is selected as the base model. Second, the MultiResUNet model is introduced as the network generator, allowing the network to extract edge features more accurately. Finally, the reconstruction loss function is improved to help the network distinguish between significant defects in key areas and minor displacements in images [27]. StarGAN is an image conversion model based on GANs, originally designed for multi-domain image conversion tasks. Its primary goal is to enable style conversion across multiple domains, rather than just between two. StarGAN's architecture allows the model to handle multiple image conversion tasks simultaneously, without the need to train separate networks for each task. It can learn mappings between multiple domains using a single generator. Figure 5 illustrates a star topology connecting multiple domains. The generator G achieves the conversion of multi-domain image generation by sharing network parameters. Five circles of different colors (marked 1 to 5) represent different image domains, such as categories of different expressions. Each circle is connected to the generator in the center by a line. Figure 4: Example of facial expressions in the dataset. Figure 5: StarGAN star topology. The StarGAN model employs a mask vector method to effectively manage all available domain labels within the network. In contrast to other models, StarGAN not only inputs the image into the generator G but also incorporates the label information corresponding to the target domain. This dual input allows for a more precise transformation of the input image across various styles. Furthermore, the model introduces a reconstruction loss function, specifically the L1 norm, which facilitates the reconstruction of the original image. This ensures that only the regions differing across domains are altered, thereby preserving the original feature information. In this architecture, the discriminator D provides two outputs: It distinguishes between real and generated images while simultaneously classifying the images into their respective domains. The generator of StarGAN receives the input image and the target domain label and generates a new image that matches the target domain. The architecture is shown in Table 4.  
The main function of StarGAN's discriminator is to determine whether the generated image is real and evaluate its matching degree with the target domain. The architecture is shown in Table 5.  
The MultiResUNetV model was introduced by [PERSON] and [PERSON] (2018) as an enhancement of the U-Net architecture. This model replaces the corresponding modules with three 3 \(\times\) 3 convolutional layers and incorporates an additional 1 \(\times\) 1 convolutional layer within the network. By integrating concepts of multi-scale feature extraction and residual connections, MultiResUNetV significantly enhances the accuracy of image segmentation, particularly for complex or small structures. Compared to the standard U-Net, MultiResUNetV achieves superior feature representation capabilities through multi-resolution feature extraction and feature fusion. The structure of the residual path is illustrated in Figure 6 below.