Bee Tracker – an open-source machine-learning based video
analysis software for the assessment of nesting and foraging performance
of cavity-nesting solitary bees
Running headline: Video analysis software for solitary bees
Anina C. Knauer1*, Johannes
Gallmann2 and Matthias Albrecht1
1 Agroscope, Agroecology and Environment, Zürich,
Switzerland;
2 Ubique Innovations AG, Zürich, Switzerland
*Corresponding author: Anina Knauer, Reckenholzstrasse 191, 8046 Zürich,
Switzerland,
anina.knauer@agroscope.admin.ch
Abstract
- The foraging and nesting performance of bees can provide important
information on bee health and is of interest for risk and impact
assessment of environmental stressors. While radio-frequency
identification (RFID) technology is an efficient tool increasingly
used for the collection of behavioral data in social bee species such
as honey bees, behavioral studies on solitary bees still largely
depend on direct observations, which is very time-consuming.
- Here, we present a novel automated methodological approach of
individually and simultaneously tracking and analyzing foraging and
nesting behavior of numerous cavity-nesting solitary bees. The
approach consists of monitoring nesting units by video recording and
automated analysis of videos by a machine learning based software.
This Bee Tracker software consists of four trained deep
learning networks to detect bees that enter or leave their nest and to
recognize individual IDs on the bees’ thorax as well as the IDs of
their nests according to their positions in the nesting unit.
- The software is able to identify each nest of each individual nesting
bee, which permits to measure individual-based measures of
reproductive success. Moreover, the software quantifies the number of
cavities a female enters until it finds its nest as a proxy of nest
recognition, and it provides information on the number and duration of
foraging trips. By training the software on 8 videos recording 24
nesting females per video, the software achieved a precision of 96%
correct measurements of these parameters.
- The software could be adapted to various experimental setups by
training it to an according set of videos. The presented method allows
to efficiently collect large amounts of data on cavity-nesting
solitary bee species and represents a promising new tool for the
monitoring and assessment of behavior and reproductive success under
laboratory, semi-field and field conditions.
Key words: behavior, fitness, Osmia bicornis , risk assessment,
sublethal
Introduction
Bees provide pollination services to wild plants and crops and are
essential for biodiversity and human food supply (Klein et al., 2007;
Ollerton et al., 2011). They hold important flagship and indicator
species and are used for the monitoring and impact assessment of
environmental stressors such as habitat degradation, pesticide exposure
or pathogens (Potts et al., 2010; Potts et al., 2016; Schönfelder &
Bogner, 2017; Woodard et al., 2020). An important component in the
evaluation of bee health is the assessment of reproductive success and
foraging behavior, as key drivers of population development and
provisioning of pollination services (Artz & Pitts-Singer, 2015; Ganser
et al., 2020; Henry et al., 2012; Siviter et al., 2021). Such
assessments requires, however, accurate and efficient tools to collect
the often large amount of data required to assess bee health, especially
if data on individual bees shall be collected (Crall et al., 2018;
Nunes-Silva et al., 2019). Recent research and environmental risk
assessments have mainly focused on the honey bee, Apis mellifera ,
and a few other social bee species (e.g. Bombus terrestris) as
indicator species (Goulson et al., 2015; Potts et al., 2016). Only
relatively recently research and risk assessments increasingly consider
also other bee species for the monitoring of impacts of stressors on bee
pollinators, prominently including cavity-nesting solitary bee species
(Boff et al., 2020; Rundlöf et al., 2015; Stuligross & Williams, 2020;
Zurbuchen et al., 2010). In Europe for example, the European Food Safety
Authority (EFSA) has proposed to integrate two cavity-nesting solitary
bee species, Osmia bicornis and O. cornuta for risk
assessment of plant protection products on bees, including higher-tier
assessments of sub-lethal effects on reproductive success (EFSA, 2013;
Franke et al., 2021). This development has been fueled by the increased
recognition of the fact that the effect of different environmental
drivers can substantially vary between bee species and depend on their
functional and life-history traits such as sociality, body size,
foraging or nesting traits (Brittain & Potts, 2011; Sgolastra et al.,
2019).
Bees can respond through changes in their nesting and foraging behavior
to various environmental stressors as pesticides, habitat degradation or
pathogens (Leonhardt et al., 2016; Li et al., 2013; Siviter et al.,
2021). However, while foraging behavior of individuals of social bee
species such as A. mellifera can automatically be recorded with
RFID technology (Nunes-Silva et al., 2019), no such tool is, to our
knowledge, currently available for the collection of such data for
solitary bees. As studies with cavity-nesting solitary bees typically
require nesting units with numerous scattered nesting cavities (Fig. 1),
RFID, which has a short reach of the signal (Nunes-Silva et al., 2019),
is difficult to implement. Furthermore, tracking foraging behavior and
reproductive success of multiple individual females requires correct
identification and assignment of the cavities used for nesting by
individual females, which can only be achieved with a large number of
readers at high costs. So far, studies on solitary bee species have
therefore largely depended on direct visual observation to monitor
foraging behavior or the nesting progress of individual females (Artz &
Pitts-Singer, 2015; Franke et al., 2021), which is very time consuming,
hampering research and environmental risk assessment with solitary model
bee species.
Software can be used to automatically detect animals in images or
analyze animal behavior recorded with videos (Eikelboom et al., 2019;
Pennington et al., 2019). Here, we present a new machine learning based
software, which can automatically extract and analyze data on the
foraging and nesting behavior of individually marked, cavity-nesting
solitary bees from videos. The Bee Tracker analyses videos of
nesting units and records the entering and leaving of cavities by
individually marked bees. The software is provided free and open-source
including the underlying Python code, as well as a user manual, which
makes the software also accessible to users who have no programming
background. The above-mentioned measurements of bee behavior are
provided as csv files and can easily be further processed (e.g. for
statistical analysis). Additionally, the software creates visualization
videos of the machine learning based analysis, which allows users to
evaluate software performance including the precision of the provided
measurements. The machine learning networks that permit to train the
software and parameters of the input file can be adapted to specific
requirements, which allows to use the software in a wide range of
experimental setups.
Methods