# Field-Applicable Pig Anomaly Detection System Using Vocalization for Embedded Board Implementations
## 3 Results
### Pig Anomaly Classification Results
The experimental results indicated that when DM was set to 0.75 or 0.5, the model's identification performance could not be maintained because the results showed a significant drop. In contrast, the three experiments using the filter clustering technique showed that the identification performance was well maintained despite a decrease in the number of filters in the neural network. This demonstrated that the MnasNet model's identification performance was not affected by the removal of filters that were not relevant for the identification, which was different from removing filters randomly from MnasNet using the DM. However, for SNRs 15, 10, 5, and 0, with strong white Gaussian noise and door opening noise (environmental noise), we noticed that the identification performance was generally low for all algorithms. Unlike the previous experiments, the experimental results listed in Table 4 are from the training performed using a dataset containing data obtained by synthesizing white Gaussian noise SNR 0 and clean data. As shown in Table 4, compared to the previous experimental results, the F1-score has considerably increased with values ranging from 0.107 to 0.277, and the pig's abnormality is stably identified not only in white Gaussian noise conditions but also in environments containing environmental noise. In particular, the average F1-score result of the 8-bit filter clustering method proposed in this study is 0.947, the highest identification result, which is 0.025 higher than the result obtained using the basic structure of MnasNet (DM 1.0). In addition, as presented in Table 5, the number of parameters of the neural network is 646,624 and the execution time for detecting a pig's abnormality from sound converted to spectrogram images on the TX-2 board is 0.253 s/image. While this model has a size that is 76.3% smaller than the basic structure of MnasNet, its execution time is 0.220 s faster, \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Noise Condition**} & \multicolumn{6}{c}{**F1-Score**} \\ \cline{2-7}  & **MnasNet** & **MnasNet** & **MnasNet** & **Filter** & **Proposed Method** & **Proposed Method** \\  & **DM 1.0** & **DM 0.75** & **DM 0.5** & **Clustering [29]** & **Only 3 \% 3 Layers** & **All Layers** \\ \hline Clean 1 & 0.943 & 0.916 & 0.841 & **0.993** & **0.993** & **0.993** \\ \hline SNR 20 & **0.940** & 0.748 & 0.656 & 0.885 & 0.888 & 0.935 \\ SNR 15 & **0.865** & 0.696 & 0.571 & 0.760 & 0.786 & 0.860 \\ SNR 10 & **0.813** & 0.593 & 0.430 & 00.676 & 0.686 & 0.680 \\ SNR 5 & **0.813** & 0.506 & 0.325 & 0.505 & 0.506 & 0.598 \\ SNR 0 & 0.558 & 0.460 & 0.216 & 0.478 & 0.388 & **0.603** \\ \hline Radio operation & 0.841 & 0.868 & 0.693 & **0.993** & 0.946 & 0.971 \\ Weak footsteps & 0.813 & 0.906 & 0.640 & **0.933** & 0.908 & 0.897 \\ Strong footsteps & 0.903 & 0.851 & 0.741 & 0.936 & 0.920 & **0.940** \\ Door opening & 0.660 & 0.763 & 0.463 & **0.781** & 0.696 & 0.680 \\ \hline Average & 0.815 & 0.731 & 0.558 & 0.794 & 0.772 & **0.816** \\ \hline Standard deviation & 0.121 & 0.164 & 0.195 & 0.190 & 0.201 & 0.157 \\ \hline \hline \end{tabular}  
* Clean refers to the original data without noise synthesis.  
\end{table} 
Table 3: Sound-based pig abnormality identification results (Train: clean dataset). which proves that the proposed method produces the most optimized model. Thus, this model can be executed in real time, and as shown in Table 4, provides the best identification results. Table 6 displays a confusion matrix of the results after applying the 8-bit filter clustering method, shown in Table 4, to all layers of MnasNet. The results confirmed that it effectively detected abnormalities related to pigs' respiratory diseases and screams resulting from attacks between pigs. Figure 7 illustrates the compressed MnasNet structure after pruning the filters that are irrelevant to the identification performance using the 8-bit filter clustering method.