Workpiece surface roughness measurement based on traditional machine vision technology faces numerous problems such as complex index design, poor robustness of the lighting environment, and slow detection speed, which make it unsuitable for industrial production. To address these problems, this paper proposes an improved YOLOv5 method for milling surface roughness detection. This method can automatically extract image features and possesses higher robustness in lighting environments and faster detection speed. We have effectively improved the detection accuracy of the model for workpieces located at different positions by introducing Coordinate Attention (CA). The experimental results demonstrate that this study’s improved model achieves accurate surface roughness detection for moving workpieces in an environment with light intensity ranging from 592 to 1060 lux. The average precision of the model on the test set reaches 97.3%, and the detection speed reaches 36 frames per second.
To address the problem that a deep neural network needs a sufficient number of training samples to have a good prediction performance, this paper firstly used the Z-Map algorithm to generate a simulated profile of the milling surface and construct an optical simulation model of surface imaging to supplement the training sample size of the neural network. Then the Deep CORAL model was used to match the textures of the simulated samples and the actual samples across domains to solve the problem that the simulated samples were not in the same domain as the actual milling samples. Experimental results have shown that high texture matching could be achieved between optical simulation images and actual images, laying the foundation for expanding the actual milled workpiece images with the simulation images. The deep convolutional neural model Xception was used to predict the classification of six classes of data sets with the inclusion of simulation images, and the accuracy was improved from 86.48% to 92.79% compared with the model without the inclusion of simulation images. The proposed method solves the problem of the need for a large number of samples for deep neural networks and lays the foundation for similar methods to predict surface roughness for different machining processes.
JavaScript jest wyłączony w Twojej przeglądarce internetowej. Włącz go, a następnie odśwież stronę, aby móc w pełni z niej korzystać.