# Change and Detection of Emotions Expressed on People's Faces in Photos
## 2 Related Work
### Artificial Intelligence Algorithms Used to Analyze Emotions  
The process of training artificial neural networks to classify emotions is challenging due to several important factors. Emotions are subjective and context-dependent, making generalization difficult. The same facial expression can be interpreted as different emotions by different people. Emotion datasets are unbalanced (overrepresentation of training patterns for some emotions and underrepresentation of training patterns for others). Datasets often differ in terms of emotion categories, making it difficult to compare studies. Creating databases about people's emotions is an additionally complex process due to ethical and legal issues. Moreover, contextual factors such as lighting and background noise can affect emotion recognition. In recent years, there has been rapid development in the field of artificial intelligence, especially in the context of image analysis. Deep learning techniques, including convolutional neural networks (CNNs) and generative adversarial networks (GANs), have become a major tool in this field. Convolutional neural networks (CNNs) are widely used for image classification and pattern recognition [5; 6; 7; 8]. The research of [PERSON] et al. [9] showed that multi-layer CNNs can effectively classify emotions based on features extracted from facial images. The introduction of multi-task networks allowed for simultaneous recognition of emotions and their intensity, which increases the classification accuracy. While CNNs are highly effective at accurately identifying basic emotions, detecting subtle emotions remains a difficult task. This requires advanced network architectures, high-quality datasets, and an appropriate training process to enhance their performance. Generative adversarial networks (GANs) have revolutionized the approach of changing emotions in images. A GAN consists of two networks: a generator and a discriminator, which cooperate to create realistic images. The work of [PERSON] et al. [10] introduced new methods for generating high-quality facial images, enabling more realistic manipulation of emotions. Manipulating facial emotions in images has become more effective thanks to advances in generative neural networks. In 2021, [PERSON] et al. [11] presented the FEGAN method, which allows precise modification of the expressed emotions while preserving the identity of the person. This algorithm uses advanced style transfer techniques to modify the specific  
Figure 2: Circumplex theory of affect [3]. facial features responsible for expressing emotions. FEGAN has region-specific editing capability enabling nuanced modifications that can convey subtle emotional changes rather than merely altering broad facial features. Many GAN-based models also allow for emotion modification, but they generally modify the entire face in a single process. While these models can generate high-quality images, they often face challenges in preserving realistic textures when making intense emotional changes. Furthermore, they may occasionally introduce artifacts when aiming for subtle adjustments, such as a slight smile or a small shift in eyebrow positioning. Another important achievement is the research of [PERSON] et al. [12], which introduced a system capable of learning to translate an image from a source domain to a target domain in the absence of paired examples. This system is particularly useful in creating training datasets. In recent years, there have been numerous innovations in the field of detecting [13; 14; 15; 16; 17; 18; 19; 20; 21; 22; 23; 24; 25] and changing [26; 27; 28; 29; 30; 31; 32] emotions in images. In the field of emotion detection, [PERSON] et al. proposed The Region Attention Network to addresses pose and occlusion challenges in facial expression recognition (FER) by applying attention to specific facial regions [22]. [PERSON] et al. introduced a pyramid architecture with super-resolution for FER [20]. [PERSON] et al. introduced a dual-direction attention mixed feature network aimed at improving FER.