Hostname: page-component-89b8bd64d-shngb Total loading time: 0 Render date: 2026-05-08T13:55:41.738Z Has data issue: false hasContentIssue false

Automatic counting and identification of two Drosophila melanogaster (Diptera: Drosophilidae) morphs with image-recognition artificial intelligence

Published online by Cambridge University Press:  11 December 2024

Aaron Gálvez Salido
Affiliation:
Departamento de Genética, Facultad de Ciencias, Universidad de Granada, Granada, Spain
Roberto de la Herrán
Affiliation:
Departamento de Genética, Facultad de Ciencias, Universidad de Granada, Granada, Spain
Francisca Robles
Affiliation:
Departamento de Genética, Facultad de Ciencias, Universidad de Granada, Granada, Spain
Carmelo Ruiz Rejón
Affiliation:
Departamento de Genética, Facultad de Ciencias, Universidad de Granada, Granada, Spain
Rafael Navajas-Pérez*
Affiliation:
Departamento de Genética, Facultad de Ciencias, Universidad de Granada, Granada, Spain
*
Corresponding author: Rafael Navajas-Pérez; Email: rnavajas@ugr.es

Abstract

Many population biology, ecology, and evolution experiments rely on the accuracy of the classification of individuals and the estimation of size population. The visual classification of vinegar flies, Drosophila melanogaster (Diptera: Drosophilidae), morphs is a laborious task usually performed by bench workers. Because of the size of the flies and the degree of precision needed to distinguish the morphological features on which the classification is based, the work is performed using a dissecting microscope. Here, we describe a method to automate the counting and identification of two types of vinegar flies, white and wild individuals. Our method is based on the image-recognition artificial intelligence (AI) tool, FlydAI (FlyDetector AI), which proved to correctly classify the flies when high-quality images were used, with a success rate of up to 100% in samples containing up to 200 individuals. This is a significant improvement with respect to preexisting approaches in terms of accuracy and specificity of the morphs detected. Although this tool is exclusively trained to routine lab tasks involving wild and white D. melanogaster, the AI can be easily trained to recognise different vinegar fly mutants and other types of insects of similar size, and its potential in other areas still needs to be explored.

Information

Type
Research Paper
Creative Commons
Creative Common License - CCCreative Common License - BYCreative Common License - NCCreative Common License - SA
This is an Open Access article, distributed under the terms of the Creative Commons Attribution-NonCommercial-ShareAlike licence (https://creativecommons.org/licenses/by-nc-sa/4.0/), which permits non-commercial re-use, distribution, and reproduction in any medium, provided the same Creative Commons licence is used to distribute the re-used or adapted article and the original article is properly cited. The written permission of Cambridge University Press must be obtained prior to any commercial use.
Copyright
© The Author(s), 2024. Published by Cambridge University Press on behalf of Entomological Society of Canada
Figure 0

Figure 1. Pipeline of the development and use of image-recognition AI: image capturing, dataset preparation, and AI training and validation.

Figure 1

Figure 2. Output of an image reconstructed by FlydAI. Each individual is identified by a red square; phenotypes and a value of confidence (a cutoff value of 0.65 was considered) included in brackets are indicated inside.

Figure 2

Figure 3. Example of an image reconstructed by combining fragments and adding artificial noise generated by Roboflow.

Figure 3

Table 1. Success rate (SR) of estimation of number and phenotype of individuals by AI and run time for the different densities and image sources

Figure 4

Table 2. Success rate (SR) of estimation of number and phenotype of individuals from digital images by human workers and processing time

Figure 5

Table 3. Success rate (SR) of estimation of number and phenotype of individuals from lab samples by human workers and processing time

Supplementary material: File

Gálvez Salido et al. supplementary material 1

Gálvez Salido et al. supplementary material
Download Gálvez Salido et al. supplementary material 1(File)
File 5.2 MB
Supplementary material: File

Gálvez Salido et al. supplementary material 2

Gálvez Salido et al. supplementary material
Download Gálvez Salido et al. supplementary material 2(File)
File 12.2 KB