<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Xception Based Method for Bird Sound Recognition of BirdCLEF 2020</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Jisheng Bai</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Chen Chen</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Jianfeng Chen</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Northwestern Polytechnical University</institution>
          ,
          <addr-line>Xi'an</addr-line>
          ,
          <country country="CN">China</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>In this paper, we present an Xception based method for bird sound recognition of BirdCLEF2020. The goal of BirdCLEF2020 is to detect and classify 960 bird species within the provided soundscape recordings, it is more complex to di erentiate such a large number of birds than BirdCLEF2019. In our approach, logmel or loglinear spectrograms are extracted as features, and some data augmentation techniques are utilized to improve the performance of detecting the bird sounds. Finally, we evaluate our system on BirdCLEF2020 test dataset and achieve a classi cation mean average precision (c-mAP) score of 0.0421.</p>
      </abstract>
      <kwd-group>
        <kwd>Bird sound recognition Xception Data augmentation</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>It is di cult to take clear photos of birds, which requires an open environment,
professional equipment, high level of photography, and it takes a lot of time
to actively look for the objects to be photographed. Instead, we can identify a
bird's specie through a segment of its voice. Hearing the sound and
distinguishing birds is important for many environmental and scienti c purposes. Some
successful techniques will be used in monitoring of ecological environment in the
future. Birds are highly sensitive to the environment. If some areas are polluted,
some birds will gradually y away. Therefore, the changes of bird habits and
population can re ect the changes of the environment. If some microphones are
installed in the forests, the information of bird population and activities can
be collected, which can signi cantly improve the e ciency and accuracy
compared with manual observation. The sounds of di erent birds are indeed speci c.
A large number of sound data can be collected by installing speci c recording
equipment. This can be done automatically in an unattended environment,
without the need for people to invest extra time and money.</p>
      <p>
        With the development of deep learning, a large body of research in sound
classi cation is proven to outperform traditional methods in bird sound classi
cation [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Convolutional neural networks(CNNs) show great feature extraction
ability and results in many computer vision tasks. The image-based
architectures, Inception-v3 for example, can obtain the best performance in sound
classi cation or what ever the targeted domain [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Dataset</title>
      <p>The training data consists of audio recordings for bird species from South and
North America and Europe. The Xeno-canto community contributes this data
and provides more than 70,000 high-quality recordings across 960 species to this
year's challenge. Each recording is accompanied by metadata containing
information on recording location, date and other high-level descriptions provided by
the recordists.</p>
      <p>
        The test data consists of 153 soundscapes recorded in Peru, the USA, and
Germany. Each soundscape is of ten-minute duration and contains high
quantities of (overlapping) bird vocalizations [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <p>The number of recordings for each specie are calculated, although the training
dataset contains over 70,000 recordings, there are less than 90 recordings in
some species, the rest species are between 90 and 100 recordings. For example,
the bird specie with a ebird name of "banfru1" only contains 1 recording, but
there are 100 recordings in another specie "whcspa". The number distribution
of the dataset is shown in Fig.1. The imbalance of the dataset can have e ect
on recognizing bird species.</p>
    </sec>
    <sec id="sec-3">
      <title>Data preparation</title>
      <sec id="sec-3-1">
        <title>Bird sing separation</title>
        <p>
          To separate bird sound and background noise from a original recording, we apply
dilation, erosion and smooth masking. Similar techniques are presented in [11]
and used in [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ] and [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ]. We then separate all recordings into 960 bird sing species
and noise classes. Details are described as following:
{ Every recording is loaded with a sample rate of 22050Hz.
{ Short-time Fourier transform(STFT) is utilized to calculate spectrograms
with a window length of 1024 and hop length of 512.
{ We calculate median value for each row and column, then set every element
in the spectrogram to 1 if it is 1.5 times bigger than the median of its related
row and column, otherwise it's set to 0.
{ Binary erosion and dilation lters are implemented to distinguish noise and
signal parts. The lter size is 4 by 4 square.
{ Here we create a one-dimension vector named indicator vector, its ith
element is set to 1 if its related column has at least one 1, or it is 0.
{ Finally, we smooth the indicator vector twice by a dilation lter of size 8 by
1 then use it as a mask to separete original bird recordings. Each recording
can be divided into lots of signal and noise parts, all signal parts are
concatenated as one and the same as noise. We cut all recordings of every species
into 5 seconds parts. After these, we can get 960 folders of each specie of
5-second bird sound and noise recordings.
3.2
        </p>
      </sec>
      <sec id="sec-3-2">
        <title>Data augmentation</title>
        <p>In recent years, some data augmentation techniques are successfully applied in
sound recognition tasks. Two data augmentation metheds are utilized in our
approach.</p>
        <p>
          Some time and frequency augmentation methods have been used in [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ] and
[11]. In our proposed method, we simply use some of the techniques to augment
the dataset and they can be described as follows:
{ Load a bird sound le from random position (it starts from the beginning if
it reach the end).
{ Add most three les on the top of a 5-second bird sound fragment with
independent chance. These three les are bird sing from the same bird specie,
bird noise from the same specie and noise from another specie with chance
of 0.3,0.3 and 0.5 respectively. A amplitude factor between 0.3 and 0.5 is
applied during the process.
{ STFT is used to generate spectrogram from the added le with a window
size of 1024 and hop length of 512.
{ Normalization and logarithm is applied to calculate logmel or loglinear
spectrogram with 128 Mel-bands, frequencies beyond 11025Hz and lower than
50Hz are removed.
{ Due to the input size of Xception, di erent interpolation lters are applied
to resize the spectrograms into 299*299*1.
        </p>
        <p>To handle the imbalanced dataset and prevent over tting, we apply mix-up
during training stage [13]. It can be expressed as:
x~ =
y~ =
xi + (1
yi + (1
)xj
)yj
where xi; xj are input features, yi; yj are target labels, 2 [0; 1] is a random
number drawn from the Beta (c; a) distribution. We can get more training
samples without extra computing resource, new samples are linear interpolated of
real samples.
3.3</p>
      </sec>
      <sec id="sec-3-3">
        <title>Denoising</title>
        <p>All the bird sounds come from diverse area around the world with special
environmental background noise. In bird sound recordings, loud raining sound,
(1)
(2)
quiet background, sound of wind and sound of other animals may exist and even
cover some bird sounds. To eliminate this, we propose a denoising method to do
spectral subtraction on a spectrogram:
{ Load a 5-second sound le and generate an amplitude spectrogram.
{ Calculate mean amplitude values over frames, mark the minimum 20 frames
and calculate the mean amplitude values of these frames, we can get a
primary subtraction vector. Then subtract the primary subtraction vector over
frequencies for each frame, we can get the nal denoised spectrogram.
3.4</p>
      </sec>
      <sec id="sec-3-4">
        <title>Features</title>
        <p>During the training, separated bird sing, augmented bird sound and spectral
subtraction sound with logmel and loglinear spectrograms of 128 bands are
generated as input. All the spectrograms are calculated by logarithm.
4
4.1</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Network architecture</title>
      <sec id="sec-4-1">
        <title>Xception</title>
        <p>
          Inception-v3 is one of the state of art architectures in image classi cation
challenge [12]. And it is con rmed that Inception-based CNNs on Mel spectrograms
provide the best performance [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ]. The best network for bird song detection seems
to be the Inception-v3 architecture and it preforms better than even the more
recent architectures [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ].
        </p>
        <p>
          Xception is a improvement of Inception-v3 proposed by Google. In [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ], the
correlation between channels and spatial correlation should be dealt with
separately. The convolution operation in the original Inception-v3 is replaced by a
separate concept (Extreme Inception), which is the basic module of Xception.
The Xception network is composed of a series of separable convolution, residual
connection similar to ResNet and some other conventional operations.
4.2
        </p>
      </sec>
      <sec id="sec-4-2">
        <title>Training strategy</title>
        <p>To recognize 960 species and handle such a large amount of recordings, we used
Xception architecture instead of other CNN architectures. As for features, we
selected logmel and loglinear spectrogram as input. We applied a denoising method
and a data augmentation method during the data preprocessing. Pytorch was
implemented to train model, and python librosa library was applied to process
recordings and generate features.</p>
        <p>During the training, categorical cross entropy was used as loss function and
stochastic gradient descent was used as optimizer with weight decay of 1e-4 and
a constant learning rate of 0.001.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Results</title>
      <sec id="sec-5-1">
        <title>Evaluation metrics</title>
        <p>The evaluation metric is the classi cation mean Average Precision (c-mAP),
considering each class c of the ground truth as a query. This means that for
each class c, all predictions are extracted from the run le with ClassId(c), rank
them by decreasing probability and compute the average precision for that class,
which can be expressed as
c
mAP =</p>
        <p>PC
c 1 AveP (c)</p>
        <p>C
AveP (c) =</p>
        <p>Pn
k=1 P (k)
nrel(c)
rel(k)
where C is the number of species in the ground truth and AveP (c) is the average
precision for a given species c computed as:
where k is the rank of an item in the list of the predicted segments containing c,
n is the total number of predicted segments containing c, P (k) is the precision
at cut-o k in the list, rel(k) is an indicator function equaling 1 if the segment
at rank k is a relevant one (i.e. is labeled as containing c in the ground truth)
and nrel is the total number of relevant segments for c.
5.2</p>
      </sec>
      <sec id="sec-5-2">
        <title>Performance on validation split</title>
        <p>For each validation or test le, we smoothed the prediction vector by applying
a moving window size of 5 seconds. Then we only selected rst 3 maximum
probabilities as the result of a 5-second test fragment.</p>
        <p>To achieve the performance of our methods, we only trained 76 bird species
included in the validation dataset, the best c-mAP scores of the experiments are
shown in Table 1, data augmentation with adding sounds randomly is denoted as
AR, spectral subtraction is denoted as Spec sub. Experiment 1 and 2 only used
the extracted bird sing to generate features, the rest of experiments extracted
features Continuously from original recordings.</p>
        <p>From Table 1 we can see, logmel with mix-up method achieves the best
c-mAP score, loglinear performs well with separated bird sings and data
augmentaion with randomly adding.
5.3</p>
      </sec>
      <sec id="sec-5-3">
        <title>Performance on test split</title>
        <p>
          Four teams submitted 29 submissions in LifeCLEF 2020 Bird Monophone.
Finally we got the 2th rank among the teams and achieved a best c-mAP score of
0.0421 and r-mAP of 0.0671. Details are shown in Table 2 [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ] [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ]. Three di erent
methods were tested and results are shown in Table 3:
(3)
(4)
{ result0: We used the randomly adding data augmentation method, the
Xception architecture, and loglinear spectrograms in this run. Test output
vectors were smoothed to get nal prediction. It's the best performance of
all runs.
{ result1: We used the spectral subtraction denoising method, the Xception
architecture, and logmel spectrograms in this run. Test output vectors were
smoothed as well. Finally we got a c-mAP score of 0.032 and r-mAP score
of 0.0592.
{ result2: We used the Xception architecture and the features are bird sing
separated loglinear spectrograms. Test output vectors were smoothed as well.
Finally we got a c-mAP score of 0.027 and r-mAP score of 0.0558.
        </p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>Conclusion and future work</title>
      <p>In this paper, we proposed a system for bird recognition based on Xception with
some data augmentation and denoising techniques. Finally, we got a c-mAP
score of 0.0421 on o cial test dataset. To handle more than 70,000 recordings,
Xception was chosen because of its great feature extraction ability. During
training, mix-up and randomly adding data augmentation methods were applied to
prevent over tting and improve generalization performance.</p>
      <p>We nally submitted 7 submissions of three main methods. Ensemble of
networks is banned this year. We will focus on the performance of convolutional
recurrent neural networks and other data augmentation methods without more
computing resources for bird recognition. Features can also have great impact
on performance sometimes and they would be studied as well. There is still a lot
of work to improve in bird sound recognition in the future.
Conference and Labs of the Evaluation Forum, Dublin, Ireland, September 11-14,
2017. (2017), http://ceur-ws.org/Vol-1866/paper 177.pdf
11. Sprengel, E., Jaggi, M., Kilcher, Y., Hofmann, T.: Audio based bird species
identi cation using deep learning techniques. Tech. rep. (2016)
12. Szegedy, C., Vanhoucke, V., Io e, S., Shlens, J., Wojna, Z.: Rethinking the
inception architecture for computer vision. In: Proceedings of the IEEE conference on
computer vision and pattern recognition. pp. 2818{2826 (2016)
13. Zhang, H., Cisse, M., Dauphin, Y.N., Lopez-Paz, D.: mixup: Beyond empirical risk
minimization. arXiv preprint arXiv:1710.09412 (2017)</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>1. AIcrowd BirdCLEF2020, https://www.aicrowd.com/challenges/lifeclef-2020-birdmonophone</mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Bai</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chen</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chen</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fu</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          :
          <article-title>Inception-v3 based method of lifeclef 2019 bird recognition</article-title>
          .
          <source>In: CLEF (Working Notes)</source>
          (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Chollet</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>Xception: Deep learning with depthwise separable convolutions (</article-title>
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4. Herve Goeau, H.G.,
          <string-name>
            <surname>Planque</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vellinga</surname>
            ,
            <given-names>W.P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kahl</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Joly</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Overview of birdclef 2018: monophone vs. soundscape bird identi cation</article-title>
          .
          <source>CLEF working notes</source>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Joly</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          , Goeau, H.,
          <string-name>
            <surname>Botella</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Glotin</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bonnet</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vellinga</surname>
            ,
            <given-names>W.P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Planque</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          , Muller, H.:
          <article-title>Overview of lifeclef 2018: a large-scale evaluation of species identi cation and recommendation algorithms in the era of ai</article-title>
          . In:
          <article-title>International Conference of the Cross-Language Evaluation Forum for European Languages</article-title>
          . pp.
          <volume>247</volume>
          {
          <fpage>266</fpage>
          . Springer (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Joly</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          , Goeau, H.,
          <string-name>
            <surname>Glotin</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Spampinato</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bonnet</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vellinga</surname>
            ,
            <given-names>W.P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lombardo</surname>
            ,
            <given-names>J.C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Planque</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Palazzo</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          , Muller, H.:
          <article-title>Lifeclef 2017 lab overview: multimedia species identi cation challenges</article-title>
          .
          <source>In: International Conference of the CrossLanguage Evaluation Forum for European Languages</source>
          . pp.
          <volume>255</volume>
          {
          <fpage>274</fpage>
          . Springer (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Joly</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          , Goeau, H.,
          <string-name>
            <surname>Kahl</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Deneu</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Servajean</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cole</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Picek</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          , Ruiz De Castan~eda, R., e, Lorieul,
          <string-name>
            <given-names>T.</given-names>
            ,
            <surname>Botella</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            ,
            <surname>Glotin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            ,
            <surname>Champ</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            ,
            <surname>Vellinga</surname>
          </string-name>
          ,
          <string-name>
            <surname>W.P.</surname>
          </string-name>
          , Stoter,
          <string-name>
            <given-names>F.R.</given-names>
            ,
            <surname>Dorso</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Bonnet</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            ,
            <surname>Eggel</surname>
          </string-name>
          ,
          <string-name>
            <surname>I.</surname>
          </string-name>
          , Muller, H.:
          <article-title>Overview of lifeclef 2020: a system-oriented evaluation of automated species identi cation and species distribution prediction</article-title>
          .
          <source>In: Proceedings of CLEF</source>
          <year>2020</year>
          ,
          <article-title>CLEF: Conference and Labs of the Evaluation Forum</article-title>
          , Sep.
          <year>2020</year>
          , Thessaloniki,
          <string-name>
            <surname>Greece.</surname>
          </string-name>
          (
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Kahl</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Clapp</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hopping</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          , Goeau, H.,
          <string-name>
            <surname>Glotin</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Planque</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vellinga</surname>
            ,
            <given-names>W.P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Joly</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Overview of birdclef 2020: Bird sound recognition in complex acoustic environments</article-title>
          .
          <source>In: CLEF task overview</source>
          <year>2020</year>
          ,
          <article-title>CLEF: Conference and Labs of the Evaluation Forum</article-title>
          , Sep.
          <year>2020</year>
          , Thessaloniki,
          <string-name>
            <surname>Greece.</surname>
          </string-name>
          (
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Lasseck</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Audio-based bird species identi cation with deep convolutional neural networks</article-title>
          .
          <source>Working Notes of CLEF</source>
          <year>2018</year>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Sevilla</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Glotin</surname>
          </string-name>
          , H.:
          <article-title>Audio bird classi cation with inception-v4 extended with time and time-frequency attention mechanisms</article-title>
          .
          <source>In: Working Notes of CLEF</source>
          <year>2017</year>
          -
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>