Automatic counting and identification of two Drosophila melanogaster (Diptera: Drosophilidae) morphs with image-recognition artificial intelligence
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.