Abstract:Aiming at the problems of high network complexity, large parameter size, and difficulty in adapting to the complex environment and stringent real-time requirements of continuous casting production lines in current general detection algorithms, this paper proposes a lightweight continuous casting slab detection algorithm named SGI-YOLOv7 (YOLOv7 with StarNet, GSConv-based Slim-neck, and Inner-SIoU loss function). Firstly, a dedicated dataset for slab detection is constructed based on images collected from the continuous casting production line. Secondly, StarNet is adopted to replace the backbone network of YOLOv7 (you only look once version 7), utilizing star operations to achieve efficient feature mapping, which effectively reduces the model’s parameter scale and computational complexity. Thirdly, a lightweight Slim-neck structure based on group shuffle convolution (GSConv) is introduced to achieve efficient fusion and compression of cross-level features. Simultaneously, an inner scale-aware intersection over union (Inner-SIoU) loss function is designed based on auxiliary bounding boxes, which enhances the model’s adaptability and convergence speed in scenarios with significant aspect ratio variations through direction-aware gradient optimization and a multi-scale regression mechanism. Finally, comparative experimental results on the self-built slab dataset show that the proposed SGI-YOLOv7 algorithm maintains high detection accuracy (mAP@0.5 is 96.0%) while reducing parameters by 35.6% and computational cost by 65.6% compared to the baseline YOLOv7 model, with an inference speed reaching 82 frames per second. This significantly alleviates the hardware deployment burden and achieves efficient, lightweight, real-time detection of continuous casting slabs in industrial scenarios.