Knitted fabric pattern defect detection method and device
By obtaining the production parameters of knitted fabrics to identify defect patterns and selecting appropriate defect detection models for detection, the problems of inefficiency and insufficient accuracy of traditional detection methods are solved, and more efficient and reliable defect detection is achieved.
Patent Information
- Application Number
- CN202510291844.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-12
- Publication Date
- 2025-05-13
AI Technical Summary
Traditional knitted fabric pattern defect detection methods are inefficient and are susceptible to subjective factors. It is difficult to ensure the consistency and accuracy of the detection, and it is impossible to fully evaluate the potential defect risks.
By obtaining the production parameters of knitted fabrics, including equipment parameters, environmental parameters and yarn parameters, possible defect patterns are identified and tested based on the corresponding defect detection model. This method monitors production parameters in real time, combines historical data analysis, and selects the most appropriate defect detection model to improve detection accuracy.
It significantly improves the accuracy and reliability of defect detection results, provides a more comprehensive defect risk assessment, ensures the professionalism and efficiency of quality control, and improves the level of product quality management.
Smart Images

Figure CN119985505A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of textile detection, and in particular to a method and a device for detecting pattern defects of knitted fabrics. Background Art
[0002] In the production of knitted fabrics, ensuring product quality is of vital importance. However, various defect modes may occur due to variations in the state of production equipment, environmental conditions, and the quality of raw materials such as yarn.
[0003] Traditional quality control methods mainly rely on manual inspection, or manually selecting a certain image processing model and then performing automated defect detection. This method is not only inefficient, but also easily affected by subjective factors, making it difficult to ensure the consistency and accuracy of detection.
[0004] In addition, appearance-based defect detection methods often focus on directly analyzing fabric images or using fixed thresholds to determine whether defects exist, which cannot fully assess potential defect risks. Summary of the invention
[0005] The embodiments of the present invention provide a method and a device for detecting pattern defects of knitted fabrics, so as to solve the problem of detecting pattern defects of knitted fabrics.
[0006] In a first aspect, an embodiment of the present invention provides a method for detecting pattern defects of a knitted fabric, comprising: Obtaining production parameters of target knitted fabrics; wherein the production parameters include equipment parameters, environmental parameters and yarn parameters; Based on the production parameters and the production parameter ranges corresponding to each defect mode, possible defect modes of the target knitted fabric are identified; Defect detection of the target knitted fabric is performed based on the defect detection model corresponding to the defect pattern to obtain the defect detection result of the target knitted fabric.
[0007] In a possible implementation, before identifying possible defect modes of the target knitted fabric based on the production parameters and the production parameter ranges corresponding to the defect modes, the method further includes: Obtain defect patterns and production parameters for multiple knitted fabrics; Based on the defect mode of each knitted fabric, the production parameters of each knitted fabric are classified, and the production parameter range corresponding to each defect mode is determined.
[0008] In a possible implementation, based on the defect mode of each knitted fabric, the production parameters of each knitted fabric are classified, and the range of production parameters corresponding to each defect mode is determined, including: For each defect mode, the production parameters of each knitted fabric with the defect mode are analyzed attribution, and the type of production parameters related to the defect mode is determined and used as the relevant production parameters of the defect mode; For each defect mode, relevant production parameters of each knitted fabric with the defect mode are clustered to obtain the relevant production parameter range corresponding to the defect mode.
[0009] In a possible implementation, based on the production parameters and the defect modes corresponding to the various production parameters, the possible defect modes of the target knitted fabric are identified, including: For each relevant production parameter range, the difference between the production parameter and each production parameter in the relevant production parameter range is calculated, and a weighted sum is performed to obtain the similarity between the production parameter and the relevant production parameter range; The defect mode corresponding to the relevant production parameter range with a similarity greater than a preset threshold is regarded as the possible defect mode of the target knitted fabric.
[0010] In a possible implementation, before performing defect detection on the target knitted fabric based on the defect detection model corresponding to the defect pattern to obtain the defect detection result of the target knitted fabric, the method further includes: Multiple defect detection models are used to perform defect detection on multiple knitted fabrics with different defect modes, and multiple defect detection results corresponding to each defect mode are obtained; Determining scores of various defect detection models based on multiple defect detection results corresponding to each defect mode and defect modes applicable to various defect detection models; For each defect mode, a defect detection model corresponding to the defect mode is determined based on the scores of various defect detection models.
[0011] In a possible implementation, based on multiple defect detection results corresponding to each defect mode and defect modes applicable to various defect detection models, scores of various defect detection models are determined, including: Based on multiple defect detection results corresponding to each defect mode, determine the accuracy of the first defect detection model in performing defect detection on each defect mode; wherein the first defect detection model is any defect detection model; Based on the preset weights corresponding to the defect modes, the accuracy of the first defect detection model in defect detection of each defect mode is weighted and summed to obtain a score of the first defect detection model.
[0012] In a possible implementation, for each defect mode, a defect detection model corresponding to the defect mode is determined based on the scores of various defect detection models, including: The defect detection model with the highest score among various defect detection models applicable to the second defect mode is used as the defect detection model corresponding to the second defect mode; wherein the second defect mode is any defect mode.
[0013] In a second aspect, an embodiment of the present invention provides a knitted fabric pattern defect detection device, comprising: A parameter acquisition module is used to acquire production parameters of the target knitted fabric; wherein the production parameters include equipment parameters, environmental parameters and yarn parameters; A pattern recognition module, for identifying possible defect patterns of a target knitted fabric based on production parameters and production parameter ranges corresponding to each defect pattern; The defect detection module is used to perform defect detection on the target knitted fabric based on the defect detection model corresponding to the defect pattern to obtain the defect detection result of the target knitted fabric.
[0014] In a third aspect, an embodiment of the present invention provides a terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the first aspect or any possible implementation method of the first aspect are implemented.
[0015] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the first aspect or any possible implementation method of the first aspect.
[0016] The embodiment of the present invention provides a method and device for detecting pattern defects of knitted fabrics. By collecting and analyzing equipment parameters, environmental parameters and yarn parameters, it is possible to have a more comprehensive understanding of factors that may affect product quality in the production process, thereby achieving more accurate defect prediction; real-time monitoring of production parameters and comparison with a preset defect mode production parameter range to determine possible defect modes, and selecting the most appropriate defect detection model according to the characteristics of different defect modes, thereby ensuring the professionalism and efficiency of the detection process, significantly improving the accuracy and reliability of the detection results, providing new ideas and technical means for the quality control of knitted fabrics, effectively solving the limitations of traditional methods, and greatly improving the level of product quality management. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0018] Figure 1 This is a flow chart of a method for detecting pattern defects of knitted fabrics provided by an embodiment of the present invention; Figure 2 It is a structural schematic diagram of a knitted fabric pattern defect detection device provided by an embodiment of the present invention; Figure 3 is a schematic diagram of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0019] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.
[0020] In order to make the purpose, technical solutions and advantages of the present invention more clear, specific embodiments will be described below in conjunction with the accompanying drawings.
[0021] See also Figure 1 , which shows a flow chart of a method for detecting pattern defects of knitted fabrics provided by an embodiment of the present invention, and is described in detail as follows: Step 101, obtaining production parameters of the target knitted fabric; wherein the production parameters include equipment parameters, environmental parameters and yarn parameters; In this embodiment, the equipment parameters refer to various operating conditions and states involved in the production process of the textile machinery, such as machine speed, temperature, humidity, tension, etc. These parameters directly affect the quality of the fabric.
[0022] Environmental parameters refer to environmental factors within the production workshop, such as temperature and humidity, dust levels, static electricity, etc. Proper environmental conditions are essential to maintaining product quality.
[0023] Yarn parameters can include physical characteristics of the yarn, such as thickness, strength, color, etc. Yarn quality is one of the foundations that determine the quality of the final product.
[0024] By installing sensors on textile machinery, key parameters such as machine speed, tension, temperature, humidity, etc. can be collected in real time. Environmental sensors are used to monitor environmental factors such as temperature and humidity, dust levels, and static electricity in the production workshop. The basic properties of the yarn are recorded, including but not limited to yarn type, thickness, color, and supplier information. This can be automatically entered into the system through barcodes or RFID tags. By analyzing these data, it is possible to identify which parameter changes may cause product quality problems, so that targeted measures can be taken to optimize the production process.
[0025] Step 102, identifying possible defect modes of the target knitted fabric based on the production parameters and the production parameter ranges corresponding to the defect modes; In this embodiment, data analysis tools (such as Pandas and NumPy libraries in Python) can be used to perform statistical analysis on historical production data, and the association between different defect patterns and specific production parameter values obtained through historical data analysis can be analyzed. For example, a certain type of broken wire defect may be related to excessive machine speed or improper yarn tension.
[0026] According to the known relationship between the defect mode and the production parameters, the possible defect types of the target knitted fabric can be determined according to the production parameters of the target knitted fabric.
[0027] Step 103: perform defect detection on the target knitted fabric based on the defect detection model corresponding to the defect pattern to obtain a defect detection result of the target knitted fabric.
[0028] In this embodiment, an algorithm model based on machine learning or deep learning technology is specifically used to identify specific types of defects. Based on the defect detection models corresponding to various defect patterns, the most suitable detection model for the current predicted defect pattern can be selected to perform a detailed inspection of the knitted fabric and output the detection results, ensuring the high reliability and professionalism of the detection results.
[0029] By collecting and analyzing equipment parameters, environmental parameters and yarn parameters, the embodiments of the present invention can more comprehensively understand the factors that may affect product quality in the production process, thereby achieving more accurate defect prediction; real-time monitoring of production parameters and comparison with a preset defect mode production parameter range to determine possible defect modes, and selecting the most appropriate defect detection model according to the characteristics of different defect modes, thereby ensuring the professionalism and efficiency of the detection process, significantly improving the accuracy and reliability of the detection results, providing new ideas and technical means for the quality control of knitted fabrics, effectively solving the limitations of traditional methods, and greatly improving the level of product quality management.
[0030] In a possible implementation, before identifying possible defect modes of the target knitted fabric based on the production parameters and the production parameter ranges corresponding to the defect modes, the method further includes: Obtain defect patterns and production parameters for multiple knitted fabrics; Based on the defect mode of each knitted fabric, the production parameters of each knitted fabric are classified, and the production parameter range corresponding to each defect mode is determined.
[0031] In this embodiment, the defect mode refers to various quality problems or abnormal conditions that may occur during the production of knitted fabrics, such as misplaced stitches, missing stitches, thread breakage, color difference, etc. These defects will affect the appearance and performance of the fabrics.
[0032] Through the defect patterns and production parameters of multiple knitted fabrics, historical data can be used to establish the relationship between different defect patterns and production parameters, and based on this, the defect patterns that may appear in new production batches can be predicted. After determining the production parameter range corresponding to each defect pattern, the production process can be monitored in real time based on this relationship, or quality defect detection can be performed on past batches of knitted fabrics.
[0033] In a possible implementation, based on the defect mode of each knitted fabric, the production parameters of each knitted fabric are classified, and the range of production parameters corresponding to each defect mode is determined, including: For each defect mode, the production parameters of each knitted fabric with the defect mode are analyzed attribution, and the type of production parameters related to the defect mode is determined and used as the relevant production parameters of the defect mode; For each defect mode, relevant production parameters of each knitted fabric with the defect mode are clustered to obtain the relevant production parameter range corresponding to the defect mode.
[0034] In this embodiment, attribution analysis is a statistical method used to determine which factors or variables contribute to a specific result and to what extent. In the context of knitted fabric pattern defect detection, attribution analysis aims to identify the relationship between the types of production parameters (such as equipment parameters, environmental parameters, and yarn parameters) and product defect patterns.
[0035] Based on the attribution analysis results, relevant production parameters are clustered to find out the reasonable range of these parameters, thereby defining a reasonable production parameter interval for each defect mode.
[0036] For example, suppose a knitting mill wants to reduce the "missing stitch" defect in its products. The steps for the relevant production parameter range corresponding to this defect mode can be as follows: Step 1: Obtain defect patterns and production parameters for multiple knitted fabrics Collect data from multiple knitted fabric samples produced in the past few months, especially those marked with "missing stitches" defects. Record the production parameters of each sample, including machine speed, needle bed condition, yarn tension, workshop temperature and humidity, etc.
[0037] Step 2: Attribution Analysis Using attribution analysis methods (such as Shapley value, LIME, etc.), all samples marked as "missing flowers" are analyzed to determine which production parameters are significantly related to this defect mode. For example, it is found that when the machine speed is too high and the needle bed pressure is insufficient, the phenomenon of missing flowers is prone to occur.
[0038] Step 3: Cluster analysis Perform cluster analysis (such as K-means clustering) on the relevant production parameters of all "missing flower" defect samples. This step can help identify the typical production parameter combinations that lead to missing flowers and determine the ideal range of these parameters. For example, through cluster analysis, it is found that "missing flower" defects most often occur when the machine speed exceeds a certain threshold and the needle bed pressure is below a certain level.
[0039] In a possible implementation, based on the production parameters and the defect modes corresponding to the various production parameters, the possible defect modes of the target knitted fabric are identified, including: For each relevant production parameter range, the difference between the production parameter and each production parameter in the relevant production parameter range is calculated, and a weighted sum is performed to obtain the similarity between the production parameter and the relevant production parameter range; The defect mode corresponding to the relevant production parameter range with a similarity greater than a preset threshold is regarded as the possible defect mode of the target knitted fabric.
[0040] In this embodiment, the similarity between the production parameters of the target knitted fabric and the production parameter range corresponding to the known defect mode can be used to predict the possible defect mode of the target knitted fabric. The weight of each production parameter and the preset threshold value can be set according to the influence of each parameter on the final defect.
[0041] Suppose a knitting factory wants to reduce the "color difference" defect in its products. Here is a specific implementation plan: Step 1: Obtain defect patterns and production parameters for multiple knitted fabrics Collect data from multiple knitted fabric samples produced in the past few months, especially those marked with a defect called “color difference.” Record the production parameters for each sample, including machine speed, dye formula, workshop temperature and humidity, etc.
[0042] Step 2: Attribution Analysis Using attribution analysis methods (such as Shapley value, LIME, etc.), all samples marked as "color difference" are analyzed to determine which production parameters are significantly related to this defect mode. For example, it is found that color difference is prone to occur when the dye concentration is uneven or the workshop humidity is high.
[0043] Step 3: Define relevant production parameter ranges Based on the attribution analysis results, define the relevant production parameter ranges that lead to the "color difference" defect. For example, the dye concentration should be within a certain range and the workshop humidity should be below a certain level.
[0044] Step 4: Similarity calculation For a new batch of target knitted fabrics, the difference between its production parameters and each parameter in the relevant production parameter range defined above is calculated, and a weighted sum is performed to obtain the similarity.
[0045] Step 5: Defect pattern recognition If the calculated similarity is greater than a preset threshold (e.g. 0.8), it is considered that the current production conditions may cause the "color difference" defect. Based on this, a defect detection model applicable to the "color difference" defect can be used to perform targeted defect detection on the target knitted fabric.
[0046] In a possible implementation, before performing defect detection on the target knitted fabric based on the defect detection model corresponding to the defect pattern to obtain the defect detection result of the target knitted fabric, the method further includes: Multiple defect detection models are used to perform defect detection on multiple knitted fabrics with different defect modes, and multiple defect detection results corresponding to each defect mode are obtained; Determining scores of various defect detection models based on multiple defect detection results corresponding to each defect mode and defect modes applicable to various defect detection models; For each defect mode, a defect detection model corresponding to the defect mode is determined based on the scores of various defect detection models.
[0047] In this embodiment, the defect detection result refers to the information output by the model after analyzing a specific knitted fabric sample, which usually includes the location, type and severity of the defect. Each defect detection model may be good at detecting certain specific types of defect patterns. For example, a model may perform well in detecting "broken thread", while another model is more suitable for detecting "color difference". The score of the defect detection model is the result of a quantitative evaluation of the performance of the model on a specific defect pattern. The higher the score, the more accurate and reliable the model is in detecting a specific type of defect, and the more applicable it is to a variety of defect patterns.
[0048] Through the multi-model comparison and scoring mechanism, the most suitable defect detection model can be selected for each defect mode, so that in the subsequent defect detection process, it can be directly called according to the possible defect mode.
[0049] Suppose a knitting factory wants to optimize its product quality control process and reduce the occurrence of common defects. The following is a specific implementation plan: Step 1: Data preparation Collect data from multiple knitted fabric samples produced in the past few months, especially those that are marked with different defect modes (such as "broken thread", "missing stitch", "color difference").
[0050] Step 2: Defect Detection Three different defect detection models (such as ModelA, ModelB and ModelC) are used to perform defect detection on these samples respectively, and the detection results of each model for each sample are recorded.
[0051] Step 3: Scoring Mechanism The score of each model is calculated based on the multiple defect detection results corresponding to each defect mode. The score can be calculated based on indicators such as the model's precision, recall, or F1 score. For example, for the "broken wire" defect mode: ModelA scores 0.9 (high precision and recall) ModelB has a score of 0.5 (lower recall) Model C has a score of 0.85 (higher accuracy) For the "missing flower" and "color difference" defect modes, repeat the above process and calculate the score of each model.
[0052] Step 4: Model selection For each defect mode, the model with the highest score is selected as the best detection model for that defect mode. For example: The best detection model for the "broken wire" defect mode is ModelA (highest score) The best detection model for the "leaking flower" defect mode is Model A or B (depending on the specific score) The best detection model for the "color difference" defect mode is Model B or C In a possible implementation, based on multiple defect detection results corresponding to each defect mode and defect modes applicable to various defect detection models, scores of various defect detection models are determined, including: Based on multiple defect detection results corresponding to each defect mode, determine the accuracy of the first defect detection model in performing defect detection on each defect mode; wherein the first defect detection model is any defect detection model; Based on the preset weights corresponding to the defect modes, the accuracy of the first defect detection model in defect detection of each defect mode is weighted and summed to obtain a score of the first defect detection model.
[0053] In this embodiment, accuracy is a measure of the performance of the defect detection model on a specific defect mode, usually evaluated by precision, recall or F1 score. Preset weights are a way to quantify the importance of different defect modes. Different defect modes may have different impacts on product quality, so different weight values are assigned.
[0054] By evaluating the performance of each defect detection model from multiple dimensions and calculating a comprehensive score based on the weight of each defect mode, we can find the best detection model for each defect mode and try to select an "all-round" model that can perform well on multiple defect modes.
[0055] Suppose a knitting factory wants to optimize its product quality control process and reduce the occurrence of common defects. The following is a specific implementation plan: Step 1: Data preparation Collect data from multiple knitted fabric samples produced in the past few months, especially those that are marked with different defect modes (such as "broken thread", "missing stitch", "color difference").
[0056] Step 2: Defect Detection Three different defect detection models (such as ModelA, ModelB and ModelC) are used to perform defect detection on these samples respectively, and the detection results of each model for each sample are recorded.
[0057] Step 3: Accuracy Assessment For each defect mode, evaluate the accuracy of each defect detection model. For example, for the "Broken Wire" defect mode: ModelA has a precision of 0.95, a recall of 0.90, and an F1 score of 0.92 Model B has a precision of 0.80, a recall of 0.75, and an F1 score of 0.77 Model C has a precision of 0.92, a recall of 0.88, and an F1 score of 0.90 Step 4: Preset weights Set the weight according to the impact of each defect mode on product quality. For example: The weight of the "broken wire" defect mode is 0.4 The weight of the "leaking flower" defect mode is 0.3 The "color difference" defect mode weight is 0.3 Step 5: Weighted summation The F1 scores of each defect detection model on each defect mode are weighted and summed to obtain the comprehensive score of the model. For example, for ModelA: The F1 score of the "broken wire" defect mode is 0.92, the weight is 0.4, and the contribution is 0.92*0.4=0.368 The F1 score of the "leaking flower" defect mode is 0.85, the weight is 0.3, and the contribution is 0.85*0.3=0.255 The F1 score of the "color difference" defect mode is 0.70, the weight is 0.3, and the contribution is 0.70*0.3=0.210 The overall score is: 0.368+0.255+0.210=0.833 Repeat the above process for ModelB and ModelC and calculate their respective comprehensive scores.
[0058] In a possible implementation, for each defect mode, a defect detection model corresponding to the defect mode is determined based on the scores of various defect detection models, including: The defect detection model with the highest score among various defect detection models applicable to the second defect mode is used as the defect detection model corresponding to the second defect mode; wherein the second defect mode is any defect mode.
[0059] In this embodiment, all models are grouped and evaluated according to different defect modes. For each defect mode, only those models that support this defect mode are considered. Within each group, the models are sorted according to the comprehensive scores calculated in the previous embodiment, and the model with the highest comprehensive score is selected as the best model for this defect mode.
[0060] Thereafter, in the process of defect detection of the target knitted fabric, the production parameters are input into the system, and the defect detection model with the highest score is selected for detection. For example, if Model A has the highest comprehensive score, Model A is used for defect detection.
[0061] This approach not only selects the most appropriate model for each specific defect mode, but also ensures that an optimized defect detection solution is used throughout the production process. This approach emphasizes the importance of data-driven decision making and shows how quantitative analysis can be used to solve practical problems.
[0062] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0063] The following is an embodiment of the device of the present invention. For details not described in detail therein, reference may be made to the corresponding method embodiment described above.
[0064] Figure 2A schematic diagram of the structure of a knitted fabric pattern defect detection device provided by an embodiment of the present invention is shown. For the sake of convenience, only the parts related to the embodiment of the present invention are shown, which are described in detail as follows: like Figure 2 As shown, a knitted fabric pattern defect detection device 2 comprises: The parameter acquisition module 21 is used to acquire the production parameters of the target knitted fabric; wherein the production parameters include equipment parameters, environmental parameters and yarn parameters; A pattern recognition module 22, for identifying possible defect patterns of the target knitted fabric based on the production parameters and the production parameter ranges corresponding to the defect patterns; The defect detection module 23 is used to perform defect detection on the target knitted fabric based on the defect detection model corresponding to the defect pattern to obtain the defect detection result of the target knitted fabric.
[0065] In a possible implementation, the pattern recognition module 22 is further configured to: Before identifying possible defect modes of the target knitted fabric based on the production parameters and the production parameter ranges corresponding to the respective defect modes, obtaining defect modes and production parameters of a plurality of knitted fabrics; Based on the defect mode of each knitted fabric, the production parameters of each knitted fabric are classified, and the production parameter range corresponding to each defect mode is determined.
[0066] In a possible implementation, the pattern recognition module 22 is specifically used for: For each defect mode, the production parameters of each knitted fabric with the defect mode are analyzed attribution, and the type of production parameters related to the defect mode is determined and used as the relevant production parameters of the defect mode; For each defect mode, relevant production parameters of each knitted fabric with the defect mode are clustered to obtain the relevant production parameter range corresponding to the defect mode.
[0067] In a possible implementation, the pattern recognition module 22 is specifically used for: For each relevant production parameter range, the difference between the production parameter and each production parameter in the relevant production parameter range is calculated, and a weighted sum is performed to obtain the similarity between the production parameter and the relevant production parameter range; The defect mode corresponding to the relevant production parameter range with a similarity greater than a preset threshold is regarded as the possible defect mode of the target knitted fabric.
[0068] In a possible implementation, the defect detection module 23 is further configured to: Before performing defect detection on a target knitted fabric based on a defect detection model corresponding to the defect pattern to obtain a defect detection result of the target knitted fabric, multiple defect detection models are used to perform defect detection on multiple knitted fabrics with different defect patterns to obtain multiple defect detection results corresponding to each defect pattern; Determining scores of various defect detection models based on multiple defect detection results corresponding to each defect mode and defect modes applicable to various defect detection models; For each defect mode, a defect detection model corresponding to the defect mode is determined based on the scores of various defect detection models.
[0069] In a possible implementation, the defect detection module 23 is specifically used to: Based on multiple defect detection results corresponding to each defect mode, determine the accuracy of the first defect detection model in performing defect detection on each defect mode; wherein the first defect detection model is any defect detection model; Based on the preset weights corresponding to the defect modes, the accuracy of the first defect detection model in defect detection of each defect mode is weighted and summed to obtain a score of the first defect detection model.
[0070] In a possible implementation, the defect detection module 23 is specifically used to: The defect detection model with the highest score among various defect detection models applicable to the second defect mode is used as the defect detection model corresponding to the second defect mode; wherein the second defect mode is any defect mode.
[0071] By collecting and analyzing equipment parameters, environmental parameters and yarn parameters, the embodiments of the present invention can more comprehensively understand the factors that may affect product quality in the production process, thereby achieving more accurate defect prediction; real-time monitoring of production parameters and comparison with a preset defect mode production parameter range to determine possible defect modes, and selecting the most appropriate defect detection model according to the characteristics of different defect modes, thereby ensuring the professionalism and efficiency of the detection process, significantly improving the accuracy and reliability of the detection results, providing new ideas and technical means for the quality control of knitted fabrics, effectively solving the limitations of traditional methods, and greatly improving the level of product quality management.
[0072] Figure 3 is a schematic diagram of a terminal provided by an embodiment of the present invention. Figure 3 As shown, the terminal 3 of this embodiment includes: a processor 30, a memory 31, and a computer program 32 stored in the memory 31 and executable on the processor 30. When the processor 30 executes the computer program 32, the steps in each of the above-mentioned knitted fabric pattern defect detection method embodiments are implemented, for example Figure 1Alternatively, when the processor 30 executes the computer program 32, the functions of each module / unit in the above-mentioned device embodiments are implemented, for example Figure 2 Functions of modules / units 21 to 23 are shown.
[0073] Exemplarily, the computer program 32 may be divided into one or more modules / units, one or more modules / units are stored in the memory 31 and executed by the processor 30 to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program 32 in the terminal 3. For example, the computer program 32 may be divided into Figure 2 Modules / units 21 to 23 are shown.
[0074] The terminal 3 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal 3 may include, but is not limited to, a processor 30 and a memory 31. Those skilled in the art will appreciate that Figure 3 It is only an example of terminal 3 and does not constitute a limitation on terminal 3. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal may also include input and output devices, network access devices, buses, etc.
[0075] The processor 30 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0076] The memory 31 may be an internal storage unit of the terminal 3, such as a hard disk or memory of the terminal 3. The memory 31 may also be an external storage device of the terminal 3, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal 3. Further, the memory 31 may also include both an internal storage unit and an external storage device of the terminal 3. The memory 31 is used to store the computer program and other programs and data required by the terminal. The memory 31 may also be used to temporarily store data that has been output or is to be output.
[0077] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0078] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0079] 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, or a combination of computer software and electronic hardware. 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 the present invention.
[0080] In the embodiments provided by the present invention, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0081] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0082] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0083] If the integrated module / 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 computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of each of the above-mentioned knitted fabric pattern defect detection method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practices in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practices, computer-readable media does not include electrical carrier signals and telecommunication signals.
[0084] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A method for detecting pattern defects of knitted fabrics, characterized in that: include: Acquiring production parameters of the target knitted fabric; wherein the production parameters include equipment parameters, environmental parameters and yarn parameters; Based on the production parameters and the production parameter ranges corresponding to the defect modes, identifying possible defect modes of the target knitted fabric; Defect detection is performed on the target knitted fabric based on a defect detection model corresponding to the defect pattern to obtain a defect detection result of the target knitted fabric.
2. A method for detecting pattern defects in knitted fabrics according to claim 1, characterized in that: Before identifying possible defect modes of the target knitted fabric based on the production parameters and the production parameter ranges corresponding to the defect modes, the method further includes: Obtain defect patterns and production parameters for multiple knitted fabrics; Based on the defect mode of each knitted fabric, the production parameters of each knitted fabric are classified, and the production parameter range corresponding to each defect mode is determined.
3. A method for detecting pattern defects in knitted fabrics according to claim 2, characterized in that: The method of classifying the production parameters of each knitted fabric based on the defect mode of each knitted fabric and determining the range of production parameters corresponding to each defect mode includes: For each defect mode, the production parameters of each knitted fabric with the defect mode are analyzed attribution, and the type of production parameters related to the defect mode is determined and used as the relevant production parameters of the defect mode; For each defect mode, relevant production parameters of each knitted fabric with the defect mode are clustered to obtain the relevant production parameter range corresponding to the defect mode.
4. A method for detecting pattern defects in knitted fabrics according to claim 3, characterized in that: The identifying possible defect modes of the target knitted fabric based on the production parameters and the defect modes corresponding to the various production parameters includes: For each relevant production parameter range, calculating the difference between the production parameter and each production parameter in the relevant production parameter range, and performing weighted summation to obtain the similarity between the production parameter and the relevant production parameter range; The defect mode corresponding to the relevant production parameter range with a similarity greater than a preset threshold is taken as the possible defect mode of the target knitted fabric.
5. A method for detecting pattern defects in knitted fabrics according to claim 1, characterized in that: Before performing defect detection on the target knitted fabric based on the defect detection model corresponding to the defect pattern to obtain the defect detection result of the target knitted fabric, the method further includes: Multiple defect detection models are used to perform defect detection on multiple knitted fabrics with different defect modes, and multiple defect detection results corresponding to each defect mode are obtained; Determining scores of various defect detection models based on multiple defect detection results corresponding to each defect mode and defect modes applicable to various defect detection models; For each defect mode, a defect detection model corresponding to the defect mode is determined based on the scores of various defect detection models.
6. A method for detecting pattern defects in knitted fabrics according to claim 5, characterized in that: The step of determining scores of various defect detection models based on multiple defect detection results corresponding to each defect mode and defect modes applicable to various defect detection models includes: Based on multiple defect detection results corresponding to each defect mode, determine the accuracy of the first defect detection model in performing defect detection on each defect mode; wherein the first defect detection model is any defect detection model; Based on the preset weights corresponding to the defect modes, the accuracy of the first defect detection model in defect detection of each defect mode is weighted and summed to obtain a score of the first defect detection model.
7. A method for detecting pattern defects in knitted fabrics according to claim 5, characterized in that: The step of determining, for each defect mode, a defect detection model corresponding to the defect mode based on the scores of various defect detection models includes: The defect detection model with the highest score among various defect detection models applicable to the second defect mode is used as the defect detection model corresponding to the second defect mode; wherein the second defect mode is any defect mode.
8. A knitted fabric pattern defect detection device, characterized in that: include: A parameter acquisition module, used to acquire production parameters of the target knitted fabric; wherein the production parameters include equipment parameters, environmental parameters and yarn parameters; A pattern recognition module, used for identifying possible defect modes of the target knitted fabric based on the production parameters and the production parameter ranges corresponding to the defect modes; The defect detection module is used to perform defect detection on the target knitted fabric based on the defect detection model corresponding to the defect pattern to obtain a defect detection result of the target knitted fabric.
9. A terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method as claimed in any one of claims 1 to 7 are implemented.