Deep Learning applied to the Identification of Fruit Fly in Intelligent Traps

  • Valter Martins UFPEL
  • Lucas Freitas UFPEL
  • Lisane Brisolara UFPEL
  • Marilton de Aguiar UFPEL
  • Paulo Roberto Ferreira Jr. UFPEL


This paper presents a novel approach to the identification of two species of fruit flies as part of a network of intelligent traps designed to monitor these insects population in a plantation. This identification is done essentially by a convolutional neural network which learns the characteristics of the insects based on its images made from the adhesive floor of the trap. The proposed approach also uses a simple image digital processing technique to prepare the image and a perceptron neural network to classify the objects into the right class given its characteristics. We have trained several convolutional neural network architectures, with different configurations, trough a dateset of images collected on the field. Our aim was to find the one with high precision and low time needed to the classification. The best performance was achieved by ResNet18, with a precision of 93.55% and 91.28%. for the classification of the fruit flies focusing here, named Ceratitis Capitata and Grapholita Molesta, respectively. As it is required that the classification occurs embedded on the trap, despite our efforts, the only architecture that have ran in our platform was the SqueezeNet. We show that its precision is 88.56\% and 90.60\%, for the classification of Ceratitis Capitata and Grapholita Molesta, respectively, which is very close to the best performance one. According our expert partners, the results are feasible to a real-world application.

Palavras-chave: Deep learning, Applications


N. Elliott J. Farrell A. Gutierrez J. C. van Lenteren M. Walton S. Wratten D. Dent Integrated pest management Berlim Alemanha:Springer Science & Business Media 1995.

A. Shelton F. Badenes-Perez "Concepts and applications of trap cropping in pest management" Annual Review of Entomology vol. 51 no. 1 pp. 285-308 2006.

J.-A. Jiang C.-L. Tseng F.-M. Lu E.-C. Yang Z.-S. Wu C.-P. Chen S.-H. Lin K.-C. Lin C.-S. Liao "A gsm-based remote wireless automatic monitoring system for field information: A case study for ecological monitoring of the oriental fruit fly bactrocera dorsalis (hendel)" Comput. Electron. Agric. vol. 62 no. 2 pp. 243-259 2008.

O. López M. M. Rach H. Migallon M. P. Malumbres A. Bonastre J. J. Serrano "Monitoring pest insect traps by means of low-power image sensor technologies" Sensors vol. 12 no. 11 pp. 15 801-15 819 2012.

P. Tirelli N. Borghese F. Pedersini G. Galassi R. Oberti "Automatic monitoring of pest insects traps by zigbee-based wireless networking of image sensors" Instrumentation and Measurement Technology Conference (I2MTC) 2011 IEEE pp. 1-5 2011.

T. B. Remboski W. D. de Souza M. S. de Aguiar P. R. Ferreira "Identification of fruit fly in intelligent traps using techniques of digital image processing and machine learning" Proceedings of the 33rd Annual ACM Symposium on Applied Computing ser. SAC ‘18 pp. 260-267 2018.

W. Dalmorra de Souza T. Bystronski Remboski M. Sanchotene de Aguiar P. R. Ferreira "A model for pest infestation prediction in crops based on local meteorological monitoring stations" 2017 Sixteenth Mexican International Conference on Artificial Intelligence (MICAI) pp. 39-45 Oct 2017.

W. Ding G. Taylor "Automatic moth detection from trap images for pest management" Computers and Electronics in Agriculture vol. 123 pp. 17-28 04 2016.

O. M. Parkhi A. Vedaldi A. Zisserman et al. "Deep face recognition" bmvc vol. 1 no. 3 pp. 6 2015.

Y. LeCun B. Boser J. S. Denker D. Henderson R. E. Howard W. Hubbard L. D. Jackel "Backpropagation applied to handwritten zip code recognition" Neural computation vol. 1 no. 4 pp. 541-551 1989.

R. Collobert J. Weston "A unified architecture for natural language processing: Deep neural networks with multitask learning" Proceedings of the 25th international conference on Machine learning pp. 160-167 2008.

F. Rosenblatt "The perceptron: a probabilistic model for information storage and organization in the brain" Psychological review vol. 65 no. 6 pp. 386 1958.

F. Rosenblatt "Principles of neurodynamics. perceptrons and the theory of brain mechanisms" Tech. Rep. 1961.

I. Goodfellow Y. Bengio A. Courville Deep Learning MIT Press 2016 [online] Available:

A. Krizhevsky I. Sutskever G. E. Hinton "Imagenet classification with deep convolutional neural networks" Advances in neural information processing systems pp. 1097-1105 2012.

J. Long E. Shelhamer T. Darrell "Fully convolutional networks for semantic segmentation" Proceedings of the IEEE conference on computer vision and pattern recognition pp. 3431-3440 2015.

M. Oquab L. Bottou I. Laptev J. Sivic "Learning and transferring mid-level image representations using convolutional neural networks" Proceedings of the IEEE conference on computer vision and pattern recognition pp. 1717-1724 2014.

L. Perez J. Wang "The effectiveness of data augmentation in image classification using deep learning" CoRR vol. abs/1712.04621 2017 [online] Available:

X. Glorot A. Bordes Y. Bengio "Deep sparse rectifier neural networks" Proceedings of the fourteenth international conference on artificial intelligence and statistics pp. 315-323 2011.

S. Ioffe C. Szegedy "Batch normalization: Accelerating deep network training by reducing internal covariate shift" CoRR vol. abs/1502.03167 2015 [online] Available:

M. Lin Q. Chen S. Yan "Network in network" CoRR vol. abs/1312.4400 2013.

K. He X. Zhang S. Ren J. Sun "Deep residual learning for image recognition" 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR) pp. 770-778 June 2016.

F. N. Iandola M. W. Moskewicz K. Ashraf S. Han W. J. Dally K. Keutzer "Squeezenet: Alexnet-level accuracy with 50× fewer parameters and ¡1mb model size" vol. abs/1602.07360 2017.

S. Xie R. Girshick P. Dollár Z. Tu K. He "Aggregated residual transformations for deep neural networks" 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR) pp. 5987-5995 July 2017.

C. Wen D. Guyer "Image-based orchard insect automated identification and classification method" Computers and Electronics in Agriculture vol. 89 pp. 110-115 11 2012.

L. Solis-Sánchez J. García-Escalante R. Castañeda-Miranda I. Torres-Pacheco R. Guevara-González "Machine vision algorithm for whiteflies (bemisia tabaci genn.) scouting under greenhouse environment" Journal of Applied Entomology vol. 133 no. 7 pp. 546-552 2009.

R. Kumar V. Martin S. Moisan "Robust insect classification applied to real time greenhouse infestation monitoring" Proceedings of the 20th International Conference on Pattern Recognition on Visual Observation and Analysis of Animal and Insect Behavior Workshop pp. 1-4 2010.

F. A. Faria P. Perre R. Zucchi L. Jorge T. Lewinsohn A. Rocha R. d. S. Torres "Automatic identification of fruit flies (diptera: Tephritidae)" Journal of Visual Communication and Image Representation vol. 25 no. 7 pp. 1516-1527 2014.
Como Citar

Selecione um Formato
MARTINS, Valter; FREITAS, Lucas ; BRISOLARA, Lisane ; DE AGUIAR, Marilton ; FERREIRA JR., Paulo Roberto. Deep Learning applied to the Identification of Fruit Fly in Intelligent Traps. In: SIMPÓSIO BRASILEIRO DE ENGENHARIA DE SISTEMAS COMPUTACIONAIS (SBESC), 9. , 2019, Natal. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2019 . p. 81-88. ISSN 2237-5430.