# Emotion Recognition in Usability Testing: A Framework for Improving Web Application UI Design
## 3 Results  
The emotion recognition model was trained using transfer learning with the MobileNetV2 architecture on the FER-2013 dataset, using a deep learning algorithm. The FER-2013 dataset consists of 28,709 grayscale face images of various ages, genders, and ethnicities, each with a resolution of 48 \(\times\) 48 pixels. The dataset is labeled with seven emotion categories: angry, disgusted, scared, happy, sad, surprised, and neutral. The images were pre-processed to ensure that the face was centered and occupied as much space as possible. MobileNetV2 is a deep learning model designed specifically for mobile devices, and implements computer vision tasks in a simple and efficient way [29]. It is  
Figure 4: Activity diagram of the proposed framework prototype for web application testing. based on the inverted residual structure, where the residual connections are between the bottleneck layers, and lightweight depthwise convolutions are used in the intermediate expansion layer, which is designed to filter functions as a source of nonlinearity [30]. This architecture was chosen for several reasons: it uses few resources, inverted residual blocks allow extracting important features from filters of different sizes, and the linear bottleneck layer contributes to flexibility and efficiency by reducing the number of parameters. Several emotion recognition models were tested before MobileNetV2 was chosen as the main architecture. The emotion recognition part of the current version of the Deepsight Toolkit is still under development and currently uses a simple \"smile\" level system. Real-time emotion recognition from facial expressions performed poorly in tests using Deepface. Using the MATLAB (MathWorks, Inc., Natick, MA, USA--MATLAB R2020a) trained models, the classifier perfectly identifies emotions from the test dataset, but when using the real-time test, the classifier often incorrectly identifies the emotion as neutral (possible reasons: limited emotional expressions in the dataset or their bias, limited training data, and overfitting). Three popular pre-trained models, namely GoogleNet, AlexNet, and VGG19, also failed to correctly identify all emotions (Table 1). In further tests, two different algorithms were used to train the emotion recognition model. The first model was trained using the Keras (Keras team (originally developed by [PERSON])--Keras v. 2.15.0) library combined with OpenCV (OpenCV team (Open Source Computer Vision Library)--opencv-python-headless==4.9.0.80) image processing. This particular model was built using the FER-2013 dataset, which contains images with different facial expressions. The CNN model was trained using the Keras Sequential model (a linear stack of layers where one layer can be added at a time starting from the input) with different convolutional, pooling, and fully connected layers. The second model was trained (Figure 5) using the Keras and TensorFlow (Google LLC, Mountain View, CA, USA--tensorflow-cpu==2.15.0) libraries for emotion classification from images and the eINTERFACE_Image_Dataset dataset. The real-time test also failed to successfully detect emotions. The proposed MobileNetV2 model was modified by adding additional layers and integrating both input and output layers to create a new version. Learning parameters were set, including the categorical cross-entropy loss function, the Adam optimization algorithm, and the accuracy metric. Finally, the model was trained with the adjusted layer weights using the training data. Training was performed over a selected number of epochs with the available training set size. To prepare the data for training, the samples of the training data set are shuffled to obtain better training results. The model input and output data arrays are then separated into images with facial expression and emotional state labels, respectively.