Surface defect segmentation is to extract various defects such as blowholes and scratches on the surface of an object.Surface defect segmentation can guide industrial production and maintenance to effectively prevent defective products from entering the market.Magnetic tile is an important component in various industrial motors,and its performance greatly affects the use of the motor.Due to various reasons such as craftsmanship and raw materials,the produced magnetic tile may have various defects such as blowholes,breaks,cracks,frays,and unevenness.Currently,most of these defects rely on human visual inspection.However,due to the large workload and long time,it is difficult for workers to quickly and correctly check the quality of the magnetic tile.In view of the remarkable achievements of deep learning in the field of computer vision,major factories are scrambling to introduce it into the production chain to automate the segmentation of defects,reduce manpower and improve production efficiency.Therefore,this paper focuses on the application of deep learning-based image segmentation in industrial magnetic tile data.Aiming at the slow speed and low accuracy of different defects segmentation of magnetic tiles,drawing on the application of YOLACT in real-time instance segmentation,combined with the attention mechanism,this paper proposes an Attention-Guided Weighted YOLACT method.The Res Net50 network is selected as the backbone to extract features.Feature maps at different scales are obtained through the weighted feature pyramid network.After that,perform two parallel subtasks at the same time.The first subtask is to input the features with the largest scale in the prototype generation branch to generate a set of prototype masks for each image.The second subtask is to input the features of all scales in the prediction branch to predict the classification confidence,bounding box offset and mask coefficient of each target.The prediction results of all scales are spliced together.Then,the prediction result with the highest confidence is obtained through the fast non-maximum suppression method.The optimal segmentation map is generated by linearly combining prototype masks and corresponding mask coefficients.Finally,the final segmentation of each instance is determined by clipping and thresholding each instance.Based on the YOLACT model,this paper improves its structure to get better defect segmentation results.The specific improvements are as follows:(1)A weighted feature pyramid network is proposed to add weights without changing the multi-scale feature extraction process of the original YOLACT model,so that the model in this paper can learn the importance of features at different scales by itself.(2)Introduce a residual structure in the prediction branch to give the two branches different weights to better balance the feature information.And enhance the expressiveness of the network by stacking convolutional layers.(3)A hybrid weighted channel attention module is inserted into the prototype generation branch.Due to the loss of information due to the pooling of compressed feature maps,this paper adds a hybrid pooling on the basis of average pooling and maximum pooling,and the three different pooling results of parallel connections are added according to the weights,reducing the lost information.The results of experiments indicate that the Attention-Guided Weighted YOLACT method proposed in this paper achieves 44.09%and 54.09%of m AP50-95 for mask and box respectively on the magnetic tile surface defect dataset,and the segmentation speed reaches 29.68 FPS.As a result,the average accuracy of segmentation is further improved,and a good segmentation effect is achieved. |