Objective A large number of precision parts used in knitting machinery, such as main needles and auxiliaries, have irregular shapes and fine structures, but the consistency requirements are extremely high. In order to tackle the inefficiency of manual detection of the consistency of precision parts in the past, as well as the shortcomings of machine vision in the detection of the consistency of precision parts, such as excessive program calculation, sensitivity to image stains, and incomplete overview of effective features of images, a consistency detection method for fine, thin and long parts based on machine learning was proposed.
Method Based on the principle of machine learning, on the existing glass disc detection device, taking model 104 knitting needle as an example, and two computer languages of LabVIEW and Python were used to design the detection algorithm, and three machine learning algorithms, which are the support vector machine model, the decision tree model, and the K-nearest neighbor model, were used to improve the detecting consistency of the overhead direction of the knitting needle. The aforementioned glass disc detection system consists of the following functional modules: automatic positioning unit, position sensing unit, image acquisition and processing unit, sorting unit.
Results For the training results of the above three machine learning models, the accuracy of the support vector machine model is 93%, the accuracy of the support vector machine model is 97%, and the accuracy of the KNN model is 88%. The number of sample images required to train the above three models is 600, including 300 qualified sample images and 300 unqualified sample images, and the ratio of the training set to the test set is 7∶3. For validation of the machine learning algorithm's performance in top-view orientation consistency detection of knitting needles, implementation and operation of the ML-based detection program on the target inspection system is mandatory. First, 700 knitting needles were tested once by manual detection, and the qualified needles and unqualified knitting needles were distinguished by a qualified template, and then the machine learning method was used to detect and compare the effects of manual detection and machine learning algorithm. Of the 700 needles manually tested, 272 were qualified and 428 were unqualified, with a detection speed of 10 needles per minute. The 700 needles were inspected in a single pass using machine learning. 271 qualified knitting needles were detected, of which there was no unqualified knitting needle mixing, and the false detection rate was 429 unqualified knitting needles were detected, of which 1 qualified knitting needle was mixed, the missed detection rate was 0.37%, the missed detection rate was low, and the detection speed was 60 needles per minute. According to previous research, the accuracy rate of using machine vision to detect knitting needles is 99%, and the average detection rate of qualified products is 84% in one progressive inspection, that is, the missed detection rate is 16%, and the detection speed is 70 pieces per minute. Compared with manual detection, machine vision detection, and machine learning detection, the missed detection rate of machine learning is greatly improved compared with machine vision, and the detection speed is greatly improved compared with manual inspection, but the detection speed of machine learning is not as good as that of machine vision.
Conclusion Using the machine learning based fine thin and long parts sorting method, the knitting needle detection consistency is carried out, the false detection rate of unqualified knitting needle is 0, and the missed detection rate of qualified knitting needle is 0.37%, which can better meet the requirements of industrial production detection, and has a great improvement in the detection speed compared with manual detection, and has a great improvement compared with machine vision in terms of missing detection rate, wherein the better model obtained during training is the decision tree, and the model accuracy is 97%. In conclusion, in order to further improve the detection efficiency of fine and long parts, a sorting method of fine and long parts based on machine learning was studied, and the machine learning model was used to reduce the missed detection rate of consistency detection and improve the accuracy of detection, which provided an effective method for the consistent sorting of fine thin and long parts.