Method and system for detecting the direction of a tube yarn based on image visual recognition technology
By constructing a dedicated model library and a dynamic composite model, and combining confidence-adaptive feature enhancement technology, the robustness problem of yarn direction recognition was solved, and the accurate positioning and direction determination of the yarn end area were achieved, thereby improving the intelligence level and efficiency of textile production.
Patent Information
- Application Number
- CN202511517945.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-23
- Publication Date
- 2025-12-23
- Estimated Expiration
- 2045-10-23
AI Technical Summary
In the textile industry, the automated identification of yarn bobbin direction faces the problems of variable yarn end shape and complex background noise interference, resulting in poor robustness of existing machine vision methods and difficulty in meeting the production requirements of high cycle time and high reliability.
A dedicated model library is constructed, and multiple target detection models are trained. Combined with confidence-adaptive feature enhancement technology and dynamic composite models, accurate localization and orientation determination of the yarn end area are achieved.
It improves the intelligence level and operational efficiency of the textile production process, and realizes high-precision yarn end area positioning and direction determination in a variable production environment, providing reliable technical support for automated operation.
Smart Images

Figure CN120997299B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer vision, in particular to a bobbin yarn direction detection method and system based on image visual recognition technology. BACKGROUND
[0002] In the textile industry, the bobbin yarn is a widely used yarn package form, which is a cylindrical or conical yarn body wound on a bobbin according to a specific rule. As the core raw material of the weaving preparation process (such as beaming and winding), the automation and intelligence level of its processing directly determines the production efficiency and product quality of the entire textile factory.
[0003] In the automatic beaming process, the automatic yarn feeding (hanging yarn) and the yarn dropping of the bobbin yarn are key links. This process relies on the automatic guided vehicle (AGV) or the mechanical hand to accurately grasp the bobbin yarn and place it to the specified position of the beaming frame. However, the bobbin yarn has a clear direction: one end is a fixed bobbin base, and the other end is a yarn head (referred to as "yarn head") that can be drawn out. Correctly identifying the direction of the bobbin yarn is a prerequisite to ensure that the yarn can be smoothly and unwoundly drawn out. If the direction is identified incorrectly, it will cause a series of serious problems, including but not limited to: (1) the yarn cannot be drawn out or broken, causing production interruption; (2) uneven tension of the warp yarn, resulting in defects in the fabric and affecting the quality of the fabric surface; (3) the automatic equipment (such as AGV) performs incorrect grasping and placing actions, which requires manual intervention for correction, so that the true "black light factory" full-process automation cannot be realized.
[0004] However, in actual industrial scenarios, there are many technical difficulties in realizing automatic identification, and the core challenge is concentrated on the visual recognition of the yarn head. Specifically, the yarn head may be pressed into the yarn layer during production and handling, naturally hanging down, or attached to the surface of the bobbin yarn in any form, lacking fixed and uniform morphological features, making it difficult for traditional rule-based image processing algorithms to stably locate and extract. In addition, changes in lighting, complex background noise generated by the yarn texture on the surface of the bobbin yarn, and other factors will also seriously interfere with the accurate identification of the weak and small target yarn head. Conventional machine vision methods (such as edge detection and template matching) have poor robustness when facing the above weak and variable target features and complex imaging environments, with high false detection rate and high missed detection rate, which cannot meet the high-speed and high-reliability production requirements of modern intelligent textile factories.
[0005] Therefore, there is an urgent need for a solution that can overcome the above difficulties, adapt to complex industrial environments, and achieve fast, accurate and stable identification of the direction of the bobbin yarn. SUMMARY
[0006] To solve the above technical problems, the present application provides a bobbin yarn direction detection method and system based on image visual recognition technology.
[0007] The application provides a tube yarn direction detection method based on image visual recognition technology, comprising the following steps: a special model library comprising a plurality of target detection models is constructed in advance, each target detection model being obtained by training a corresponding set of special image data; wherein the morphological characteristics of the yarn head and the background characteristics of the tube yarn corresponding to each special image data are similar; real-time images of the tube yarn to be detected are collected, and image features and their confidence levels are extracted from the real-time images, the image features comprising morphological characteristics of the yarn head and background characteristics of the tube yarn; and the image features are subjected to enhanced transformation processing according to the confidence levels, to obtain a plurality of enhanced image features; a plurality of related target detection models are matched from the special model library according to the enhanced image features, and a dynamic composite model is established based on each target detection model; the real-time images are processed using the dynamic composite model, to obtain a predicted bounding box of the yarn head region, and the direction of the tube yarn is determined according to the position of the predicted bounding box in the real-time images.
[0008] The application also provides a tube yarn direction detection system based on image visual recognition technology, comprising: a model construction unit, which constructs a special model library comprising a plurality of target detection models in advance, each target detection model being obtained by training a corresponding set of special image data; wherein the morphological characteristics of the yarn head and the background characteristics of the tube yarn corresponding to each special image data are similar; a feature enhancement processing unit, which collects real-time images of the tube yarn to be detected, extracts image features and their confidence levels from the real-time images, the image features comprising morphological characteristics of the yarn head and background characteristics of the tube yarn; and subjects the image features to enhanced transformation processing according to the confidence levels, to obtain a plurality of enhanced image features; a model matching unit, which matches a plurality of related target detection models from the special model library according to the enhanced image features, and establishes a dynamic composite model based on each target detection model; and an identification reasoning unit, which processes the real-time images using the dynamic composite model, to obtain a predicted bounding box of the yarn head region, and determines the direction of the tube yarn according to the position of the predicted bounding box in the real-time images.
[0009] The application has at least the following beneficial technical effects: the application constructs a special model library for different yarn head morphologies and background characteristics in advance, effectively solving the problem of insufficient generalization ability of a single model in a complex industrial scene; the self-adaptive feature enhancement technology based on confidence levels significantly improves the representation ability of low-quality image features and the robustness of model matching; and the dynamic composite model mechanism can intelligently combine the optimal detection model according to the image features to be detected, significantly improving the detection accuracy and adaptability. Ultimately, the application realizes accurate positioning and direction determination of the yarn head region in a variable production environment, provides reliable technical support for subsequent automatic operation, and significantly improves the intelligent level and operating efficiency of the textile production process. Attached Figure Description
[0010] Figure 1 This is a flowchart of a yarn bobbin orientation detection method based on image visual recognition technology disclosed in an embodiment of the present invention.
[0011] Figure 2 This is a structural diagram of a yarn bobbin orientation detection system based on image visual recognition technology disclosed in an embodiment of the present invention. Detailed Implementation
[0012] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments.
[0013] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0014] To facilitate understanding of the embodiments of the present invention, further explanations and descriptions will be provided below with reference to the accompanying drawings and specific embodiments. These embodiments do not constitute a limitation on the embodiments of the present invention.
[0015] like Figure 1 As shown, this embodiment of the invention discloses a yarn bobbin direction detection method 100 based on image visual recognition technology, including the following steps: 10, a dedicated model library including multiple target detection models is pre-constructed, and each target detection model is trained using a corresponding set of dedicated image data; wherein, the yarn end morphological features and yarn bobbin background features corresponding to each dedicated image data are similar.
[0016] In this step, in order to solve the problem of insufficient generalization ability of a single model in the face of variable yarn head morphology and complex background, the application constructs a special model library with strong pertinence and wide coverage. Specifically, the construction method of the special model library is as follows: a large number of cheese images are collected, and are finely classified according to yarn head morphological characteristics (for example, yarn head is pressed into the yarn layer, naturally falls, or is attached to the surface of the cheese in any form) and cheese background characteristics (for example, different lighting conditions, cheese surface texture noise). Images with similar dominant features (i.e. yarn head morphological characteristics and cheese background characteristics) are grouped into a group to form multiple sets of special image data as training data sets. A target detection model (such as a YOLO series model) is trained using each set of special image data. Finally, these target detection models trained for different specific working conditions together form a special model library, and each target detection model is good at solving the recognition of yarn head in a certain type of image situation.
[0017] 20, collecting real-time images of the cheese to be tested, extracting image features and their confidence from the real-time images, the image features including yarn head morphological characteristics and cheese background characteristics; and performing enhanced transformation processing on the image features according to the confidence to obtain a plurality of enhanced image features.
[0018] In this step, first, real-time images of the cheese to be detected on the production line are collected, and key image features (such as possible shapes of the yarn head, colors, and textures of the background, lighting conditions, etc.) and their corresponding confidence are extracted. Confidence is used to quantify the significance and reliability of the feature in the image.
[0019] Next, according to the level of confidence, the extracted original image features are subjected to differential enhanced transformation processing. For example, for image features with high confidence, perform light enhanced transformation, the purpose is to fine-tune and explore a small range on the basis of keeping reliable information, to prevent mismatching models due to small fluctuations; for image features with low confidence, perform deep enhanced transformation, the purpose is to generate multiple differentiated feature representations through large-scale, multi-directional transformation, to make up for the uncertainty of the original features and increase the probability of matching to the correct special model.
[0020] After the above enhanced transformation processing based on confidence, multiple enhanced image features are obtained from one image feature as multiple possible representations of the real-time image.
[0021] 30, according to the enhanced image features, matching multiple related target detection models from the special model library, and based on each target detection model, a dynamic composite model is formed.
[0022] In this step, the set of enhanced image features obtained in step 20 are compared with the feature representations corresponding to each target detection model in the specialized model library (i.e., yarn head morphological features and yarn background features) for similarity calculation. Those target detection models that are frequently selected by multiple enhanced feature versions with high similarity are screened out.
[0023] Subsequently, the screened-out multiple expert models are combined to form a dynamic composite model. The composite model is customized and constructed for the specific characteristics of the current image to be tested (reflected by its enhanced image features), and its comprehensive detection capability is superior to any single fixed model. It can be understood that the prediction results output by each target detection model in the dynamic composite model are integrated through an internal fusion mechanism to obtain the final prediction bounding box.
[0024] 40, using the dynamic composite model to process real-time images to obtain a prediction bounding box of the yarn head region, and determining the direction of the yarn tube according to the position of the prediction bounding box in the real-time image.
[0025] In this step, the real-time image of the yarn tube to be tested collected is input into the dynamic composite model dynamically established in step 30. The dynamic composite model will cooperate with the detection results of each expert model in it, and through an internal fusion mechanism (such as weighted voting, non-maximum suppression, etc.), it will finally output a most reliable prediction bounding box of the yarn head region.
[0026] According to the specific position of the above prediction bounding box in the real-time image (for example, located on the left or right side, upper end or lower end of the yarn tube), combined with the pre-set rules, the correct direction of the yarn tube is finally determined, providing accurate guidance information for subsequent automatic grabbing and yarn feeding operations of AGV or mechanical hand.
[0027] The present application effectively solves the problem of insufficient generalization ability of a single model in a complex industrial scene by pre-constructing a specialized model library for different yarn head morphologies and background features. In addition, through the adaptive feature enhancement technology based on confidence, the representation ability of low-quality image features is significantly improved, and the robustness of model matching is enhanced. Furthermore, by using the dynamic composite model mechanism, the optimal detection model can be intelligently combined according to the image features to be tested, achieving significant improvement in detection accuracy and adaptability. Finally, the present application realizes accurate positioning and direction determination of the yarn head region in a variable production environment, providing reliable technical support for subsequent automation operations, and greatly improving the intelligent level and operation efficiency of the textile production process.
[0028] As an example, each target detection model is trained using a corresponding set of dedicated image data, including: 11, collecting a large number of cone yarn images that meet the quantity condition, and classifying all the cone yarn images according to yarn head morphological features and cone yarn background features; wherein the yarn head morphological features include yarn head being pressed into the yarn layer, naturally falling or being attached to the surface of the cone yarn in any form; and the cone yarn background features include different lighting conditions and surface textures of the cone yarn.
[0029] In this step, a large number of cone yarn images need to be collected, and these images need to meet the quantity condition, i.e. to ensure that the image data used to train each type of dedicated model is sufficient in quantity, so as to avoid the problem of model overfitting or weak generalization ability caused by insufficient data.
[0030] All the cone yarn images are systematically classified according to yarn head morphological features and cone yarn background features. The yarn head morphological features mainly involve the physical state of the yarn head, including typical cases such as yarn head being pressed into the yarn layer, naturally falling, or being attached to the surface of the cone yarn in any form; and the cone yarn background features mainly involve the influence of the imaging environment, including different lighting conditions (such as strong light, weak light, shadow and reflection caused by side light) and complex surface texture of the cone yarn.
[0031] 12, the cone yarn images with similar yarn head morphological features and similar cone yarn background features are grouped into a group to form a set of dedicated image data, and a target detection model is trained using the set of dedicated image data.
[0032] In this step, on the basis of completing the feature classification, the grouping operation of the cone yarn images is performed to form the final training set. Specifically, the images classified in step 11 are grouped according to the principle of similar yarn head morphological features and similar cone yarn background features. For example, all the images showing yarn head naturally falling and under strong light background are grouped into one group; and all the images showing yarn head being pressed into the yarn layer and under complex surface texture background are grouped into another group.
[0033] Thus, each set of dedicated image data has high feature consistency and scene specificity. Using such a set of highly homogenized data to train a specific target detection model can make the target detection model highly focused on learning and identifying the yarn head pattern under the specific working condition, thereby becoming an expert model for solving such specific recognition problems, and thus can significantly improve the detection accuracy and robustness of the target detection model in the respective skilled scene.
[0034] In this embodiment, by pre-classifying and grouping massive images according to the morphological characteristics of the yarn head and the background characteristics of the cheese, a plurality of special image datasets with highly consistent internal characteristics are constructed. This method ensures that each target detection model is trained using homogenized data specific to a particular working condition, allowing the model to focus highly on learning and accurately identifying the yarn head pattern in that specific scenario. This refined data construction strategy fundamentally improves the detection accuracy and robustness of each specialized model in its area of expertise, thereby facilitating the subsequent dynamic composite model to achieve high-precision and high-adaptability cheese direction detection, effectively overcoming the deficiency of insufficient model generalization ability caused by mixed training data.
[0035] As an example, the confidence of the image feature extracted from the real-time image includes: 21, evaluating its saliency based on the degree of aggregation of the image feature in the feature space, which is determined by calculating the distance between the image feature and the cluster center of the same type of feature; and evaluating its reliability based on the stability of the image feature in adversarial verification, which is determined by calculating the degree of change of the image feature after adding a small perturbation in the real-time image.
[0036] In this step, the embodiment constructs a two-dimensional feature quality evaluation system to finely measure the confidence of the image feature from two aspects of internal nature and external anti-interference ability, as follows: in the saliency evaluation aspect: the degree of aggregation is quantified by calculating the Euclidean distance or cosine distance between the current image feature vector and the pre-established cluster center of the same type of feature in the feature space. The smaller the distance, the closer the current feature is to the core area of its category in the feature space, the more typical and prominent the feature expression, i.e., the higher the saliency; on the contrary, if the distance is larger, it means that the feature may be an edge case or an outlier, and its saliency is lower. It can be understood that this evaluation reflects the typicality or purity of the image feature as a representative of its category.
[0037] In the reliability evaluation aspect: the stability of the feature is tested by adversarial verification. The specific method is to add a series of imperceptible small perturbations (such as Gaussian noise) to the original real-time image, then extract the image feature again, and calculate the degree of change between the feature vectors before and after the perturbation (for example, calculate the L2 norm distance). If the degree of change is small, it means that the feature is not sensitive to interference and has strong robustness, i.e., high reliability; if the degree of change is large, it means that the feature is fragile and unstable, and the reliability is low. It can be understood that this evaluation represents the robustness of the image feature to remain consistent in real complex industrial environments.
[0038] 22, according to the weighted combination of the saliency and the reliability, the confidence of the image feature is calculated.
[0039] In this step, the evaluation results of the above two dimensions are fused to obtain a comprehensive confidence score. Specifically, appropriate weights are assigned to the saliency and reliability, for example, the saliency weight can be set to 0.6 and the reliability weight can be set to 0.4 according to the requirements of the specific application scene, and the final confidence is calculated by weighted summation.
[0040] Confidence = (Saliency Score x Ws) + (Reliability Score x Wr), where Ws + Wr = 1.
[0041] This weighted combination mechanism makes the confidence not only reflect the clarity of the feature itself (i.e. saliency), but also consider its anti-interference ability in practical application (i.e. reliability).
[0042] The present embodiment realizes the fine measurement of image feature confidence by constructing a two-dimensional evaluation system based on saliency and reliability. The evaluation mechanism adopted by the present embodiment fully considers the intrinsic nature of the image feature and the external anti-interference ability, so that the subsequent adaptive image feature enhancement transformation processing based on confidence is more accurate, thereby helping to accurately identify the direction of the tube yarn.
[0043] As an example, the reliability of the image feature is evaluated based on its stability in adversarial verification, including: 211, determining the intensity and number of small perturbations based on the image quality score of the real-time image and the neighborhood density of the image feature in the feature space.
[0044] This step introduces a double-factor adaptive perturbation parameter determination mechanism. Specifically, the following two key factors are considered: the image quality score of the real-time image: the image quality score is calculated based on the clarity, contrast, noise level and other indicators of the image. When the image quality score is low, it means that the original image itself may have problems such as blur, noise, etc., and the stability of its features is questionable, so stronger and more perturbations are needed to perform more rigorous stress testing.
[0045] At the same time, the neighborhood density of the image feature in the feature space is introduced as another key factor. The neighborhood density is quantified by counting the number of other training feature points within a given radius centered on the feature point. Specifically: when the neighborhood density is low, it means that the feature is located in a relatively sparse or remote area of the feature space, and it may be a poorly trained or rare feature pattern, whose stability is also questionable, so stronger and more perturbations are needed to fully test whether its foothold in the feature space is stable.
[0046] By comprehensively considering the image quality (reflecting the uncertainty at the data level) and the feature neighborhood density (reflecting the cognitive uncertainty at the model level), the required perturbation intensity and quantity for adversarial verification can be dynamically determined more comprehensively and accurately.
[0047] 212, adding the determined micro-perturbations to the real-time image to generate a plurality of perturbed images, and re-extracting features from each of the perturbed images.
[0048] In this step, a series of micro-perturbations (such as Gaussian noise, salt and pepper noise, or micro-affine transformation, etc.) that meet the requirements are generated according to the perturbation intensity and quantity determined in step 211, and these perturbations are superimposed one by one on the original real-time image, thereby generating a plurality of perturbed images. It can be understood that although these perturbed images are visually slightly different from the original image, they are sufficient to challenge the feature extraction process. Using the same feature extraction method as extracting the features of the original image, the features of each perturbed image are re-extracted to obtain the corresponding perturbed image features.
[0049] This embodiment can be understood as simulating the micro-changes in the image caused by factors such as changes in lighting and equipment vibration in a real industrial environment, and observing the output performance of the feature extraction algorithm under these changes.
[0050] 213, evaluating the reliability of the image features by calculating the difference between each of the perturbed image features and the original image features.
[0051] In this step, all the perturbed image features obtained in step 212 are compared with the original image features, and the difference between them is calculated. Specifically, the Euclidean distance or cosine distance between each perturbed feature and the original feature in the feature space can be calculated, and then the distance values are statistically analyzed (such as taking the average value, maximum value, etc.). If the difference is generally small, it means that even if there is a micro-perturbation in the image, the extracted features remain highly consistent, and the reliability of the original image features is high. If the difference is large, it means that the feature is sensitive to perturbation and has poor stability, and the reliability is low.
[0052] Finally, based on the statistical results of the above difference, a quantitative reliability score is output as an input for subsequent confidence score calculation.
[0053] As an example, the method of enhancing and transforming the image features according to the confidence score to obtain a plurality of enhanced image features comprises: 23, applying a first type of enhancement transformation to the first type of image features whose confidence score is higher than a preset high threshold; the first type of enhancement transformation is a random perturbation within a first intensity range applied to the image features in the feature space.
[0054] This step performs fine-tuning in the feature space for the first type of image features with high confidence.
[0055] Specifically, when the extracted image feature (i.e. the yarn head morphological feature and the cheese background feature, usually represented as a high-dimensional feature vector) has a confidence higher than a pre-set high threshold, it indicates that the position of the feature vector in the feature space is reliable and accurate. At this time, the first type of enhancement transformation is defined as: in each dimension of the feature vector, a random perturbation with a strictly limited intensity range (for example, a random noise vector with a mean of zero and a very small variance) is superimposed. By setting the first intensity range very small, it can be ensured that the new feature vector after perturbation (i.e. the enhanced image feature) is still tightly distributed in the vicinity of the original feature vector.
[0056] By introducing this controllable, small randomness, the natural fluctuations that may exist in the feature extraction process are simulated, thereby generating a set of highly similar but not exactly the same alternative features for the subsequent model matching process, thereby improving the robustness of the matching process and avoiding mismatching models due to slight deviations in features.
[0057] 24. For the second type of image features with a confidence lower than a pre-set low threshold, a second type of enhancement transformation is applied; the second type of enhancement transformation is a random perturbation with a second intensity range applied to the image feature in the feature space, and the lower limit of the second intensity range is greater than the upper limit of the first intensity range.
[0058] This step performs extensive exploration in the feature space for the second type of image features with low confidence.
[0059] Specifically, when the confidence of the extracted image feature is lower than a pre-set low threshold, it indicates that the position of the feature vector is unreliable and may be far from its ideal, true feature region. At this time, the second type of enhancement transformation is defined as: in each dimension of the feature vector, a random perturbation with an intensity falling within the second intensity range is superimposed. Wherein, the lower limit of the second intensity range is greater than the upper limit of the first intensity range, i.e. the perturbation intensity of the second type of transformation is significantly higher than the first type of transformation. This strong perturbation will map the original unreliable feature vector to a more extensive region in the feature space.
[0060] Through this large-scale, exploratory random sampling, the probability that one or more new feature vectors after perturbation can accidentally fall into a feature region that a specific model is good at can be significantly increased. This approach is a powerful remedial mechanism for low-quality features, using breadth to make up for the lack of accuracy.
[0061] 25. generating the several enhanced image features from the original image feature by the random perturbation.
[0062] Through the aforementioned subtle fine calibration and strong extensive exploration, i.e. through applying multiple random perturbations, several enhanced image features are derived from the original image feature. This set of enhanced image features collectively constitutes multiple possible interpretations of the original uncertain image in the feature space, which helps subsequent high-probability accurate matching in the dedicated model library.
[0063] The embodiment realizes intelligent optimization of image features by implementing a differentiated random perturbation strategy in the feature space based on confidence. Specifically, small-range perturbation is adopted for fine calibration of high-confidence features, which enhances the robustness of the matching process while maintaining feature accuracy; large-range perturbation is adopted for extensive exploration of low-confidence features, which significantly improves the probability of matching low-quality features to the correct dedicated model. This adaptive enhancement mechanism at the feature level can effectively overcome the limitations of traditional image enhancement methods in dealing with uncertain features, avoiding excessive distortion of reliable features while effectively remedying unreliable features, providing a more abundant and reliable feature representation for subsequent model matching, thereby improving the accuracy and adaptability of tube yarn direction detection under complex working conditions.
[0064] As shown in FIG. 2, Figure 2 The embodiment of the present application discloses a tube yarn direction detection system 200 based on image visual recognition technology, which comprises: a model construction unit 2001, which pre-constructs a dedicated model library comprising a plurality of target detection models, each of which is trained using a corresponding set of dedicated image data; wherein the yarn head morphological features and the tube yarn background features corresponding to each dedicated image data are similar.
[0065] A feature enhancement processing unit 2002 acquires real-time images of the tube yarn to be tested, extracts image features and their confidence from the real-time images, the image features including yarn head morphological features and tube yarn background features; and performs enhancement transformation processing on the image features according to the confidence to obtain several enhanced image features.
[0066] A model matching unit 2003 matches a plurality of related target detection models from the dedicated model library according to the enhanced image features, and forms a dynamic composite model based on each target detection model.
[0067] An identification inference unit 2004 processes the real-time images using the dynamic composite model to obtain a predicted bounding box of the yarn head region, and determines the direction of the tube yarn according to the position of the predicted bounding box in the real-time image.
[0068] As an example, the model construction unit 2001 is configured to collect the cheese images satisfying the quantity condition, and classify all the cheese images according to the yarn head morphological features and the cheese background features; wherein the yarn head morphological features include that the yarn head is pressed into the yarn layer, naturally falls or is attached to the cheese surface in any form; the cheese background features include different illumination conditions and cheese surface textures; the cheese images with similar yarn head morphological features and similar cheese background features are grouped into a group to form a group of special image data, and a target detection model is trained using the group of special image data.
[0069] As an example, the feature enhancement processing unit 2002 is configured to evaluate the saliency of the image feature based on the degree of aggregation of the image feature in the feature space, the degree of aggregation being determined by calculating the distance between the image feature and the clustering center of the same type of feature; and evaluate the reliability of the image feature based on the stability in adversarial verification, the stability being determined by calculating the degree of change of the image feature after adding a slight perturbation to the real-time image; and calculate the confidence of the image feature according to the weighted combination of the saliency and the reliability.
[0070] As an example, the feature enhancement processing unit 2002 is further configured to determine the intensity and number of the slight perturbation based on the image quality score of the real-time image and the neighborhood density of the image feature in the feature space; add the determined slight perturbation to the real-time image to generate a plurality of perturbed images, and extract perturbed image features from each of the perturbed images; and evaluate the reliability of the image feature by calculating the degree of difference between each of the perturbed image features and the original image feature.
[0071] As an example, the feature enhancement processing unit 2002 is further configured to apply a first type of enhancement transformation to a first type of image feature with a confidence higher than a preset high threshold; the first type of enhancement transformation is a random perturbation within a first intensity range applied to the image feature in the feature space; apply a second type of enhancement transformation to a second type of image feature with a confidence lower than a preset low threshold; the second type of enhancement transformation is a random perturbation within a second intensity range applied to the image feature in the feature space, the lower limit of the second intensity range being greater than the upper limit of the first intensity range; and generate the plurality of enhanced image features from the original image feature through the random perturbation.
[0072] While the application has been particularly shown and described with reference to preferred embodiments, it will be understood to those skilled in the art that various changes in form and details can be made therein without departing from the spirit and scope of the application. Accordingly, the disclosed application is to be considered as illustrative and not restrictive, and the application is defined by the scope of the appended claims.
Claims
1. A method for detecting the direction of a cheese based on image visual recognition technology, characterized in that, The method comprises the following steps: a special model library comprising a plurality of target detection models is pre-constructed, each target detection model being trained using a corresponding set of special image data; real-time images of the test yarn package are collected, and image features and their confidence levels are extracted from the real-time images, the image features including yarn head morphological features and yarn package background features; and the image features are enhanced and transformed based on the confidence levels, to obtain a plurality of enhanced image features; a plurality of relevant target detection models are matched from the special model library based on the enhanced image features, and a dynamic composite model is established based on each target detection model; the real-time images are processed using the dynamic composite model, to obtain a predicted bounding box of the yarn head region, and the direction of the yarn package is determined based on the position of the predicted bounding box in the real-time image; the confidence level of the image features is extracted from the real-time images, comprising: the significance of the image features is evaluated based on their clustering degree in the feature space, the clustering degree being determined by calculating the distance between the image features and the clustering center of similar features; and the reliability of the image features is evaluated based on their stability in adversarial verification, the stability being determined by calculating the degree of change in the image features after a slight perturbation is added to the real-time image; the confidence level of the image features is calculated based on the weighted combination of the significance and the reliability.
2. The tube yarn direction detection method based on image visual recognition technology according to claim 1, characterized in that: Each target detection model is trained using a corresponding set of special image data, comprising: a plurality of yarn package images meeting the quantity condition are collected, and all the yarn package images are classified according to yarn head morphological features and yarn package background features; the yarn head morphological features include yarn head being pressed into the yarn layer, naturally hanging down or being attached to the surface of the yarn package in any form; the yarn package background features include different lighting conditions and surface textures of the yarn package; yarn package images with similar yarn head morphological features and similar yarn package background features are grouped into a set, to form a set of special image data, and a target detection model is trained using the set of special image data.
3. The method of claim 1, wherein the method comprises the steps of: a) capturing an image of the tube yarn; b) determining a direction of the tube yarn based on the captured image; and c) displaying the determined direction of the tube yarn. The reliability of the image features is evaluated based on their stability in adversarial verification, comprising: the intensity and quantity of the slight perturbation are determined based on the image quality score of the real-time image and the neighborhood density of the image features in the feature space; the determined slight perturbation is added to the real-time image, to generate a plurality of perturbed images, and perturbed image features are extracted from each of the perturbed images; the reliability of the image features is evaluated by calculating the degree of difference between each of the perturbed image features and the original image features.
4. The tube yarn direction detection method based on image visual recognition technology according to claim 3, characterized in that: The image features are enhanced and transformed based on the confidence levels, to obtain a plurality of enhanced image features, comprising: first-type image features with a confidence level higher than a preset high threshold are subjected to first-type enhancement transformation; the first-type enhancement transformation is a random perturbation within a first intensity range applied to the image features in the feature space; For the second type of image features with the confidence lower than the preset low threshold, a second type of enhancement transformation is applied; the second type of enhancement transformation is a random perturbation in a second intensity range applied to the image features in the feature space, and the lower limit of the second intensity range is greater than the upper limit of the first intensity range; The original image features are generated into the enhanced image features through the random perturbation.
5. A system for detecting the direction of a cone yarn based on image visual recognition technology, characterized in that, The system comprises: A model construction unit pre-constructs a special model library comprising a plurality of target detection models, each of which is trained using a corresponding set of special image data; wherein the yarn head morphological features and the cheese background features corresponding to each special image data are similar; A feature enhancement processing unit acquires a real-time image of a cheese to be tested, extracts image features and their confidence from the real-time image, the image features including yarn head morphological features and cheese background features; and performs enhancement transformation processing on the image features according to the confidence to obtain a plurality of enhanced image features; A model matching unit matches a plurality of related target detection models from the special model library according to the enhanced image features, and forms a dynamic composite model based on each target detection model; An identification and reasoning unit processes the real-time image using the dynamic composite model to obtain a predicted bounding box of the yarn head region, and determines the direction of the cheese according to the position of the predicted bounding box in the real-time image; The feature enhancement processing unit is configured to: evaluate the significance of the image features based on their degree of aggregation in the feature space, which is determined by calculating the distance between the image features and the clustering center of similar features; and evaluate the reliability of the image features based on their stability in adversarial verification, which is determined by calculating the degree of change in the image features after adding a slight perturbation to the real-time image; The confidence of the image features is calculated based on the weighted combination of the significance and the reliability.
6. The system for detecting the direction of the cheese according to claim 5, wherein: The model construction unit is configured to: collect cheese images that meet the quantity condition, and classify all cheese images according to yarn head morphological features and cheese background features; wherein the yarn head morphological features include yarn head pressed into the yarn layer, naturally hanging or arbitrarily attached to the surface of the cheese; and the cheese background features include different lighting conditions and surface textures of the cheese; group cheese images with similar yarn head morphological features and similar cheese background features into a group to form a set of special image data, and train a target detection model using the set of special image data.
7. The system for detecting the direction of the cheese according to claim 6, characterized in that: The feature enhancement processing unit is further configured to: determine the intensity and number of slight perturbations based on the image quality score of the real-time image and the neighborhood density of the image features in the feature space; add the determined slight perturbations to the real-time image to generate a plurality of perturbed images, and extract perturbed image features from each of the perturbed images; evaluate the reliability of the image features by calculating the degree of difference between each of the perturbed image features and the original image features.
8. The system for detecting the direction of the cheese according to claim 7, characterized in that: The feature enhancement processing unit is further configured to: apply a first type of enhancement transformation to the first type of image features whose confidence is higher than a preset high threshold; the first type of enhancement transformation is random disturbance in a first intensity range applied to the image features in the feature space; apply a second type of enhancement transformation to the second type of image features whose confidence is lower than a preset low threshold; the second type of enhancement transformation is random disturbance in a second intensity range applied to the image features in the feature space, and a lower limit of the second intensity range is greater than an upper limit of the first intensity range; generate the several enhanced image features from the original image features through the random disturbance.
Citation Information
Patent Citations
Deep learning-based cone yarn defect image classification method
CN116823718A
Cone yarn head positioning method, system and equipment and storage medium
CN117522985A