Monitoramento da maturação dos frutos e de doenças do cafeeiro utilizando modelos de deep learning
Arquivos
Data
2021-12-20
Autores
Título da Revista
ISSN da Revista
Título de Volume
Editor
Universidade Federal de Viçosa
Resumo
O valor da safra do café está relacionado à vários fatores entre eles: a oferta e a demanda, a quantidade produzida, o armazenamento, a qualidade dos frutos, dentre outros. A qualidade do café, por sua vez, é afetada por vários fatores, entre eles radiação solar, nutrição das plantas, altitude, presença ou ausência de pragas e doenças. Dentre as principais doenças que infestam a cultura do café estão: ferrugem, cercosporiose e mancha de phoma. A ferrugem (Hemileia vastatrix Berk. & Br.) ataca as folhas do cafeeiro o que gera queda prematura das mesmas e redução da fotossíntese. De forma semelhante, a cercosporiose causa danos, principalmente, em lavouras sem fertilização adequada, atingindo folhas e frutos. Já mancha de phoma é favorecida por diferentes eventos climáticos como: ventos fortes e frios, granizo e geada. Além das doenças, outro fator determinante que impacta diretamente na qualidade da bebida é o grau de maturação dos frutos no momento da colheita. Sabe- se que frutos maduros, no estádio denominado cereja, geram cafés de qualidade superior. Normalmente, a avaliação do grau de maturação é realizada por métodos destrutivos, com colheitas de algumas plantas no talhão, que podem ou não representar o talhão a ser colhido. Neste contexto, tecnologias computacionais, tais como: técnicas de inteligência artificial podem ser úteis para monitoramento do cafeeiro. A inteligência artificial tem tido um papel importante no desenvolvimento da agricultura, por meio dela é possível estimar a produtividade das safras, identificar pragas e doenças nas lavouras, definir de forma mais assertiva o momento adequado para realizar a colheita. Dessa forma, esse trabalho teve como objetivos: (1) Desenvolver modelo de detecção, classificação e segmentação de frutos a partir de imagens obtidas em ambientes não controlados (2) Desenvolver um classificador para classificar imagens entre: presença e ausência da doença no cafeeiro, e desenvolver um classificador para identificar as três espécies de doenças comuns que atacam o cafeeiro, a saber, cercosporiose, mancha de phoma e ferrugem. Para atender o primeiro objetivo foram coletadas 78 imagens com frutos em diferentes graus de maturação. As imagens foram rotuladas para identificação dos locais com frutos verde, cereja e passa e fundo. A rotulagem foi realizada de forma manual/visual com auxílio de uma ferramenta desenvolvida por meio da linguagem de programação Python. A partir dos rótulos foi possível treinar um modelo de segmentação de instâncias com arquitetura Mask-RCNN. Para atender o segundo foram coletadas imagens de plantas contaminadas pelas doenças do cafeeiro, a saber, cercospora, mancha de phoma e ferrugem e imagens de plantas sem contaminação na região da Zona da Mata mineira. As mesmas imagens foram utilizadas para classificar somente as três doenças do cafeeiro. Em ambas as análises as imagens serviram de entradas para o treinamento dos modelos de classificação utilizando redes neurais convolucionais. Os resultados foram avaliados pelas métricas da matriz de confusão, a saber, a precisão, recall e f1-score. A precisão do modelo é a relação entre verdadeiros positivos (detecções corretas) sobre a soma de todas as detecções. As abordagens mostraram que o modelo de segmentação de frutos alcançou precisões de 0,897; 0,900; 0,891 para as classes: cereja, verde e passa, respectivamente. Os valores de recall para as mesmas classes respectivamente foram: 0,759; 0,700; 0,813, respectivamente. Já os valores de f1-score para as mesmas classes foram:0,7336; 0,6802; 0,7692. Desta forma, o modelo foi mais eficiente na detecção, segmentação de classificação de frutos passas. Quando foi aplicado o mesmo modelo nas imagens geradas por janela deslizante os valores de precisão foram: 0,974; 0,906; 0,878; recall foram: 0,753; 0,740; 0,813; e f1-score foram: 0,844; 0,8105; 0,8427 para as classes: cereja, verde e passa, respectivamente. No modelo de classificação de doenças as precisões, recall e f1-score foram: 0,933 para ambas as classes: presença e ausência de doença. Já o modelo que classificou as três espécies de doenças apresentou valores de precisão: 0,900, 0,850 e 0,900, recall de 0,900, 0,850 e 0,900 e f1-score de 0,900, 0,850 e 0,900 para as classes ferrugem, cercospora e mancha de phoma, respectivamente. Palavras-chave: Processamento de Imagens. Segmentação de instâncias. Deep Learning. Colheita do café. Inteligência artificial. Maturação do café.
The value of the coffee crop is related to several factors, including supply and demand, the quantity produced, storage, fruit quality, among others. Coffee quality, in turn, is affected by several factors, including solar radiation, plant nutrition, altitude, presence or absence of pests and diseases. Among the main diseases that infest the coffee crop are: rust, brown eye spot and phoma spot. Rust (Hemileia vastatrix Berk. & Br.) attacks coffee leaves, which causes premature leaf fall and reduced photosynthesis. Similarly, brown eye spot causes damage, mainly in crops without adequate fertilization, affecting leaves and fruits. Phoma stain is favored by different climatic events such as strong and cold winds, hail and frost. In addition to diseases, another determining factor that directly impacts the quality of the drink is the degree of maturation of the fruits at the time of harvest. It is known that ripe fruits, in the stage called cherry, generate coffees of superior quality. Normally, the assessment of the degree of maturation is carried out by destructive methods, with harvesting of some plants in the field, which may or may not represent the field to be harvested. In this context, computational technologies such as artificial intelligence techniques can be useful for monitoring the coffee tree. Artificial intelligence has played an important role in the development of agriculture, through which it is possible to estimate the productivity of crops, identify pests and diseases in crops, define in a more assertive way the appropriate time to carry out the harvest. Thus, this work aimed to: (1) Develop a model of detection, classification and segmentation of fruits from images obtained in uncontrolled environments (2) Develop a classifier to classify images between: presence and absence of the disease in coffee, and to develop a classifier to identify the three species of common diseases that attack the coffee tree, namely, brown eye spot, phoma spot and rust. To meet the first objective, 78 images were collected with fruits in different degrees of maturation. The images were labeled to identify the places with green, cherry and raisin fruits and background. Labeling was performed manually/visually with the aid of a tool developed using the Python programming language. From the labels it was possible to train an instance segmentation model with Mask-RCNN architecture. To meet the second, images of plants contaminated by coffee diseases were collected, namely, cercospora, phoma stain and rust and images of plants without contamination in the Zona da Mata region of Minas Gerais. The same images were used to classify only the three coffee diseases. In both analyzes the images served as inputs for training the classification models using convolutional neural networks. The results were evaluated by the metrics of the confusion matrix, namely, precision, recall and f1-score. Model accuracy is the ratio of true positives (correct detections) over the sum of all detections. The approaches showed that the fruit segmentation model reached accuracies of 0.897; 0.900; 0.891 for the classes: cherry, green and raisin, respectively. The recall values for the same classes respectively were: 0.759; 0.700; 0.813, respectively. The f1-score values for the same classes were: 0.7336; 0.6802; 0.7692. In this way, the model was more efficient in the detection, segmentation and classification of raisin fruits. When the same model was applied to the images generated by the sliding window, the precision values were: 0.974; 0.906; 0.878; recall were: 0.753; 0.740; 0.813; and f1-score were: 0.844; 0.8105; 0.8427 for the classes: cherry, green and raisin, respectively. In the disease classification model, the precisions, recall and f1-score were: 0.933 for both classes: presence and absence of disease. The model that classified the three disease species, on the other hand, presented precision values: 0.900, 0.850 and 0.900, recall of 0.900, 0.850 and 0.900 and f1-score of 0.900, 0.850 and 0.900 for the rust, cercospora and phoma stain classes, respectively. Keywords: Image Processing. Instance Segmentation. Deep Learning. Coffee Harvest. Artificial Intelligence. Coffee Maturation
The value of the coffee crop is related to several factors, including supply and demand, the quantity produced, storage, fruit quality, among others. Coffee quality, in turn, is affected by several factors, including solar radiation, plant nutrition, altitude, presence or absence of pests and diseases. Among the main diseases that infest the coffee crop are: rust, brown eye spot and phoma spot. Rust (Hemileia vastatrix Berk. & Br.) attacks coffee leaves, which causes premature leaf fall and reduced photosynthesis. Similarly, brown eye spot causes damage, mainly in crops without adequate fertilization, affecting leaves and fruits. Phoma stain is favored by different climatic events such as strong and cold winds, hail and frost. In addition to diseases, another determining factor that directly impacts the quality of the drink is the degree of maturation of the fruits at the time of harvest. It is known that ripe fruits, in the stage called cherry, generate coffees of superior quality. Normally, the assessment of the degree of maturation is carried out by destructive methods, with harvesting of some plants in the field, which may or may not represent the field to be harvested. In this context, computational technologies such as artificial intelligence techniques can be useful for monitoring the coffee tree. Artificial intelligence has played an important role in the development of agriculture, through which it is possible to estimate the productivity of crops, identify pests and diseases in crops, define in a more assertive way the appropriate time to carry out the harvest. Thus, this work aimed to: (1) Develop a model of detection, classification and segmentation of fruits from images obtained in uncontrolled environments (2) Develop a classifier to classify images between: presence and absence of the disease in coffee, and to develop a classifier to identify the three species of common diseases that attack the coffee tree, namely, brown eye spot, phoma spot and rust. To meet the first objective, 78 images were collected with fruits in different degrees of maturation. The images were labeled to identify the places with green, cherry and raisin fruits and background. Labeling was performed manually/visually with the aid of a tool developed using the Python programming language. From the labels it was possible to train an instance segmentation model with Mask-RCNN architecture. To meet the second, images of plants contaminated by coffee diseases were collected, namely, cercospora, phoma stain and rust and images of plants without contamination in the Zona da Mata region of Minas Gerais. The same images were used to classify only the three coffee diseases. In both analyzes the images served as inputs for training the classification models using convolutional neural networks. The results were evaluated by the metrics of the confusion matrix, namely, precision, recall and f1-score. Model accuracy is the ratio of true positives (correct detections) over the sum of all detections. The approaches showed that the fruit segmentation model reached accuracies of 0.897; 0.900; 0.891 for the classes: cherry, green and raisin, respectively. The recall values for the same classes respectively were: 0.759; 0.700; 0.813, respectively. The f1-score values for the same classes were: 0.7336; 0.6802; 0.7692. In this way, the model was more efficient in the detection, segmentation and classification of raisin fruits. When the same model was applied to the images generated by the sliding window, the precision values were: 0.974; 0.906; 0.878; recall were: 0.753; 0.740; 0.813; and f1-score were: 0.844; 0.8105; 0.8427 for the classes: cherry, green and raisin, respectively. In the disease classification model, the precisions, recall and f1-score were: 0.933 for both classes: presence and absence of disease. The model that classified the three disease species, on the other hand, presented precision values: 0.900, 0.850 and 0.900, recall of 0.900, 0.850 and 0.900 and f1-score of 0.900, 0.850 and 0.900 for the rust, cercospora and phoma stain classes, respectively. Keywords: Image Processing. Instance Segmentation. Deep Learning. Coffee Harvest. Artificial Intelligence. Coffee Maturation
Descrição
Dissertação de mestrado defendida na Universidade Federal de Viçosa.
Palavras-chave
Café - Doenças e pragas, Redes neurais (Computação), Processamento de imagens, Aprendizado profundo (Aprendizado do computador), Visão por computador
Citação
OLIVEIRA, Carolina Tavares de. Monitoramento da maturação dos frutos e de doenças do cafeeiro utilizando modelos de deep learning. 2021. 49 f. Dissertação (Mestrado em Engenharia Agrícola) - Universidade Federal de Viçosa, Viçosa-MG. 2021.