| In recent years,the bamboo product industry in China has experienced increasingly prosperous development,with the mahjong-style bamboo mat being a typical representative of this industry.Due to inevitable damages and defects during the natural growth,cutting,transportation,and processing of bamboo,the quality of bamboo pieces used in producing mahjong-style bamboo mats varies.Without strict defect detection on the manufactured bamboo mats,their release into the market is bound to provoke consumer resistance and result in business losses.Manual selection of bamboo pieces suffers from low efficiency,vague standards,and high costs.Therefore,this paper is based on computer vision technology and utilizes defect detection techniques based on deep learning,which offer advantages such as high efficiency,high accuracy,and low cost.By introducing the attention mechanism and transfer learning method into the commonly used convolutional neural network(CNN),and optimizing models such as edge detection and defect segmentation,Use the ResNet50 network with the highest recognition accuracy to identify bamboo defects.The specific research content of this article is as follows:(1)Construction and preprocessing of bamboo chip defect datasets.The bamboo defect datasets used in this article was captured by the author using an industrial camera in a fixed scene at the same angle and distance.The defect types include half sheet material,flower sheet material,rotten head material,and waste sheet material.Firstly,5237 images were selected as the original dataset,and the GAN method was used to expand the datasets and unify the image size;Secondly,edge detection algorithms are used to detect edges and internal defects in the image;Finally,a classification network was used to classify and recognize the preprocessed datasets.The highest accuracy rates of the datasets before and after edge detection were77.36% and 82.46%,respectively.The experimental results showed that the bamboo chip defect recognition method based on convolutional neural networks was effective.(2)Bamboo defect recognition based on transfer learning and attention mechanism.In this paper,VGG16,GoogLeNet and ResNet50,three classification networks in the convolutional neural network,are used to classify and identify the preprocessed data sets and compare them.At the same time,in order to improve the accuracy of classification and recognition,transfer learning is embedded into the above three classification networks for training,and the classification results are presented through the confusion matrix.The highest classification accuracy is 91.75% of ResNet50.In addition,after embedding transfer learning,this paper adds an attention mechanism to the classification model.After demonstrating the channel attention,spatial attention and mixed attention mechanisms,the analysis finds that the mixed attention mechanism is more suitable for this experiment,and the classification accuracy of the experiment has improved by 4.65%,reaching 96.4%.The experimental results and the visual representation of the confusion matrix show that the recognition accuracy of the network with attention mechanism is significantly improved compared with the original classification network.Bamboo defect recognition based on U-Net and improved U-Net segmentation network.In order to improve the accuracy of defect recognition,this article uses the popular segmentation network U-Net model to segment bamboo defects.Annotation software is used to annotate the defective parts of the image on the training set,and the image after U-Net defect segmentation is overlaid on the original image for classification and recognition through a classification network.At the same time,this paper improves the backbone network architecture of U-Net,changes the convolution mode,adds a residual structure on the coding layer and decoding layer of each layer,and improves the regularization method.The improved segmentation network can more accurately identify bamboo chip defects.The highest accuracy of defect classification and identification before and after the improvement is 99.18% and99.78% of ResNet50 network respectively.The experimental results demonstrate that the use of U-Net segmentation network and improved network model has certain advantages in defect segmentation,improving the accuracy of bamboo defect classification and recognition. |