Abstract:Forgings are prone to various surface defects such as cracks during the manufacturing process, which affects product quality. Aiming at the problem that small target cracks are easily missed in complex visible light environments, and considering the requirement of efficient deployment in production line, the LSC-PoolFormer algorithm is proposed. First, the magnetic particle inspection images from the automobile steering knuckle production line of Hubei Sanhuan Forging Co., Ltd. were collected, annotated and made into a FDMPI data set; then, an encoder based on the PoolFormer backbone network was used to achieve lightweight and efficient feature extraction; secondly, the asymptotic feature pyramid is introduced as the neck network to reduce the semantic gap between features of different scales; finally, DS-Seghead is proposed as the decoding head based on dynamic snake convolution to enhance the model′s perception of stripe cracks, and a DDS training strategy is proposed, reducing the probability of missing small target cracks. The experimental results of LSC-PoolFormer on FDMPI show that compared with the baseline model, the parameter amount and calculation amount of this algorithm decreased by 9.2% and 48.78% respectively, and the F1 score and IoU increased by 1.1% and 1.69% respectively. At the same time, the performance on the public data set NEU-Seg also proves the generalization ability of the algorithm. Compared with the baseline model, the mF1 score and mIoU increased by 0.66% and 1.04% respectively while greatly reducing the number of parameters and calculations. Experiment shows that the algorithm in this paper significantly reduces the complexity of the algorithm while maintaining detection accuracy, which is beneficial to the actual deployment.