## 9 Algorithms, AI Models and Digital Twins
### AI in Agricultural UGVs
(c) Two-stage methods, which first generate candidate regions and then classify them. These methods are generally more accurate but more computationally demanding. Two-stage models includes R-CNN and its improved versions like Faster R-CNN and Mask R-CNN. Traditionally, due to the limited computational power of UGVs and the need for speed in detection, single-stage models were predominantly used, despite their lower accuracy. Today, advances in hardware performance (see Section 7) have made some two-stage methods feasible as well. * Recurrent Neural Networks (RNNs) and Long Short-Term Memory (LSTM) networks are used for analyzing sequential data, such as predicting weather conditions or tracking crop growth over time [142; 143]. These deep learning models excel at preserving temporal relationships within data sequences, effectively modeling patterns and dependencies that evolve over time. This ability is due to their architecture, which includes output connections that loop back to some hidden nodes in the input layer, allowing for information to persist. This enables the network to maintain a hidden state that captures information from previous time steps. * Reinforcement Learning (RL) models optimize the decision-making processes of UGVs [54; 144]. In this approach, UGVs learn to make decisions by receiving feedback from their actions in the form of rewards or penalties, and model training can be achieved in unseen environments. These models are used for path-planning and rover exploration in unstructured environments, where autonomous navigation, efficient resource management, and adaptation to dynamic field conditions are essential. Additionally, RL models are employed to coordinate multiple unmanned vehicles without explicitly defining and coding their behavior [145; 146]. By continually learning from their interactions with the environment, these models help UGVs improve their performance over time, leading to more effective and efficient agricultural operations. As reported in [147], DL models are accurate, fast, and robust solutions for detection and recognition tasks in agriculture and are widely used in UGVs instead of classic Computer Vision algorithms due to their ability to generalize and extract complex features from images with less interference from the background environment. However, the DL accuracy depends on the dataset used to train the model. As reported by [147; 148; 149; 150; 151; 152; 153; 154; 155; 156; 157; 158; 159; 160; 161; 162; 163; 164; 1  
needed. An informative review on this topic is provided in [150], although it is limited to the year 2020. For a more recent list of open datasets, we refer to [8]. For this reason, data enhancement and augmentation operations are adopted, including techniques such as random cropping, adding noise, image scaling, and random contrast adjustment [136; 137; 141; 151], and transfer learning is used to adapt previously trained networks to new fruits and vegetables and finetune the model [152; 153], or synthetic datasets are created [84]. With this diverse array of models, agricultural UGVs can tackle various tasks effectively: ML models handle robust data analysis and predictions, DL models excel in advanced image processing, while RL models optimize decision-making. Integrating these models allows for UGVs to accomplish a broad spectrum of tasks with precision and adaptability, aiding in enhancing crop health, boosting yields, and promoting sustainable farming practices. Although this approach offers significant advantages, it also comes with limitations. One notable limitation is the complexity of integrating and coordinating different AI models within a single UGV system, which can lead to increased development and maintenance costs. Additionally, the need for extensive computational resources (GPUs) to run multiple AI models simultaneously can pose challenges in terms of energy consumption and processing speed, particularly in remote or resource-constrained agricultural environments.