Defect detection result processing method and system, medium and computer
The method addresses the limitations of existing systems by implementing stage rules for defect processing, enhancing flexibility and scalability in fabric defect detection, allowing for customized processing without model retraining.
Patent Information
- Application Number
- CN202411298864.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2024-12-13
AI Technical Summary
Existing fabric defect detection systems focus primarily on detection algorithms, neglecting post-processing technologies such as defect splicing, aggregation, and reclassification, leading to insufficient flexibility and scalability, which hinders their ability to meet the diverse needs of different factories with varying quality requirements.
A defect detection result processing method involving the construction of multiple stage rules, each containing group rules for sequential execution, including defect filtering, splicing, reclassification, and statistics, allowing for customizable and efficient defect processing without requiring model retraining.
Enhances the flexibility and scalability of defect detection systems by enabling tailored processing methods for different types of fabrics and factories, reducing implementation costs and improving detection accuracy and efficiency.
Smart Images

Figure CN119125181A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of defect detection, and more specifically, to a defect detection result processing method, system, medium and computer. Background Art
[0002] This patent relates to a fabric defect detection system based on AI algorithm. The system has broad application prospects in industrial applications and can effectively improve the quality control level of textiles. This type of quality inspection system based on image detection may not cover all defects due to the limited focus area of the camera. It is necessary to first detect the local defects and then splice multiple local defects into complete defects through post-processing. In addition, there are defects formed by the dispersion of a large number of unconnected small defects, such as weft shrinkage in pieces.
[0003] In existing technologies, people often only focus on defect detection algorithms, while ignoring the description of post-processing technologies such as defect splicing, aggregation, and reclassification. However, in the field of fabric defect detection, there are many types of defects, and different types of fabrics have different requirements for defect detection. At the same time, different factories also have different quality requirements for fabrics. If the post-processing logic lacks sufficient flexibility and scalability, it will be difficult for a system to meet the customized needs of different factories, making the entire system difficult to implement or the implementation cost too high. Summary of the invention
[0004] In view of the shortcomings of the prior art, the purpose of the present invention is to provide a defect detection result processing method, system, medium and computer to overcome the shortcomings of the prior art that the defect detection model only focuses on the detection algorithm and ignores the subsequent processing scheme, resulting in insufficient flexibility and scalability.
[0005] The above technical objectives of the present invention are achieved through the following technical solutions: A defect detection result processing method, applied to grey cloth defect detection, the method comprising:
[0006] S1. constructing a plurality of stage rules, each of which includes at least one group rule for execution;
[0007] S2, in response to the input of the defect detection result, determine whether the defect detection result satisfies the execution condition of any group rule of the first stage rules, if so, execute the group rule and execute step S3; if not, execute step S3;
[0008] S3. Determine whether there is a stage rule that has not been matched with the execution condition. If so, record the stage rule as the first stage rule and execute step S2; if not, terminate the execution and output the rule execution result of the first stage rule.
[0009] Optionally, the constructing of several stage rules specifically includes: constructing several stage rules arranged in sequence; before responding to the input of the defect detection result and judging whether the defect detection result satisfies the execution condition of any group rule of the first stage rule, it also includes: according to the arrangement of the several stage rules, recording the first stage rule in the arrangement as the first stage rule.
[0010] Optionally, the determining whether there is a stage rule that does not match the execution condition specifically includes: according to the order of the stage rules, determining whether a stage rule adjacent to the first stage rule does not match the execution condition.
[0011] Optionally, after executing the group of rules, the method further includes: stopping judging whether the defect detection result satisfies the execution conditions of the remaining group of rules of the first stage rules.
[0012] Optionally, the construction of several stage rules, each of which includes at least one group rule for execution, specifically includes: constructing first-stage rules, the first-stage rules include: defect filtering group rules and direct end group rules; constructing second-stage rules; the second-stage rules include: defect splicing group rules; constructing third-stage rules, the third-stage rules include: defect end group rules and defect reclassification group rules; constructing fourth-stage rules, the fourth-stage rules include: defect statistics group rules; constructing fifth-stage rules, the fifth-stage rules include: defect statistics end group rules; constructing sixth-stage rules, the sixth-stage rules include: defect lighting group rules.
[0013] Optionally, the group of rules includes: a rule name, a rule object, a rule condition, and an operation list; wherein the rule name is used to provide an identification function for the rule; the rule object is used to define the defect type associated with the rule; the rule condition is used to determine whether the defect meets the execution condition; and the operation list is used to define the operations to be performed when the rule condition meets the rule condition.
[0014] Optionally, the defect detection result includes a defect image and a defect identification type.
[0015] A defect detection result processing system, comprising:
[0016] A rule construction unit, used for constructing a plurality of stage rules, each of which includes at least one group rule for execution;
[0017] A conditional judgment unit, for responding to the input of the defect detection result, judging whether the defect detection result satisfies the execution condition of any group rule of the first stage rule, if so, executing the group rule and executing step S3; if not, executing step S3;
[0018] The result output unit is used to determine whether there is a stage rule that has not been matched with the execution condition. If so, the stage rule is recorded as the first stage rule and step S2 is executed; if not, the execution is terminated and the rule execution result of the first stage rule is output.
[0019] A computer-readable storage medium stores a computer program, which implements the steps of the above method when executed by a processor.
[0020] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0021] In summary, the present invention has the following beneficial effects: The present invention provides a defect detection result processing method, comprising: S1, constructing a plurality of stage rules, each of which includes at least one group rule for execution; S2, in response to the input of the defect detection result, judging whether the defect detection result satisfies the execution condition of any one group rule of the first stage rule, if so, executing the group rule and executing step S3; if not, executing step S3; S3, judging whether there is a stage rule that has not been matched with the execution condition, if so, recording the stage rule as the first stage rule, and executing step S2; if not, terminating the execution and outputting the rule execution result of the first stage rule; adopting the method of the present application, after the model detects and outputs the defect detection result, different processing methods can be matched for the defect based on different types of defects, and when defect identification is performed based on fabric type, the applicable scope of the defect detection result can be effectively improved, and the defect processing method of the present application does not need to modify the model or modify the code, which reduces the overly cumbersome process of the factory in the process of applying the model for defect detection, and helps the factory to achieve differentiated management. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 A flow chart of a defect detection result processing method of the present invention;
[0023] Figure 2 This is a structural diagram of a defect detection result processing system of the present invention;
[0024] Figure 3 is an internal structure diagram of a computer device in an embodiment of the present invention;
[0025] Figure 4 Schematic diagram of splicing grey cloth defects in an embodiment of the present invention.
[0026] In the figure: 1. Rule building unit; 2. Condition judgment unit; 3. Result output unit. DETAILED DESCRIPTION
[0027] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings. Several embodiments of the present invention are shown in the accompanying drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein.
[0028] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal connection of two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances. The terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features.
[0029] In the present invention, unless otherwise clearly specified and limited, the first feature being "above" or "below" the second feature may include the first and second features being in direct contact, or may include the first and second features being in contact not directly but through another feature between them. Moreover, the first feature being "above", "above" and "above" the second feature includes the first feature being directly above and obliquely above the second feature, or simply indicates that the first feature is higher in level than the second feature. The first feature being "below", "below" and "below" the second feature includes the first feature being directly below and obliquely below the second feature, or simply indicates that the first feature is lower in level than the second feature. The terms "vertical", "horizontal", "left", "right", "above", "below" and similar expressions are for illustrative purposes only, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the present invention.
[0030] The present invention is described in detail below in conjunction with the accompanying drawings and embodiments.
[0031] The present invention provides a defect detection result processing method, such as Figure 1 As shown, including:
[0032] S1. constructing a plurality of stage rules, each of which includes at least one group rule for execution;
[0033] S2, in response to the input of the defect detection result, determine whether the defect detection result satisfies the execution condition of any group rule of the first stage rules, if so, execute the group rule and execute step S3; if not, execute step S3;
[0034] S3. Determine whether there is a stage rule that has not been matched with the execution condition. If so, record the stage rule as the first stage rule and execute step S2; if not, terminate the execution and output the rule execution result of the first stage rule.
[0035] In practical applications, defects on grey fabrics are identified and detected by using an automatic detection robot, which includes a slider that can move laterally. The slider is equipped with a camera that can drive the slider to slide laterally to take photos of the grey fabric being woven, and the pre-trained deep learning model is used to identify and process the photos of the grey fabric so that the model can judge the defects on the grey fabric. If the model detects that there are some major defects on the grey fabric, it is necessary to stop weaving and turn on the indicator light to prompt the relevant staff to check the status of the textile machine, find out and solve the cause of the major defects on the textile machine, and ensure the smooth operation of the factory.
[0036] The existing deep learning models are highly targeted, and the models are all based on the photos taken by the camera for detection. In order to ensure the accuracy and high efficiency of image processing, the size of the photos needs to be controlled at a certain resolution, which will result in a smaller coverage of the photos, and the accuracy of the model judgment will be affected when the model identifies defects. The retraining model is inefficient and difficult to meet the production needs of the factory. The present application proposes a defect detection result processing method, which specifically includes: constructing a number of stage rules, each stage rule contains at least one group rule, and the stage rule is used for sequential execution. In the present application, the stage rules can be arbitrarily expanded or reduced to meet the needs of different types of grey cloth. The stage rules need to be executed one by one, that is, after the first stage rule is executed, the second, third, and fourth stage rules need to be executed in sequence. Each stage rule includes at least one group rule, which is used for conditional judgment and operation execution. In the present application, a more special group rule is also included, that is, the group rule is directly terminated. Its operation execution is that regardless of whether there are other rule stages behind, since the current defect detection result does not meet the target defect of the processing method, the current process is directly terminated and the next defect detection result is reprocessed.
[0037] To summarize, the present application proposes a defect detection result processing method that can be arbitrarily expanded or arbitrarily limited, so as to adjust the defect detection results, including splicing, statistics, reclassification, etc., to improve the accuracy of the defect detection results. It can also improve the scope of application of the factory's defect detection model and avoid the inefficiency caused by retraining the model.
[0038] Furthermore, the constructing of a plurality of stage rules specifically includes: constructing a plurality of stage rules that are sequentially arranged;
[0039] Before judging whether the defect detection result satisfies the execution condition of any group rule of the first stage rule in response to the input of the defect detection result, the method further includes:
[0040] According to the order of the plurality of stage rules, the first stage rule in the order is recorded as the first stage rule.
[0041] In practical applications, the stage rules are sorted in sequence and the first stage rule is set as the initial stage rule to ensure the orderliness and logic of the processing flow, and improve the standardization and systematicness of defect processing.
[0042] Furthermore, the determining whether there is a stage rule that has not been matched with the execution condition specifically includes:
[0043] According to the order of the plurality of stage rules, it is determined whether a stage rule adjacent to the first stage rule has not been matched with an execution condition.
[0044] In practical applications, by determining whether the stage rules adjacent to the first-stage rules have not matched the execution conditions, the processing flow is further refined to ensure that all stage rules are executed reasonably, avoid omissions or repeated processing, and improve the comprehensiveness of detection.
[0045] Further, after executing the group of rules, the method further includes:
[0046] Stop judging whether the defect detection result satisfies the execution conditions of the remaining groups of rules of the first stage rule.
[0047] In practical applications, after executing a group of rules, the execution conditions of the remaining group rules of the first stage are stopped to avoid unnecessary repeated calculations and processing, improve system efficiency and response speed, and enhance the real-time and practicality of the system.
[0048] Furthermore, the construction of several stage rules, each of which includes at least one group rule for execution, specifically includes:
[0049] Constructing the first stage rules, the first stage rules including: defect filtering group rules and direct termination group rules;
[0050] Constructing the second stage rules; the second stage rules include: defect splicing group rules;
[0051] Constructing third-stage rules, wherein the third-stage rules include: defect termination group rules and defect reclassification group rules;
[0052] Constructing the fourth stage rules, the fourth stage rules including: defect statistics group rules;
[0053] Constructing fifth-stage rules, the fifth-stage rules including: defect statistics end group rules;
[0054] The sixth stage rules are constructed, and the sixth stage rules include: defective lamp group rules.
[0055] In practical applications, the first stage includes defect filtering (filter) and direct end (directend); among them, defect filtering (filter): After the defects are detected, the filtering operation is performed first. This step aims to filter out defects that do not require further processing, such as some insignificant or minor flaws. By filtering out these unimportant defects, the burden on the system can be reduced and the detection efficiency can be improved. The filtering rules may be based on the size, shape, location or other characteristics of the defects. Direct end (directend): For some small defects, even if they are not filtered out, they can be directly marked as ended because of their small impact. After these small defects are detected, no subsequent splicing or processing is performed, and the processing is directly ended at the current stage. This step ensures that the system does not waste resources due to small defects.
[0056] The second stage includes defect joining; the system will join the currently detected defects with the previously unfinished defects. The joining rules are usually based on factors such as the relative position, similarity and time interval of the defects. By joining adjacent or related defects together, complex defect patterns can be better identified and described. For example, multiple adjacent small defects may constitute a larger defect, which can be accurately represented by joining.
[0057] The third stage includes: defect end and reclassification; defect end: after the splicing is completed, the system needs to decide whether to end the processing of the current defect. If the current defect meets certain conditions (such as reaching a certain size or duration), it can be marked as ended, indicating that the defect will no longer participate in subsequent splicing operations. This can prevent repeated processing and excessive splicing. Reclassification: Some defects may change their characteristics during splicing or other processing and need to be reclassified. For example, a small defect may become a larger or different type of defect after splicing. In this case, the system will reclassify the defects according to the new characteristics to ensure the accuracy and consistency of the defect type.
[0058] The fourth stage includes: defect statistics (stats); this step is used to perform detailed statistical analysis on defects that need to be counted. For example, for defects such as patch weft shrinkage that require density statistics, the system will calculate the density of adjacent weft defects. When these defects reach a certain density, they will be marked as patch weft shrinkage defects. This statistical analysis helps to identify large-scale or patch defects, thereby providing a more comprehensive quality assessment.
[0059] The fourth stage includes: defect statistics end (statsend); after the defect statistics are completed, it is necessary to clearly end the statistical process. This step marks the completion of the statistical stage and ensures that the statistical results are not interfered with by subsequent inspections or processing. After the statistics are completed, the system can generate a statistical report or store data for subsequent analysis and reference.
[0060] The sixth stage includes: defect lighting (light); the last step is to execute the defect lighting rule. When a defect of a certain type or severity is detected, the system will trigger a light event. This function is usually used to remind operators or perform automated processing. Through the light prompt, operators can find and handle key defects in time to prevent them from further affecting product quality.
[0061] Furthermore, the present application also provides examples for explaining the reclassification group rules:
[0062]
[0063] The meaning of the above code is that after the weft (No. 2) defect is completed, the retype group rule (that is, the reclassification group rule) will be triggered. If the length of the current weft defect is greater than 50 cm, further classification will be performed. The field and steps in the above configuration are parameters of the retype operation, which means that the average height (avg_h) of the current defect is taken and classified according to the gradient (steps). If the average height is greater than 0.3, the defect type is changed to defect No. 110, otherwise it is changed to defect No. 21.
[0064]
[0065]
[0066] The meaning of the above code is that after the weft (2) defect is completed, the stats group rule will be triggered. If the length of the current weft defect is less than 50 cm, it will be counted. The defectType in the above configuration is the parameter of the stats operation, which means that the current weft defect is counted into the statistical defects of type 350 and 380.
[0067] Furthermore, this application also provides examples of defect statistics items, specifically including:
[0068] ·Count the total number of all fabric defects counted;
[0069] sumW is the sum of the widths of all fabric defects counted;
[0070] maxW is the maximum width of all fabric defects counted;
[0071] minW is the minimum width of all fabric defects counted;
[0072] ·sumH is the sum of the heights of all counted fabric defects;
[0073] maxH is the maximum height of all fabric defects counted;
[0074] minH is the minimum height of all fabric defects counted;
[0075] avgW is the average width of all fabric defects counted;
[0076] avgH is the average height of all fabric defects counted.
[0077] Furthermore, the group of rules includes: a rule name, a rule object, a rule condition, and an operation list; wherein the rule name is used to provide an identification function for the rule; the rule object is used to define the defect type associated with the rule; the rule condition is used to determine whether the defect meets the execution condition; and the operation list is used to define the operations that need to be performed when the rule condition meets the rule condition.
[0078] In practical applications, such as Figure 4 As shown, since the object of the model detection is a small-sized picture, it is necessary to perform certain processing on the small-sized picture according to the detection result of the small-sized picture. In this application, it is mainly because the small-sized picture may not capture the defects completely, so it is difficult to accurately identify the size and type of the defects. After the small-sized pictures are spliced, it is necessary to re-judge the type of defects and count the number of defects, and trigger the relevant actions in the final stage rules, that is, the action of lighting up the alarm in this application. Therefore, in this application, for each group rule, it is necessary to specify the corresponding rule name, rule object, rule condition and operation list. When the corresponding group rule is referenced, the corresponding condition judgment can be performed, and the corresponding operation can be performed when the condition judgment is met. The structured rule design provides a clear rule management framework, which is conducive to the definition, understanding and execution of rules, and ensures the transparency and controllability of the detection process.
[0079] The rule conditions are implemented by logically combining multiple expressions. Only when the expression result is true can the subsequent specific operations be performed. For example:
[0080] cur.lngIdx<=60 means that the current defect warp round is less than or equal to 60.
[0081] cur.len()<2.5 means the length of the current defect is less than 2.5 cm.
[0082] cur.zone.w<10.0 means the width of the current defect is less than 10 cm.
[0083] cur.count(2)>=15 means that the number of latitudinal defects (No. 2) in the current statistical defects is greater than or equal to 15.
[0084] cur.lat_dis(pre)<1.0&&cur.lng_dis(pre)<1.0 means that the latitudinal distance and longitudinal distance between the current defect and the previous defect are both less than 1 cm.
[0085] ticket.curLng-cur.zone.t>150.0 means that the top coordinate of the current defect is more than 150 centimeters away from the current warp coordinate of the ticket.
[0086] cur.count(2)>=15&&(cur.count(2)>=25||cur.sum_w()>=40.0) means if the current statistical defects contain 15 or more weft (No. 2) defects and the current statistical defects contain 25 or more weft (No. 2) defects or the total defect width of the current statistical defects is greater than or equal to 40 cm.
[0087] Furthermore, this application also provides some expression variables and methods.
[0088] pre indicates that when traversing the previously unfinished list of fabric defects, it points to a fabric defect that has been traversed.
[0089] ·cur indicates that when traversing the list of cloth defects sent by the current thumbnail, it points to a cloth defect traversed.
[0090] Image indicates the thumbnail information currently being sent.
[0091] ·Ticket indicates the current ticket information.
[0092] ·edge indicates the current edge information.
[0093] lat_dis is the function for calculating the latitudinal distance of the defect.
[0094] lng_dis is the function for calculating the longitudinal distance of the defect.
[0095] ·Count, avg_h, max_h, sum_w represent the statistical functions of defects.
[0096] The action list is the operation to be performed after the rule conditions are successfully matched. All operations will be executed in sequence. The operation can be expanded according to business needs, for example:
[0097] Ignore means the current defect is ignored and discarded.
[0098] Join means joining the current defect with the previous defect.
[0099] ·end means the splicing of the current defect ends.
[0100] {"func":"stats","defectType":350} means that the current defect is counted as defect type 350.
[0101] {"func":"event","eventCode":1651} means the current defect triggers the event coded as 1651.
[0102] Furthermore, the defect detection result includes a defect image and a defect recognition type.
[0103] In practical applications, defect detection results include defect images and defect identification types, providing comprehensive detection information. Images provide intuitive visual evidence, and identification types provide quantitative and qualitative descriptions of defects, which are helpful for the accuracy of subsequent processing and decision-making. Furthermore, in order to distinguish the differences between defects, defects need to be coded and classified, among which defects mainly include the following three main categories: Small image defects: defects identified by the algorithm may be local defects on the fabric surface. It is necessary to splice the connected small images through this system to obtain complete fabric defects. Fabric defects: defects obtained by splicing small image defects represent the actual physical defects on the fabric surface. For example, warp (No. 1), weft (No. 2), loose edges, holes, stains, invisible weft shrinkage, broken double weft, jagged edges, long warp, long loose edges, large stains, etc. There are two states of fabric defects: splicing in progress and splicing completed. Statistical defects: new defects are combined by counting the defects that have been spliced. For example, piece weft shrinkage, continuous broken double weft, etc.
[0104] In summary, this application provides a defect detection result processing method based on expression rules. This solution is based on expressions, which greatly improves the flexibility of the rules and makes the expansion of the rules very easy. When it is implemented in the factory, you only need to adjust the rule configuration to meet the customized needs, avoiding code changes and OTA. The supporting cloud-based device management and configuration dynamic distribution capabilities can realize differentiated management of rules for large-scale equipment.
[0105] like Figure 2 As shown, the present invention also provides a defect detection result processing system, comprising:
[0106] A rule construction unit 1, used for constructing a plurality of stage rules, each of which includes at least one group rule for execution;
[0107] Condition judgment unit 2, for responding to the input of the defect detection result, judging whether the defect detection result satisfies the execution condition of any group rule of the first stage rule, if so, executing the group rule and executing step S3; if not, executing step S3;
[0108] The result output unit 3 is used to determine whether there is a stage rule that has not been matched with the execution condition. If so, the stage rule is recorded as the first stage rule and step S2 is executed; if not, the execution is terminated and the rule execution result of the first stage rule is output.
[0109] The specific definition of a defect detection result processing system can be found in the definition of a defect detection result processing method mentioned above, which will not be repeated here. Each module in the above-mentioned defect detection result processing system can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0110] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 3 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. When the computer program is executed by the processor, a defect detection result processing method is implemented.
[0111] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0112] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0113] S1. constructing a plurality of stage rules, each of which includes at least one group rule for execution;
[0114] S2, in response to the input of the defect detection result, determine whether the defect detection result satisfies the execution condition of any group rule of the first stage rules, if so, execute the group rule and execute step S3; if not, execute step S3;
[0115] S3. Determine whether there is a stage rule that has not been matched with the execution condition. If so, record the stage rule as the first stage rule and execute step S2; if not, terminate the execution and output the rule execution result of the first stage rule.
[0116] In one embodiment, the constructing of a plurality of phase rules specifically includes: constructing a plurality of phase rules that are sequentially arranged;
[0117] Before judging whether the defect detection result satisfies the execution condition of any group rule of the first stage rule in response to the input of the defect detection result, the method further includes:
[0118] According to the order of the plurality of stage rules, the first stage rule in the order is recorded as the first stage rule.
[0119] In one embodiment, the determining whether there is a stage rule that has not been matched with the execution condition specifically includes:
[0120] According to the order of the plurality of stage rules, it is determined whether a stage rule adjacent to the first stage rule has not been matched with an execution condition.
[0121] In one embodiment, after executing the group of rules, the method further includes:
[0122] Stop judging whether the defect detection result satisfies the execution conditions of the remaining groups of rules of the first stage rule.
[0123] In one embodiment, the construction of a plurality of phase rules, each of which includes at least one group rule for execution, specifically includes:
[0124] Constructing the first stage rules, the first stage rules including: defect filtering group rules and direct termination group rules;
[0125] Constructing the second stage rules; the second stage rules include: defect splicing group rules;
[0126] Constructing third-stage rules, wherein the third-stage rules include: defect termination group rules and defect reclassification group rules;
[0127] Constructing the fourth stage rules, the fourth stage rules including: defect statistics group rules;
[0128] Constructing fifth-stage rules, the fifth-stage rules including: defect statistics end group rules;
[0129] The sixth stage rules are constructed, and the sixth stage rules include: defective lamp group rules.
[0130] In one embodiment, the group rule includes: a rule name, a rule object, a rule condition, and an operation list;
[0131] Among them, the rule name is used to provide an identification function for the rule; the rule object is used to define the defect type associated with the rule; the rule condition is used to determine whether the defect meets the execution condition; and the operation list is used to define the operations that need to be performed when the rule condition meets the rule condition.
[0132] In one embodiment, the defect detection result includes a defect image and a defect identification type.
[0133] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0134] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0135] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. A defect detection result processing method, characterized in that: Applied to grey cloth defect detection, the method comprises: S1. constructing a plurality of stage rules, each of which includes at least one group rule for execution; S2, in response to the input of the defect detection result, determine whether the defect detection result satisfies the execution condition of any group rule of the first stage rules, if so, execute the group rule and execute step S3; if not, execute step S3; S3. Determine whether there is a stage rule that has not been matched with the execution condition. If so, record the stage rule as the first stage rule and execute step S2; if not, terminate the execution and output the rule execution result of the first stage rule.
2. A defect detection result processing method according to claim 1, characterized in that: The constructing of a plurality of stage rules specifically includes: constructing a plurality of stage rules arranged in sequence; Before judging whether the defect detection result satisfies the execution condition of any group rule of the first stage rule in response to the input of the defect detection result, the method further includes: According to the order of the plurality of stage rules, the first stage rule in the order is recorded as the first stage rule.
3. A defect detection result processing method according to claim 2, characterized in that: The determining whether there is a stage rule that has not been matched with the execution condition specifically includes: According to the order of the plurality of stage rules, it is determined whether a stage rule adjacent to the first stage rule has not been matched with an execution condition.
4. A defect detection result processing method according to claim 1, characterized in that: After executing the group of rules, the method further includes: Stop judging whether the defect detection result satisfies the execution conditions of the remaining groups of rules of the first stage rule.
5. A defect detection result processing method according to claim 1, characterized in that: The said constructing of a plurality of stage rules, each of which includes at least one group rule for execution, specifically includes: Constructing the first stage rules, the first stage rules including: defect filtering group rules and direct termination group rules; Constructing the second stage rules; the second stage rules include: defect splicing group rules; Constructing third-stage rules, wherein the third-stage rules include: defect termination group rules and defect reclassification group rules; Constructing the fourth stage rules, the fourth stage rules including: defect statistics group rules; Constructing fifth-stage rules, the fifth-stage rules including: defect statistics end group rules; The sixth stage rules are constructed, and the sixth stage rules include: defective lamp group rules.
6. A defect detection result processing method according to claim 5, characterized in that: The group rule includes: rule name, rule object, rule condition and operation list; Among them, the rule name is used to provide an identification function for the rule; the rule object is used to define the defect type associated with the rule; the rule condition is used to determine whether the defect meets the execution condition; and the operation list is used to define the operations that need to be performed when the rule condition meets the rule condition.
7. A defect detection result processing method according to claim 1, characterized in that: The defect detection result includes a defect image and a defect recognition type.
8. A defect detection result processing system, characterized in that: include: A rule construction unit, used for constructing a plurality of stage rules, each of which includes at least one group rule for execution; A conditional judgment unit, for responding to the input of the defect detection result, judging whether the defect detection result satisfies the execution condition of any group rule of the first stage rules, and if so, executing the group rule and executing step S3; If not satisfied, execute step S3; The result output unit is used to determine whether there is a stage rule that has not been matched with the execution condition. If so, the stage rule is recorded as the first stage rule and step S2 is executed; if not, the execution is terminated and the rule execution result of the first stage rule is output.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, 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.
