Weft yarn detection method, device and equipment and storage medium
Through the visual component obtaining and image processor analysis of the weft gauze image, the problem of poor adaptability and signal interference of the existing weaving weft control technology was solved, and higher weft yarn detection accuracy and weaving efficiency were achieved.
Patent Information
- Application Number
- CN202411865943.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-01-21
AI Technical Summary
The existing weft detection control technology of the existing loom is poorly adaptable and it is difficult to cope with the requirements of different wefts. The signal interference problem causes the loom to stop or break the weft.
The visual component is used to obtain the weft gauze image, and the visual analysis processing is performed through the image processor, and the output of the weft gauze is output to determine the results of the weft gauze detection. This method uses real -time detection of the mechanical angle of the main axis of the weaving machine, controls the visual component to shoot the weir gauze image, improves the accuracy and adaptability of the detection, and avoid signal interference.
Improve the accuracy and adaptability of weft yarn detection, reduce signal interference, and improve the production efficiency and product quality of the weaving machine.
Smart Images

Figure CN119332396A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of weaving control, and in particular to a weft yarn detection method, device, equipment and storage medium. Background Art
[0002] In the loom system, weft feeler, as one of the control links, has a direct impact on the quality of the cloth and production efficiency. The existing weft feeler is generally composed of two parts: a photoelectric probe and a weft feeler processor. Among them, the photoelectric probe is mainly composed of an optical fiber and an infrared transmitting and receiving tube. When the loom is working normally, the weft yarn is introduced into the slit of the photoelectric tube of the weft feeler through the reed. The optical fiber receives the weft yarn signal and converts it into an electrical signal, which is transmitted to the weft feeler processor. The weft feeler processor amplifies and processes the electrical signal, and then compares it with the weft feeler synchronization angle signal of the loom to determine the accuracy of the weft yarn signal and feeds the result back to the loom main control system for control operations.
[0003] The weft feeler control currently used in the market can be roughly divided into two categories: analog weft feeler and digital weft feeler. However, these technologies still have some shortcomings and challenges, which are mainly reflected in the following aspects: (1) Poor adaptability, limiting production capacity: The analog weft feelers currently available on the market cannot adjust parameters in real time according to factors such as the thickness, color and material of the weft yarn, making it difficult to meet the adaptability requirements of different weft yarns. This problem limits the flexibility and production capacity of the same loom in the production of multiple varieties of fabrics; (2) Signal interference problem: Under environmental protection requirements, looms usually use circulating water sources. Since water will carry some impurities during long-term circulation, these impurities will interfere with the signal during the weft feeler head's recognition of the weft yarn, resulting in the loom stopping or weft breaking.
[0004] Therefore, how to solve the above problems and improve the accuracy and adaptability of weft yarn detection is an important technical challenge facing the current textile industry. Summary of the Invention
[0005] The present application provides a weft yarn detection method, device, equipment and storage medium to improve the accuracy and adaptability of weft yarn detection.
[0006] In a first aspect, the present application provides a weft yarn detection method, comprising: acquiring a weft yarn image, wherein the weft yarn image is obtained by real-time detection of the mechanical angle of the loom main shaft, and when the mechanical angle meets a preset first target angle, controlling the visual component to photograph the target area; inputting the weft yarn image into an image processor so that the image processor performs visual analysis processing on the weft yarn image and outputs a weft yarn result; and determining a weft yarn detection result based on the weft yarn result.
[0007] In one possible implementation, the visual component is installed on a loom, and the visual component also includes a shooting device; wherein, a first angle of the shooting device relative to the loom is obtained, and when the first angle does not meet a preset target angle, the shooting device is adjusted based on the target angle until the first angle meets the preset target angle; wherein, the shooting range of the shooting device includes the target area.
[0008] In one possible implementation, inputting the weft yarn image into an image processor so that the image processor performs visual analysis processing on the weft yarn image and outputs a weft yarn result specifically includes: inputting the weft yarn image into the image processor so that the image processor divides the weft yarn image into a first weft yarn image and a second weft yarn image, performing visual analysis processing on the first weft yarn image and the second weft yarn image, respectively, outputting a first weft yarn result corresponding to the first weft yarn image, and outputting a second weft yarn result corresponding to the second weft yarn image.
[0009] In one possible implementation, based on the weft yarn result, a weft yarn detection result is determined, specifically including: the weft yarn result includes a first weft yarn result and a second weft yarn result; when it is detected that the first weft yarn result is that the weft yarn exists in the first weft yarn image, and the second weft yarn result is that the weft yarn exists in the second weft yarn image, the weft yarn detection result is confirmed to be a long weft; when it is detected that the first weft yarn result is that the weft yarn does not exist in the first weft yarn image, and the current detection is the last detection, the weft yarn detection result is confirmed to be a short weft; when it is detected that the first weft yarn result is that the weft yarn exists in the first weft yarn image, the second weft yarn result is that the weft yarn does not exist in the second weft yarn image, and the current detection is the last detection, the weft yarn detection result is determined to be normal.
[0010] In a possible implementation, visual analysis processing is performed on the first weft yarn image and the second weft yarn image respectively, and a first weft yarn result corresponding to the first weft yarn image is output, and a second weft yarn result corresponding to the second weft yarn image is output, specifically including: performing weft yarn recognition processing on the first weft yarn image based on a pre-trained weft yarn recognition model, and when a weft yarn is recognized to exist in the first weft yarn image, outputting the first weft yarn result corresponding to the first weft yarn image as the weft yarn exists in the first weft yarn image; otherwise, outputting the first weft yarn result corresponding to the first weft yarn image as the weft yarn does not exist in the first weft yarn image; performing weft yarn recognition processing on the second weft yarn image based on the pre-trained weft yarn recognition model, and when a weft yarn is recognized to exist in the second weft yarn image, outputting the second weft yarn result corresponding to the second weft yarn image as the weft yarn exists in the second weft yarn image; otherwise, outputting the second weft yarn result corresponding to the second weft yarn image as the weft yarn does not exist in the second weft yarn image.
[0011] In a possible implementation, after determining the weft yarn detection result, the method further includes: generating a stop instruction when detecting that the weft yarn detection result is a short weft or a long weft, and performing a stop process on the loom based on the stop instruction.
[0012] In one possible implementation, after the weft yarn image is input into the image processor, the process further includes: cropping the weft yarn image based on a preset calibration object to obtain a first cropped image; correcting the first cropped image based on a standard weft yarn image to obtain a first corrected image, and updating the first corrected image to the weft yarn image.
[0013] In one possible implementation, correcting the first cropped image based on the standard weft yarn image to obtain the first corrected image specifically includes: determining matching feature point pairs between the standard weft yarn image and the first cropped image based on a feature matching algorithm; calculating a transformation matrix based on the matching feature point pairs; and performing image transformation processing on the first cropped image based on the transformation matrix to obtain the first corrected image.
[0014] In a second aspect, the present application provides a weft yarn detection device, comprising: an image acquisition module, a visual analysis module and a weft yarn detection result determination module; wherein the image acquisition module is used to acquire a weft yarn image, wherein the weft yarn image is obtained by real-time detection of the mechanical angle of the loom main shaft, and when the mechanical angle meets a preset first target angle, controlling the visual component to photograph the target area; the visual analysis module is used to input the weft yarn image into an image processor, so that the image processor performs visual analysis processing on the weft yarn image and outputs a weft yarn result; the weft yarn detection result determination module is used to determine the weft yarn detection result based on the weft yarn result.
[0015] In a third aspect, an embodiment of the present application further provides a computer device, which includes a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the above method when executing the computer program.
[0016] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program can implement the above method when executed by a processor.
[0017] The embodiments of the present application provide a weft yarn detection method, device, equipment, and storage medium, which have the following advantages over the prior art: By acquiring the weft yarn image through the visual component, the actual state of the weft yarn can be captured more intuitively and accurately. Compared with traditional photoelectric probes, the visual component can provide richer information, including the thickness, color and material properties of the weft yarn, thereby improving the adaptability and accuracy of detection; the weft yarn image is input into the image processor, so that the image processor performs visual analysis and processing on the weft yarn image and outputs the weft yarn result; finally, based on the weft yarn result, the weft yarn detection result is determined; in this process, the visual component identifies the state of the weft yarn through image processing and does not rely on the transmission of photoelectric signals. Therefore, it can effectively avoid interference problems caused by environmental factors and improve the stability and reliability of detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0019] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0020] One or more embodiments are exemplarily illustrated by pictures in the corresponding drawings. These exemplifications do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements. Unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0021] Figure 1 This is a flow chart of an embodiment of a weft yarn detection method provided by the present application; Figure 2 This is a structural schematic diagram of an embodiment of a weft yarn detection device provided by the present application; Figure 3 This is a schematic structural diagram of a visual component and a loom according to an embodiment of the present application; Figure 4 This is a schematic diagram of judging different weft yarn detection results according to an embodiment of the present application; Figure 5 This is a structural diagram of an electronic device provided by this application. DETAILED DESCRIPTION
[0022] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0023] The disclosure below provides many different embodiments or examples for implementing different structures of the present application. In order to simplify the disclosure of the present application, the components and settings of specific examples are described below. Of course, these are merely examples and are not intended to limit the present application. In addition, the present application may repeat reference numbers and / or letters in different examples. Such repetition is for the purpose of simplicity and clarity and does not in itself indicate the relationship between the various embodiments and / or settings discussed.
[0024] It will be understood that when used in this specification and the appended claims, the terms “comprises” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0025] It should also be understood that the terms used in this specification are for the purpose of describing specific embodiments only and are not intended to limit the present application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.
[0026] It should be further understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0027] As used in this specification and the appended claims, the term “if” can be interpreted as “when” or “upon” or “in response to determining” or “in response to detecting,” depending on the context. Similarly, the phrase “if it is determined” or “if [described condition or event] is detected” can be interpreted as meaning “upon determination” or “in response to determining” or “upon detection of [described condition or event]” or “in response to detecting [described condition or event],” depending on the context. Example 1, see Figure 1 , Figure 1 FIG. 1 is a flow chart of an embodiment of a weft yarn detection method provided by the present application. Figure 1As shown, the method includes steps 101 to 103, which are specifically as follows: Step 101: Acquire a weft yarn image, wherein the weft yarn image is obtained by detecting the mechanical angle of the loom main shaft in real time, and when the mechanical angle meets a preset first target angle, controlling the visual component to shoot a target area.
[0028] Compared with the weft yarn detection in the prior art, in this embodiment, the existing analog weft detection or digital weft detection sensor is replaced with a visual component, and the visual component is connected to the loom electronic control main control board MCU in the loom electronic control box, such as Figure 3 As shown, Figure 3 This is a structural diagram of a visual component and a loom according to an embodiment of the present application.
[0029] Specifically, a loom electronic control main board MCU is installed in the loom electronic control box, and the visual component is communicatively connected to the loom electronic control main board MCU; specifically, the connection is made through a network, such as USB or Gigabit Ethernet; preferably, the connection can also be made directly based on IO level signals.
[0030] In one embodiment, the visual component is installed on the loom; preferably, the visual component is installed at a stable position on the rear beam of the loom, and is aligned with the weft yarn from the back to the front for shooting.
[0031] In one embodiment, the visual component further includes a photographing device, wherein a photographing range of the photographing device includes the target area.
[0032] Preferably, the shooting device includes but is not limited to a monocular camera device, a binocular camera device, etc.
[0033] Specifically, when capturing a weft image based on the capturing device in the visual component, the captured weft image may not include or not completely include the required target area due to different placement positions of the capturing device. Therefore, in this embodiment, before performing weft detection, a first angle of the capturing device relative to the loom is obtained. When the first angle does not meet the preset target angle, the capturing device is adjusted based on the target angle until the first angle meets the preset target angle.
[0034] Preferably, the target angle may be one angle or multiple angles, wherein the desired target area is captured based on the one angle or the multiple angles.
[0035] In one embodiment, when capturing a weft yarn image based on a visual component, the mechanical angle of the loom main shaft is detected in real time; when the mechanical angle meets a preset first target angle, the capturing device is controlled to capture and process the target area to obtain the weft yarn image corresponding to the current mechanical angle, until it is detected that the mechanical angle meets a preset second target angle, at which point the capturing device is controlled to stop capturing.
[0036] Specifically, due to the connection relationship between the vision component and the loom electronic control main board MCU, the vision component can directly obtain the mechanical angle of the loom main shaft from the loom electronic control main board MCU.
[0037] Preferably, when the weft yarn image is captured based on the visual component, in addition to directly obtaining the mechanical angle of the loom main shaft from the loom electronic control main board MCU, the visual component can also control the shooting device to capture the image of the target area by receiving the shooting device trigger signal sent by the loom electronic control main board; specifically, when the loom electronic control main board detects that the mechanical angle meets the preset first target angle, the shooting device trigger signal is sent to the visual component, and when the mechanical angle is detected to meet the preset second target angle, the shooting device stop shooting signal is sent to the visual component.
[0038] In one embodiment, the visual component further includes a fill light.
[0039] In one embodiment, when capturing a weft yarn image based on a visual component, the mechanical angle of the loom main shaft is detected in real time; when the mechanical angle meets a preset third target angle, the fill light is controlled to turn on; when the mechanical angle meets a preset first target angle, the shooting device is controlled to perform image capture processing on the target area to obtain the weft yarn image corresponding to the current mechanical angle; until it is detected that the mechanical angle meets a preset second target angle, the fill light is controlled to turn off, and the shooting device is controlled to stop shooting.
[0040] Specifically, the third target angle is not greater than the first target angle. When the mechanical angle of the loom main shaft is in the range of the third target angle and the first target angle, based on the preset target angle interval, the shooting device is controlled to perform multiple image shooting processes on the target area.
[0041] Specifically, the third target angle is 200 degrees, the first target angle is 240 degrees, and the second target angle is 340 degrees; preferably, the first target angle, the second target angle and the third target angle can also be any angle preset by the user, such as the first target angle and the second target angle that trigger the shooting device to capture the image can also be at the same overlapping moment.
[0042] Specifically, the target angle interval is 20 degrees; preferably, the target angle interval can also be any angle interval preset by the user, which is not specifically limited here.
[0043] The following example illustrates the process of capturing weft yarn images based on the vision component: Due to the connection between the vision component and the loom electronic control main board MCU, when the mechanical angle of the loom main shaft is detected to be 200 degrees, the fill light is triggered to turn on, and image acquisition is triggered every 20 degrees starting from 240 degrees. After the last acquisition at 340 degrees, the fill light trigger is turned off and the image acquisition trigger is turned off.
[0044] In one embodiment, since the shooting device in the visual component may be interfered by sewage and dust, in this embodiment, a cleaning device is also provided to the loom. When the shooting device in the visual component is in a non-working interval, the shooting device is cleaned by spraying, thereby improving the clarity of the image captured by the shooting device and avoiding interference of the external environment on the image.
[0045] Step 102: inputting the weft yarn image into an image processor, so that the image processor performs visual analysis processing on the weft yarn image and outputs a weft yarn result.
[0046] In one embodiment, the weft yarn image is input into an image processor, so that the image processor divides the weft yarn image into a first weft yarn image and a second weft yarn image, performs visual analysis processing on the first weft yarn image and the second weft yarn image, respectively, and outputs a first weft yarn result corresponding to the first weft yarn image and a second weft yarn result corresponding to the second weft yarn image.
[0047] Preferably, in addition to dividing the weft yarn image into two images, a first weft yarn image and a second weft yarn image, the weft yarn image can also be divided into multiple weft yarn sub-images based on user needs. The subsequent image processor performs visual analysis processing on each weft yarn sub-image to obtain the weft yarn results corresponding to each weft yarn sub-image.
[0048] In one embodiment, the image processor can be integrated into the visual component or into the loom electronic control main board; preferably, the image processor can also be used as an independent module, independent of the visual component and the loom electronic control main board.
[0049] In one embodiment, when the image processor is integrated into a visual component, after the weft yarn image is captured by a shooting device, the weft yarn image is also transmitted to the image processor of the visual component so that the image processor performs image processing on the weft yarn image.
[0050] In one embodiment, when the image processor is integrated into the loom electronic control main board, after the weft yarn image is captured by the shooting device, the weft yarn image is sent to the loom electronic control main board, so that the loom electronic control main board inputs the weft yarn image into the image processor and performs image processing on the weft yarn image based on the image processor.
[0051] In one embodiment, when the image processor serves as an independent module, after the weft yarn image is captured by the shooting device, the weft yarn image is sent to the image processor, and the image processor performs image processing on the weft yarn image.
[0052] In one embodiment, since the images captured by the camera may contain a large number of invalid background areas, in order to improve the efficiency of subsequent image visual analysis, after acquiring the weft yarn image, the image processor further includes: cropping the weft yarn image based on a preset calibration object to obtain a first cropped image; correcting the first cropped image based on a standard weft yarn image to obtain a first corrected image, and updating the first corrected image to the weft yarn image.
[0053] Specifically, based on a preset calibration object, the weft yarn image is cropped to obtain a first cropped image. A calibration object is placed or selected in a target area, wherein the calibration object can be an object with known size and features, such as a specific pattern or shape, so that in step 101, the weft yarn image captured by using a shooting device is a weft yarn image containing the calibration object; the captured weft yarn image is preprocessed to obtain a preprocessed image, wherein the preprocessing includes but is not limited to grayscale, filtering, etc., to improve the accuracy of subsequent processing; the preprocessed image is subjected to calibration object detection processing based on image processing technology to determine the position and size of the calibration object in the preprocessed image; and the scaling ratio of the preprocessed image is calculated according to the size of the calibration object and the actual size of the calibration object, the preprocessed image is scaled based on the scaling ratio to obtain a scaled image, and the scaled image is cropped based on the position of the calibration object to obtain a first cropped image.
[0054] Specifically, based on the position of the calibration object, the pixel point area within the target range corresponding to the position is selected, and the remaining pixel point areas outside the pixel point area in the zoomed image are cropped. This can effectively crop out useful target areas from the original image and remove invalid background areas, thereby improving the efficiency of subsequent image visual analysis.
[0055] In one embodiment, the first cropped image is corrected based on the standard weft yarn image to obtain the first corrected image. Matching feature point pairs between the standard weft yarn image and the first cropped image are determined based on a feature matching algorithm. A transformation matrix is calculated based on the matching feature point pairs. The first cropped image is then transformed based on the transformation matrix to obtain the first corrected image. In this process, the transformation matrix is applied to make the first cropped image closer to the standard weft yarn image, which helps eliminate image distortion caused by factors such as the shooting device angle and lens distortion, thereby improving the accuracy and reliability of subsequent weft yarn analysis.
[0056] In one embodiment, after the first corrected image is updated to the weft yarn image, when the weft yarn image is divided into the first weft yarn image and the second weft yarn image, an image centerline of the weft yarn image is obtained and, based on a preset distance threshold, the image centerline is translated in a preset direction to obtain an image segmentation line; and based on the image segmentation line, the weft yarn image is divided into the first weft yarn image and the second weft yarn image, i.e., recognition area 1 and recognition area 2.
[0057] Specifically, when the image center line is translated in a preset direction based on a preset distance threshold, the image center line is translated 2 cm to the right to obtain an image segmentation line.
[0058] Specifically, the image area on the right side of the image dividing line is used as the first weft yarn image, and the image area on the left side of the image dividing line is used as the second weft yarn image.
[0059] In one embodiment, weft yarn recognition processing is performed on the first weft yarn image based on a pre-trained weft yarn recognition model. When a weft yarn is recognized to exist in the first weft yarn image, a first weft yarn result corresponding to the first weft yarn image is outputted as indicating that the weft yarn exists in the first weft yarn image; otherwise, a first weft yarn result corresponding to the first weft yarn image is outputted as indicating that the weft yarn does not exist in the first weft yarn image.
[0060] In one embodiment, weft yarn recognition processing is performed on the second weft yarn image based on a pre-trained weft yarn recognition model. When a weft yarn is recognized to exist in the second weft yarn image, a second weft yarn result corresponding to the second weft yarn image is outputted as indicating that the weft yarn exists in the second weft yarn image. Otherwise, a second weft yarn result corresponding to the second weft yarn image is outputted as indicating that the weft yarn does not exist in the second weft yarn image.
[0061] Specifically, when weft yarn recognition processing is performed on the weft yarn image based on the weft yarn recognition model, the weft yarn recognition method includes but is not limited to: a traditional image processing method, a machine learning-based method, an image classification method based on deep learning, and a target recognition method based on deep learning.
[0062] Specifically, when using the traditional image processing method, an image dataset containing weft yarns and excluding weft yarns is collected, wherein the images in the image dataset are images taken under different lighting conditions, backgrounds and weft yarn states, and the image dataset contains various types of weft yarns, such as weft yarns of different thicknesses, colors and materials, as well as images under different backgrounds; each image in the image dataset is preprocessed, including grayscale conversion, noise reduction and contrast enhancement, to improve the accuracy of subsequent processing, an edge detection algorithm (such as Canny, Sobel or Laplacian) is used to identify the edges in the image, and a threshold segmentation technique is applied to segment the image into different regions based on the edges in the identified image. A domain is obtained, and multiple segmented images are obtained. Feature recognition is performed on the multiple segmented images, such as edge, shape, texture and grayscale value distribution, to determine the outline or area of the weft yarn, and the features are quantified, such as calculating the area, perimeter, and shape descriptors (such as aspect ratio and roundness) of the weft yarn area to obtain feature analysis results. Based on the feature analysis results, a series of rules are defined to determine whether there is weft yarn in the image; for example, if the area and shape of a segmented image in the weft yarn image meet the characteristics of the weft yarn, the area is considered to be the weft yarn; and custom rules are applied based on the test image to check the validity and accuracy of the custom rules. According to the test results, the rules are adjusted and optimized to improve the accuracy and robustness of model recognition.
[0063] Specifically, when adopting the method based on machine learning, a data set of images containing weft yarns and excluding weft yarns is collected, wherein the images in the image data set are images taken under different lighting conditions, backgrounds and weft yarn states, and the image data set contains various types of weft yarns, such as weft yarns of different thicknesses, colors and materials, as well as images under different backgrounds; image annotation is performed on each image in the image data set, and a weft yarn label is set for images containing weft yarns, and a weft yarn label is set for images not containing weft yarns; feature extraction is performed on the images in the image data set, wherein the features include but are not limited to grayscale mean, variance, texture features, edge features, etc.; in the model training stage of the weft yarn recognition model, the image is selected Select a suitable machine learning algorithm, such as support vector machine (SVM), decision tree, random forest or least squares method, and divide the labeled data set into training set and test set; use the training set data to train the selected machine learning algorithm. This step involves adjusting the model parameters to best fit the training data, using cross-validation methods (such as k-fold cross-validation) to evaluate the performance of the model to ensure that the model performs well on unseen data, and using performance indicators such as accuracy, precision, recall rate and F1 score to evaluate the effect of the model; finally, based on the results of cross-validation, adjust the model parameters, such as regularization strength, kernel function type, etc., to optimize the model performance and determine the optimized weft yarn recognition model.
[0064] Specifically, when using a deep learning-based image classification method, a dataset of images containing and excluding weft yarns is collected. The images in the dataset are captured under different lighting conditions, backgrounds, and weft yarn states, and the dataset contains various types of weft yarns, such as weft yarns of different thicknesses, colors, and materials, as well as images against different backgrounds. Each image in the dataset is annotated, with images containing weft yarns assigned a label indicating "containing weft yarns" and images excluding weft yarns assigned a label indicating "excluding weft yarns." Data augmentation processing, such as rotation, scaling, cropping, and color conversion, is then performed on the image data in the dataset to increase the diversity of the dataset and improve the robustness of the model. During the training phase of the weft yarn recognition model, a deep learning framework, such as Keras, TensorFlow, or PyTorch, is selected to design a convolutional neural network (CNN) model. This typically includes multiple convolutional layers, pooling layers, activation functions (such as ReLU), and fully connected layers. You can use a pre-trained model (such as VGG, ResNet) as a starting point, or build a model from scratch; divide the labeled image dataset into a training set and a validation set, where the training set is used for model training and the validation set is used to evaluate model performance; use the training set to train the CNN model. This step involves adjusting the model parameters to best fit the training data and selecting an appropriate loss function (such as cross-entropy loss) and optimizer (such as Adam or SGD) to guide the model's learning process; and during the model optimization phase of the weft yarn recognition model, adjust the model's hyperparameters, such as the learning rate, batch size, and number of training rounds, to optimize model performance; use the validation set to evaluate the model's performance, monitor overfitting or underfitting, and apply regularization techniques (such as Dropout and L2 regularization) to reduce overfitting to obtain the optimized weft yarn recognition model.
[0065] Specifically, when using a deep learning-based object recognition method, a dataset of images containing and excluding weft yarns is collected. The images in the dataset are captured under different lighting conditions, backgrounds, and weft states, and include various types of weft yarns, such as weft yarns of varying thickness, color, and material, as well as images against different backgrounds. The weft yarns in the images in the dataset are annotated using annotation tools (such as LabelImg and VGG Image Annotator), including bounding boxes to mark their locations. During the training phase of the weft yarn recognition model, a deep learning model suitable for object detection is selected. Common models include YOLO (You Only Look Once), SSD (Single Shot MultiBox Detector), and Faster R-CNN. A deep learning framework (such as TensorFlow or PyTorch) and related libraries are set up, a training environment is prepared, the annotated image dataset is divided into a training set and a validation set, and the selected model is trained using the training set data. This step involves adjusting model parameters to best fit the training data, selecting appropriate loss functions (such as cross-entropy loss combined with bounding box regression loss) and optimizers (such as Adam or SGD) to guide the model's learning process; in the model evaluation stage of the weft yarn recognition model, the detection performance of the model is evaluated based on the validation set, using indicators such as precision, recall, and mean average precision (mAP), and adjusting the model's hyperparameters, such as learning rate, batch size, and number of training rounds, based on the evaluation results of the validation set to optimize model performance.
[0066] Step 103: Determine a weft yarn detection result based on the weft yarn result.
[0067] In one embodiment, since the weft yarn result includes a first weft yarn result and a second weft yarn result; the first weft yarn result and the second weft yarn result include long weft, short weft and detection normal, such as Figure 4 As shown, Figure 4 This is a schematic diagram of judging different weft yarn detection results in an embodiment provided by the present application; it avoids the problem in the prior art that only short weft yarns can be detected, thereby improving the accuracy of weft yarn detection.
[0068] Specifically, the long weft refers to the weft yarn exceeding the length range due to the mistaken disconnection of the upper weft yarn; the short weft refers to the weft yarn failing to reach the designated area due to poor weft insertion.
[0069] Preferably, when the weft yarn image is divided into a plurality of weft yarn sub-images in step 102, a weft yarn detection result is further determined for the weft yarn result corresponding to each weft yarn sub-image.
[0070] In one embodiment, when the first weft yarn result is detected as a weft yarn existing in the first weft yarn image, and the second weft yarn result is detected as a weft yarn existing in the second weft yarn image, the weft yarn detection result is confirmed to be a long weft.
[0071] In one embodiment, when the first weft yarn detection result is that the weft yarn does not exist in the first weft yarn image and the current detection is the last detection, the weft yarn detection result is determined to be a short weft.
[0072] Specifically, when determining whether the current detection is the last detection, the current mechanical angle of the loom main shaft is obtained, and when the current mechanical angle meets the third target angle, the current detection is determined to be the last detection.
[0073] Specifically, when it is detected that the first weft yarn result is that there is no weft yarn in the first weft yarn image, and the current detection is not the last detection, the first weft yarn result corresponding to the weft yarn image corresponding to the next mechanical angle is re-acquired, and it is re-judged whether the first weft yarn result is that there is a weft yarn in the first weft yarn image, until it is detected that the first weft yarn result is that there is a weft yarn in the first weft yarn image, or the current detection is the last detection.
[0074] In one embodiment, when it is detected that the first weft yarn result is that the weft yarn exists in the first weft yarn image, the second weft yarn result is that the weft yarn does not exist in the second weft yarn image, and the current detection is the last detection, it is determined that the weft yarn detection result is normal.
[0075] Specifically, when it is detected that the first weft yarn result is that the weft yarn exists in the first weft yarn image, the second weft yarn result is that the weft yarn does not exist in the second weft yarn image, and the current detection is not the last detection, the second weft yarn result corresponding to the weft yarn image of the next mechanical angle is re-acquired, and it is re-determined whether the second weft yarn result is that the weft yarn exists in the second weft yarn image, until it is detected that the second weft yarn result is that the weft yarn exists in the second weft yarn image, or the current detection is the last detection.
[0076] In one embodiment, after determining the weft yarn detection result, the method further includes: generating a stop instruction when detecting that the weft yarn detection result is a short weft or a long weft, and performing a stop process on the loom based on the stop instruction.
[0077] In one embodiment, when it is detected that the weft yarn detection result is a short weft or a long weft, the image processor can be controlled to generate a stop instruction, and the loom electronic control main control board can also be controlled to generate a stop instruction.
[0078] In one embodiment, when the control image processor generates a stop instruction and the image processor is integrated in the visual component, the stop instruction is sent from the visual component to the loom electronic control main board by setting the output port of the image processor in the visual component to be connected to the input port of the loom electronic control main board, so that the loom electronic control main board will shut down the loom after receiving the stop instruction.
[0079] Specifically, when the image processor in the vision component detects that the weft detection result is short weft or long weft, it sends a stop command to the loom electronic control main control board of the loom through the IO interface, so that the loom electronic control main control board stops the loom after receiving the stop command; in this way, the vision component not only improves the accuracy of weft yarn detection, but also realizes an automated control process through the close integration of the IO interface and the loom main control system, thereby improving production efficiency and product quality, and reducing production losses caused by weft yarn problems.
[0080] In one embodiment, when the control image processor generates a shutdown instruction and the image processor is integrated in the loom electronic control main board, the loom electronic control main board directly obtains the shutdown instruction generated by the internal integrated image processor, and based on the shutdown instruction, the loom is shut down.
[0081] In one embodiment, when the control image processor generates a stop instruction and the image processor acts as an independent module, the stop instruction is sent to the loom electronic control main board based on the image processor, so that the loom electronic control main board shuts down the loom after receiving the stop instruction.
[0082] In one embodiment, it can also be arranged that during the operation of the loom, the loom electronic control main control board continuously generates loom operation instructions, and controls the operation of the loom based on the loom operation instructions. When the weft yarn detection result is determined and the weft yarn detection result is short weft or long weft, the loom operation instruction is stopped from being generated to stop the loom.
[0083] In one embodiment, due to the different characteristics of different types of weft yarns, some weft yarns will become weak in the twisted edges and loose in the fabric edges after the weft yarns are shortened due to the lack of waste edge constraints. To cope with this situation, in this embodiment, a constraint mechanism is added where the weft yarns reach, wherein the constraint structure can be an air suction constraint or a clamping constraint. Based on the added constraint mechanism, the adaptability to weft yarns with different characteristics is improved.
[0084] In summary, since the vision component can quickly capture the image of the weft yarn and analyze the status of the weft yarn in real time through the image processor, this high-speed image processing capability makes the weft detection process faster and reduces the delays that may occur in traditional weft detection methods. In this process, since the vision component can ensure that the weft yarn is deemed to have been successfully detected as soon as it reaches the specified position, the length of the next weft yarn can be shortened as much as possible. This not only reduces the use of raw materials but also reduces production costs. Moreover, when the weft detection is unsuccessful, the loom's electronic control system can automatically perform the APR (Automatic Pick Replacing) automatic weft pulling operation based on the information provided by the vision component. This automated operation not only improves production efficiency, but also reduces errors and delays caused by manual operation.
[0085] Example 2, see Figure 2 , Figure 2 Schematic diagram of a weft yarn detection device provided in this application. Corresponding to the above weft yarn detection method, this application also provides a weft yarn detection device. The weft yarn detection device includes modules for executing the above weft yarn detection method. Specifically, the weft yarn detection device includes an image acquisition module 201, a visual analysis module 202, and a weft yarn detection result determination module 203.
[0086] The image acquisition module 201 is used to acquire a weft yarn image, wherein the weft yarn image is obtained by real-time detection of the mechanical angle of the loom main shaft and controlling the visual component to shoot the target area when the mechanical angle meets a preset first target angle.
[0087] The visual analysis module 202 is configured to input the weft yarn image into an image processor, so that the image processor performs visual analysis on the weft yarn image and outputs a weft yarn result.
[0088] The weft yarn detection result determination module 203 is configured to determine a weft yarn detection result based on the weft yarn result.
[0089] In one embodiment, the visual component is installed on the loom, and the visual component also includes a shooting device.
[0090] In one embodiment, a first angle of the shooting device relative to the loom is obtained. When the first angle does not meet a preset target angle, the shooting device is adjusted based on the target angle until the first angle meets the preset target angle; wherein the shooting range of the shooting device includes the target area.
[0091] In one embodiment, the visual analysis module 202 is configured to input the weft yarn image into an image processor so that the image processor performs visual analysis processing on the weft yarn image and outputs a weft yarn result. Specifically, the visual analysis module 202 includes: inputting the weft yarn image into the image processor so that the image processor divides the weft yarn image into a first weft yarn image and a second weft yarn image, performing visual analysis processing on the first weft yarn image and the second weft yarn image, respectively, outputting a first weft yarn result corresponding to the first weft yarn image, and outputting a second weft yarn result corresponding to the second weft yarn image.
[0092] In one embodiment, the weft yarn detection result determination module 203 is used to determine the weft yarn detection result based on the weft yarn result, specifically including: the weft yarn result includes the first weft yarn result and the second weft yarn result; when it is detected that the first weft yarn result is that the weft yarn exists in the first weft yarn image, and the second weft yarn result is that the weft yarn exists in the second weft yarn image, the weft yarn detection result is confirmed to be a long weft; when it is detected that the first weft yarn result is that the weft yarn does not exist in the first weft yarn image, and the current detection is the last detection, the weft yarn detection result is confirmed to be a short weft; when it is detected that the first weft yarn result is that the weft yarn exists in the first weft yarn image, the second weft yarn result is that the weft yarn does not exist in the second weft yarn image, and the current detection is the last detection, the weft yarn detection result is determined to be normal.
[0093] In one embodiment, the visual analysis module 202 is configured to perform visual analysis processing on the first weft yarn image and the second weft yarn image, respectively, and output a first weft yarn result corresponding to the first weft yarn image and a second weft yarn result corresponding to the second weft yarn image, specifically comprising: performing weft yarn recognition processing on the first weft yarn image based on a pre-trained weft yarn recognition model, and when a weft yarn is recognized to exist in the first weft yarn image, outputting a first weft yarn result corresponding to the first weft yarn image as the presence of the weft yarn in the first weft yarn image; otherwise, outputting a first weft yarn result corresponding to the first weft yarn image as the absence of the weft yarn in the first weft yarn image; performing weft yarn recognition processing on the second weft yarn image based on the pre-trained weft yarn recognition model, and when a weft yarn is recognized to exist in the second weft yarn image, outputting a second weft yarn result corresponding to the second weft yarn image as the presence of the weft yarn in the second weft yarn image; otherwise, outputting a second weft yarn result corresponding to the second weft yarn image as the absence of the weft yarn in the second weft yarn image.
[0094] In one embodiment, the weft yarn detection result determination module 203 is configured to, after determining the weft yarn detection result, further include: generating a stop instruction when detecting that the weft yarn detection result is a short weft or a long weft, and performing a stop process on the loom based on the stop instruction.
[0095] In one embodiment, after inputting the weft yarn image into the image processor, the visual analysis module 202 further includes: cropping the weft yarn image based on a preset calibration object to obtain a first cropped image; correcting the first cropped image based on a standard weft yarn image to obtain a first corrected image, and updating the first corrected image to the weft yarn image.
[0096] In one embodiment, the visual analysis module 202 is configured to perform correction processing on the first cropped image based on the standard weft yarn image to obtain a first corrected image. Specifically, the correction processing includes: determining matching feature point pairs between the standard weft yarn image and the first cropped image based on a feature matching algorithm; calculating a transformation matrix based on the matching feature point pairs; and performing image transformation processing on the first cropped image based on the transformation matrix to obtain a first corrected image.
[0097] The weft yarn detection device can implement the weft yarn detection method of the above method embodiment. The options in the above method embodiment are also applicable to this embodiment and will not be described in detail here.
[0098] like Figure 5 As shown, Figure 5 1 is a schematic diagram of the structure of an electronic device provided in the present application; it includes a processor 111, a communication interface 112, a memory 113 and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114, and the memory 113 is used to store computer programs.
[0099] In one embodiment of the present application, the processor 111 is configured to implement the weft yarn detection method provided by any one of the aforementioned method embodiments when executing a program stored in the memory 113 .
[0100] Those skilled in the art will appreciate that all or part of the steps in the method of the above-described embodiment can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the steps in the method of the above-described embodiment.
[0101] Therefore, an embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the weft yarn detection method provided in any of the aforementioned method embodiments are implemented.
[0102] The storage medium is a physical, non-transient storage medium, such as a USB flash drive, a removable hard drive, a read-only memory (ROM), a magnetic disk, or an optical disk, among other physical storage media capable of storing program code. The computer-readable storage medium may be either non-volatile or volatile.
[0103] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0104] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and other division methods may be used in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not implemented.
[0105] The steps in the method of the embodiment of the present application can be adjusted in order, combined, and deleted according to actual needs. The units in the device of the embodiment of the present application can be combined, divided, and deleted according to actual needs. In addition, the functional units in the various embodiments of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into a single unit.
[0106] If this integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of this application, or the part that contributes to the existing technology, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, terminal, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of this application.
[0107] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0108] Obviously, those skilled in the art may make various modifications and variations to this application without departing from the spirit and scope of this application. Thus, as long as these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.
[0109] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present application, and such modifications or substitutions should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A weft yarn detection method, characterized in that: include: Acquire a weft yarn image, wherein the weft yarn image is obtained by real-time detection of a mechanical angle of a main shaft of the loom, and when the mechanical angle meets a preset first target angle, controlling a visual component to shoot a target area; Inputting the weft yarn image into an image processor so that the image processor performs visual analysis processing on the weft yarn image and outputs a weft yarn result; Based on the weft yarn result, a weft yarn detection result is determined.
2. The method according to claim 1, characterized in that The visual component is installed on the loom, and the visual component also includes a shooting device; wherein a first angle of the photographing device relative to the loom is obtained, and when the first angle does not meet a preset target angle, the photographing device is adjusted based on the target angle until the first angle meets the preset target angle; Wherein, the shooting range of the shooting device includes the target area.
3. The method according to claim 1, characterized in that: The weft yarn image is input into an image processor so that the image processor performs visual analysis processing on the weft yarn image and outputs a weft yarn result, which specifically includes: The weft yarn image is input into an image processor so that the image processor divides the weft yarn image into a first weft yarn image and a second weft yarn image, performs visual analysis processing on the first weft yarn image and the second weft yarn image respectively, outputs a first weft yarn result corresponding to the first weft yarn image, and outputs a second weft yarn result corresponding to the second weft yarn image.
4. The method according to claim 3, characterized in that Based on the weft yarn result, determining a weft yarn detection result specifically includes: The weft yarn result includes the first weft yarn result and the second weft yarn result; When it is detected that the first weft yarn result is that the weft yarn exists in the first weft yarn image, and the second weft yarn result is that the weft yarn exists in the second weft yarn image, confirming that the weft yarn detection result is a long weft; When it is detected that the first weft yarn result is that there is no weft yarn in the first weft yarn image, and the current detection is the last detection, confirming that the weft yarn detection result is a short weft; When it is detected that the first weft yarn result is that the weft yarn exists in the first weft yarn image, the second weft yarn result is that the weft yarn does not exist in the second weft yarn image, and the current detection is the last detection, it is determined that the weft yarn detection result is normal.
5. The method according to claim 3, characterized in that: Performing visual analysis processing on the first weft yarn image and the second weft yarn image respectively, outputting a first weft yarn result corresponding to the first weft yarn image, and outputting a second weft yarn result corresponding to the second weft yarn image, specifically includes: Based on the pre-trained weft yarn recognition model, performing weft yarn recognition processing on the first weft yarn image, when recognizing that the weft yarn exists in the first weft yarn image, outputting a first weft yarn result corresponding to the first weft yarn image, indicating that the weft yarn exists in the first weft yarn image; otherwise, outputting a first weft yarn result corresponding to the first weft yarn image, indicating that the weft yarn does not exist in the first weft yarn image; Based on the pre-trained weft yarn recognition model, weft yarn recognition processing is performed on the second weft yarn image. When it is recognized that the weft yarn exists in the second weft yarn image, a second weft yarn result corresponding to the second weft yarn image is outputted, that is, the weft yarn exists in the second weft yarn image; otherwise, a second weft yarn result corresponding to the second weft yarn image is outputted, that is, the weft yarn does not exist in the second weft yarn image.
6. The method according to claim 1, characterized in that: After determining the weft yarn detection result, it also includes: When it is detected that the weft yarn detection result is a short weft or a long weft, a stop instruction is generated, and the loom is stopped based on the stop instruction.
7. The method according to claim 1, characterized in that: After the weft yarn image is input into the image processor, the method further comprises: Based on a preset calibration object, the weft yarn image is cropped to obtain a first cropped image; The first cropped image is corrected based on a standard weft yarn image to obtain a first corrected image, and the first corrected image is updated to the weft yarn image.
8. The method according to claim 7, characterized in that Correcting the first cropped image based on the standard weft yarn image to obtain a first corrected image specifically includes: Determining matching feature point pairs between the standard weft yarn image and the first cropped image based on a feature matching algorithm; A transformation matrix is calculated based on the matching feature point pairs, and image transformation processing is performed on the first cropped image based on the transformation matrix to obtain a first corrected image.
9. A weft yarn detection device, characterized in that: include: An image acquisition module, a visual analysis module and a weft yarn detection result determination module; The image acquisition module is used to acquire a weft image, wherein the weft image is obtained by detecting the mechanical angle of the main shaft of the loom in real time, and when the mechanical angle meets a preset first target angle, controlling the visual component to shoot a target area; The visual analysis module is used to input the weft yarn image into an image processor so that the image processor performs visual analysis processing on the weft yarn image and outputs a weft yarn result; The weft yarn detection result determination module is used to determine the weft yarn detection result based on the weft yarn result.
10. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 8 when executing the computer program.
11. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 8 can be implemented.
Citation Information
Patent Citations
Weft-insertion-condition display method and weft-insertion-condition display apparatus for loom
CN101503841A
Image body identification, correction and registration method
CN106407983A
High-efficiency focusing stereo matching method based on image segmentation
CN108460792A
A method and apparatus for image cropping
CN109523503A
Workpiece size visual measurement method for complex machining environment
CN117011282A