A Metaheuristic Harris Hawks Optimization Algorithm for Weed Detection Using Drone Images
Abstract
:1. Introduction
- A deep-learning-based framework, “DenseHHO”, that is designed to improve the detection of weeds using pre-trained CNNs such as DenseNet-121 and DenseNet-201 is presented.
- The devised model’s CNN architecture is adopted based on the analysis of weed images captured by sprayer drones structured as an optimization problem addressed by an HHO natural-inspired algorithm.
- The performance of the devised model is improved using HHO for binary class classification to automatically select as well as optimize the CNN’s hyperparameters.
- The performance of DenseHHO has been evaluated through a comparative analysis and performance evaluation based on various performance metrics.
2. Related Work
3. Proposed Framework
3.1. Dataset Collection and Preprocessing
- Random Flip: This layer will perform horizontal and vertical mirroring through the reversal of rows/columns of pixels..
- Random Rotation: This layer will apply random rotations to each image. The factor here is a float represented as a fraction of 0.1.
3.2. Pre-Trained Models
3.2.1. DenseNet-121 Model
3.2.2. DenseNet-201 Model
3.3. Harris Hawks Optimization Algorithm
- Exploration: Hawks fly randomly to discover new areas in which they can search.
- Exploitation: Hawks attempt to improve upon the solutions provided by the most successful individuals.
- Intensification: Hawks coordinate their efforts to search for prey.
Algorithm 1 The suggested DenseHHO framework pseudocode |
Input:Weed Images Dataset Dt, CNN- Hyperparameters, Objective Function F Output:best model architecture, Performance Metrics.
|
3.4. Experimental Setting
3.5. Performance Parameters and Evaluation Metrics
4. Results
4.1. Model Evaluation Performance
4.2. DenseHHO Performance Compared to State-of-the Art
5. Discussion
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
ANN | Artificial Neural Network |
AUC | Area Under the Curve |
CNN | Convolutional Neural Network |
DL | Deep Learning |
DNN | Deep Neural Networks |
ENN | Elman Neural Network |
GA | Genetic Algorithm |
GF | Gabor Filtering |
GWO | Gray Wolf Optimizer |
HHO | Harris Hawks Optimization |
KNN | K-Nearest Neighbor |
MBMODL-WD | Modified Barnacles Mating Optimization with Deep-Learning-based weed detection |
RCNN | Region-based CNN |
RF | Random Forest |
SVM | Support Vector Machine |
UAV | Unmanned Aerial Vehicle |
References
- Daponte, P.; De Vito, L.; Glielmo, L.; Iannelli, L.; Liuzza, D.; Picariello, F.; Silano, G. A review on the use of drones for precision agriculture. In IOP Conference Series: Earth and Environmental Science; IOP Publishing: Bristol, UK, 2019; Volume 275, p. 012022. [Google Scholar]
- Belal, A.A.; EL-Ramady, H.; Jalhoum, M.; Gad, A.; Mohamed, E.S. Precision farming technologies to increase soil and crop productivity. In Agro-Environmental Sustainability in MENA Regions; Springer: Cham, Switzerland, 2021; pp. 117–154. [Google Scholar]
- Pavelka, K.; Raeva, P.; Pavelka, K., Jr. Evaluating the Performance of Airborne and Ground Sensors for Applications in Precision Agriculture: Enhancing the Postprocessing State-of-the-Art Algorithm. Sensors 2022, 22, 7693. [Google Scholar]
- Ghanizadeh, H.; Lorzadeh, S.; Aryannia, N. Effect of weed interference on Zea mays: Growth analysis. Weed Biol. Manag. 2014, 14, 133–137. [Google Scholar]
- Oerke, E.C. Crop losses to pests. J. Agric. Sci. 2006, 144, 31–43. [Google Scholar]
- Myers, S.S.; Smith, M.R.; Guth, S.; Golden, C.D.; Vaitla, B.; Mueller, N.D.; Dangour, A.D.; Huybers, P. Climate change and global food systems: Potential impacts on food security and undernutrition. Annu. Rev. Public Health 2017, 38, 259–277. [Google Scholar]
- Aharon, S.; Peleg, Z.; Argaman, E.; Ben-David, R.; Lati, R.N. Image-based high-throughput phenotyping of cereals early vigor and weed-competitiveness traits. Remote Sens. 2020, 12, 3877. [Google Scholar]
- Herrmann, I.; Bdolach, E.; Montekyo, Y.; Rachmilevitch, S.; Townsend, P.A.; Karnieli, A. Assessment of maize yield and phenology by drone-mounted superspectral camera. Precis. Agric. 2020, 21, 51–76. [Google Scholar]
- Liakos, K.G.; Busato, P.; Moshou, D.; Pearson, S.; Bochtis, D. Machine learning in agriculture: A review. Sensors 2018, 18, 2674. [Google Scholar]
- Forero, M.G.; Herrera-Rivera, S.; Ávila-Navarro, J.; Franco, C.A.; Rasmussen, J.; Nielsen, J. Color classification methods for perennial weed detection in cereal crops. In Progress in Pattern Recognition, Image Analysis, Computer Vision, and Applications Proceedings of the 23rd Iberoamerican Congress, CIARP 2018, Madrid, Spain, 19–22 November 2018; Springer International Publishing: Berlin/Heidelberg, Germany, 2019; pp. 117–123. [Google Scholar]
- Dyrmann, M.; Karstoft, H.; Midtiby, H.S. Plant species classification using deep convolutional neural network. Biosyst. Eng. 2016, 151, 72–80. [Google Scholar]
- Albanese, A.; Nardello, M.; Brunelli, D. Automated pest detection with DNN on the edge for precision agriculture. IEEE J. Emerg. Sel. Top. Circuits Syst. 2021, 11, 458–467. [Google Scholar]
- Pang, Y.; Shi, Y.; Gao, S.; Jiang, F.; Veeranampalayam-Sivakumar, A.N.; Thompson, L.; Luck, J.; Liu, C. Improved crop row detection with deep neural network for early-season maize stand count in UAV imagery. Comput. Electron. Agric. 2020, 178, 105766. [Google Scholar]
- Chowdhury, M.E.; Rahman, T.; Khandakar, A.; Ayari, M.A.; Khan, A.U.; Khan, M.S.; Ali, S.H.M. Automatic and reliable leaf disease detection using deep learning techniques. AgriEngineering 2021, 3, 294–312. [Google Scholar]
- Rai, N.; Flores, P. Leveraging transfer learning in ArcGIS Pro to detect “doubles” in a sunflower field. In Proceedings of the 2021 ASABE Annual International Virtual Meeting, Online, 12–16 July 2021; American Society of Agricultural and Biological Engineers: St. Joseph, MI, USA, 2021; p. 1. [Google Scholar]
- Butte, S.; Vakanski, A.; Duellman, K.; Wang, H.; Mirkouei, A. Potato crop stress identification in aerial images using deep learning-based object detection. Agron. J. 2021, 113, 3991–4002. [Google Scholar]
- Ismail, N.; Malik, O.A. Real-time visual inspection system for grading fruits using computer vision and deep learning techniques. Inf. Process. Agric. 2022, 9, 24–37. [Google Scholar]
- Onishi, Y.; Yoshida, T.; Kurita, H.; Fukao, T.; Arihara, H.; Iwai, A. An automated fruit harvesting robot by using deep learning. Robomech J. 2019, 6, 13. [Google Scholar]
- Liu, J.; Wang, X. Plant diseases and pests detection based on deep learning: A review. Plant Methods 2021, 17, 22. [Google Scholar]
- Urmashev, B.; Buribayev, Z.; Amirgaliyeva, Z.; Ataniyazova, A.; Zhassuzak, M.; Turegali, A. Development of a weed detection system using machine learning and neural network algorithms. East.-Eur. J. Enterp. Technol. 2021, 6, 114. [Google Scholar]
- O’Shea, K.; Nash, R. An introduction to convolutional neural networks. arXiv 2015, arXiv:1511.08458. [Google Scholar]
- Liu, L.; Ouyang, W.; Wang, X.; Fieguth, P.; Chen, J.; Liu, X.; Pietikäinen, M. Deep learning for generic object detection: A survey. Int. J. Comput. Vis. 2020, 128, 261–318. [Google Scholar]
- Ronay, I.; Ephrath, J.E.; Eizenberg, H.; Blumberg, D.G.; Maman, S. Hyperspectral Reflectance and Indices for Characterizing the Dynamics of Crop–Weed Competition for Water. Remote Sens. 2021, 13, 513. [Google Scholar]
- Tian, H.; Wang, T.; Liu, Y.; Qiao, X.; Li, Y. Computer vision technology in agricultural automation—A review. Inf. Process. Agric. 2020, 7, 1–19. [Google Scholar]
- Alam, M.; Alam, M.S.; Roman, M.; Tufail, M.; Khan, M.U.; Khan, M.T. Real-time machine-learning based crop/weed detection and classification for variable-rate spraying in precision agriculture. In Proceedings of the 2020 7th International Conference on Electrical and Electronics Engineering (ICEEE), Antalya, Turkey, 14–16 April 2020; pp. 273–280. [Google Scholar]
- Kawamura, K.; Asai, H.; Yasuda, T.; Soisouvanh, P.; Phongchanmixay, S. Discriminating crops/weeds in an upland rice field from UAV images with the SLIC-RF algorithm. Plant Prod. Sci. 2020, 24, 198–215. [Google Scholar]
- Brinkhoff, J.; Vardanega, J.; Robson, A.J. Land Cover Classification of Nine Perennial Crops Using Sentinel-1 and-2 Data. Remote Sens. 2020, 12, 96. [Google Scholar]
- Zhang, S.; Guo, J.; Wang, Z. Combing K-means Clustering and Local Weighted Maximum Discriminant Projections for Weed Species Recognition. Front. Comput. Sci. 2019, 1, 4. [Google Scholar]
- Ramirez, W.; Achanccaray, P.; Mendoza, L.F.; Pacheco, M.A.C. Deep convolutional neural networks for weed detection in agricultural crops using optical aerial images. In Proceedings of the 2020 IEEE Latin American GRSS & ISPRS Remote Sensing Conference (LAGIRS), Santiago, Chile, 22–26 March 2020; pp. 133–137. [Google Scholar]
- You, J.; Liu, W.; Lee, J. A DNN-based semantic segmentation for detecting weed and crop. Comput. Electron. Agric. 2020, 178, 105750. [Google Scholar]
- Yu, J.; Schumann, A.W.; Cao, Z.; Sharpe, S.M.; Boyd, N.S. Weed detection in perennial ryegrass with deep learning convolutional neural network. Front. Plant Sci. 2019, 10, 1422. [Google Scholar]
- dos Santos Ferreira, A.; Freitas, D.M.; da Silva, G.G.; Pistori, H.; Folhes, M.T. Weed detection in soybean crops using ConvNets. Comput. Electron. Agric. 2017, 143, 314–324. [Google Scholar]
- Ahmad, A.; Saraswat, D.; Aggarwal, V.; Etienne, A.; Hancock, B. Performance of deep learning models for classifying and detecting common weeds in corn and soybean production systems. Comput. Electron. Agric. 2021, 184, 106081. [Google Scholar]
- Beeharry, Y.; Bassoo, V. Performance of ANN and AlexNet for weed detection using UAV-based images. In Proceedings of the 2020 3rd International Conference on Emerging Trends in Electrical, Electronic and Communications Engineering (ELECOM), Balaclava, Mauritius, 25–27 November 2020; pp. 163–167. [Google Scholar]
- Sabzi, S.; Abbaspour-Gilandeh, Y.; García-Mateos, G. A fast and accurate expert system for weed identifcation in potato crops using metaheuristic algorithms. Comput. Ind. 2018, 98, 80–89. [Google Scholar]
- Dadashzadeh, M.; Abbaspour-Gilandeh, Y.; Mesri-Gundoshmian, T.; Sabzi, S.; Hernández-Hernández, J.L.; Hernández-Hernández, M.; Arribas, J.I. Weed Classification for Site-Specific Weed Management Using an Automated Stereo Computer-Vision Machine-Learning System in Rice Fields. Plants 2020, 9, 559. [Google Scholar]
- El-Kenawy, E.-S.M.; Khodadadi, N.; Mirjalili, S.; Makarovskikh, T.; Abotaleb, M.; Karim, F.K.; Alkahtani, H.K.; Abdelhamid, A.A.; Eid, M.M.; Horiuchi, T.; et al. Metaheuristic Optimization for Improving Weed Detection in Wheat Images Captured by Drones. Mathematics 2022, 10, 4421. [Google Scholar]
- Albraikan, A.A.; Aljebreen, M.; Alzahrani, J.S.; Othman, M.; Mohammed, G.P.; Ibrahim Alsaid, M. Modified Barnacles Mating Optimization with Deep Learning Based Weed Detection Model for Smart Agriculture. Appl. Sci. 2022, 12, 12828. [Google Scholar]
- Heidari, A.A.; Mirjalili, S.; Faris, H.; Aljarah, I.; Mafarja, M.; Chen, H. Harris hawks optimization: Algorithm and applications. Future Gener. Comput. Syst. 2019, 97, 849–872. [Google Scholar]
- Shehab, M.; Mashal, I.; Momani, Z.; Shambour, M.K.Y.; AL-Badareen, A.; Al-Dabet, S.; Bataina, N.; Alsoud, A.R.; Abualigah, L. Harris hawks optimization algorithm: Variants and applications. Arch. Comput. Methods Eng. 2022, 29, 5579–5603. [Google Scholar]
- Huang, G.; Liu, Z.; Van Der Maaten, L.; Weinberger, K.Q. Densely connected convolutional networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; pp. 4700–4708. [Google Scholar]
Layer (Type) | Output Shape | Param # |
---|---|---|
Input_2 (InputLayer) | [(None, 256, 256, 3)] | 0 |
sequential (Sequential) | [(None, 256, 256, 3)] | 0 |
densenet121 (Functional) | (None, 8, 8, 1024) | 7,037,504 |
flatten (Flatten) | (None, 65, 536) | 0 |
dense (Dense) | (None, 128) | 8,388,736 |
Dense_1 (Dense) | (None, 2) | 258 |
Total Params: 15,426,498 | ||
Trainable Params: 15,342,850 | ||
Non-trainable Params: 83,648 |
Layer (Type) | Output Shape | Param # |
---|---|---|
Input_2 (InputLayer) | [(None, 256, 256, 3)] | 0 |
sequential (Sequential) | [(None, 256, 256, 3)] | 0 |
densenet121 (Functional) | (None, 8, 8, 1024) | 18,321,984 |
flatten (Flatten) | (None, 65,536) | 0 |
dense (Dense) | (None, 128) | 15,728,768 |
Dense_1 (Dense) | (None, 2) | 258 |
Total params: 34,051,010 | ||
Trainable params: 33,821,954 | ||
Non-trainable params: 229,056 |
Parameter | Purpose | Value |
---|---|---|
Fitness_function | A user-defined function that takes a set of hyperparameters as input and returns a fitness value that represents the performance of a machine-learning model trained with those hyperparameters. | The maximum validation accuracy and minimum validation loss |
objf | The objective function to be optimized. | Accuracy |
lb | A numpy array representing the lower bounds of the search space. | 0 |
ub | A numpy array representing the upper bounds of the search space. | 1 |
dim | The number of dimensions in the search space. | 10 |
SearchAgents_no | The number of search agents (i.e., hawks) to be used in the optimization algorithm. | 30 |
Max_iter | The maximum number of iterations to run the optimization algorithm. | 2 |
Model | Accuracy | F1_Score | Sensitivity | Specificity |
---|---|---|---|---|
DenseNet-121 | 98.44% | 97.61% | 99.10% | 97.30% |
DenseNet-201 | 97.91% | 97.91% | 97.50% | 98.00% |
Precision | Recall | F1_Score | Support | |
---|---|---|---|---|
0 | 0.95 | 0.91 | 0.93 | 130 |
1 | 0.98 | 0.99 | 0.98 | 540 |
accuracy | 0.97 | 670 | ||
macro avg | 0.96 | 0.95 | 0.96 | 670 |
weighted avg | 0.97 | 0.97 | 0.97 | 670 |
Precision | Recall | F1_Score | Support | |
---|---|---|---|---|
0 | 0.98 | 0.92 | 0.94 | 130 |
1 | 0.98 | 0.99 | 0.99 | 540 |
accuracy | 0.98 | 670 | ||
macro avg | 0.98 | 0.95 | 0.97 | 670 |
weighted avg | 0.98 | 0.98 | 0.98 | 670 |
Ref. | Target Images | Methodology | Performance | Optimization |
---|---|---|---|---|
[31] | Ryegrass species & three distinct weed types | VGGNet | F-Score: maculate-92.65%, hederacea-99.84%, officinale-97.37% | No |
[32] | Plant species | AlexNet | Accuracy-99.5% | |
[33] | Four weed species. | VGG16, ResNet50, Inceptionv3 | Accuracy VGG16-98.90%, ResNet50-97.80%, Inceptionv3-96.70%, | No |
[34] | Weed | AlexNet ANN | Accuracy AlexNet-99%, ANN-48%. | No |
[36] | Rice plant species & weeds | ANN Bee Algorithm (BA) | Accuracy-92.02% | Yes |
[37] | Weed & wheat | NNs, SVMs,& KNN & hybrid of sine cosine & gray wolf optimization. | Accuracy-97.70% | Yes |
[38] | Weed | DenseNet-121 MBMO | Accuracy-98.99%. | No |
DenseHHO | Weed & wheat | DenseNet-121 & DenseNet-201 optimized with HHO | Accuracy: DenseNet-121-98.44% DenseNet-201-97.61% | Yes |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
P.P., F.R.; Ismail, W.N.; Ali, M.A.S. A Metaheuristic Harris Hawks Optimization Algorithm for Weed Detection Using Drone Images. Appl. Sci. 2023, 13, 7083. https://doi.org/10.3390/app13127083
P.P. FR, Ismail WN, Ali MAS. A Metaheuristic Harris Hawks Optimization Algorithm for Weed Detection Using Drone Images. Applied Sciences. 2023; 13(12):7083. https://doi.org/10.3390/app13127083
Chicago/Turabian StyleP.P., Fathimathul Rajeena, Walaa N. Ismail, and Mona A. S. Ali. 2023. "A Metaheuristic Harris Hawks Optimization Algorithm for Weed Detection Using Drone Images" Applied Sciences 13, no. 12: 7083. https://doi.org/10.3390/app13127083
APA StyleP.P., F. R., Ismail, W. N., & Ali, M. A. S. (2023). A Metaheuristic Harris Hawks Optimization Algorithm for Weed Detection Using Drone Images. Applied Sciences, 13(12), 7083. https://doi.org/10.3390/app13127083