Aiming at the problem of class sample imbalance in crack detection of wing spars, a crack classification model was proposed based on cross-scale feature fusion with an improved Swin Transformer V2(CSFF-ISTV2), and a triplet dynamic weight balance loss function was designed. First, the global attention mechanism was introduced into the Swin Transformer V2 module to enhance the global long-range dependence modeling ability. At the same time, the multi-layer perceptron was optimized by combining the gated linear unit and the Swish activation function to improve the accuracy of feature expression. Second, a cross-scale attention fusion structure was constructed to make up for the deficiency of single-scale receptive field feature extraction. Finally, the recognition ability of a few crack samples was enhanced by the triplet dynamic weight balance loss. The experimental results show that the geometric mean criterion value of the proposed model is 86.27% and the accuracy is 98.29% under the condition of significant sample imbalance across multiple categories. Compared with the baseline Swin Transformer V2, the two indicators are improved by 33.5% and 4.44%, respectively.
HEChangfu, HEDeqiang, WEIZexian, et al. A Train Bearing Imbalanced Fault Diagnosis Method Based on Extended CCR and Multi-scale Feature Fusion Network[J]. Nonlinear Dynamics, 2024, 112(15): 13147-13173.
[2]
ZHANGYan, LIUWenyi, WANGXin, et al. A Novel Wind Turbine Fault Diagnosis Method Based on Compressed Sensing and DTL-CNN[J]. Renewable Energy, 2022, 194: 249-258.
CHENYu, XIANGWei, LINWenwen, et al. Abnormal Detection of Injection Molding Products Based on Semi-supervised Learning Dual-model Structure[J]. China Mechanical Engineering, 2025, 36(3): 576-583.
[5]
JIAOBotao, GUOYinan, GONGDunwei, et al. Dynamic Ensemble Selection for Imbalanced Data Streams with Concept Drift[J]. IEEE Transactions on Neural Networks and Learning Systems, 2024, 35(1): 1278-1291.
YUYue, DINGLei, JINZhaoyang. Robust Forecasting-aided State Estimation Method of Active Distribution Network Considering Small Sample Imbalance[J]. High Voltage Engineering, 2024, 50(10): 4550-4560.
[8]
LILusi, HEHaibo, LIJie. Entropy-based Sampling Approaches for Multi-class Imbalanced Problems[J]. IEEE Transactions on Knowledge and Data Engineering, 2020, 32(11): 2159-2170.
[9]
ZHOUZiyou. Fault Diagnosis Method for Imbalanced and Unlabeled Data Based on Bayesian Graph Balanced Learning[J]. Measurement Science and Technology, 2024, 35(9): 096131.
[10]
GUOZhaolin, ZHAOYanming. An Intelligent Fault Diagnosis Method Based on Data Enhancement by Multi-information Driven Spiking Generative Adversarial Network[J]. Measurement Science and Technology, 2026, 37(4): 046107.
[11]
LIZhenxiang, ZHENGTaisheng, WANGYang, et al. A Novel Method for Imbalanced Fault Diagnosis of Rotating Machinery Based on Generative Adversarial Networks[J]. IEEE Transactions on Instrumentation and Measurement, 2021, 70: 3500417.
WANGNana, LIWenyi, LIXiaolong. An Oil-immersed Transformer Fault Diagnosis Method Based on DGA Unbalanced Limited Sample Processing and Improved CatBoost[J]. Power System Protection and Control, 2024, 52(23): 167-176.
[14]
LIUZe, LINYutong, CAOYue, et al. Swin Transformer: Hierarchical Vision Transformer Using Shifted Windows[C]∥2021 IEEE/CVF International Conference on Computer Vision (ICCV). Montreal, 2021: 9992-10002.
[15]
ZENGFei, RENXiaotong, WUQing. A Fault Diagnosis Method for Motor Vibration Signals Incorporating Swin Transformer with Locally Sensitive Hash Attention[J]. Measurement Science and Technology, 2024, 35(4): 046121.
[16]
LIUZe, HUHan, LINYutong, et al. Swin Transformer V2: Scaling up Capacity and Resolution[C]∥2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). New Orleans, 2022: 11999-12009.
[17]
LIZhenwei, HANYanqi, YANGXiaoli. Multi-fundus Diseases Classification Using Retinal Optical Coherence Tomography Images with Swin Transformer V2[J]. Journal of Imaging, 2023, 9(10): 203.
HUANGYuanfeng, HEJianfeng, ZHANGFengyuan, et al. Research on Copper Ore Grade Classification Method Based on SwinV2-EfficientNetV2[J]. Mining Research and Development, 2025, 45(4): 220-228.
LIUJunjie, XIEJun, WANGHu, et al. The Application of Gam-EEGNet with Global Attention Mechanism in SSVEP Classification[J]. Electronic Measurement Technology, 2024, 47(22): 76-83.
ZHANGHong, SHENGYongjian, HUANGZilong, et al. W-DenseNet-based Fault Diagnosis Model of Pressure-reducing Valve with Unbalanced Samples[J]. Control and Decision, 2022, 37(6): 1513-1520.
DULinhao. Fault Diagnosis Method of Rotating Machinery Based on MSResNet Feature Fusion and CAM[J]. Journal of Vibroengineering, 2024, 26(7): 1600-1615.