## 2 Materials and Methods
### Incorporated Quality Control System Using Computer Vision
#### 2.5.3 YOLO Object Detection
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & & & & & \\ \hline
**Parameter** & **YOLOv8 n** & **YOLOv8 s** & **YOLOv8 m** & **YOLOv8 l** & **YOLOv8 x** \\ \hline Size of the input image & 832 \(\times\) 832 & 832 \(\times\) 832 & 832 \(\times\) 832 & 832 \(\times\) 832 & 832 \(\times\) 832 \\ \hline Max training batch & 4 & 4 & 4 & 2 & 1 \\ \hline Number of classes & 2 & 2 & 2 & 2 & 2 \\ \hline Pretrained weights & 319/355 & 349/355 & 589/595 & 589/595 & 589/595 \\ \hline Learning rate & 0.01 & 0.01 & 0.01 & 0.01 & 0.01 \\ \hline Momentum & 93.7\% & 93.7\% & 93.7\% & 93.7\% & 93.7\% \\ \hline Optimizer & AdamW & AdamW & AdamW & AdamW & AdamW \\ \hline Epochs & 20 & 20 & 20 & 20 & 20 \\ \hline \hline
**(b)** & & & & & \\ \hline
**Parameter** & **YOLOv9 m** & **YOLOv9 c** & **YOLOv9 t** & **YOLOv9 s** & **YOLOv9 e** \\ \hline Size of the input image & 832 \(\times\) 832 & 832 \(\times\) 832 & 832 \(\times\) 832 & 832 \(\times\) 832 & 832 \(\times\) 832 \\ \hline Max training batch & 4 & 4 & 4 & 4 & 4 \\ \hline Number of classes & 2 & 2 & 2 & 2 & 2 \\ \hline Pretrained weights & 901/907 & 931/937 & 1303/1339 & 1333/1339 & 1805/1811 \\ \hline Learning rate & 0.01 & 0.01 & 0.01 & 0.01 & 0.01 \\ \hline Momentum & 93.7\% & 93.7\% & 93.7\% & 93.7\% & 93.7\% \\ \hline Optimizer & AdamW & AdamW & AdamW & AdamW & AdamW \\ \hline Epochs & 20 & 20 & 20 & 20 & 20 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: (a) Parameters of YOLOv8 n, s, m, l and x training. (b) Parameters of YOLOv9 m, c, t, s and e training. outputs from different levels of the network, and the Upsample layers increase image resolution while preserving spatial information, allowing for better detection at various scales. Finally, the detect head utilizes information from the previous layers to predict object boundaries and their classes, ensuring accurate and rapid detection results. The architecture of the proposed YOLOv9 m, c, t, s and e models consists of a series of convolutional layers, Efficient Layer Aggregation Network (ELAN) blocks, Replicated Non-CSP ELAN (RepNCSPELAN) blocks, SPPELAN (Spatial Pyramid Pooling with ELAN) blocks, and Concat and Upsample layers. The convolutional layers are designed for the initial extraction of basic features from input images, while the ELAN blocks enable deeper learning of complex features through efficient layer aggregation. RepNCSPELAN blocks further enhance the model's ability to detect objects of various sizes by combining information from different levels of the spatial pyramid. SPPELAN blocks provide additional layering and improve detection efficiency by combining spatial pyramid pooling with ELAN blocks. The Concat layers integrate outputs from different levels of the network, and the Upsample layers increase image resolution while preserving spatial information, allowing for better detection at various scales. Finally, like with the YOLOv8 models, the detect head utilizes information from the previous layers to predict object boundaries and their classes, ensuring accurate and rapid detection results. The YOLOv8 and YOLOv9 architectures consist of convolutional layers but differ significantly in their block structures. YOLOv8 uses (Cross-Stage Partial with Two Flow Paths) C2f blocks and an SPPF (Spatial Pyramid Pooling Fast) block to enhance feature learning and multi-scale object detection. In contrast, YOLOv9 introduces blocks like (Efficient Layer Aggregation Network) ELAN, (Replicated Non-CSP ELAN) RepNCSPELAN, and (Spatial Pyramid Pooling with ELAN) SPPELAN, which should provide efficient layer aggregation and improved detection capabilities. YOLOv9's architecture should offer reduced parameter count and higher efficiency (7.8 GFLOPs vs. YOLOv8's 8.2 GFLOPs) while maintaining or enhancing detection performance through sophisticated layer integration and spatial pyramid pooling mechanisms.