Declaration of Authenticity I declare that this research is our own, carried out under the supervision of Assoc. Le Hong Trang and Mr. Nguyen Quang Duc. The results of our study are credible and have not yet been made public.
All materials utilized in this research were gathered by myself from various sources and are properly cited in the reference section. Furthermore, all of the research results are properly referenced and unrelated to the initial data. In any event, I stand by my actions and accept responsibility for any plagiarism. Thus, any copyright violations resulting from our research are not the responsibility of Univer- sity of Technology-Vietnam National University Ho Chi Minh City.
Ho Chi Minh City, Dec 2024 Project Author Ly Kim Phong 1 Acknowledgment First and foremost, I want to show my heartfelt gratitude to my parents and friends, particularly my parents, who have always supported and encouraged me on my path. They are the ones who have always been there when I need them the most, they are my source of inspiration, drive, and strength to go through all the hardships in my life. I am very grateful to have them by my side. Second, I want to express the appreciation to my advisers, Assoc.
Le Hong Trang and Mr. Nguyen Quang Duc. Without their assistance and support, I would not have been able to finish my paper effectively; they have been incredibly gracious and patient in guiding me through problems. Third, I also want to express my deepest thank to Dr.
Nguyen Duc Dung, my re- viewer. He has pointed out my mistakes and shortcomings and provides few direct ad- vices to improve my work. In closing, I would like to thank all the teachers, TA and the Department of Com- puter Science for their assistance and support in getting me ready for this project; their opinions and assessment have been invaluable. Without their help, I could not have com- pleted this job.
They provided guidance for the path of my studies. One more time, I would like to express my gratitude and admiration to everyone who has helped and inspired me. Thank you to everyone. 2 Abstract In order to develop a basic mobile application for farmers to identify diseases on cof- fee leaves in their early stages, the topic has been researched.
The goal of this study is to develop deep learning tools / AI for the identification and early warning of pest in- festations in coffee plants. The theory of disease detection systems in the modern world has been summarized in this dissertation, which also reviews various popular methods of early detection employing deep learning models, machine learning, computer vision, and hardware monitoring. We provide a one-stage model of YOLOv10 based on ref- erence research. In order to optimize the model and further prune the models, further enhancements for this project require obtaining more balanced datasets.4 Structure of this project .1 Deep Learning Neural Network .2 Basic components of a neural network .3 How does a Deep Learning Neural Network work.
32 4 Mobile app integration 35 4. 41 4 5 Conclusion 46 6 Future work 47 5 List of Figures 2.1 The basic building block of Deep Learning models - Perceptron .3 Hyperbolic tangent function [7] .4 Logistic-curve function [15] .6 Deep Neural Network architecture [4] .10 YOLOv10 architecture Dual Label Assignment .11 Example of YOLOv10 architecture .12 Example of PR curve .1 Original dataset with 2 classes: Miner (purple) and Brown eye spot (yel- lowish) .3 Example of tflite dataset with normal class .2 tflite data distribution .4 Original and +40% brightness applied .5 Original and 10% noise applied .7 Confusion matrix normalized .1 Use-case diagram .5 Login/Sign up .7 Home & Recent activities & Profile pages .9 Update info & Change password & History pages. 45 6 List of Tables 3.1 tflite class distribution .2 List of augments .1 Motivation Coffee is consumed daily by 30-40% of the global population, with more than 178.5 million 60-kilogram bags reported to be consumed in 2023/2024. However, coffee plants are highly susceptible to various pests and diseases, which pose a significant threat to crop health and yield.
Early detection and effective management of these challenges are crucial for sustaining productivity. Our research aims to develop an innovative application capable of identifying pests in coffee plants through image analysis of roots, stems, and leaves. This tool is designed to provide farmers with timely alerts, enabling them to implement preventive measures and mitigate potential losses. The motivation for this project stems from several key factors.
Coffee is a vital agri- cultural product, cultivated extensively in numerous countries and contributing signifi- cantly to global economies. Pests and diseases, if left unchecked, can drastically reduce yields and profitability. In addition, there is an urgent need for efficient and accessible solutions to facilitate early threat detection for farmers. We are confident that this application will create a transformative impact on the coffee industry by enhancing productivity, protecting farmers’ livelihoods, and contributing to a sustainable coffee supply chain that benefits all stakeholders.2 Problem statement Diseases such as coffee rust, coffee berry disease, and pink disease pose significant threats to coffee plants by infecting leaves and impairing the ripening process, ultimately reducing coffee bean yields.
Early detection of these diseases is critical, and this can be achieved through automated systems capable of identifying symptoms at their initial stages. Currently, most leaf disease detection systems rely on convolutional neural networks (CNNs) and their variants, including R-CNN, F-CNN, Faster-CNN, SSD, and YOLO, to identify disease-induced damage. While these methods are effective, they heavily de- pend on accurately labeled datasets and face limitations in adaptability. Specifically, the addition of new disease variants often necessitates retraining the model from the begin- ning, which is both time-consuming and resource-intensive.
To address these limitations, first we propose a one-stage approach using the YOLOv10x general object detection model to directly identify leaf diseases. This method also cal- culates the probability of various diseases, such as rust and miner infestations. Our ap- proach enables seamless incorporation of new disease classes by simply adding a clas- 8 sification label, eliminating the need for complete model retraining. Then we develop a mobile application that takes input (coffee leaves) images from farmers, detects the diseases of that images and provides the details and recommends treatments for that diseases.
This report presents the experiments conducted and the findings that inform the de- velopment of a robust, scalable model for our application.3 Scope In this project, my aim is to achieve these goals: 1. Assessing current document matching methods and making the necessary adjust- ments to determine which ones best meet our needs. Using the latest model to get a more accurate model architecture. Developing a basic mobile application to demonstrate our model.4 Structure of this project The rest of this paper is organized as follows.1, we recall some back- grounds on deep neural network, how it works, and CNN introduction.2 is a brief introduction of relevant models.4 are the training losses and eval- uating metrics used to evaluate the model’s performance.
Chapter 3 is about the dataset being used in this project, our training and evaluating results. Chapter 4 discusses about what we have done to develop the application. Chapter 5 and 6 discusses the results and future improvements that can be made.1 Deep Learning Neural Network Before going to what we have done on this project, we need some basic knowledge about Deep Learning Neutral Network. First of all, Machine Learning is a field of study in artificial intelligence that en- ables algorithms to uncover hidden patterns within datasets, allowing them to make predictions on new, similar data without explicit programming for each task.[14] And Deep Learning, conceptualized by Geoffrey Hinton in the 1980s, is a subset of Machine Learning that uses some functions to map input into output.
These functions will form a relationship between the input and the output by extracting essential information from the input data. This is called learning, and the process of learning is training.[5] Next, about Neural Networks, also known as Artificial Neural Networks, it was also created by Hinton, which is a Deep Learning algorithm structured similar to the orga- nization of Neurons in the brain. Hinton took this approach because the human brain is arguably the most powerful computational engine known today. This network consists of 3 layers of perceptron: input, hidden and output layer.
Before going to output layer, from hidden layer, the calculations of inter- connected nodes must be carried out and between those calculations, in order to avoid overfitting problem when training, weights, biases and activation functions are added. In the next section, we will introduce more details about the basic components of a neural network, how does a Deep Learning Neural Network work, what are CNN and why we use CNN for our problem.2 Basic components of a neural network First, let us have a look at a perceptron or neuron: Figure 2.1: The basic building block of Deep Learning models - Perceptron 10 Inputs: They are passed on to a neural network to make predictions, they are presented as features of a dataset. Weights: They are important real values associated with the inputs that tell the signif- icant of the feature passed in. Bias: Its mission is to shift the activation function across the plane towards either left or right.
More information will be explained later. Sum: It is a function to add up the product of the weight and the input with bias. Layers: Layers in a deep learning model form the fundamental components of its ar- chitecture. They process data sequentially, where each layer takes input from the previous one and passes the output to the next.[22] There are several types of layer we want to declare in this project: • Dense layer: also called a fully connected layer, uses a linear operation to mainly transform the dimensionality of the input to fit the desired output (e., classification probabilities in the final layer), but sometimes it is used to aggregate and process information.
Below is its mathematical operation. For an input vector x: y = σ (W x + b) where σ is the activation function, W is the weight matrix, b is the bias, and y is the output.[19] • Pooling layer: Used for scaling down the input. • Normalization layer: Normalization layers are components in neural networks that help to stabilize and hasten the training process by normalizing the inputs to a layer.[16] They are particularly useful in deep learning architectures, including con- volutional neural networks (CNNs) and fully connected networks. • Convolutional layer: A convolutional layer is a fundamental component of con- volutional neural networks (CNNs), primarily used for processing and analyzing visual data.
It applies a mathematical operation called convolution to the input data, utilizing filters (or kernels) to extract features such as edges, textures, and patterns. This process helps the network learn hierarchical representations of the input data.2: Convolution layer [17] Activation function: It is used to add non-linearity to the model. Here are some acti- vation functions that are commonly used: • Tanh function: Tanh or Hyperbolic Tangent function commonly denoted as ( tanh(x)) is a mathematical function that is widely used as an activation function in neural networks. It is defined as the ratio of the hyperbolic sine and hyperbolic cosine functions[9]: sinh(x) ex − e−x tanh(x) = = cosh(x) ex + e−x Figure 2.3: Hyperbolic tangent function [7] 12 • Sigmoid / Logistic function: The sigmoid function, also known as the logistic func- tion, is a mathematical function that maps any real-valued number into a value be- tween 0 and 1.
It is defined by the following formula[15]: 1 σ (x) = 1 + e−x Figure 2.4: Logistic-curve function [15] • ReLU function: The Rectified Linear Unit (ReLU) function is a widely used acti- vation function in deep neural networks.