## 1 Introduction
With the development of deep learning in artificial intelligence, convolutional neural networks (CNNs) have been applied in various deep learning technologies. Deep learning is now commonly used in computer vision, mainly because of the 2012 ImageNet Large-Scale Visual Recognition Challenge [13]. AlexNet, the deep learning network architecture proposed by [PERSON] [14], heralded the era of the CNN model. Subsequently, VGG, GoogleNet, and ResNet architectures, all of which are commonly used in innovative technologies, were developed [15; 16; 17]. Object tracking refers to the tracking of objects in continuous images; after the objects in each image are detected, they are tracked to determine and analyze their movement trajectory. Pedestrians and cars have been the objects most commonly tracked in previous studies [18; 19; 20; 21; 22], and the MeanShift tracking method, Kalman filter method, particle filter method, local steering kernel object texture descriptors method, CamShift method, and optical flow method have been commonly used for tracking [12; 18; 19; 20; 21; 22]. Several methods have been developed for CNN-based feature extraction and object tracking in video. For example, simple online and real-time tracking with a deep association metric (DeepSORT) combines information regarding an object's position and appearance to achieve high tracking accuracy [23]. In most previous studies on human emotion recognition, human emotions have been classified using traditional methods involving feature extractors and classifiers. Some recent studies have explored using CNN models to extract human features. In 2010, [PERSON] et al. proposed recurrent neural networks (RNNs) to deal effectively with time series problems [24]. Regarding research on human emotion recognition, [PERSON] et al. and [PERSON] et al. used the local binary pattern method [25; 26] and the Gabor wavelet transform method, respectively, to recognize facial expressions [27]. [PERSON] et al. proposed a facial expression recognition CNN model that receives RGB data and depth maps as input [28]. [PERSON] et al. introduced long-term recurrent convolutional networks, which combine CNNs and long short-term memory (LSTM) models to recognize people in videos [29]. Animals have basic emotions that result in different emotional states and neural structures in their brains [30]. However, the lack of large datasets makes assessing canine emotional states more challenging than humans. Nevertheless, we can evaluate a dog's physiology, behavior, and cognitive mood [31]. Facial expressions, blink rate, twitching, and yawning are among the essential sources of information for assessing animal stress and emotional states [1; 32]. In addition to facial behavior, body posture and movement are associated with affective states and pain-related behaviors [33; 34]. Open spaces, novel objects, elevated plus mazes, and qualitative behavioral assessments evaluate animals' pain, discomfort, and emotional mood [35; 36]. In recent years, physical and postural behavior has also been utilized to assess affective emotions in dogs and horses [1; 37; 38]. The present study focused on the recognition of the emotions of dogs in videos to identify potentially aggressive dogs and relay warning messages in real time. The proposed system first uses YOLOv3 architecture to detect dogs and their positions in the input videos. To track the dogs, we modified the sizes of the images input into the DeepSORT model, improved the feature extraction model, trained the model on the dog dataset, and modified each final tracking position to the position of each tracked dog. The modified model is called real-time dog tracking with a deep association metric (DeepDogTrack). Finally, the system categorizes the dogs' emotional behaviors into three types--angry (or aggressive), happy (or excited), and neutral (or general emotional) behaviors--based on manual judgments made by veterinary experts and custom dog breeders.