 The Harris-Hawk optimization algorithm, HHO, was used to design a convolutional neural network, CNN, architecture for identifying weeds from crop images captured by drone sprayers. The HHO algorithm selected the best parameters for the DenseNet-121 and DenseNet-201 models, resulting in an average accuracy of 98.44% and 97.91%, respectively. This is higher than any other optimization-based weed detection strategy. This article was authored by Fath-Mathal Regina Pee-Pee, Wala N. Ismail, and Mona A.S. Ali.