The Role of Artificial Intelligence and Machine Learning in Smart and Precision Agriculture

Abstract


A. Introduction
Automation and technological modernization in the agricultural sector are significant concerns for every country. The global population is rapidly increasing, leading to a simultaneous increase in demand for food. We can grasp the magnitude of these demands when considering that the world population is projected to reach 10 billion by 2050. Traditional methods employed by farmers are insufficient to meet the growing demand, resulting in soil degradation due to the excessive use of harmful pesticides and fertilizers, which negatively impact agricultural production. It has been documented that approximately 40% of global crops are currently destroyed by pests and pathogens, with annual expenditures of up to $25.8 billion on agricultural research [1].
Over the past 50 years, there has been significant development in artificial intelligence due to its application in various fields, including agriculture, which faces numerous challenges and difficulties on a daily basis. Farmers are required to deal with diseases and weeds that affect crops, manage storage and product distribution, use pesticides and fertilizers, as well as irrigation and drainage of their crops. To address these issues, new practices are now being implemented that utilize artificial neural networks (ANN), artificial intelligence (AI), machine learning (ML), deep learning (DL), Internet of Things (IoT), wireless communications, expert systems, and fuzzy logic. Artificial intelligence systems can gather information on physical quantities to "understand" the environment, maintain and utilize the knowledge they have acquired to find solutions to problems in the agricultural sector. The use of methods that apply techniques from these fields promotes significant transformations in the field of agriculture, such as monitoring plant diseases, weed detection, identification and control of pests and pathogens, and crop harvesting, among others [2].
In general, the automation of agricultural practices has been proven to contribute to the improvement and increase of production, helping farmers to tackle challenges and difficulties more easily and quickly.
B. Smart Agriculture -Agriculture 4.0 Smart agriculture, or precision agriculture, is defined as a system where cuttingedge smart technologies are integrated into traditional agricultural approaches to improve the quality and quantity of agricultural production. The goal of smart agriculture is to enhance productivity, reduce environmental footprint, and increase efficiency and profitability by employing techniques such as controlled irrigation and targeted, precise use of pesticides and fertilizers that differ from conventional methods [3].
Factors such as the environment, pests, pathogens, and soil seriously impact crops, reducing the quality and quantity of production and leading to significant economic losses and food crises. Precision agriculture attempts to provide solutions at this point. However, the question that arises and seriously concerns us is whether artificial intelligence (AI) can truly help in solving the global crop loss that jeopardizes the food security of the planet.
The main digital technologies for the development and implementation of smart agriculture systems include ( Figure 1) artificial intelligence, big data, cloud and edge computing, smart sensors, IoT technology, drones, and robotics. The integration of these technologies in agriculture drives the next-generation industrial agriculture, known as Agriculture 4.0, which is also referred to as precision agriculture, smart agriculture, or digital agriculture. However, several challenges need to be highlighted in the emerging field of smart agriculture, such as digitization, the agricultural supply chain, ecological concerns, and crop productivity, which need to be addressed [4].

Techniques and methods used in smart agriculture
Recent advancements in smart agriculture significantly differ from traditional agricultural practices due to the use of equipment, technology, machinery, and devices that include sensors, information technology, and computer vision. Future agriculture will heavily rely on advanced tools and technologies such as GPS technologies, robots, humidity sensors, and aerial imagery. In real-time, a decision support system can enhance productivity, resource allocation, adaptability to climate change, improve food supply chains, and detect crop diseases [5].
Fuzzy logic (FL) as a technique of artificial intelligence helps a controller to correctly understand changes over time in order to make decisions and act accordingly in real-time. Today, FL technique is widely used in the agricultural sector in various processes, such as navigation of unmanned aerial vehicles (UAVs) for farm monitoring from above and capturing images that are processed to make decisions, as well as guiding robots used for harvesting [6].
The Genetic Algorithm (GA), which is a heuristic (evolutionary) algorithm inspired by genetic principles, and the Simulated Annealing (SA) technique are tools used in solving large and complex optimization problems in the field of Artificial Intelligence (AI). They have been adopted in the agricultural sector due to their effective functioning and accuracy in providing optimal results. The GA algorithm and the SA technique can be used in programming the motion of autonomous agricultural vehicles [6].
Τhe Internet of Things (IoT) is now a fundamental technology in a wide range of applications and is not limited to smart city and home applications. IoT technology can be used to enhance traditional agricultural approaches by combining advanced technologies with sophisticated methods. Sensors and actuators are the components of an IoT system that collect data related to weather conditions, pressure, temperature, plant characteristics, and more. The large volume of data is then sent to a cloud-based application via the internet for processing and analysis in order to make informed decisions.
Specifically, in the field of smart agriculture, IoT technologies can contribute to the creation of an integrated control system for all agricultural parameters, such as crop development, early disease detection, harvesting and post-harvest storage, prevention of waste due to inefficient harvesting, increasing crop production, and so on. Smart agriculture, as depicted in Figure 2, refers to the applications of intelligent information and communication technology systems that utilize IoT devices and techniques, such as sensors, cloud-based processes, machine learning, artificial intelligence, and networking in agricultural systems. It is a combination of software and hardware with the primary goal of enhancing agricultural productivity [7].

Figure 2. IoT technologies in Smart agriculture
The evolution of the Internet of Things (IoT) and unmanned aerial vehicles (UAVs) promotes the vision of sustainable smart agriculture and adds value to the data obtained through automated processing, analysis, and access. Furthermore, the use of IoT technology reduces the climate impact on production by monitoring and predicting weather conditions, allowing farmers to address real-time threats from weeds, pests, diseases, or monitor soil conditions. As a result, UAV and IoT-based technologies facilitate the efficient and optimized use of resources such as water, pesticides, or agrochemicals. Additionally, these intelligent technologies have been proven to enhance the quality of crop performance and reduce the environmental footprint of the agricultural sector [3].
Artificial Neural Networks (ANN) are widely used and have been integrated into the agricultural sector multiple times due to their advantages over traditional systems. The main advantage of neural networks is their ability to make predictions based on parallel processing [2].
With the development of sensing technologies, wireless communication, and the Internet, we now live in a world filled with various smart things. An emerging research area, Embedded Intelligence (EI), aims to uncover individual behaviors, spatial contexts, and social patterns by extracting digital traces left by people interacting with the Internet of Things (IoT) (such as cameras, smart cars, smart cards, etc.). In the agricultural sector, embedded intelligence involves processing and analyzing largescale data (Big Data) to make decisions in the field of Intelligent Building Technologies (IBT), specifically in areas like smart greenhouses, smart irrigation, or intelligent crop management [8].

Factors of agricultural cultivation where smart farming innovations are applied.
Various end devices, sensors, wireless sensor networks (WSN), RFID tags and readers, near field communication (NFC) devices, etc. are used for collecting information regarding temperature, wind speed, humidity, soil nutrient levels, plant diseases, insects, etc. The collected information is processed through embedded devices and uploaded to a higher network level for further processing and analysis. These terminal devices and sensors are used for monitoring and controlling agricultural products. For example, WSNs are often used to monitor climate and track storage and supply facilities of agricultural products. RFID technologies, a critical element of connected devices, store data in the form of Electronic Product Codes (EPC), which are then activated, read, and managed by readers. Each device needs to connect with its neighboring nodes and a gateway to form a network. At this network level, sensor nodes interact and communicate with other nodes and gateways to forward data to a remote infrastructure where the data is stored, further analyzed, processed, and transformed into useful information. Applications operating in this manner have contributed to the advancement of various agricultural fields, such as seeding, fertilization, pesticide spraying, weed detection and removal, fertility assessment, production mapping, and more [3].

Seeding
Undoubtedly, seed and seedling planting in a large cultivable area using UAV technology can be more efficient, but it is still in its early stages of development and study. UAV systems equipped with image recognition technology and optimized planting techniques have been created and tested. These systems can be used to automate seeding without human intervention and precisely fertilize fields when needed [3].
Detection, prediction, and monitoring of diseases, pests, and weeds -Management of fertilizer and pesticide use.
Parasites are detrimental organisms that typically reduce plant density and negatively affect the growth and quality of agricultural products when they appear in a crop. Monocultures are more susceptible to pests and harmful insects compared to other forms of cultivation. Crop protection should be carried out both before and after harvest. Pre-harvest crop protection mainly involves protection against weed growth, parasites, and harmful insects that act as disease vectors. Post-harvest crop protection includes proper processing, storage, and transportation of the crops. Crop protection also entails the use of pesticides in the correct proportion. Overdosing can affect the quality of the soil, which in turn has long-term effects on cultivation. Monitoring the health of crops and weed removal are two critical factors that influence effective, productive, and resilient cultivation. Due to frequent infestations by pests and pathogens, crops can become diseased, resulting in a degradation of both the quality and quantity of production. Designing an integrated approach based on IoT technologies and artificial intelligence, tailored to monitoring crop health, weed detection, atmospheric air control, and various operations such as pesticide spraying, is a challenge of precision agriculture.
A system combining sensor devices and IoT, machine learning (ML), and deep learning (DL) techniques for image processing utilizes two specific intelligent learning models. The system takes images of the crop as sensor inputs, and the available learning models identify spatiotemporal characteristics of the samples, allowing realtime discrimination between healthy and diseased leaves and detection of weeds in the crop. The results demonstrate that the proposed models can accurately predict the health status of leaves and identify weeds with high precision, enabling targeted spraying of pesticides or herbicides exactly where necessary [9].
Plants that are affected by diseases or pests usually exhibit visible signs or damages on their leaves, stems, flowers, and/or fruits. Feature extraction methods can be applied to images of plants captured from the field to determine if they have potentially been affected by a disease. Initially, preprocessing is performed on the collected images, such as resizing, filtering, and histogram equalization, to enhance the image quality. Segmentation follows to isolate the leaf, fruit, or flower from the background. One challenge that may arise is that the recognition algorithm may not function well in the presence of complex backgrounds and would require the user to place a white surface behind the leaf when taking the photograph. Feature extraction is a process of extracting information from the final image to guide accurate anomaly classification. Features that can be extracted include texture, shape, size, and color. Machine learning algorithms are trained to recognize diseases based on these features. Therefore, the trained algorithm can process the features extracted from the images captured from the field and determine if a disease has developed. With the proper selection of features to achieve higher accuracy rates in recognition, multiple learning algorithms can be used for training and classification, and the results they provide can be combined. For the classification of diseased leaf segments from healthy ones, a Genetic Algorithm (GA) can be used. However, in recent years, artificial neural networks (CNN) and deep learning have gained dominance, demonstrating high performance as feature extractors and classifiers in image recognition. This technique is continuously expanding in agricultural applications for disease, pest, and weed recognition [10]. For weed detection in the crop, a robotic weeding system has been developed that utilizes a Convolutional Neural Network (CNN) for weed image detection among the crop. It is equipped with a blade attached to its tip for weed removal. The robotic system operates autonomously, ensuring reduced human labor, decreased working time, and lower costs [11].
In the case of agricultural production in a greenhouse, images can be captured through a Wireless Visual Sensor Network (WVSN) deployed at various points within the greenhouse. The images obtained can be processed using machine learning methods to detect pests or diseases appearing on the plant leaves [12].
In the case of weeds, early detection poses a challenge, which refers to the ability to identify them before they significantly develop. This can be achieved by using images of the soil captured by UAV systems. Several researchers have utilized RGB cameras, hyperspectral cameras, and multispectral sensors mounted on UAVs to achieve early weed detection [3].
Weeding is perhaps the most challenging process in the field of agriculture, requiring human labor, time, and money. A recent development in precision agriculture is the use of Unmanned Aerial Vehicles (UAVs) for spraying, employing machine learning techniques to accurately identify spray areas. This specific technique contributes to achieving precise spraying, enhancing their effectiveness and saving chemicals (pesticides/herbicides). The deep learning system utilizes a fast Regionbased Convolutional Neural Network (R-CNN) for classifying the collected images and accurately distinguishing the areas that need to be sprayed from the rest. The proposed system demonstrated excellent performance and could easily be integrated into UAV-based sprayers in real-time [13].
It has been observed that UAV systems effectively and rapidly spray pesticides and fertilizers compared to traditional broad-area sprayers. The quantity of pesticides required per unit of agricultural land depends on the size of the problem but is also linked to environmental contamination. With UAV systems, the use of pesticides is minimized to the lowest possible amount, resulting in reduced environmental pollution and workload [3].
Lastly, the blockchain method has been used to ensure a private and secure IoT model. The proposed solution enables mobile objects to send or receive notifications when they are in proximity to a marked, potential, or confirmed disease case [12] .

Crop phenotype
In order to create three-dimensional models of crops for the purpose of monitoring plant development, intelligent sensors have been integrated into UAV systems. These sensors are capable of capturing measurements related to crop conditions, quantity, and quality, such as temperature, humidity, wind speed, wind direction, plant height, and more. The integration of a wireless sensor network into a smart UAV platform offers significant benefits in terms of real-time measurements, allowing us to monitor, detect, and address a situation promptly [3].

Water analysis and optimal irrigation
Water irrigation at the right time and with the correct amount of water is a significant aspect of the agricultural sector. Farmers take into account the weather forecast as a crucial factor in their decision-making process regarding irrigation. An intelligent autonomous irrigation system is activated based on the prediction of drought conditions, taking into consideration weather forecasts in combination with real-time measurements of soil moisture and temperature [3]. To process the parameters that determine the decision to open or close the irrigation valve, a fuzzy logic approach was utilized in an irrigation control system, specifically the Fuzzy Mamdani model. The parameters taken into account include soil moisture, air temperature, and atmospheric humidity [14]. In addition to the decision to activate the irrigation system at the appropriate timing, it is crucial to ensure water conservation. An irrigation control system utilizes sensors and IoT devices for data collection, along with machine learning (ML) and deep learning (DL) techniques for data processing and decision-making regarding the irrigation operation [9].

Precision agriculture systems and platforms.
Smart agriculture systems under development help predict known diseases and crop-related issues. However, there are various diseases and problems that have not yet been detected by such systems but may have been addressed by other farmers. In such situations, it would be beneficial to share solutions directly from the farmers who have implemented them, benefiting the entire farming community facing similar issues. Various integrated smart agriculture systems have been developed in this direction, one of which is depicted in Figure 3. In this system, the management of information from different sources, including land observation, is done to enhance the value of data, competitiveness, efficiency, sustainability, and resilience of the agricultural sector, enabling decision-making for the digital transformation in agriculture and rural areas. The integrated system includes five areas: • Agricultural systems (at local, regional, and global levels) • Data sources (real-time data collection from the agricultural system, previously stored user data) • Data management platform (Artificial Intelligence application for data integration and analysis) • Data sharing (facilitating feedback loop closure with the farm by implementing direct improvements or providing new input values to the data platform) • Blockchain (governance, decision support, and data security system) [15].  [15]. An economically efficient and secure system for collecting data generated by a community of farmers regarding the detection of plant diseases can be based on blockchain technology. The model, which can detect and propose solutions to various crop diseases, utilizes blockchain to address issues and constraints related to data security and also ensures high participation from farmers through the use of incentive mechanisms. Farmers can either seek assistance from the machine learning model regarding the problems they face in their cultivation by uploading an image or contribute to providing assistance. The system stores information about the images and solutions proposed by fellow farmers in a database, enabling the learning model to be retrained on new diseases and expand its scope [12].

Crop management and yield optimization
Agricultural production is affected by climate change and natural disasters, resulting in significant economic losses for farmers. In order to assist farmers in making decisions regarding the selection of the right crops, a set of fuzzy rules was employed, incorporating a combination of climate variables such as temperature, weather disasters, water availability, pest levels, diseases, species extinction, and deforestation, to estimate the rate of agricultural production [16].
In potato production, the number and size of harvested tubers are related to the number of plants that have developed. Density variation maps of the plants can provide a decision support tool for determining the optimal harvesting time based on fruit development progress. Unmanned Aerial Vehicle (UAV) images were utilized for capturing plant count, and the technique of Convolutional Neural Network (FRCNN) was employed to generate a plant detection model and estimate their density within a crop. The FRCNN model was trained and then used to create predictions. The research