Deep learning-based methods, especially convolutional neural networks (CNNs), have shown their effectiveness for image classification. In this paper, vision transformer technology is used to classify the surface defects of processed bamboo, which can be more quick and accurate compared with the low efficiency of manual identification. In the first step, we replace the activation function from Gelu to Mish in the encoder part, but the classification performance is not satisfied. Then, to get a better classification results, we keep the original activation function and introduce the DropBlock. Compared with dropout, DropBlock can obtain better classification accuracy. Finally, compared with the results after transfer learning, it is proved that replacing dropout with DropBlock can improve the classification accuracy. The results on the bamboo chip datasets show that the accuracy of this method is 2% higher than the original transformer network whether using transfer learning.
In this paper, computer vision technology is used to quickly and accurately identify and classify the surface defects of processed bamboo, which overcomes the low efficiency of manual identification. The datasets consist of 6360 defective bamboo mat images of four categories taken by the author at the same position, which are split at a ratio of 8:2 for training and testing. In this experiment, we improved the U-net to segment the datasets and use VGG16, GoogLeNet and ResNet50 with attention mechanism for classification and comparison. The experimental results show that the accuracy of this method is 5.65% higher than the commonly used neural network method. The highest accuracy rate is 99.2%.