A Hidden Markov Model-Based Acoustic Cicada Detector for Crowdsourced Smartphone Biodiversity Monitoring
Total Page:16
File Type:pdf, Size:1020Kb
Proceedings of the Twenty-Third International Joint Conference on Artificial Intelligence A Hidden Markov Model-Based Acoustic Cicada Detector for Crowdsourced Smartphone Biodiversity Monitoring Davide Zilli, Oliver Parson, Geoff V Merrett, Alex Rogers Electronics and Computer Science, University of Southampton, Southampton, UK fdz2v07,op106,gvm,[email protected] Abstract Automated acoustic recognition of species aims to provide a cost-effective method for biodiversity monitoring. This is particularly appealing for de- tecting endangered animals with a distinctive call, such as the New Forest cicada. To this end, we pur- sue a crowdsourcing approach, whereby the mil- lions of visitors to the New Forest will help to mon- itor the presence of this cicada by means of a smart- phone app that can detect its mating call. However, Figure 1: Cicadetta montana. Photograph by Jaroslav Maly, current systems for acoustic insect classification are reproduced with permission. aimed at batch processing and not suited to a real- time approach as required by this system, because due to climate change or land-use change, is an important they are too computationally expensive and not ro- question for UK biodiversity research. bust to environmental noise. To address this short- Today, traditional approaches to searching for rare species coming we propose a novel insect detection algo- typically call for trained ecologists to perform detailed man- rithm based on a hidden Markov model to which ual surveys. However, the obvious costs of such work have we feed as a single feature vector the ratio of two led to significant recent research into automated approaches key frequencies extracted through the Goertzel al- whereby animals and plants can be classified remotely with- gorithm. Our results show that this novel approach, out requiring that trained experts be in the field. In the compared to the state of the art for batch insect clas- case of insects, this is most often performed by deploy- sification, is much more robust to noise while also ing fixed sensors with sensitive microphones that record the reducing the computational cost. sounds that the insects emit [MacLeod, 2007]. These record- ings are then analysed later to automatically identify the in- 1 Introduction sects whose calls were heard. The algorithms to do so typ- ically range from those that operate solely in the time do- Biodiversity is a key measure of the health of an ecosystem, main, such as time domain signal coding [Chesmore, 2004; and as land-use and climate change impact on the natural en- Chesmore and Ohya, 2004], to those inspired by the litera- vironment, many countries are increasingly seeing the need to ture of human speech recognition. The latter typically use monitor and protect it. For example, the UK has formalised a hidden Markov model (HMM) for classification [Leqing this within the UK Biodiversity Action Plan (UK BAP) and and Zhen, 2010], and perform a number of pre-processing has established a priority species list to focus work on a small stages, often taken directly from the human speech recogni- number of critically important species [Joint Nature Conser- tion literature, to extract features from the raw recording. For vation Committee, 2010]. One of these, of particular interest example, [Chaves et al., 2012] present a state-of-the-art ap- in this paper, is the New Forest cicada (cicadetta montana s. proach that pre-processes the recorded sound to remove un- str., see Figure 1); the only native cicada known to the UK, sounded periods where no insect call is detected, that maps which was first identified in the New Forest, a national park the raw frequencies to the mel scale, which better represents on the south coast of England, in 1812. Despite being well human hearing; then it converts it back into a pseudo-time do- studied at a number of sites in the 1960s, there has been no main, called the cepstrum, by calculating a number of mel fre- confirmed observation of the New Forest cicada in the last 20 quency cepstral coefficients (MFCC), that are used as features years [Pinchen and Ward, 2002]. Understanding whether this for the HMM classification with just one state per species. is simply due to the migration of the cicada to as yet undis- The use of automatic acoustic recognition is particularly covered sites, or whether the cicada is now extinct in the UK appealing in the case of the New Forest cicada, since this in- 2945 sect has a particularly loud high-pitched mating song which, tection and recognition of insects (and specifically, the New while being close to the upper frequency limit of a normal Forest cicada) on computationally constrained smartphones. adult hearing range, can easily be detected by conventional Rather than calculating a number of mel frequency cepstral microphones. However, the use of fixed sensors to collect coefficients, as above, we use the Goertzel algorithm — an these recordings for later analysis is less compelling. The efficient method for approximating individual terms of a dis- New Forest covers 600 km2, and, to exhaustively survey it for crete Fourier transform (DFT) [Goertzel, 1958] — to calcu- potential cicada breeding sites, would require tens of thou- late the magnitude of two specific frequency bands; one cen- sands of sensors. Therefore, in our work, we are pursuing tred at 14 kHz, corresponding the central frequency of both a different approach, and are seeking to exploit the 13 mil- the insects’ calls, and one centred at 8 kHz, which is far from lion day visits to the New Forest that occur each year by the both general background noise and the insects’ call. We use general public to crowdsource the search for the New Forest the ratio of these magnitudes as a single feature, which iden- cicada. In particular, in this paper, we describe a HMM-based tifies the song of either the bush cricket or the New Forest ci- detection algorithm that runs within a smartphone app, to be cada. Then, we use a four-state hidden Markov model that ex- used by these visitors, that can automatically detect the mat- plicitly represents both the idle, un-sounded period between ing call of the male cicada, identify it as such to the user in insect calls, and also the short pauses between the chirps real-time, and prompt the user to make a recording that can of the bush cricket’s song. Hence, rather than attempting be uploaded for further analysis once the smartphone has an to recover the time domain information lost while removing acceptable Internet connection. A similar approach to crowd- un-sounded periods through heuristic methods, we explicitly sourcing for sustainability problems using mobile phones was capture this in the HMM, as this approach can be readily ex- employed by Quinn et al. [2011], however it has not yet been tended to cover insect calls of more complexity, all within the applied to crowdsourcing biodiversity using acoustics. same principled framework. We then use the Viterbi algo- The requirements of the automatic detection algorithm that rithm to identify the most likely sequence of insect calls at will run on these smartphones are somewhat different to those any point in time, as in Sun et al. [2009]. that have been previously proposed for post recording analy- We evaluate our approach using recordings made by the au- sis of insect calls. Firstly, we must be aware of the limited thors with an Apple iPhone 4S of both the New Forest cicada computational resources available on some lower-end mobile (recorded in Slovenia where the same species is still abun- devices. The algorithms described above are typically de- dant) and the dark bush cricket (recorded in the New For- signed to run on high-end servers, and thus, are relatively est). Unlike standard library recordings, our trial dataset rep- unconstrained by both memory and processor speed. Sec- resents the quality of crowdsourced data that we are likely ondly, we note that the algorithms above are designed to run to encounter, exhibiting significant noise (including, among in batch-mode on existing recordings, whereas in our appli- others, handling noise, background road traffic, human voice cation, we require that the algorithms provide real-time feed- and noise generated by the wind), and insect calls of varying back to the user as to the identification of the insect being amplitude depending on the proximity of the recording device heard; firstly, so that if it is not a cicada we do not force the to the specimen. user to upload unnecessary recordings1, and conversely, if a We show how our approach is capable of identifying the ci- cicada is detected, so that we can prompt the user to collect cada call in normal environmental noise more accurately than the best quality recording possible and keep them engaged in the state-of-the-art batch classification algorithms described the search. Finally, the pre-processing approaches described earlier. In particular, we achieve an F1 score of 0:955 for the above may actually impair detection in certain cases. In par- detection of the cicada on a large data set of over 30 calls, ticular, while often insects can easily be classified by differ- recorded with a smartphone, while the method proposed by ences in the frequencies of their song, we demonstrate that Chaves et al. [2012] only scores F1 = 0:126 due to the con- these methods fail to distinguish between the song of the fusion with the cricket’s calls. Our efficient feature extraction New Forest cicada (which sings continuously at 14 kHz), procedure is robust to noise and decreases the computational and that of the dark bush cricket, common in the New For- complexity of the detection process, providing the capability est (that chirps intermittently at 14 kHz).