# Evaluation of YOLO Object Detectors for Weed Detection in Different Turfgrass Scenarios
## 2 Materials and Methods
### YOLO and YOLOv5, YOLOv6, YOLOv7, YOLOv8 Detectors
To date, the YOLOv7 algorithm resulted with lower inference speed and higher accuracy than YOLOR, PP-YOLOE, YOLOX, Scaled-YOLOv4, and YOLOv5 [35]. Furthermore, the YOLOv7 network provides two model sizes: YOLOv7 and YOLOv7x (extra-large). YOLOv8 represents the state-of-the-art among YOLO object detectors. Indeed, no paper about YOLOv8 has been published yet. However, some information is available online (Table 1). YOLOv8 is an anchor-free detector developed to drop the number of box predictions and speed up the Non-maximum suppression. YOLOv8 uses mosaic augmentation to boost the training process and has been disabled for the last ten epochs. YOLOv8 provides several innovations to support a full range of vision AI tasks, including detection, segmentation, pose estimation, tracking classification, labeling, training, and deploying. YOLOv8 provided five scaled versions: YOLOv8n (nano), YOLOv8s (small), YOLOv8m (medium), YOLOv8l (large) and YOLOv8s (extra-large). YOLOv8x obtained an AP of 53.9% on MS the MS COCO dataset test-dev 2017, with an image size of 640 pixels and a speed of 280 FPS on an NVIDIA A100 and TensorRT [49]. In general, larger model scales provide higher accuracy but a lower inference speed. Therefore, for this trial, all five of the YOLOv5 model scales, four of the YOLOv6 models, the two YOLOv7 models, and all five YOLOv8 model scales were used to train the weed detection algorithm. Hereafter hyperparameters for the training process are listed in Table 2.  
EfficientDet was also trained and compared with the abovementioned YOLO models. EfficientDet is a SSD which employs bi-directional feature pyramid network (BiFPN) to enhance multi-scale feature fusion performance [52] and EfficientNet [53] backbones to boost image classification performance. The model was trained for 1000 iterations, with images size of 640 \(\times\) 640, a learning rate of 0.0001 and a batch size of 8. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Model**} & \multicolumn{2}{c}{**Parameters**} & \multirow{2}{*}{**GFlops \({}^{\text{a}}\)**} & \multirow{2}{*}{**Year**} & \multirow{2}{*}{**AP (\%) \({}^{\text{b}}\)**} & \multirow{2}{*}{**Repository**} & \multirow{2}{*}{**Reference**} \\  & **(Millions)** & & & & & \\ \hline YOLOv5n & 1.8 & 4.2 & & & & \\ YOLOv5s & 7.1 & 16.5 & & & & \\ YOLOv5m & 20.9 & 48.2 & 2020 & 55.8 & \begin{tabular}{c} [[https://github.com/ultralytics/YOLOv5](https://github.com/ultralytics/YOLOv5)]([https://github.com/ultralytics/YOLOv5](https://github.com/ultralytics/YOLOv5)) \\ (accessed on 2 July 2023) \\ \end{tabular} & [33] \\ YOLOv5l & 46.1 & 108.2 & & & & \\ YOLOv5x & 86.2 & 204.6 & & & \\ \hline YOLOv6n & 4.3 & 11.1 & & & \\ YOLOv6s & 17.2 & 44.2 & 2022 & 52.5 & \begin{tabular}{c} [[https://github.com/meituan/YOLOv6](https://github.com/meituan/YOLOv6)]([https://github.com/meituan/YOLOv6](https://github.com/meituan/YOLOv6)) \\ (accessed on 2 July 2023) \\ \end{tabular} & [34] \\ YOLOv6m & 34.3 & 82.2 & & & \\ YOLOv6l & 58.5 & 144.0 & & & \\ \hline YOLOv7 & 37.2 & 105.1 & & & \\ YOLOv7x & 70.8 & 188.9 & 2022 & 56.8 & \
\begin{tabular}{c} [[https://github.com/WongKinYiu/yolov7](https://github.com/WongKinYiu/yolov7)]([https://github.com/WongKinYiu/yolov7](https://github.com/WongKinYiu/yolov7)) \\ (accessed on 2 July 2023) \\ \end{tabular} & [35] \\ \hline YOLOv8n & 3.0 & 8.2 & & & \\ YOLOv8s & 11.2 & 28.6 & & & \\ YOLOv8m & 25.9 & 79.1 & 2023 & 53.9 &
\begin{tabular}{c} [[https://github.com/ultralytics/ultralytics](https://github.com/ultralytics/ultralytics)]([https://github.com/ultralytics/ultralytics](https://github.com/ultralytics/ultralytics)) \\ (accessed on 2 July 2023) \\ \end{tabular} & - \\ YOLOv8l & 43.6 & 165.4 & & & (accessed on 2 July 2023) & - \\ YOLOv8x & 68.2 & 258.1 & & & \\ \hline \hline \end{tabular}  
\({}^{\text{a}}\) GFlops is a computational power unit of measure equal to 1 B floating-point operations per second. \({}^{\text{b}}\) AP (%) represents the average precision of the YOLO detectors on the COCO 2017 dataset [49].  
\end{table}