Intelligent monitoring and management platform for the prevention of olive pests and diseases, including IoT with sensing, georeferencing and image acquisition capabilities through computer vision

. Climate change affects global temperature and precipitation patterns. These effects, in turn, influence the intensity and, in some cases, the frequency of extreme environmental events, such as forest fires, hurricanes, heat waves, floods, droughts, and storms. In general, these events can be particularly conducive to the appearance of plant pests and diseases. The availability of models and a data collection system is crucial to manage pests and diseases in sustainable agricultural ecosystems. Agricultural ecosystems are known to be complex, multivariable, and unpredictable. It is important to anticipate crop pests and diseases in order to improve its control in a more ecological and economical way (e.g., precision in the use of pesticides). The development of an intelligent monitoring and management platform for the prevention of pests and diseases in olive groves at Trás-os-Montes region will be very beneficial. This platform must: a) integrate data from multiple data sources such as sensory data (e.g., temperature), biological observations (e.g., insect counts), georeferenced data (e.g., altitude) or digital images (e.g., plant images); b) systematize these data into a regional repository; c) provide relevant forecasts for pest and diseases. Convolutional Neural Networks (CNNs) can be a valuable tool for the identification and classification of images acquired by Internet of Things (IoT).


Computer Vision and Deep Learning for prevention of olive pests and diseases
The project will develop an Intelligent monitoring and management platform for prevention of pests and diseases in olive groves, including IoT with sensing, georeferencing and image acquisition capabilities through computer vision.In recent years computer vision has been, combined with intelligent technology such as deep learning technology, applied to every aspect of agricultural production management.As already mentioned, this study will focus on olive disease prevention.According to Tian, Wang, Liu, Qiao and Li, "… computer vision technology has been well applied in the prevention and control of agricultural pests and diseases, and its high efficiency, high precision and low cost are its main features" [1].According to Liu and Wang "Object positioning is one of the most basic tasks in the field of computer vision.It is also the closest task to plant diseases and pests detections in the traditional sense.Its purpose is to obtain accurate location and category information of the object.At present, object detection methods based on deep learning emerge endlessly."[2] According to Dokic, Blaskovic and Mandusic "The development of artificial intelligence and machine learning in the last decades has led to a significant increase in the number of projects in the field of agriculture" [3].These authors counted 95 papers published during 2020 in Scopus and Web of Science databases.They also categorised the founded papers according to five criteria: areas of application (e.g., crops, pests), selected deep learning methods (e.g., RNN, CNN), input data (e.g., temperature, camera), crop (e.g., wheat, grape) and applied framework (e.g., MATLAB, Keras).Specifically for prevention and control of crop diseases, pests and weeds, many papers were published demonstrating the application of computer vision and deep learning on agriculture (e.g.Maharlooei et al. [4], Liu and Chahl [5], Zhong et al. [6]).

Olive Trees in Trás-os-Montes
In Trás-os-Montes, Portugal, olive groves have an enormous economic, social and scenic importance.The olive oil produced in this region is of high quality, mainly because of the distinctive soil and climate characteristics of this geographical region.Portuguese olive oil wins frequently international awards.
Climate change affects global temperature and precipitation patterns.These effects, in turn, influence the intensity and, in some cases, the frequency of extreme environmental events, such as forest fires, hurricanes, heat waves, floods, droughts, and storms.In general, these events can be particularly conducive to the appearance of plant pests and diseases.In the Mediterranean region, including Portugal, pests and diseases are, among biotic factors, the most damaging, and can cause production losses of up to 30%.

Deep Learning -Definition and Convolutional Neural Network
According to IBM, "Deep learning is a subset of machine learning, which is essentially a neural network with three or more layers.These neural networks attempt to simulate the behavior of the human brain allowing it to 'learn' from large amounts of data" [7].Deep learning -DL -distinguishes itself from classical machine learning by the type of data that it works with, and by the methods through which it learns.Deep learning algorithms can process unstructured data (e.g.images), and automate feature extraction, removing some of the dependency on human experts.Famous types of deep learning networks are: Recursive Neural Networks (RvNN), Recurrent Neural Networks (RNN) and Convolutional Neural Networks (CNN).According to Alzubaidi L. et al. "In the field of DL, the CNN is the most famous and commonly employed algorithm.The main benefit of CNN compared to its predecessors is that it automatically identifies the relevant features without any human super-vision.CNNs have been extensively applied in a range of different fields, including computer vision (…)" [8].When deploying DL, several limitations must be taken into consideration: • DL requires a large amount of data to achieve a good model performance.This limitation can be solved with techniques such as transfer learning and data augmentation (e.g., by performing simulations).Transfer learning is widely used in image classification because it allows us to use pre-existing models, trained on huge datasets, for our own tasks, reducing the cost of training.
• When trained with unbalanced data (classification data with skewed class proportions), DL can produce undesired results.
• DL models may be of "black box" type, that is, the model produces predictions, but it is not known how these predictions are produced and which factors most influence them.This happens in complex models that capture relationships that are not necessarily linear.The interpretability of the data can be important.
• When classifying problems by applying DL, the predicted probabilities (softmax output) are assumed to represent the true probability of correctness for the predicted class.The loss of connection between model prediction probabilities and the confidence of model predictions would prevent the application of modern neural network models to real-world problems.• When a DL model continuously learns over time by incorporating new information, it usually quickly replaces previously learned knowledge, leading to the deterioration of the performance of the DL model (catastrophic forgetting).
• DL models make intensive use of memory and processing resources due to their high complexity and large number of parameters involved.In order to train DL models well, new hardware solutions can be used in production mode for parallel processing (ex: FPGAs and GPUs).Techniques exist for DL model compression.
• DL models have excessively high chances of fitting the data set used in training very well, but resulting in a reduced ability to achieve a good performance on tested data (data overfitting at the training stage).
• The Gradient Dissipation and Gradient Explosion problems occur in artificial neural networks trained using back-propagation and gradient-based learning.In these networks, gradients are used to update the weights.These problems occur, respectively, when the gradient becomes incredibly small or grows exponentially.In the case of gradient dissipation, the weights almost stop changing their values, causing the network to stop training.In the case of gradient burst, the weights can become incredibly large and can cause memory overflow.
• DL models often exhibit poor behavior when tested in the real world due to under-specification.To address this limitation, stress testing can be used.

CNN for pests and diseases prediction for olive culture in Trás-os-Montes region
The CNN with best performance will be sought, taking into account its limitations and the characteristics of the data collected by IoT devices in the olive groves of Trás-os-Montes region.

Development of the Intelligent monitoring and management platform
Implementation of platforms to be used by stakeholders of the olive crop in the Trás-os-Montes region, Northeast of Portugal, implies the following tasks: a) requirements definition; b) system analysis; c) platform development testing and deployment.The platform must be developed according to a rapid prototyping process -the generated prototypes will be iteratively tested by stakeholders (producers, associations of growers, government entities, R&D entities, etc.) and consequently developed.
The platform must be modular, in order to facilitate its reuse and its integration with thirdparty hardware and software.There are case studies that present models for implementing modularity in the context of embedded software development, and that present considerable advantages in terms of code reuse, productivity, cost reduction, and increased quality [9].The platform will be developed in a client/server architecture accessible through the web using PCs or mobile devices.The database management system (DBMS) used by the platform will be non-relational, also known as NoSQL.NoSQL DBMS are typically used in systems that store data from different sources and with very different structures (if with any structure at all).According to