# Field-Applicable Pig Anomaly Detection System Using Vocalization for Embedded Board Implementations
## 1 Introduction
\begin{tabular}{c} **Active** \\ **Noise** \\ **Control** \\ \end{tabular}  & \begin{tabular}{c} **Signal** \\ **Feature** \\ \end{tabular}  & \begin{tabular}{c} **Detection** \\ **Target** \\ \end{tabular}  & \begin{tabular}{c} **Detection** \\ **Technique** \\ \end{tabular}  & \begin{tabular}{c} **Real-Time** \\ **Performance** \\ \end{tabular}  & **Reference** \\ \hline \hline \multirow{8}{*}{PC} & Not & No & \begin{tabular}{c} Frequency \\ domain \\ \end{tabular}  & \begin{tabular}{c} Cough by \\ disease \\ \end{tabular}  & \begin{tabular}{c} Dynamic \\ time warping \\ \end{tabular}  & \begin{tabular}{c} Not \\ specified \\ Statistical \\ analysis \\ \end{tabular}  & \ \begin{tabular}{c} [9] \\ Specified \\ \end{tabular}  &
\begin{tabular}{c} [10] \\ [11] \\ [12] \\ [13] \\ [14] \\ [15] \\ [16] \\ [17] \\ [18] \\ [19] \\ [20] \\ [21] \\ [22] \\ [23] \\ [24] \\ [25] \\ [26] \\ [27] \\ [28] \\ [29] \\ [20] \\ [21] \\ [28] \\ [25] \\ [26] \\ [27] \\ [28] \\ [29] \\ [20] \\ [21] \\ [20] \\ [22] \\ [23] \\ [24] \\ [25] \\ [26] \\ [27] \\ [28] \\ [29] \\ [20] \\ [21] \\ [20] \\ [22] \\ [20]No previous study explored the feasibility of implementing a real-time economic abnormality detection system in a low-cost computing environment for small/medium-size farms. The term \"real-time\" was used to describe a study in one paper [10], but the content did not specify any measurement of the execution time for us to verify the real-time processing status. However, when the research team interviewed the managers of small/medium-sized pig farms to better understand their needs, they put forward the following conditions to be met by the pig abnormality detection system: (1) Low price; (2) 24-hours monitoring; (3) The false alarm rate must be low whereas the abnormality detection performance must be high; (4) The system must be noise robust if it relies on sound, as there is a considerable amount of noise in piggeries; and (5) The sensors must be periodically replaced because their data collection functionalities deteriorate from the constant exposure to gases such as ammonia, hydrogen sulfide, and methane generated in pigpens with poor air circulation. In this study, we propose a low-cost real-time sound-based pig abnormality monitoring system that can be installed in real pigpens and operate for 24 h a day in an embedded environment that has limited computing resources, without needing a personal computer (PC) environment. First, the system employs an adaptive context attachment model (ACAM)-based noise-robust voice activity detection (VAD) algorithm, which can effectively detect sound regions even in noisy environments, to detect the sound regions in the data received from the sound sensor [18; 19; 20; 21]. Then, each detected sound region is converted into a spectrogram, containing both frequency and time information, before feeding it to the lightweight deep learning model, MnasNet [22]. The filter or kernel of the neural network is pruned using the filter clustering method proposed in this study that improves the processing speed while maintaining the abnormality detection performance. In addition, we used a convolutional neural network (CNN) based deep learning structure in this study because it guarantees an effective abnormality detection performance even in various noisy environments [23; 24; 25]. The remainder of this paper is organized as follows. In Section 2, we describe the noise-robust sound-based pig anomaly detection system that is deployed in an embedded board and can process data in real time. In Section 3, we present the performance and experimental results of the proposed system. In Section 4, we draw conclusions and discuss future research.