<!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>
      <journal-title-group>
        <journal-title>Journal of Invertebrate Pathology 73 (1999) make5040083.
40-44. doi:10.1006/jipa.1998.4803. [15] Z. Huangfu</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <article-id pub-id-type="doi">10.1006/jipa.1998.4803</article-id>
      <title-group>
        <article-title>Insights into Entomopathogenic Nematode Behavior by Using AI Techniques to Advance Sustainable Pest Control</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Gianluca Manduca</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Anita Casadei</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Valeria Zeni</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Giovanni Benelli</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Cesare Stefanini</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Donato Romano</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Agriculture</institution>
          ,
          <addr-line>Food and Environment</addr-line>
          ,
          <institution>University of Pisa</institution>
          ,
          <addr-line>Via del Borghetto 80, Pisa, 856124</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Department of Excellence in Robotics and AI, Sant'Anna School of Advanced Studies</institution>
          ,
          <addr-line>Piazza Martiri della Libertà 33, Pisa, 56127</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>The BioRobotics Institute, Sant'Anna School of Advanced Studies</institution>
          ,
          <addr-line>Viale R. Piaggio 34, Pontedera (PI), 56025</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2024</year>
      </pub-date>
      <volume>3486</volume>
      <fpage>29</fpage>
      <lpage>30</lpage>
      <abstract>
        <p>Entomopathogenic nematodes (EPNs) are organisms that are often mass-produced as biological control agents (BCAs) to mitigate pesticide-related hazards and foster environmental sustainability. Enhancing our understanding of EPNs biology and their interactions with hosts is crucial for refining the use of EPNs in integrated pest management. This study pioneers an interdisciplinary approach, integrating engineering, and entomology, to investigate the behavior of Steinernema carpocapsae EPN. Employing a novel blend of deep learning and optical flow analysis, a Convolutional Neural Network (CNN) efectively recognizes how nematodes react to host-borne stimuli. Achieving remarkable precision (1) and an overall accuracy of 0.938, the model elucidates EPN behaviors in a prototyped microfluidic platform reproducing a host-environment context. The integration of optical flow analysis highlights an increased motor activity in EPNs when exposed to stimuli, adding novel information on their dynamic responses. This versatile methodology represents a significant advancement in detecting and understanding EPNs responses to diverse stimuli, fostering their use as advanced BCAs in sustainable pest control and environmental management.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;deep learning</kwd>
        <kwd>optical flow</kwd>
        <kwd>biological control</kwd>
        <kwd>chemo-ecology</kwd>
        <kwd>lab-on-a-chip</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>minimal turbulent motion. A deep learning approach and then fabricated by rapid prototyping in a
biocomdiferentiated between scenarios involving stimulus pres- patible resin (VisiJet® M3 Crystal, 3D Systems). The
ence and control conditions, enabling the analysis of microfluidic testing arena, featuring a releasing chamber
motor diferences attributed to the stimulus presence. (Ø=5mm; h=2mm) and two stimuli chambers (Ø=3mm;
Nematodes are utilized as biosensors to gather environ- h=2mm), creates small environments for the analysis of
mental information and investigate changes in behavioral nematode behavior without imposing spatial constraints
traits in response to stimuli. The integration of optical on their motility, thereby avoiding potential biases. Each
lfow analysis revealed distinct variations in motor ac- stimuli chamber is connected to the releasing chamber
tivity among individuals across diferent contexts. This through an aisle creating an y-maze arena. The floor of
study bridges microfluidics, machine learning, and sus- the test arena is represented by a transparent glass plate
tainable integrated pest management, ofering insights ifrmly connected to the base of the upper component by
into S. carpocapsae EPN behavior. It contributes to the depositing and curing a polydimethylsiloxane (PDMS)
broader context of the convergence of AI, engineering, film (Sylgard 184). To observe and record the behavior of
and entomology, advancing strategies for biomedical re- nematodes, an operator introduced the nematodes into
search and sustainable pest control. the releasing chamber using a pipette. Subsequently, the
miniaturized testing arena was carefully positioned
under a 3D visual inspection microscope (Nikon TMS) with
2. Methods a total magnification of 25X. This setup allowed for
precise and detailed observation of EPN behavior within
2.1. Steinernema carpocapsae the microfluidic system, ensuring accurate recording of
their responses to the specific stimuli provided in the
chambers.</p>
      <p>We used NEMOPAK SC, a commercial product distributed
by BIOPLANET (Cesena, Italy), to obtain and test
Steinernema carpocapsae nematodes at infective juvenile stage
(IJ). Nematodes were maintained at 4-8°C till the expira- 2.4. Experiment workflow and recordings
tion date and solubilized in water at 25°C, with constant
stirring and heating, obtained using a magnetic vortex,
to keep them viable before trials.</p>
      <p>The nematodes were reactivated in water at a
temperature of 25°C for 20 minutes as arranged by Bioplanet srl.
(Cesena, Italy). Meanwhile, the microarena was washed
with water and 70% ethanol to remove contaminants,
re2.2. Tested cue duce surface tension, enhance arena wettability, and
imEPNs are attracted by chemical cues deriving from po- prove nematode locomotion. A second washing was
cartential hosts. Some studies show the attractive efects of ried out using water to eliminate the alcohol traces
potengut content of hosts on EPN locomotion [13]. Thus, we tially harmful to the EPN. The chip was then filled with
used Lobesia botrana 5th instar larvae feces to investigate the medium, 0.9% NaCl physiological solution within
responses in S. carpocapsae. which the nematodes move, it is useful to avoid osmotic
stress. Solution and nematodes were inserted using a
2.3. Microfluidic platform and plastic micro pipette. The chip thus assembled is placed
under the microscope and the stimulus is positioned in
experimental apparatus the opposite arenas, alternating localization to avoid bias
during the analysis. The videos were recorded under
the microscope for a total of 5 minutes. Video analysis
The miniaturized testing arena was designed in
SolidWorks (Dassault Systemes, Velizy Villacoublay, France)
considers only 60 seconds recording to avoid acclima- sured within each subset. Manual labeling of images was
tion time and promote next computer vision and deep performed using the online Makesense software. The
learning analysis. Videos are recorded by using an RGB dataset also includes approximately 10% background
imcamera (48MP, ƒ/1.8) set on the microscope. Following ages without nematodes, distributed in the same 70-20-10
each test, the device is washed and cleaned in accordance ratio. The CNN was trained with a batch size of 8, over
with the previously described procedures. 200 epochs, and an image size of 1920x1080 to enhance
data quality when dealing with small objects. Afterward,
2.5. Deep learning detection 32 one-minute inference videos were analyzed, evenly
split between stimulus and control contexts. Frames were
A deep learning approach was utilized to diferentiate extracted from each video at a frequency of 1Hz. For each
between scenarios involving stimulus presence and con- frame, the CNN detected nematodes distinguished under
trol conditions for nematodes. Beyond discriminating stimulus and control conditions. The outcomes were
avbetween the two contexts, this approach enabled the eraged for each frame to establish the presence or absence
analysis of motor activity diferences captured through of a stimulus in the scenario. This procedure was iterated
images, attributed to the stimulus presence. In this sense, for each video. In evaluating the CNN model, various
nematodes have been employed as biosensors to gather metrics such as accuracy, precision, recall, f1-score, and
information about the surrounding environment, while mAP were considered. Training and subsequent analyses
also investigating changes in behavioral traits in response were performed using Ultralytics in Python with a Tesla
to a stimulus using deep learning techniques. To achieve T4 GPU.
this objective, a YOLOv8n Convolutional Neural Network
(CNN) model pre-trained on the COCO dataset, a widely 2.6. Optical flow analysis
used benchmark for object detection tasks [14], was
utilized. The selection of this CNN model was driven by its For a comprehensive motor activity investigation, an
opversatility and demonstrated efectiveness in object detec- tical flow analysis was integrated into the deep learning
tion tasks. YOLO networks have been applied across vari- framework, using the Farnebäck algorithm [19] with
speous detection tasks, particularly in the v8 version, encom- cific parameter settings (image scale of 0.5, 5 pyramid
passing small object identification in Unmanned Aerial layers, averaging window size of 15, 3 iterations, size of
Vehicle (UAV) images [15], evaluating medical face mask the pixel neighborhood used for polynomial expansion
adherence in COVID-19 scenarios [16], or also detecting in each pixel of 7, standard deviation of the Gaussian
diverse marine species [17]. YOLOv8 employs a CNN used to smooth derivatives for the polynomial expansion
structured into three main components: the backbone, of 1.5). A total of 60 videos, balanced between control
neck, and head. The backbone, based on a modified CSP- and stimulus contexts, were considered. Given that
neDarknet53 architecture, facilitates multi-scaled object de- matodes exhibit body movements with a 2Hz frequency
tection through a feature pyramid network, generating according to literature [20], frames were sampled at 5Hz
ifve scale features [ 18]. The neck introduces a PAN-FPN in accordance with the Shannon theorem for the optical
architecture, optimizing performance while maintain- flow analysis. First, the optical flow magnitude was
coming a lightweight design. The detection head consists of puted by comparing two frames. The CNN model was
convolutional and fully connected layers for object classi- exploited to obtain the bounding boxes of the detected
ifcation and bounding box regression. Loss functions like nematodes. Then, the mean magnitude value for each
BCE Loss and DFL/CIoU are employed. YOLOv8 operates bounding box was considered. Lastly, the maximum
magas an anchor-free detection model, directly predicting nitude among the averaged values of the bounding boxes
object centers. Dynamic sample assignment is achieved was extracted for each frame, to avoid misclassifications
through the Task-Aligned Assigner mechanism, further with background. Temporal data were collected, and the
improving accuracy and robustness. Architectural en- mean of these values was computed to derive a
represenhancements include module exchanges and convolution tative value for each video. The analysis was conducted
replacements, resulting in a model weighing 6.24 MB using OpenCV in Python.
in the v8 nano version. The pre-trained CNN model
was fine-tuned to identify and distinguish nematodes in 2.7. Statistical analysis
the presence of a stimulus from those in a control
setting. A dataset of 1680 images was obtained from 50 Data were normally distributed (Shapiro-Wilk test,
videos, evenly distributed between control and stimulus p&gt;0.01) and homoscedastic (Levene test, p&gt;0.01).
Therecontexts. The dataset was divided into training (70%), val- fore, statistical significance between stimuli and control
idation (20%), and testing (10%) sets, resulting in subsets was established using a t-test. Statistical analyses were
comprising 1189, 339, and 152 images, respectively. An performed using JMP Pro 17 software. The threshold was
equal distribution of images across both classes was en- set at p=0.05.</p>
    </sec>
    <sec id="sec-2">
      <title>3. Results</title>
      <p>identifying the control context, as demonstrated in the
normalized confusion matrix in Fig.2(C). Examination of
Microscopical observations have allowed us to identify the normalized confusion matrix indicates that the
conthe main behaviors performed by S. carpocapsae, includ- trol class achieved 100% accuracy, while the stimulus class
ing an increase in movement and the size of oscillations. exhibited 88% accuracy with a 12% error attributed to
misThis clearly demonstrates the presence of an efect due classification as the control class. Fig. 2( D) showcases
to tested cue arising from the host on the gestural com- predictions in video analysis. Overall, the video analysis
plex of the EPN. Our findings indicate that S. carpocapsae attained an accuracy of 0.938, precision of 1, recall of
exhibits not only a sit-and-wait strategy but also demon- 0.875, and f1-score of 0.933 in identifying stimulus
presstrates active host-seeking behavior in response to chem- ence from behavioral traits. The results obtained through
ical stimuli within its proximity. The fact that nematodes deep learning validate the observations. The CNN
efecchanged their posture and locomotion direction towards tively distinguished between the two contexts (stimulus
the stimulus is functional to describe L. botrana feces as presence and control) based on nematodes. Considering
an attractive cue. Furthermore, this characteristic has this image-based approach, the diferences are attributed
been sparsely evaluated in the literature [21] but holds to altered gestures due to the presence of a stimulus. The
significant value for enhancing our understanding about subsequent analysis integrating the optical flow aims
this species ethology and optimizing its utilization as to investigate changes in motor activity over time
beBCA. The CNN model achieved a precision of 0.632, re- tween the control and stimulus contexts. Fig.3(A) shows
call of 0.623, and mAP0.5 of 0.608 on the validation set. a graphical representation of the magnitude for the
stimPredictions for two images outside the training and vali- ulus scenario, obtained through MINMAX normalization.
dation processes are shown in Fig.2(A) and (B). Although Initially, the CNN model was utilized to obtain bounding
the network exhibits limitations, particularly in individ- boxes for each frame. Subsequently, the mean optical
ual identification compared to background, conducting lfow magnitude was calculated for each bounding box.
video analysis yields promising results with no errors in Finally, the maximum value among the averaged
mag</p>
    </sec>
    <sec id="sec-3">
      <title>Acknowledgments</title>
      <p>
        nitude values in the bounding boxes was determined. not to the emitter. Nematode responses were assessed
Temporal profiles of this value for the control and stim- using automated motility tracking and computer vision
ulus contexts are compared in Fig.3(B) considering two techniques [24]. The proposed integrated methodology
video samples. The mean of these magnitude values over significantly enhances our ability to discern and
undertime was considered to obtain an overall value for each stand EPN responses to diverse host stimuli. The use
video. Fig. 3(C) illustrates the comparison between con- of AI-based techniques and deep learning, integrated
trol and stimulus data. Statistical analysis conducted on with microfluidics and optical flow analysis, represents
this data demonstrates significance ( p=0.010), providing an innovative approach to behavioral studies, ofering
evidence of observed diferences in motor activity. The the possibility of using nematodes as biosensors.
Furintegration of optical flow with deep learning detection ther research on EPN behavior, utilizing pose estimation
reveals increased motor activity of nematodes in the pres- and diverse organic stimuli, could enhance commercial
ence of the stimulus when compared to the motility of product performance and expand S. carpocapsae’s use
control specimens. as a BCA for other phytophagous species, supporting
biological control principles [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
      </p>
    </sec>
    <sec id="sec-4">
      <title>4. Discussion</title>
      <p>The deep learning approach efectively diferentiated
between scenarios with stimuli and control conditions for This research was supported by the EU H2020 FETOPEN
nematodes. Beyond discrimination, it helped analyze Project “Robocoenosis - ROBOts in cooperation with a
motor activity the presence of the stimulus. EPNs have bioCOENOSIS” [899520], the PRIN Project “COSMIC
been used as biosensors, gathering environmental data COntrolled Space MIcroecological system supporting
and revealing behavioral changes through deep learning eCopoiesis” granted by the Italian Ministry of
Educatechniques. We utilized various methods, including mi- tion, University and Research (MIUR) [2022EY5BXC], and
crofluidics, deep learning, and optical flow, to investigate the EU H2020-MSCARISE-2018 “ECOBOTICS.SEA -
Biothese diferences and develop an automated workflow inspired Technologies for a Sustainable Marine
Ecosysfor studying EPNs. Microfluidics was already employed tem” [824043]. Funders had no role in the study design,
in several biological and behavioral assays with diferent data collection and analysis, decision to publish, or
prepaspecies [22], but considering nematodes, this technique ration of the manuscript. The authors are grateful to Ms.
is common also for the model organism Caenorhabdi- Cristina Piras for her kind support in visualization.
tis elegans [23]. Our innovative approach is essential
for studying a parasite’s behavior and locomotion in a
natural-like condition. AI analysis revealed challenges References
at the frame level due to background interference, but
exploring diferent architectures may improve results.</p>
      <p>However, at the video level, the model showed
satisfactory performance with 100% precision. Optical flow and
statistical analyses highlighted distinctions in motor
activity between individuals in diferent contexts. Tests on
EPN movement emphasized their ability to sense, move
towards, and enter hosts. AI-based results confirm the
preliminary microscopic observations regarding the
presence of active motility in the tested species and supports
the few assays which consider S. carpocapsae a
nematode with some cruiser’s features [21]. Considering our
results it’s clearly observed that S. carpocapsae has an
actual locomotion towards the stimulus, explainable as
chemotaxis where there is a spatial movement and
klinotaxis where speciemens change their body conformation
by bending or turning in presence of the organic stimulus.</p>
      <p>Nematodes demonstrate aggregate migration; notably,
we observed increased presence near the attractor [23].</p>
      <p>According to our results, we are able to define larval feces
cues as a kairomone; in fact, they evoke a physiological
response in EPNs, which is favorable to the receiver but</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>J.</given-names>
            <surname>Zhou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Dong</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Hou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Huang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <article-title>Highthroughput microfluidic systems accelerated by artificial intelligence for biomedical applications</article-title>
          ,
          <source>Lab on a Chip</source>
          (
          <year>2024</year>
          ). doi:
          <volume>10</volume>
          .1039/D3LC01012K.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>R.</given-names>
            <surname>Gaugler</surname>
          </string-name>
          ,
          <article-title>Ecological genetics of entomopathogenic nematodes</article-title>
          , CSIRO,
          <string-name>
            <surname>East</surname>
            <given-names>Melbourne</given-names>
          </string-name>
          ,
          <year>1993</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>W.</given-names>
            <surname>Hominick</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Briscoe</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F. G.</given-names>
            <surname>del Pino</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Heng</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Hunt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Kozodoy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Mracek</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Nguyen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Reid</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Spiridonov</surname>
          </string-name>
          , et al.,
          <article-title>Biosystematics of entomopathogenic nematodes: current status, protocols and definitions</article-title>
          ,
          <source>Journal of Helminthology</source>
          <volume>71</volume>
          (
          <year>1997</year>
          )
          <fpage>271</fpage>
          -
          <lpage>298</lpage>
          . doi:
          <volume>10</volume>
          .1017/S0022149X00016096.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>E.</given-names>
            <surname>Lewis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Gaugler</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Harrison</surname>
          </string-name>
          ,
          <article-title>Entomopathogenic nematode host finding: response to host contact cues by cruise and ambush foragers</article-title>
          ,
          <source>Parasitology</source>
          <volume>105</volume>
          (
          <year>1992</year>
          )
          <fpage>309</fpage>
          -
          <lpage>315</lpage>
          . doi:
          <volume>10</volume>
          . 1017/S0031182000074230.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>P.</given-names>
            <surname>Grewal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Converse</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Georgis</surname>
          </string-name>
          ,
          <article-title>Influence of production and bioassay methods on infectivity of two ambush foragers (nematoda: Steinernemati-</article-title>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>