Search

CN-116575153-B - Two-for-one twisting broken yarn detection method, system, equipment and medium based on image recognition

CN116575153BCN 116575153 BCN116575153 BCN 116575153BCN-116575153-B

Abstract

The application relates to a two-for-one yarn breakage detection method, a system, equipment and a medium based on image recognition, which have the technical scheme that whether a target image contains a pulley or not is identified, the pulley is a pulley for conveying yarns on a two-for-one twister, when the pulley is identified to be contained in the target image, a foreground region containing the pulley is cut to obtain a cut image, the arrow direction of the pulley on the target image is identified and classified to obtain an arrow direction type, the cut image is subjected to HOG feature extraction to obtain a corresponding feature map, whether the pulley and a reference pulley are the same pulley or not is judged by a KCF algorithm on the feature map, if yes, the arrow direction type is recorded in a reference direction type set corresponding to the reference pulley, if no, whether the yarn breakage occurs or not is judged according to the state of the reference pulley.

Inventors

  • ZOU JIANFA

Assignees

  • 上海致景信息科技有限公司

Dates

Publication Date
20260508
Application Date
20230519

Claims (9)

  1. 1. The two-for-one twisting broken yarn detection method based on image recognition is characterized by comprising the following steps of: S100, acquiring a target image; S200, identifying whether a pulley is contained in the target image, wherein the pulley is a pulley for conveying yarns on a two-for-one twister, and if yes, executing a step S300; S300, cutting a foreground region containing a pulley to obtain a corresponding cut image, carrying out HOG feature extraction on the cut image to obtain a corresponding feature map, identifying the arrow direction of an arrow label or an arrow-bearing rubber sleeve arranged on the pulley in the target image, and classifying the arrow direction to obtain a corresponding arrow direction type, wherein the arrow direction type is used for representing the rotation direction of the pulley; Judging whether the cutting image is the first cutting image containing pulleys, if so, taking the current pulley as a reference pulley, taking the current arrow pointing category as a reference pointing category set corresponding to the reference pulley, and returning to execute the step S100; s400, judging whether the pulley and the reference pulley are the same pulley or not by a KCF algorithm on the characteristic map, if so, executing a step S500, and if not, executing a step S600; S500, recording the arrow pointing category in a reference pointing category set corresponding to the reference pulley, and returning to execute the step S100; And S600, determining the state of the reference pulley according to the reference pointing class set, namely determining that the reference pulley is in a rotating state if the reference pointing class set comprises a plurality of different arrow pointing classes, and determining that the reference pulley is in a static state if the arrow pointing classes in the reference pointing class set are the same, and further determining whether yarn breakage occurs according to the state of the reference pulley, wherein the rotating state represents that the yarn is not broken, and the static state represents that the yarn is broken.
  2. 2. The two-for-one twisting broken yarn detection method based on image recognition according to claim 1, wherein the performing HOG feature extraction on the cut image to obtain a corresponding feature map comprises: carrying out graying treatment on the cut image, and carrying out color space normalization on the grayed cut image by adopting a gamma correction method to obtain a normalized image; calculating gradients of all pixel points of the normalized image; dividing the normalized image to obtain a plurality of blocks, and dividing each block to obtain a plurality of cell units; Counting the gradient histograms of the cell units, and connecting the gradient histograms of all the cell units in each block in series to obtain HOG feature maps corresponding to each block; and connecting all HOG feature maps of the blocks in series to obtain corresponding feature maps.
  3. 3. The two-for-one twisting broken yarn detecting method based on image recognition according to claim 1, wherein the step S400 comprises: inputting the feature map into a trained KCF filter to obtain a response map and a response peak; And if the response peak value is greater than the preset multiple of the average value of the historical response peak values, determining that the pulley and the reference pulley are the same pulley, executing step S500, and if the response peak value is not greater than the preset multiple of the average value of the historical response peak values, determining that the pulley and the reference pulley are not the same pulley, executing step S600.
  4. 4. The two-for-one twist break detection method based on image recognition as set forth in claim 3, wherein the training method of the KCF filter includes: Obtaining a base sample, wherein the base sample comprises a characteristic diagram of a reference pulley; mapping the base samples to a high-dimensional space; circularly shifting the base sample mapped to the high-dimensional space to obtain a first sample set; and training the filter by adopting the first sample set, updating the filter, and updating the filter coefficient and the first sample set by adopting a linear interpolation mode.
  5. 5. The two-for-one twisting broken yarn detecting method based on image recognition according to claim 1, wherein the step S200 comprises: after the target image is subjected to standardization processing, inputting a trained YOLO model to obtain a detection result; if the detection result is that the target image contains a pulley, the target image comprises a foreground region containing the pulley and a background region not containing the pulley, and step S300 is executed; If the detection result indicates that the target image does not include a pulley, the process returns to step S100.
  6. 6. The two-for-one twist break detection method based on image recognition as set forth in claim 5, wherein the training method of the YOLO model includes: acquiring a second sample set, wherein the second sample set comprises a plurality of target images containing pulleys and a plurality of target images without pulleys; Marking pulleys in the samples of the second sample set to obtain a real marked image; training a YOLO model by using the second sample set, and comparing an output result of the YOLO model with a real marker image to obtain a training error; and (3) reversely spreading the training error in the YOLO model, updating parameters of the YOLO model, and obtaining the trained YOLO model after repeated iterative training.
  7. 7. The two-for-one twist break detection method based on image recognition according to claim 1, further comprising, after step S600: And taking the pulley as a next reference pulley, changing the reference pointing class set into a historical pointing class set, and taking the arrow pointing class as a reference pointing class set corresponding to the next reference pulley.
  8. 8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 7 when the computer program is executed.
  9. 9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.

Description

Two-for-one twisting broken yarn detection method, system, equipment and medium based on image recognition Technical Field The invention relates to the technical field of broken yarn detection, in particular to a two-for-one broken yarn detection method, a two-for-one broken yarn detection system, two-for-one broken yarn detection equipment and two-for-one broken yarn detection media based on image recognition. Background In the two-for-one twisting process of yarn, the yarn is broken in the process of twisting the yarn by utilizing the two-for-one twisting machine, and in the actual factory environment, the broken yarn is usually inspected continuously, whether the broken yarn appears in the two-for-one twisting process is found, and then the broken yarn appears is solved. The prior art discloses a file with a publication number of CN106093052A and a yarn breakage detection method, which comprises the steps of controlling a holder to move along a guide rail, installing a CCD camera on the holder, shooting video signals in real time in the moving process along the guide rail by the CCD camera, extracting frames from the video signals according to preset interval periods, detecting whether yarn breakage exists according to the extracted frames, extracting image content of a designated area from the frames containing the yarn breakage if the yarn breakage is detected according to the extracted frames, arranging a signboard in the designated area, matching and identifying identification characters represented by the signboard in the designated area through a preset image template, and sending the identified identification characters to monitoring equipment. Disclosure of Invention Aiming at the defects existing in the prior art, the invention aims to provide a two-for-one broken yarn detection method, system, equipment and medium based on image recognition, which have the functional advantages of low recognition difficulty and higher detection accuracy. The technical aim of the invention is realized by the following technical scheme: a two-for-one twisting broken yarn detection method based on image recognition comprises the following steps: S100, acquiring a target image; S200, identifying whether a pulley is contained in the target image, wherein the pulley is a pulley for conveying yarns on a two-for-one twister, and if yes, executing a step S300; S300, cutting a foreground region containing pulleys to obtain corresponding cut images, carrying out HOG feature extraction on the cut images to obtain corresponding feature images, identifying the arrow directions of the pulleys in the target images, and classifying the arrow directions to obtain corresponding arrow direction categories; s400, performing KCF algorithm on the feature map to judge whether the pulley and the reference pulley are the same pulley, if so, executing step S500, otherwise, executing step S600; S500, recording the arrow pointing category in a reference pointing category set corresponding to the reference pulley, and returning to execute the step S100; s600, determining the state of the reference pulley according to the reference direction category set, and determining whether yarn breakage occurs according to the state of the reference pulley. Optionally, after the step S300, the method further includes: judging whether the cutting image is the first cutting image containing pulleys, if not, executing step S400; If yes, the pulley is used as a reference pulley, the arrow pointing category is used as a reference pointing category set corresponding to the reference pulley, and the step S100 is executed again. Optionally, the performing HOG feature extraction on the cut image to obtain a corresponding feature map includes: carrying out graying treatment on the cut image, and carrying out color space normalization on the grayed cut image by adopting a gamma correction method to obtain a normalized image; calculating gradients of all pixel points of the normalized image; dividing the normalized image to obtain a plurality of blocks, and dividing each block to obtain a plurality of cell units; Counting the gradient histograms of the cell units, and connecting the gradient histograms of all the cell units in each block in series to obtain HOG feature maps corresponding to each block; and connecting all HOG feature maps of the blocks in series to obtain corresponding feature maps. Optionally, the step S400 includes: inputting the feature map into a trained KCF filter to obtain a response map and a response peak; And if the response peak value is greater than the preset multiple of the average value of the historical response peak values, determining that the pulley and the reference pulley are the same pulley, executing step S500, and if the response peak value is not greater than the preset multiple of the average value of the historical response peak values, determining that the pulley and the reference pulley are not the same pulley, executing