## 4 Experiments
### Model Training Parameters and Evaluation Criteria
#### 4.3.2 Model Evaluation Criteria  
In the dog detection, tracking, and emotion recognition experiments, various evaluation criteria were used to examine the performance of the models.  
\begin{table}
\begin{tabular}{c c} \hline  & Parameters \\ \hline Input size & 16 \(\times\) 2048 \\ Feature length & 16 \\ Learning rate & 0.0001 \\ Dropout & 0.4 \\ Batch size & 2 \\ Activation function & tanh \\ Epoch & 50 \\ \hline \end{tabular}
\end{table}
Table 10: Training parameters of LSTM model.  
\begin{table}
\begin{tabular}{c c c c} \hline Video & Total Image Number & Number of Dog & Emotion Types \\ \hline IMG\_0033 & 400 & 2 & Neutral/Happy \\ \hline AngryDogs & 400 & 1 & Neutral/Angry \\ \hline \end{tabular}
\end{table}
Table 9: Test data-set of integrated system.  
Evaluation Criteria for Dog Detection  
The dog detection performance of the proposed system was evaluated according to the rate of correct predictions (vs. the ground truth region). This experiment used three evaluation criteria, the first of which is Recall. Recall represents the number of predicted ground truth pixels and is calculated as follows:  
\[\text{Recall}=\frac{1}{N}\sum_{i=1}^{N}\frac{Gt_{i}\cap P_{i}}{Gt_{i}} \tag{6}\]  
where \(Gt_{i}\) represents the ground truth region of the \(i\)th dog, \(P_{i}\) represents the predicted region of the \(i\)th dog, \(N\) is the total number of dogs, and \(Gt_{i}\cap P_{i}\) represents the intersection between the ground truth and predicted regions.  
The second evaluation criterion used was Precision. Precision represents the number of correctly predicted pixels and is calculated as follows:  
\[\text{Precision}=\frac{1}{N}\sum_{i=1}^{N}\frac{Gt_{i}\cap P_{i}}{P_{i}} \tag{7}\]  
The third evaluation criterion used was the mean IOU (mIOU), that is, the average number of pixels detected correctly in the ground truth and predicted regions. It is calculated as follows:  
\[\text{mIOU}=\frac{1}{N}\sum_{i=1}^{N}\frac{Gt_{i}\cap P_{i}}{Gt_{i}\cup P_{i}} \tag{8}\]  
where \(Gt_{i}\cup P_{i}\) represents the union of the ground truth region \(Gt_{i}\) and the predicted region \(P_{i}\).  
The fourth evaluation criterion used was the detection rate. The detection rate is considered satisfactory if the Recall, Precision, or mIOU value is \(\geq\)0.5.  
Evaluation Criteria for Dog Tracking  
In the dog tracking experiment, the models were evaluated in terms of MOT accuracy (MOTA), as defined by the MOT Challenge [57]. MOTA is calculated as follows:  
\[\text{MOTA}=1-\frac{\sum_{t}\left(FN_{i}+FP_{i}+IDSW_{i}\right)}{\sum_{i}GT_{i}} \tag{9}\]  
where \(GT_{i}\) is the ground truth region of the dog in the \(i\)th image, \(FN_{i}\) (false negative) is the number of dogs that are not tracked in the \(i\)th image, and \(FP_{i}\) (false positive) is the number of tracked dogs in the \(i\)th image for which the tracked region is incorrect. Incorrectly tracked regions are those for which the IOU between the tracked region and the ground truth region is less than 50%. \(IDSW_{i}\) (ID Switch) represents the number of dogs tracked as other dogs in the \(i\)th image. Therefore, larger MOTA values indicate higher MOTA.  
Evaluation Criteria for Dog Emotion Recognition  
Dog emotion recognition was evaluated by comparing the predicted results with the ground truth results and is presented herein in terms of identification accuracy \(ACC\), which is calculated as follows:  
\[ACC=\sum_{i=1}^{N_{T}}P_{i}\text{ and }P_{i}=\frac{NT_{i}}{N_{i}} \tag{10}\]  
where \(P_{i}\) is the identification rate of the \(i\)th category of emotions, \(N_{T}\) represents the total number of images, \(NT_{i}\) represents the number of correct recognitions in the \(i\)th category, and \(N_{i}\) represents the total number of dogs in the \(i\)th category.