Abstract:Aiming at the current problems of occlusion, noise interference and low detection accuracy between prohibited X-ray objects, a contraband detection model integrating anchor-aided training strategy and fine-grained multi-scale features was proposed based on the YOLOv8s network. In the network, the C3_Res2Net module is used to replace the C2f module. By integrating features at different levels to enhance multi-scale, the receptive field range of the network layer is increased, and features at the fine-grained level are obtained to solve the problem of low detection accuracy caused by occlusion between contraband items;The sliding average Slide Loss target category loss function and the improved border loss function are used to try to assign higher weights to difficult samples, which reduces the competitiveness of high-quality anchor frames while reducing the harmful gradients generated by low-quality examples. At the same time, the focus is on anchor frames of ordinary quality to improve the overall performance of the detector and make it have better anti-noise interference ability; In the early stages of training, the ATSS (Adaptive Training Sample Selection) and Task-Aligned Assigner collaborative label assignment strategies are used, leveraging anchor-based preset information to stabilize model training; In the later training stages, an anchor-aided training strategy further enhances detection accuracy by exploiting the respective advantages of various anchor networks; The improved model was trained and tested on the public SIXray and HiXray datasets, achieving mAP50 scores of 94.9% and 83.7%, and mAP50:95 scores of 73.1% and 52.2%, respectively. The results demonstrate that the proposed model offers high accuracy and stability in contraband detection.