With the promotion and application of a new generation of information technology,a large number of knitting machinery companies in China have started to carry out intelligent transformation and apply artificial intelligence technology in quantitative production.As an important equipment in the knitting machinery industry,computerized flat knitting machines are still assembled manually due to the special nature of the assembly process standard of its core components and the inability of automated production to control the fit and linkage of the assembled devices.This method is prone to misoperation problems,causing confusion in the assembly process and leading to abnormalities in the flat knitting machine components,which affects production efficiency and cost.To solve this problem,this paper designs an assembly process inspection system for flat knitting machine parts based on the target detection algorithm,and the details of the research are as follows:(1)Design the assembly process inspection scheme and build the overall system architecture for performing inspection according to the actual assembly standards of flat knitting machine parts.The image acquisition module and image processing module of the system are analyzed and selected in conjunction with the production site,and the software algorithm research plan and the function of the alarm system module are designed.(2)Study Faster RCNN,Cascade RCNN and YOLOX mainstream target detection algorithms built by convolutional neural networks,trained and tested on a homemade assembly process dataset.The results show that the mainstream algorithms have detection accuracy and speed imbalance problems.To address this problem,the G-Swin algorithm is designed to integrate Swin-Transformer and FPN structures in the Retina Net framework to enhance the global and detail attention capability of feature extraction,and the regression effect of the prediction frame is optimized using GIoU Loss.The experimental results show that the detection accuracy and speed of G-Swin algorithm are more balanced,but the detection accuracy cannot reach the actual production line application level.(3)To further improve the detection accuracy of the algorithm model,the G-Swin algorithm is used as a benchmark to improve the GIoU Loss and anchor frame aspect ratio strategy,and the My-Swin algorithm is proposed.The GIoU Loss function introduces the non-intersection region of extra attention,designs the restriction factor of the ratio of the distance between the center point of the prediction frame and the real frame boundary,and matches the aspect ratio loss term to guide the regression direction of the prediction frame and improve the detection accuracy of the model;the fixed anchor frame aspect ratio is improved to reduce the regression difficulty of the prediction frame.The experimental results show that the detection accuracy of My-Swin algorithm reaches the highest experimental 90.4%,and the FPS is stable at 20.3,which meets the detection accuracy and speed required by practical applications.(4)Deploy the algorithm model on the server side,and design the determination logic and process by traversing the prediction tuple information output from the ONNX model to complete the step determination module of the assembly process.Develop human-computer interaction interface based on Pycharm and Py Qt5 to realize real-time monitoring of production dynamics and viewing statistics through GUI interface. |