To address the issues of missed detection and low detection accuracy in X-ray weld defect detection,an improved YOLOv8-based detection method is proposed.Firstly,the efficient multi-scale attention(EMA)mechanism is improved by replacing the 3×3 convolutional kernel with a 5×5 kernel to expand the receptive field,and replacing the average pooling with the multi-scale pooling to extract multi-scale features.The improved EMA module is embedded into the backbone network to enhance the model's ability to detect defects at various scales.Then the spatial pyramid pooling fast module is improved by introducing adaptive average pooling and max pooling layers,to improve the perception of weld edge information.Finally,in the neck part,Dual convolution is used to replace traditional convolution,to reduce the parameter number of the model.The WIoU(wise intersection over union)loss function is adopted to replace the CIoU(complete intersection over union)loss function to improve the convergence speed of the model. Experimental results show that,compared to YOLOv8n,the proposed algorithm reduces the number of parameters by 4.02%and increases the mean average precision by 5.9%,which is well-suited for X-ray weld defect detection tasks.
| 科 Family | 属数 Number of genus | 种数 Number of species | 占总种数比例 Percentage of total species (%) | 属 Genus | 种数 Number of species | 占总种数比例 Percentage of total species (%) |
|---|---|---|---|---|---|---|
| 鹅膏菌科Amanitaceae | 2 | 11 | 5.26 | 鹅膏菌属 Amanita | 10 | 4.78 |
| 小菇科 Mycenaceae | 2 | 12 | 5.74 | 丝盖伞属 Inocybe | 5 | 2.39 |
| 多孔菌科 Polyporaceae | 8 | 14 | 6.70 | 蜡蘑属 Laccaria | 5 | 2.39 |
| 红菇科 Russulaceae | 3 | 23 | 11.00 | 小皮伞属 Marasmius | 6 | 2.87 |
| 小菇属 Mycena | 11 | 5.26 | ||||
| 光柄菇属 Pluteus | 5 | 2.39 | ||||
| 红菇属 Russula | 17 | 8.13 | ||||
| 栓菌属 Trametes | 5 | 2.39 |