# SGST-YOLOv8: An Improved Lightweight YOLOv8 for Real-Time Target Detection for Campus Surveillance
## 1 Introduction
The improved method achieved a 0.91 mAP accuracy on the wildlife video frame dataset, and each detection time was only 0.42 s. For the problems of poor quality and accuracy of multi-object segmentation and detection in complex traffic scenes, [PERSON] improved the MaskR-CNN: the path enhancement strategy is introduced, and the Efficient Channel Attention module (ECA) is added to optimize the semantic infographic; ResNet in the original backbone network is replaced by ResNet network with group convolution to enhance feature extraction ability. The results showed that the detection accuracy and segmentation accuracy of the improved Mask R-CNN algorithm increased by 4.73% and 3.96%, respectively. One-stage detection algorithms mainly include YOLO, SSD, and RetinaNet. Compared with two-stage detection, these algorithms directly predict the category and bounding box of the target through a single neural network, omitting the process of candidate region extraction, which is faster. YOLO is a fast and accurate target detection algorithm with a single forward propagation [12]. SSD is another popular real-time target detection algorithm. It predicts bounding boxes and class probabilities for objects of different scales using multiple layers of feature maps [13]. Unlike the previous two, RetinaNet combines an efficient feature pyramid network and Focal Loss to solve the problem of category imbalance in target detection, thereby improving detection performance [14]. Therefore, one-stage detection algorithms can achieve real-time target detection, but compared to two-stage detection algorithms, they may have slightly lower accuracy. [PERSON] et al. achieved high accuracy in strawberry detection by combining two-stage detection (Mask R-CNN) and one-stage detection (YOLOv3) networks for training and recognition [15]. To solve multiple complex situations in actual traffic scenes, [PERSON] et al. proposed a deep learning target detection network based on SI-SSD [16]. This network utilizes the feature pyramid network (FPN) and feature map fusion method to combine shallow and deep feature maps and enhance its sensitivity to small objects. [PERSON] et al. addressed the issue of insufficient information features for small objects by combining MFEM with RetinaNet [17]. They constructed a bidirectional feature pyramid network model, which prevented information loss and effectively integrated strong semantic information and high-resolution information. Among them, the YOLO algorithm has achieved tremendous success in the field of target detection due to its unique concept and outstanding performance. More and more researchers are starting to explore the application of target detection algorithms in actual scenarios. [PERSON] et al. proposed a lightweight and real-time method based on an improved instance segmentation model, which has achieved remarkable results in pixel-level crack detection [18]. [PERSON] et al. proposed a glove detection algorithm (YOLOv8-AFPN-M-C2F) based on YOLOv8 [19]. This algorithm replaces the head of YOLOv8 with the AFPN-M-C2f network, expanding the path of feature vector propagation and alleviating semantic differences between non-adjacent feature layers. At the same time, the surface feature information is enriched by introducing a superficial feature layer, and the sensitivity to small objects is improved. To achieve real-time detection of students and passing vehicles in the complex campus environment, while addressing the challenges of lightweight model and high performance, the main contributions of this paper are as follows:  
1. By introducing the Triplet Attention module, which reduces background interference by enhancing target representation and integrating context information. The results show that the introduction of the module can improve the performance of target detection tasks. 2. Using the GSConv + SlimNeck to replace Conv and C2f modules in the YOLOv8 model for lightweight operation.