# SGST-YOLOv8: An Improved Lightweight YOLOv8 for Real-Time Target Detection for Campus Surveillance
## 5 Discussion  
This research is based on campus safety hazards, using object detection and object tracking algorithms as technical methods to achieve the combination of theoretical algorithm improvements and practical applications. Looking at the existing literature, this is the first research to use an improved YOLOv8 model combined with a target tracking algorithm for real-time detection and recognition of pedestrians and vehicles based on web-based campus surveillance. Typically, using algorithms for object recognition and tracking in surveillance helps managers efficiently identify abnormal situations. However, the accuracy of the object detection algorithm and the inference speed after deployment can affect the results.  
This paper presents an improved lightweight model named SGST-YOLOv8, which replaces the original module with a GSConv backbone to reduce the overall complexity of the model. At the same time, adding the Triplet Attention mechanism module to the head section enhances the target representation and integrates contextual information, reducing background interference to improve classification accuracy. The method achieved an accuracy of 88.6% on the pedestrian and vehicle dataset and an FPS increase of 3-5 fps compared to the baseline model on real-time surveillance videos. The model is superior to YOLOv8n in parameters, GFLOPS, and Precision, indicating that the model is a practical real-time pedestrian and vehicle detection algorithm. Therefore, the SGST-YOLOv8 model and deployment method framework proposed in this study can help subsequent scholars to carry out related research and provide ideas and directions for them.  
Although this improved model reduces the overall complexity of the target monitoring model and adds the Triplet Attention mechanism to improve the classification accuracy, the model's ability to monitor small targets still needs to be improved. In future research, follow-up experiments will further optimize the algorithm to improve the accuracy and efficiency of the model, and explore its integration with tasks such as target tracking and semantic segmentation to meet the evolving application requirements.  
The current work's main contributions are compared with those reported in existing technologies, as shown in Table 5.  
From the table, it can be seen that most of the current research in this field focuses on offline processing and object recognition for static targets, while there has been little in-depth exploration of subsequent target path tracking. In terms of practical application, previous research primarily conducted in-depth studies in the scientific domain without performing relevant experiments for actual deployment. This can be seen from the deployment types and detection targets. Previous research has proposed many excellent and practical improved algorithms. However, new algorithms continue to emerge in the field of technology and object detection. Therefore, this study presents a lightweight improved model, SGST-YOLOv8, providing a new algorithm direction for future research.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Scenario** & **Model** & **FPS** \\ \hline \multirow{3}{*}{No Physical Scene} & CSGT-YOLOv8 & 44.7 \\  & YOLOv8 & 44.4 \\  & YOLOv8+ 1  & 42.9–43.6 \\ \hline \multirow{3}{*}{Simple Scene} & CSGT-YOLOv8 & 34.9 \\  & YOLOv8 & 32.3 \\  & YOLOv8+ & 28.1–31.4 \\ \hline \multirow{3}{*}{Intricate Scene} & CSGT-YOLOv8 & 22.9 \\  & YOLOv8 & 17.6 \\ \cline{1-1}  & YOLOv8+ & 15.8–16.8 \\ \hline \hline \end{tabular}
\end{table}
Table 4: Scenario PFS for each model in the three scenarios.