# A Metaheuristic Harris Hawks Optimization Algorithm for Weed Detection Using Drone Images
## 5 Discussion  
Detecting undesirable plants, or weeds, plays a significant role across a variety of sectors and has significant implications for society as a whole. It is possible to increase agricultural productivity, protect natural ecosystems, and improve the quality of our environment by effectively identifying and controlling weeds. Plants cultivated in soil compete with weeds for resources such as water, nutrients, and sunlight. In addition to hindering crop growth, they can decrease yields and result in economic losses for farmers. To mitigate these negative effects on agriculture, early detection, and effective weed-management strategies are essential. Using artificial intelligence and machine learning, weed-detection systems can be improved in accuracy and efficiency, allowing them to identify weed species with greater accuracy and reliability. A more effective and sustainable management practice can be achieved across the agricultural and environmental sectors using this information to help researchers, farmers, and land managers make informed decisions about weed-control strategies. The current study examines the effects of the HHO algorithm to boost weed classification accuracy using two different CNN-based pre-trained models. Optimization algorithms can be used to tune hyperparameters in pre-trained models to improve their performance on specific tasks. Hyperparameters are parameters that are set before training begins and cannot be learned from the data. Examples of hyperparameters include the learning rate, the number of layers in the network, and the size of each layer. A significant achievement of the HHO algorithm is that it was able to find a set of hyperparameter values that resulted in the best accuracy value for weed classification. An objective function's accuracy value indicates the performance of the deep-learning model with the corresponding hyperparameters. HHO found the best accuracy value of 98.44% and 97.97% (as shown in Figures 4 and 5), which is close to 100%. The results indicate that the deep-learning model with the best set of hyperparameters is capable of accurately \begin{table}
\begin{tabular}{l l l l l} \hline
**Ref.** & **Target Images** & **Methodology** & **Performance** & **Optimization** \\ \hline \multirow{3}{*}{[31]} & Ryggrass species & \multirow{3}{*}{VGGNet} & F-Score: & \multirow{3}{*}{No} \\  & \& three distinct & & maculate-92.65\%, & \\  & weed types & & & hederacca-99.84\%, & \\  & & & & officinale-97.37\% & \\ \hline
[32] & Plant species & AlexNet & Accuracy-99.5\% & \\ \hline \multirow{3}{*}{[33]} & Four weed species. & VGG16, & Accuracy & \multirow{3}{*}{No} \\  & & ResNet50, & & VGG16-98.90\%, & \\  & & Inceptionv3 & ResNet50-97.80\%, & \\  & & & Inceptionv3-96.70\%, & \\ \hline \multirow{3}{*}{[34]} & \multirow{3}{*}{Weed} & AlexNet & Accuracy & \multirow{3}{*}{No} \\  & & ANN & & ANN-48\%. & \\ \hline \multirow{3}{*}{[36]} & Rice plant species \& weeds & ANN Bee & \multirow{3}{*}{Accuracy-92.02\%} & \multirow{3}{*}{Yes} \\  & & Algorithm (BA) & & \\ \hline \multirow{3}{*}{[37]} & \multirow{3}{*}{Weed \& wheat} & NNs, SVMs,\& \multirow{3}{*}{Accuracy-97.70\%} & \multirow{3}{*}{Yes} \\  & & KNN \& hybrid & \\ \cline{1-1}  & & of sine cosine \& gray wolf optimization. & \\ \hline \multirow{3}{*}{[38]} & \multirow{3}{*}{Weed} & DenseNet-121 & \multirow{3}{*}{Accuracy-98.99\%.} & \multirow{3}{*}{No} \\  & & MBMO & & \\ \hline \multirow{3}{*}{**DenseHHO**} & \multirow{3}{*}{Weed \& wheat} & DenseNet-121 \& \multirow{3}{*}{Accuracy:} & \multirow{3}{*}{Yes} \\  & & DenseNet-201 & DenseNet-121-98.44\% & \\ \cline{1-1}  & & optimized with HHO & DenseNet-201-97.61\% & \\ \hline \end{tabular}
\end{table} 
Table 7: Performance comparison of DenseHHO and state-of-the-art-related works—Neural networks (NNs), Support vector machines (SVMs), and K-nearest neighbors (KNN). classifying the weed collected data. This level of accuracy is quite high and indicates that the model has the potential to be useful in a wide range of real-world applications.