Cloth laser cutting method and system based on artificial intelligence and medium

Through the artificial intelligence-based fabric laser cutting method, the problems of inaccurate cutting of complex pattern fabrics are solved and efficient and accurate cutting and quality assurance are achieved.

CN119747907AInactive Publication Date: 2025-04-04GBOS LASER INC

Patent Information

Application Number
CN202411714371.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-04-04
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art is difficult to accurately cut fabrics with complex irregular patterns, and lacks an automated defect detection mechanism, resulting in low cutting quality and waste of fabric.

Method used

Using a cloth laser cutting method based on artificial intelligence, the cloth is detected by the sensing device, identification instructions are generated, and the image acquisition device is controlled to collect the cloth image, defect detection and pattern boundary recognition are performed based on the preset detection model, cutting paths are planned, and the laser performs the device to cut.

Benefits of technology

Accurate cutting of fabrics with complex patterns is achieved, cutting quality and efficiency is improved, fabric waste is reduced, and clothing quality is ensured through automated inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119747907A_ABST
    Figure CN119747907A_ABST
Patent Text Reader

Abstract

The invention discloses a cloth laser cutting method and system based on artificial intelligence and a medium, and the method comprises the steps that when a control device receives an identification instruction sent by a sensing device, an image collection device is controlled to collect a cloth image of to-be-cut cloth based on the identification instruction; the control device determines an effective cutting area of the to-be-cut cloth in the cloth image based on flaw detection of the cloth image, performs pattern boundary identification on the effective cutting area, determines to-be-cut boundaries of all to-be-cut patterns in the to-be-cut cloth, and plans a cutting path according to all the to-be-cut boundaries; and then the control device controls the laser execution device to cut each to-be-cut pattern in the to-be-cut cloth based on the cutting path. According to the invention, efficient and accurate cutting of each to-be-cut pattern is realized through the planned cutting path, and the quality of the cloth pattern obtained by cutting is ensured through flaw detection of the preset detection model before cutting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent manufacturing and processing technology, and in particular to a cloth laser cutting method, system and medium based on artificial intelligence. Background Art

[0002] With the improvement of living standards, the types of clothing styles, colors and patterns are becoming more and more diverse. The diversity of clothing styles, colors and patterns is closely related to the colors and patterns of fabrics, as well as the cutting, cutting and processing of fabrics. With the development of technology, the cutting of fabrics has evolved from traditional manual measurement and cutting after marking to automated cutting.

[0003] At present, the automatic cutting of fabrics is mainly used on large quantities of single-color fabrics, which are cut uniformly by designing cutting paths in the software system and controlling related execution tools. However, for fabrics with patterns, especially complex and irregular patterns, when they need to be cut according to the boundary lines of the patterns, it is easy to fail to cut accurately according to the boundary lines, resulting in low cutting quality and fabric waste. In addition, there is a lack of relevant automatic defect detection mechanisms. Although fabrics are inspected before being put into storage, the inspection is usually carried out by manual sampling and visual inspection, which is easy to miss. In addition, fabrics may be damaged when stored in the warehouse before cutting, such as insect bites, corrosion, etc. If such fabrics are cut and used for clothing production, the quality of subsequent clothing will inevitably be affected.

[0004] Therefore, how to accurately cut patterned fabrics and perform automated inspection before cutting to ensure cutting quality and clothing quality is one of the technical problems that need to be solved at present. Summary of the invention

[0005] The main purpose of the present invention is to provide a method, system and storage medium for fabric laser cutting based on artificial intelligence, aiming to solve the technical problems of how to accurately cut patterned fabrics and perform automatic detection before cutting.

[0006] To achieve the above-mentioned purpose, the present invention provides a cloth laser cutting method based on artificial intelligence, which is applied to a cloth laser cutting system based on artificial intelligence. The cloth laser cutting system includes a material laying platform, an image acquisition device, a laser execution device and a control device. The control device is communicatively connected with the execution device, the image acquisition device, and the sensor device on the material laying platform. The cloth laser cutting method includes:

[0007] When the sensing device detects that there is cloth to be cut on the material laying platform, it generates a recognition instruction and transmits it to the control device, and the control device controls the image acquisition device to acquire the cloth image of the cloth to be cut based on the recognition instruction;

[0008] The control device performs defect detection on the cloth image based on a preset detection model, and determines an effective cutting area of ​​the cloth to be cut in the cloth image based on the defect detection;

[0009] The control device performs pattern boundary recognition on the effective cutting area, determines the to-be-cut boundary of each to-be-cut pattern in the to-be-cut cloth in the cloth image, and plans a cutting path according to each to-be-cut boundary;

[0010] The control device controls the laser execution device based on the cutting path to cut each pattern to be cut in the cloth to be cut.

[0011] Preferably, the control device performs pattern boundary recognition on the effective cutting area, and the step of determining the to-be-cut boundary of each to-be-cut pattern in the to-be-cut cloth in the cloth image comprises:

[0012] The control device performs pattern edge detection on the effective cutting area to obtain edge pixel coordinate sets corresponding to each of the patterns to be cut, and performs the following steps for each edge pixel coordinate set:

[0013] Determining whether the edge pixel coordinate set matches a preset cutting coordinate set, and if so, generating the to-be-cut boundary based on the edge pixel coordinate set;

[0014] If the edge pixel coordinate set does not match the preset cutting coordinate set, a reference pattern template is established based on the preset cutting coordinate set, and the to-be-cut boundary is determined based on a first similarity value between the reference pattern template and the target to-be-cut pattern corresponding to the edge pixel coordinate set.

[0015] Preferably, the step of determining the boundary to be cut based on a first similarity value between the reference pattern template and the target pattern to be cut corresponding to the edge pixel coordinate set comprises:

[0016] Determine whether the first similarity value is greater than or equal to a preset similarity threshold, and if so, generate the to-be-cut boundary based on the reference pattern template;

[0017] If the first similarity value is less than a preset similarity threshold, rotating the reference pattern template multiple times based on a first preset angle to obtain multiple rotated reference patterns;

[0018] Generate a plurality of second similarity values ​​between the rotated reference patterns and the target pattern to be cut, perform difference calculation on each of the second similarity values ​​and a preset similarity threshold to obtain a difference calculation result, and generate the boundary to be cut according to each of the difference calculation results.

[0019] Preferably, the step of generating the to-be-cut boundary according to each of the difference operation results comprises:

[0020] Performing absolute value calculation on each difference calculation result to obtain multiple similarity absolute difference values;

[0021] Determine a minimum value among a plurality of the similarity absolute differences, and judge whether the difference result corresponding to the minimum value is a non-negative value, and if it is a non-negative value, generate the to-be-cut boundary based on the rotated reference image corresponding to the minimum value;

[0022] If the difference result corresponding to the minimum value is a negative value, determining a target rotation reference pattern corresponding to the minimum value among the multiple rotation reference patterns, and rotating the target rotation reference pattern multiple times based on a second preset angle to obtain multiple new rotation reference patterns;

[0023] Based on a plurality of new rotated reference patterns, a step of generating second similarity values ​​between the plurality of rotated reference patterns and the target pattern to be cut is performed until the difference result corresponding to the minimum value is a non-negative value.

[0024] Preferably, the step of the control device performing defect detection on the cloth image based on a preset detection model comprises:

[0025] The control device controls the filtering process of the cloth image to obtain a filtered image, and divides the filtered image to obtain a plurality of regular images, each of which contains an image of a pattern to be cut;

[0026] For each of the regular images, a feature vector of each pixel in the regular image is extracted based on a preset detection model, and a saliency value of each pixel is calculated based on the feature vector of each pixel. The calculation formula is:

[0027]

[0028] The regular image is converted into a grayscale image based on each of the saliency values, and a grayscale threshold of the grayscale image is determined, wherein the conversion formula of the grayscale image is:

[0029]

[0030] Where Si represents saliency, n represents the number of pixels, Ri represents the feature vector of the i-th pixel, |·| represents the modulus of the vector, and Gi represents the grayscale value of the i-th pixel in the grayscale image;

[0031] The grayscale value of each pixel in the grayscale image is compared with the grayscale threshold value to generate a comparison result, and defect detection is performed on the fabric image based on the comparison result.

[0032] Preferably, before the step of extracting the feature vector of each pixel in the regular image based on a preset detection model for each regular image, the step includes:

[0033] Acquire a large number of sample images, and divide the sample images into training sample images and verification sample images based on a preset ratio;

[0034] Iteratively training a preset initial model based on the training sample images, and when the iterative training reaches a preset number of times, verifying the preset initial model based on the verification sample images to obtain a verification result;

[0035] The loss function value of the preset initial model is calculated based on the verification result, and it is determined whether the loss function value is less than a preset threshold, wherein the calculation formula of the loss function value is:

[0036]

[0037] Among them, L represents the loss function value, α represents the color weight value of the preset initial model, M represents the number of verification sample images, ‖·‖ represents the modulus of the matrix, and x k represents the color feature matrix of the verification result corresponding to the kth verification sample image, x k0 represents the reference color feature matrix corresponding to the kth validation sample image, β represents the texture weight value of the preset initial model, and h k Represents the texture feature matrix of the verification result corresponding to the kth verification sample image, represents the transpose of the texture feature matrix, h k0 represents the reference color feature matrix corresponding to the kth verification sample image, represents the transpose of the reference color feature matrix;

[0038] If it is less than a preset threshold, the preset initial model is generated as a preset recognition model according to the loss function value;

[0039] If the loss function value is greater than a preset threshold, the model parameters of the preset initial model are updated, and for the preset initial model after the model parameters are updated, the step of iteratively training the preset initial model based on the training sample image is performed.

[0040] Preferably, the step of generating the preset initial model into a preset recognition model according to the loss function value comprises:

[0041] Find the historical loss function value generated by the previous preset number of iterative trainings, and fit the historical loss function value and the loss function value together into a function curve;

[0042] According to the function curve, determining whether the preset initial model converges, and if converged, generating the preset initial model as a preset recognition model;

[0043] If the preset initial model does not converge, the model parameters of the preset initial model are updated, and for the preset initial model after the model parameters are updated, the step of iteratively training the preset initial model based on the training sample images is performed.

[0044] Preferably, the step of planning a cutting path according to each of the boundaries to be cut comprises:

[0045] Determine the boundaries to be planned located at the edges of the effective cutting area among the boundaries to be cut, and perform the following steps for each boundary to be planned:

[0046] Determine the first boundary adjacent to the boundary to be planned in each boundary to be cut, and calculate the operation coefficient between the boundary to be planned and each first boundary, the calculation formula is:

[0047]

[0048] Among them, S j represents the operation coefficient between the boundary to be planned and the jth first boundary, p represents the number of first boundaries, G min (j) represents the function for calculating the shortest running time of the laser actuator from the boundary to be planned to the jth first boundary, δ min (j) represents a function for calculating the shortest cutting time for the laser actuator to cut the jth first boundary, u j Indicates the equalization coefficient corresponding to the running time and the cutting time;

[0049] Determine the minimum value of each of the operation coefficients, and find the second boundary corresponding to the minimum value of the coefficient in each of the first boundaries, and remove the boundary to be planned and the second boundary from each of the boundaries to be cut to obtain a new boundary to be cut;

[0050] The second boundary is used as a new boundary to be planned, and based on the new boundary to be planned and the new boundary to be cut, a step of determining a first boundary adjacent to the boundary to be planned in each boundary to be cut is performed until each boundary to be cut generates a corresponding minimum coefficient value;

[0051] The minimum values ​​of the coefficients are summed to generate an operation path coefficient corresponding to the boundary to be planned;

[0052] After each of the to-be-planned boundaries generates its own corresponding operation path coefficient, the operation path coefficients are compared to determine the minimum path coefficient among the operation path coefficients, and the operation path corresponding to the minimum path coefficient is used as the cutting path.

[0053] Furthermore, to achieve the above-mentioned purpose, the present invention also provides a cloth laser cutting system based on artificial intelligence, the cloth laser cutting system comprising a material laying platform, an image acquisition device, a laser execution device and a control device, the control device is communicatively connected with the execution device, the image acquisition device, and the sensor device on the material laying platform;

[0054] The control device includes a memory, a processor, a communication bus, and a control program stored in the memory:

[0055] The communication bus is used to realize the connection and communication between the processor and the storage;

[0056] The processor is used to execute the control program to implement the steps of the artificial intelligence-based cloth laser cutting method as described above.

[0057] Furthermore, to achieve the above-mentioned purpose, the present invention also provides a medium, which is a readable storage medium, on which a control program is stored, and when the control program is executed by a processor, the steps of the artificial intelligence-based cloth laser cutting method as described above are implemented.

[0058] The invention discloses a method, system and medium for fabric laser cutting based on artificial intelligence, and the method is applied to a fabric laser cutting system based on artificial intelligence. The fabric laser cutting system includes a control device, an image acquisition device, a laser execution device and a sensor device on a material laying platform that are communicatively connected to the control device. The sensor device detects the material laying platform in real time, and once it detects that a fabric to be cut is placed on the material laying platform, it generates a recognition instruction and transmits it to the control device. The control device controls the image acquisition device to collect the fabric image of the fabric to be cut according to the recognition instruction, and performs defect detection on the collected fabric image according to a preset detection model, and determines the effective cutting area of ​​the fabric to be cut in the fabric image according to the defect detection. Then the control device performs pattern boundary recognition on the effective cutting area, determines the boundaries to be cut of each pattern to be cut in the fabric image, and plans the cutting path according to each boundary to be cut. Then the control device controls the laser execution device to cut each pattern to be cut in the fabric to be cut according to the cutting path. In this way, by setting a preset detection model, the defect detection is performed on the cloth to be cut before cutting, and the effective cutting area without defects is determined to perform pattern boundary recognition, and the boundaries of each pattern to be cut in the cloth to be cut are identified. Then, the cutting path is planned according to each boundary to cut each pattern to be cut contained in the cloth to be cut. While accurately cutting each pattern to be cut according to the boundary, the quality of the cloth pattern obtained by cutting is ensured by defect detection before cutting, and the shortest path for the laser actuator to perform the cutting operation is made through the planned cutting path, thereby improving the cutting efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 It is a schematic flow chart of a first embodiment of a cloth laser cutting method based on artificial intelligence of the present invention;

[0060] Figure 2 It is a flow chart of a second embodiment of the cloth laser cutting method based on artificial intelligence of the present invention;

[0061] Figure 3 It is a flow chart of a third embodiment of the artificial intelligence-based cloth laser cutting method of the present invention;

[0062] Figure 4 It is a schematic flow chart of a fourth embodiment of the artificial intelligence-based cloth laser cutting method of the present invention;

[0063] Figure 5 This is a structural schematic diagram of the hardware operating environment involved in an embodiment of the artificial intelligence-based cloth laser cutting system of the present invention.

[0064] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0065] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0066] The present invention provides a cloth laser cutting method based on artificial intelligence, please refer to Figure 1 , Figure 1 It is a schematic flow chart of the first embodiment of the method for laser cutting cloth based on artificial intelligence of the present invention.

[0067] The embodiment of the present invention provides an embodiment of a cloth laser cutting method based on artificial intelligence. It should be noted that although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here. Specifically, the cloth laser cutting method based on artificial intelligence in this embodiment includes:

[0068] Step S10: When the sensing device detects that there is cloth to be cut on the material spreading platform, a recognition instruction is generated and transmitted to the control device. The control device controls the image acquisition device to acquire the cloth image of the cloth to be cut based on the recognition instruction.

[0069] It should be understood that the cloth to be cut in this embodiment includes clothing cloth, and can also be replaced by leather or other fabrics.

[0070] The cloth laser cutting method based on artificial intelligence in this embodiment is applied to a cloth laser cutting system based on artificial intelligence, and the cloth laser cutting system includes a paving platform, an image acquisition device, a laser actuator and a control device. A sensor device is provided on the paving platform, and the control device can be connected to the laser actuator, the image acquisition device and the sensor device in communication. In addition, the cloth laser system can also include a cloth conveying device connected to the control device in communication, and the cloth conveying device is provided with a rotating shaft. When there is a demand for cloth cutting, a start signal is sent to the control device. For example, the control device includes a limiting device, and a start button is provided on the display device, and a start signal is sent to the control device by pressing the button. After receiving the start signal, the control device controls the rotating shaft of the cloth conveying device to rotate, and the cloth is conveyed to the paving platform by rotating the rotating shaft. The sensing device of the paving platform can be a position sensor arranged at one end of the rotating shaft in the yard. When the sensing device detects a cloth signal, it means that the cloth is conveyed by the rotating shaft and laid flat on the paving platform, that is, it is detected that there is cloth to be cut on the paving platform.

[0071] Further, the sensing detection device triggers the recognition instruction to be transmitted to the control device, and the control device receives the recognition instruction and sends a collection instruction to the image acquisition device. The image acquisition device can be a panoramic camera, a monocular camera, or a binocular camera. After receiving the collection instruction, the image acquisition device is started, and the image of the cloth to be cut laid on the material platform is collected, and the cloth image is obtained and transmitted to the control device, so that the control device performs defect detection and controls cutting. It should be noted that the cloth laser cutting system supports cutting of monochromatic cloth or cloth with regular distribution of patterns. For monochromatic cloth, the control device cuts according to the pre-planned cutting path after defect detection. For cloth with regular distribution of patterns, the cloth contains multiple regularly arranged patterns. The control device identifies the boundary lines of each pattern after defect detection, and cuts each cloth area containing the pattern from the cloth to be cut according to the boundary line. The cloth to be cut in this embodiment is preferably a cloth with regular distribution of patterns, and each regularly distributed pattern constitutes the pattern to be cut in the cloth to be cut.

[0072] In step S20, the control device performs defect detection on the cloth image based on a preset detection model, and determines an effective cutting area of ​​the cloth to be cut in the cloth image based on the defect detection.

[0073] Furthermore, the fabric laser cutting system is pre-trained with a preset detection model for defect detection, and the control device can perform defect detection on the fabric image according to the preset detection model. The fabric image is a real image of the fabric to be cut, so the defect detection of the fabric image is to determine whether there are defects in the fabric to be cut by analyzing and processing the fabric image. The defects in the fabric include at least fabric yarn defects such as hundred feet, double wefts, sunken yarn, star jump, etc., as well as fabric pattern defects such as partial color loss, pattern mismatch, pigment pollution, etc.

[0074] Furthermore, the effective cutting area of ​​the cloth to be cut in the cloth image is determined based on whether there are defects in the cloth to be cut as determined by defect detection. If it is determined by defect detection that there are no defects in the cloth to be cut, the entire area of ​​the cloth to be cut is effective, so the entire cloth image is taken as the effective cutting area. If it is determined by defect detection that there are defects in the cloth to be cut, it is further determined whether the defect exists in one or several pattern images contained in the cloth to be cut. If it exists in one or several pattern images, then this type of pattern is a defective pattern after cutting and cannot be used for subsequent clothing manufacturing. Therefore, the area where the defect is located is removed from the cloth to be cut, and the area after the defect image is removed from the cloth image is taken as the effective cutting area. If it is determined that the defect is not in one or several pattern images contained in the cloth to be cut, it means that the existence of this type of defect will not affect the pattern after cutting, so the entire area of ​​the cloth to be cut, that is, the entire cloth image is still taken as the effective cutting area.

[0075] It should be noted that the location area where the defect exists in the fabric needs to be determined based on the coordinate conversion relationship between the image coordinate system corresponding to the fabric image and the physical coordinate system of the fabric laying platform. After determining that there are defects in the fabric to be cut through the analysis and processing of the fabric image, the pixel coordinates of the defect area imaged in the fabric image are converted to the physical coordinates of the physical coordinate system based on the coordinate conversion relationship, and then the location area where the defect exists in the fabric is determined based on the physical coordinates.

[0076] In step S30, the control device performs pattern boundary recognition on the effective cutting area, determines the to-be-cut boundary of each to-be-cut pattern in the to-be-cut cloth in the cloth image, and plans a cutting path according to each to-be-cut boundary.

[0077] Furthermore, after determining the effective area to be cut formed by the cloth to be cut in the cloth image based on the defect detection of the cloth image, the control device performs pattern boundary recognition on the effective cutting area. The imaging of each pattern to be cut contained in the cloth to be cut in the cloth image is recognized, and then each imaging boundary is recognized, that is, the boundary to be cut of each pattern to be cut in the cloth image is obtained as a basis for cutting each pattern to be cut. Moreover, the cloth to be cut contains many patterns to be cut, and each pattern to be cut has its own corresponding boundary to be cut. In order to improve the efficiency of cutting, the control device also plans the cutting path according to the position of each boundary to be cut. The planned cutting path includes each boundary to be cut, and at the same time, it can ensure that the path for the laser actuator to perform the cutting operation is the shortest.

[0078] Step S40: the control device controls the laser actuator based on the cutting path to cut each pattern to be cut in the cloth to be cut.

[0079] Furthermore, after the path planning for cutting each pattern to be cut is completed, the control device sends a start instruction to the laser actuator to control the laser actuator to operate according to the planned path to cut each pattern to be cut contained in the cloth to be cut. After the laser actuator is completed, all valid patterns to be cut contained in the cloth to be cut are obtained, and the cloth to be cut is accurately and efficiently cut.

[0080] The artificial intelligence-based cloth laser cutting method of this embodiment is applied to an artificial intelligence-based cloth laser cutting system. The cloth laser cutting system includes a control device, an image acquisition device, a laser execution device, and a sensor device on the material laying platform that are communicatively connected to the control device. The sensor device detects the material laying platform in real time. Once it detects that there is a cloth to be cut placed on the material laying platform, it generates a recognition instruction and transmits it to the control device. The control device controls the image acquisition device to collect the cloth image of the cloth to be cut according to the recognition instruction, and performs defect detection on the collected cloth image according to a preset detection model, and determines the effective cutting area of ​​the cloth to be cut in the cloth image according to the defect detection. Then the control device performs pattern boundary recognition on the effective cutting area, determines the boundaries to be cut of each pattern to be cut in the cloth to be cut in the cloth image, and plans the cutting path according to each boundary to be cut. Then the control device controls the laser execution device to cut each pattern to be cut in the cloth to be cut according to the cutting path. In this way, by setting a preset detection model, the defect detection is performed on the cloth to be cut before cutting, and the effective cutting area without defects is determined to perform pattern boundary recognition, and the boundaries of each pattern to be cut in the cloth to be cut are identified. Then, the cutting path is planned according to each boundary to cut each pattern to be cut contained in the cloth to be cut. While accurately cutting each pattern to be cut according to the boundary, the quality of the cloth pattern obtained by cutting is ensured by defect detection before cutting, and the shortest path for the laser actuator to perform the cutting operation is made through the planned cutting path, thereby improving the cutting efficiency.

[0081] For further information, please refer to Figure 2 Based on the first embodiment of the artificial intelligence-based cloth laser cutting method of the present invention, a second embodiment of the artificial intelligence-based cloth laser cutting method of the present invention is proposed.

[0082] The difference between the second embodiment of the artificial intelligence-based cloth laser cutting method and the first embodiment of the artificial intelligence-based cloth laser cutting method is that the control device performs pattern boundary recognition on the effective cutting area, and the step of determining the to-be-cut boundaries of each to-be-cut pattern in the to-be-cut cloth in the cloth image includes:

[0083] Step S31, the control device performs pattern edge detection on the effective cutting area to obtain edge pixel coordinate sets corresponding to each of the patterns to be cut, and performs the following steps for each edge pixel coordinate set:

[0084] Step S32, determining whether the edge pixel coordinate set matches a preset cutting coordinate set, and if so, generating the to-be-cut boundary based on the edge pixel coordinate set;

[0085] Step S33: if the edge pixel coordinate set does not match the preset cutting coordinate set, a reference pattern template is established based on the preset cutting coordinate set, and the to-be-cut boundary is determined based on a first similarity value between the reference pattern template and the target to-be-cut pattern corresponding to the edge pixel coordinate set.

[0086] Furthermore, a preset detection algorithm for edge detection is provided in the control device, and the pattern edge of the effective cutting area is detected by the preset detection algorithm to obtain an edge pixel coordinate set of each pattern to be cut contained in the effective cutting area. Each pattern to be cut corresponds to an edge pixel coordinate set, which represents the coordinate position of the pixel corresponding to the edge of the pattern to be cut.

[0087] Furthermore, a preset cutting coordinate set is pre-set in the control device, and each coordinate element in the preset cutting coordinate set constitutes a reference boundary of the imaging of the pattern to be cut as a whole. Each edge pixel coordinate set is compared with the preset cutting coordinate set, and the consistency of the elements contained in the two is compared to determine whether the two match. If they match, it means that the pattern edge represented by the edge pixel coordinate set obtained by detection is consistent with the reference boundary of the imaging of the pattern to be cut, so that the edge pixel coordinate set is generated as the boundary to be cut of the pattern to be cut. If it is determined by comparison that the edge pixel coordinate set does not match the preset cutting coordinate set, the mismatch may be caused by inaccurate pattern edge detection, which makes the obtained edge pixel coordinate set inaccurate. In order to eliminate this type of mismatch caused by inaccurate pattern edge detection, this embodiment establishes a reference pattern template based on the preset cutting coordinate set, and uses the imaging of the pattern to be cut from the edge pixel coordinate set currently being matched as the target pattern to be cut. Then, the similarity value between the reference pattern template and the target pattern to be cut is calculated, and the calculated similarity value is used as the first similarity value, and the boundary to be cut corresponding to the target pattern to be cut is determined based on the first similarity value.

[0088] Wherein, the step of determining the boundary to be cut based on the first similarity value between the reference pattern template and the target pattern to be cut corresponding to the edge pixel coordinate set comprises:

[0089] Step S331, determining whether the first similarity value is greater than or equal to a preset similarity threshold, and if so, generating the to-be-cut boundary based on the reference pattern template;

[0090] Step S332: if the first similarity value is less than a preset similarity threshold, the reference pattern template is rotated multiple times based on a first preset angle to obtain multiple rotated reference patterns;

[0091] Step S333, generating second similarity values ​​between the plurality of the rotated reference patterns and the target pattern to be cut, performing difference operation on each of the second similarity values ​​and a preset similarity threshold to obtain a difference operation result, and generating the boundary to be cut according to each of the difference operation results.

[0092] Furthermore, a preset similarity threshold is pre-set, and the preset similarity threshold indicates the degree of similarity between the reference pattern template and the target pattern to be cut. The first similarity value obtained by calculation is compared with the preset similarity threshold to determine whether the first similarity value is greater than the preset similarity threshold. If it is greater than the preset similarity threshold, it means that the degree of similarity between the reference pattern template and the target pattern to be cut is high. At this time, a boundary to be cut for cutting the target pattern to be cut is generated based on the reference pattern template, and specifically, the boundary to be cut can be formed based on a preset cutting coordinate set that forms the reference pattern template.

[0093] Furthermore, if it is determined through comparison that the first similarity value is not greater than a preset similarity threshold, it indicates that the similarity between the reference pattern template and the target pattern to be cut is low. For this, it may be caused by the non-positive position of the target pattern to be cut in the cloth to be cut. Usually, the patterns contained in the cloth to be cut are regularly arranged in the cloth to be cut. For example, if the cloth to be cut contains multiple gourd-shaped patterns, then usually each gourd-shaped pattern is arranged at the same angle in the cloth to be cut. The reference pattern template is also a template formed according to this angle. If the angle of a certain pattern is different from this angle, that is, the position of the pattern in the cloth to be cut is not positive, so that the first similarity value generated by the reference pattern template and the pattern is not greater than the preset similarity threshold. For such patterns with no flaws in overall shape and content, this embodiment is provided with a mechanism for matching by rotation.

[0094] Specifically, a first preset angle for controlling the rotation angle is pre-set. After determining that the first similarity value is not greater than the preset similarity threshold, the reference pattern template is controlled to rotate multiple times at the first preset angle. The latter rotation is performed on the basis of the previous rotation, and the reference pattern template after each rotation constitutes a rotated reference pattern, and multiple rotated reference patterns are obtained through multiple rotations. Then, each rotated reference pattern is respectively calculated for similarity with the target pattern to be cut, and a second similarity value between each rotated reference pattern and the target pattern to be cut is generated, and each second similarity value is respectively subjected to a difference operation with the preset similarity threshold to obtain multiple difference operation results. The difference operation results reflect the degree of similarity between each rotated reference pattern and the target pattern to be cut, and then the to-be-cut boundary of the target pattern to be cut is generated based on the degree of similarity.

[0095] Furthermore, the step of generating the to-be-cut boundary according to each of the difference operation results comprises:

[0096] Step S3331, performing absolute value operation on each difference operation result to obtain multiple similarity absolute difference values;

[0097] Step S3332, determining a minimum value among the plurality of similarity absolute differences, and judging whether the difference result corresponding to the minimum value is a non-negative value, if it is a non-negative value, generating the to-be-cut boundary based on the rotated reference image corresponding to the minimum value;

[0098] Step S3333: if the difference result corresponding to the minimum value is a negative value, determining a target rotation reference pattern corresponding to the minimum value among the multiple rotation reference patterns, and rotating the target rotation reference pattern multiple times based on a second preset angle to obtain multiple new rotation reference patterns;

[0099] Step S3334, based on multiple new rotated reference patterns, executing the step of generating second similarity values ​​between the multiple rotated reference patterns and the target pattern to be cut, until the difference result corresponding to the minimum value is a non-negative value.

[0100] Furthermore, the absolute value of each difference operation result is taken to obtain multiple similarity absolute difference values. A comparison is performed between each similarity absolute difference value to determine the minimum value therein, and it is determined whether the difference result from which the minimum value comes is a non-negative value. If it is a non-negative value, that is, a positive value or zero, it means that the second similarity value that generates the minimum value is greater than or equal to the preset similarity threshold value, and the degree of similarity between the rotating reference pattern that generates the second similarity value and the target pattern to be cut is relatively high, so the boundary to be cut for cutting the target pattern to be cut can be generated based on the rotating reference pattern, and the boundary pixel coordinates of the rotating reference pattern can be specifically identified, and the identified boundary pixel coordinates are formed as the boundary to be cut.

[0101] Furthermore, if the difference corresponding to the minimum value is determined to be a negative value, it means that the second similarity value that generates the minimum value is less than the preset similarity threshold, and the degree of similarity between the rotated reference pattern that generates the second similarity value and the target pattern to be cut is low. The reason for the low degree may be that the rotation angle of the reference pattern template is not appropriate. For example, the rotation angle is too large, which makes the rotation amplitude of the reference pattern template larger, so that the similarity between the rotated reference pattern template, that is, the rotated reference pattern and the target pattern to be cut is lower, and the second similarity value is less than the preset similarity threshold. Therefore, the rotation angle of the reference pattern template is adjusted from the first preset angle to a second preset angle with a smaller angle, or an angle with a smaller angle is generated based on a preset algorithm as the second preset angle. At the same time, the rotation reference pattern that generates the minimum value is found from multiple rotation reference patterns as the target rotation reference pattern, and the target rotation reference pattern is rotated again multiple times at the second preset angle to obtain multiple new rotation reference patterns.

[0102] It should be noted that the basis for re-rotation, in addition to being the rotated reference pattern that generates the minimum value, can also be the original unrotated reference pattern template. Specifically, the difference operation and absolute value operation are performed based on the first similarity value generated by the reference pattern template and the preset similarity threshold to obtain the operation result, and the size relationship between the operation result and the minimum value is determined. If the operation result is greater than the minimum value, it means that the degree of similarity between the rotated reference pattern that generates the minimum value and the target pattern to be cut is high, so the rotated reference pattern is used as the basis for re-rotation. On the contrary, if the operation result is less than the minimum value, it means that the degree of similarity between the unrotated reference pattern template and the target pattern to be cut is high, so the reference pattern template is used as the basis for re-rotation. By determining a pattern that is more similar to the target pattern to be cut as the rotation basis, it is convenient to quickly find a reference pattern that matches the target pattern to be cut.

[0103] Furthermore, for the new multiple rotated reference patterns, the similarities between each of them and the target pattern to be cut are calculated respectively, and multiple new second similarity values ​​are obtained to perform difference calculation and absolute value calculation with the preset similarity threshold, and the corresponding minimum value is determined for judgment. This cycle is repeated until the difference result corresponding to the minimum value is a non-negative value, and the boundary to be cut for cutting the target pattern to be cut is generated.

[0104] It should be noted that after multiple cycles, the minimum value obtained may still be a negative value, and it is difficult to find a reference pattern that matches the target pattern to be cut, indicating that there are other abnormalities in the target pattern to be cut, such as deformation of the target pattern to be cut. For this reason, the number of cycles needs to be limited to avoid spending too much time on the target pattern to be cut. A preset number threshold for limiting the number of cycles is pre-set. After each new cycle, the total number of cycles is counted, and the number obtained by counting is compared with the preset number threshold to determine whether the number obtained by counting is greater than the preset number threshold. If the preset number threshold is reached, it means that a reference pattern matching the target pattern to be cut has not been found after multiple cycles. At this time, the identification of the to-be-cut boundary of the target pattern to be cut is abandoned, and there is no need to cut the target pattern to be cut subsequently.

[0105] In this embodiment, a three-level generation mechanism is set up for the boundary to be cut corresponding to the pattern to be cut in the cloth to be cut. The first is to obtain its edge pixel coordinate set and match it with the preset cutting coordinate set. The second is to establish the preset cutting coordinate set as a reference pattern template for matching and generation. The third is to rotate the established reference pattern template for matching and generation, so that the generation of the boundary to be cut is more accurate and efficient.

[0106] For further information, please refer to Figure 3 Based on the first and second embodiments of the artificial intelligence-based cloth laser cutting method of the present invention, a third embodiment of the artificial intelligence-based cloth laser cutting method of the present invention is proposed.

[0107] The difference between the third embodiment of the artificial intelligence-based cloth laser cutting method and the first and second embodiments of the artificial intelligence-based cloth laser cutting method is that the step of the control device performing defect detection on the cloth image based on a preset detection model includes:

[0108] Step S21, the control device controls the filtering process of the cloth image to obtain a filtered image, and divides the filtered image to obtain a plurality of regular images, each of which contains an image of a pattern to be cut;

[0109] Step S22, for each of the regular images, extracting a feature vector of each pixel in the regular image based on a preset detection model, and calculating a saliency value of each pixel based on the feature vector of each pixel;

[0110] Step S23, converting the regular image into a grayscale image based on each of the saliency values, and determining a grayscale threshold of the grayscale image;

[0111] Step S24, comparing the grayscale value of each pixel in the grayscale image with the grayscale threshold value to generate a comparison result, and performing defect detection on the fabric image based on the comparison result.

[0112] Furthermore, a filtering algorithm is pre-set in the control device, and the cloth image is filtered by the filtering algorithm to remove noise in the cloth image and obtain a filtered image. Then, the filtered image is identified and divided, and the regions containing the patterns in the filtered image are identified, and the regions are divided into regular shapes, such as rectangular frames and circular frames surrounding the patterns, to obtain multiple regular images. Each regular image contains an image of a pattern to be cut. Moreover, the recognition can be preferably a rough recognition, and it is not required to accurately recognize the boundary position of the pattern, so as to improve the efficiency of recognition and division.

[0113] Furthermore, for each regular image, a feature vector of each pixel is extracted through a preset detection model, and the feature vector represents the features of the pixel, including color features, texture features, etc. Then, the saliency value of each pixel is calculated according to the feature vector of each pixel, and the regular image is converted into a grayscale image according to the saliency value of each pixel. Among them, the saliency value reflects the saliency of the pixel in the regular image. The calculation formula of the saliency value can be seen in the following formula (1), and the conversion formula of the grayscale image can be seen in the following formula (2).

[0114]

[0115] Where Si represents saliency, n represents the number of pixels, Ri represents the feature vector of the i-th pixel, |·| represents the modulus of the vector, and Gi represents the grayscale value of the i-th pixel in the grayscale image. After the saliency values ​​Si of each pixel in the regular image are converted to grayscale values ​​Gi through formula (2), the regular image is converted into a grayscale image.

[0116] Furthermore, for a grayscale image, the preset detection model extracts the grayscale value of each pixel therein and performs summation processing, and performs mean operation on the summation result to obtain the average grayscale value of the grayscale image as the grayscale threshold of the grayscale image. Then, the grayscale value of each pixel in the grayscale image is compared with the grayscale threshold to generate a comparison result. The comparison result is a collection of the difference between each grayscale value and the grayscale threshold.

[0117] Furthermore, in order to express the size relationship between the grayscale value of the pixel and the grayscale threshold, a preset reference grayscale is pre-set, and the difference is compared with the preset reference grayscale to determine whether the difference is greater than the preset reference grayscale. If it is greater than or equal to the preset reference grayscale, it means that the difference between the grayscale value and the grayscale threshold is large, and the pixel corresponding to the grayscale value is abnormal, which is a defective pixel. If the difference is less than the preset reference area, it means that the difference between the grayscale value and the grayscale threshold is small, and the pixel corresponding to the grayscale value is normal, which is a normal non-defective pixel. In this way, defect detection of the fabric image is achieved based on the generated comparison results. By extracting the feature vector of each pixel and calculating the saliency value of each pixel point based on the feature vector, the saliency value more prominently reflects the characteristics of the pixel, and then after the regular image is converted into a grayscale image, the characteristics of each pixel in the grayscale image are also more significant, so that the detection of defects is more accurate.

[0118] It is understandable that in order to ensure the accuracy of the feature vector extracted by the preset monitoring model, it is necessary to form a preset detection model training through a large number of sample image training in advance. Specifically, for each of the regular images, the step of extracting the feature vector of each pixel in the regular image based on the preset detection model includes:

[0119] Step a1, obtaining a large number of sample images, and dividing the sample images into training sample images and verification sample images based on a preset ratio;

[0120] Step a2, iteratively training a preset initial model based on the training sample images, and when the iterative training reaches a preset number of times, verifying the preset initial model based on the verification sample images to obtain a verification result;

[0121] Step a3, calculating the loss function value of the preset initial model based on the verification result, and determining whether the loss function value is less than a preset threshold;

[0122] Step a4: if the loss is less than the preset threshold, the preset initial model is generated as a preset recognition model according to the loss function value;

[0123] Step a5: If the loss function value is greater than a preset threshold, the model parameters of the preset initial model are updated, and for the preset initial model after the model parameters are updated, the step of iteratively training the preset initial model based on the training sample image is performed.

[0124] Furthermore, a large number of sample images are obtained, and the obtained sample images are divided into training sample images and verification sample images according to a preset ratio. The division according to the preset ratio makes the number of training sample images greater than the number of verification sample images. For example, the division is performed in a ratio of 8 to 2, or in a ratio of 7 to 3, etc. Then, the preset initial model constructed by the neural network is iteratively trained according to the training sample images, and a preset number of times is preset. When the number of iterative training reaches the preset number, the preset initial model is verified according to the verification sample images to obtain a verification result.

[0125] Furthermore, in order to reflect the effect of the preset initial model in extracting features from the verification sample image, the loss function value of the preset initial model is calculated based on the verification result. The loss function value represents the difference between the features actually extracted by the preset initial model for the verification sample image and the features pre-annotated for the verification sample image. The smaller the loss function value, the smaller the difference between the features actually extracted and the annotated features, and the better the performance of the preset initial model in extracting features from the image, and vice versa. The formula for calculating the loss function value can be found in the following formula (3).

[0126]

[0127] Among them, L represents the loss function value, α represents the color weight value of the preset initial model, M represents the number of verification sample images, ‖·‖ represents the modulus of the matrix, and x k represents the color feature matrix of the verification result corresponding to the kth verification sample image, x k0 represents the reference color feature matrix corresponding to the kth validation sample image, β represents the texture weight value of the preset initial model, and h k Represents the texture feature matrix of the verification result corresponding to the kth verification sample image, represents the transpose of the texture feature matrix, h k0 represents the reference color feature matrix corresponding to the kth verification sample image, Represents the transpose of the reference color feature matrix. By using color features and texture features as the calculation indicators of the loss function value, the trained preset recognition model pays more attention to the color features and texture features in the image, which is conducive to more accurately extracting color features and texture features from each pixel of the image according to the preset recognition model, thereby achieving more accurate defect detection.

[0128] Furthermore, in order to indicate the size of the difference, a preset threshold is pre-set, and the calculated loss function value is compared with the preset threshold to determine whether the loss function value is less than the preset threshold. If it is less than the preset threshold, it means that the closer the actual extracted features are to the annotated features, the more accurately the preset initial model can extract features from the image. On the contrary, it means that the actual extracted features are quite different from the annotated features, and the preset initial model needs to be iteratively trained. At this time, the model parameters of the preset initial model are updated. The updated model parameters are mainly parameters related to the extraction of color features and parameters related to the extraction of texture features, such as weight values. The updating method can be performed through a pre-set update algorithm. After the model parameters are updated, the preset initial model is iteratively trained again through the training sample images, and when the number of training times reaches the preset number, the loss function value is verified and calculated again until the calculated loss function value is less than the preset threshold.

[0129] Furthermore, for the loss function value that is determined to be less than the preset threshold, it may be an occasional situation. That is, the loss function value is accidentally less than the preset threshold, and the preset initial model does not have the stable performance of accurately extracting image features. At this time, it is necessary to combine the loss function value with the previously calculated loss function value to determine whether the preset initial model has the stable performance of accurately extracting image features, and then generate the preset initial model as the preset initial model based on the judgment result. Specifically, the step of generating the preset initial model as the preset recognition model according to the loss function value includes:

[0130] Step a41, searching for historical loss function values ​​generated by a preset number of iterations of training, and fitting the historical loss function values ​​and the loss function value together into a function curve;

[0131] Step a42, judging whether the preset initial model converges according to the function curve, and if converged, generating the preset initial model as a preset recognition model;

[0132] Step a43, if the preset initial model has not converged, the model parameters of the preset initial model are updated, and for the preset initial model after the model parameters are updated, the step of iteratively training the preset initial model based on the training sample images is performed.

[0133] Furthermore, the historical loss function values ​​generated by the previous preset iterative training are obtained, and the previous preset times can be set in advance based on the experience of model training. Then, it is determined whether each historical loss function value is less than the preset threshold. If they are all less than the preset threshold, it means that the preset initial model continuously presents good performance in image feature extraction. On the contrary, if there is a historical loss function value that is not less than the preset threshold, it means that the performance of the preset initial model is unstable and fluctuates, and it is necessary to continue iterative training through training sample images. For the case where each historical loss function value is less than the preset threshold, each historical loss function value and the loss function value are fitted together into a function curve. Specifically, a two-dimensional coordinate system can be established, with the horizontal axis being the time parameter and the vertical axis being the loss function value. The historical loss function value and the current loss function value are added to the two-dimensional coordinate system for fitting to obtain a function curve.

[0134] Furthermore, according to the trend of the function curve, it is judged whether the preset initial model has converged. If the trend is continuously decreasing and gradually tending to be stable, it means that the performance of the preset initial model in extracting image features is good and stable, so the preset initial model is judged to be converged, and the preset initial model is generated as the preset recognition model. If the trend of the function curve is continuously decreasing but has not yet tended to be stable, or it is not continuously decreasing, it means that the performance of the preset initial model in extracting image features is still unstable, and it still needs to be iteratively trained through training sample images. Among them, each iterative training requires first updating the model parameters of the preset initial model, and then training through training sample images after the update.

[0135] This embodiment pre-trains a preset recognition model with the ability to extract color features and texture features, extracts the feature vectors of each pixel in the image in color and texture by the preset recognition model to calculate the saliency value, and then converts the regular image into a grayscale image for defect detection based on the saliency value of each pixel. The features of each pixel in the grayscale image after conversion are closely related to the color features and texture features of each pixel before conversion, which can better reflect color defects and texture defects, making defect detection more accurate.

[0136] For further information, please refer to Figure 4 Based on the first, second and third embodiments of the artificial intelligence-based cloth laser cutting method of the present invention, a fourth embodiment of the artificial intelligence-based cloth laser cutting method of the present invention is proposed.

[0137] The fourth embodiment of the artificial intelligence-based cloth laser cutting method is different from the first, second and third embodiments of the artificial intelligence-based cloth laser cutting method in that the step of planning a cutting path according to each of the to-be-cut boundaries comprises:

[0138] Step S34, determining the boundaries to be planned located at the edges of the effective cutting area among the boundaries to be cut, and performing the following steps for each boundary to be planned:

[0139] Step S35, determining a first boundary adjacent to the boundary to be planned among the boundaries to be cut, and calculating an operation coefficient between the boundary to be planned and each of the first boundaries;

[0140] Step S36, determining the minimum coefficient value of each of the operation coefficients, and searching for the second boundary corresponding to the minimum coefficient value in each of the first boundaries, and removing the boundary to be planned and the second boundary from each of the boundaries to be cut, to obtain a new boundary to be cut;

[0141] Step S37, taking the second boundary as a new boundary to be planned, and based on the new boundary to be planned and the new boundary to be cut, performing the step of determining the first boundary adjacent to the boundary to be planned in each boundary to be cut, until each boundary to be cut generates a corresponding minimum coefficient value;

[0142] Step S38, summing up the minimum values ​​of the coefficients to generate an operation path coefficient corresponding to the boundary to be planned;

[0143] Step S39, after each of the to-be-planned boundaries generates its own corresponding operation path coefficient, the operation path coefficients are compared to determine the minimum path coefficient among the operation path coefficients, and the operation path corresponding to the minimum path coefficient is used as the cutting path.

[0144] Furthermore, from each boundary to be cut, find out the boundaries distributed around the edges of the effective cutting area, that is, the outermost boundaries around the effective cutting area, as the boundary to be planned as the starting point of the path planning. For each boundary to be planned, first determine the boundary adjacent to it from each boundary to be cut as the first boundary, and then calculate the operation coefficient between the boundary to be planned and each first boundary. The operation coefficient is the shortest time coefficient for the laser actuator to run to the first boundary to cut the first boundary after the laser actuator completes the cutting of the boundary to be planned. The specific calculation formula can be seen in the following formula (4).

[0145]

[0146] Among them, S j represents the operation coefficient between the boundary to be planned and the jth first boundary, p represents the number of first boundaries, G min (j) represents the function for calculating the shortest running time of the laser actuator from the boundary to be planned to the jth first boundary, δ min (j) represents a function for calculating the shortest cutting time for the laser actuator to cut the jth first boundary, u j Indicates the balance coefficient corresponding to the running time and cutting time.

[0147] Specifically, the time taken by the laser actuator to reach the first boundary along different paths is different; and the first boundary is cut along different path directions. For example, the difficulty of rotating in the clockwise direction is higher than that of rotating in the counterclockwise direction, which makes the time of rotating in the clockwise direction longer than that of rotating in the counterclockwise direction. Both the running path and the cutting direction will affect the time length coefficient. Therefore, the operation coefficient can be generated by combining the shortest time between the running of the laser actuator to the first boundary image and the shortest time for cutting the first boundary. In addition, the laser actuator runs to the first boundary along different paths, and there are different corresponding stop points on the first boundary, so that there are different cutting starting points on the first boundary. Cutting from different cutting starting points may also have different cutting times for the same cutting rotation direction. In this way, the cutting starting point corresponding to the path with the shortest running time may increase the cutting time. In order to reflect the increase, a balance coefficient is determined based on the experiment. The shortest running time and the shortest cutting time are corrected by the balance coefficient to generate the overall final operation coefficient, so that the operation coefficient more accurately reflects the shortest time for the laser actuator to run to the first boundary and cut the first boundary.

[0148] Furthermore, after calculating the operation coefficients between the boundary to be planned and each first boundary, the operation coefficients are compared to determine the minimum value of the coefficients, which represents the first boundary with the shortest time in operation and cutting as a whole. For example, the first boundary adjacent to the boundary to be planned includes the boundaries located to the left, right, and below the boundary to be planned, wherein the operation coefficient of the boundary to be planned with the first boundary on the left is c1, the operation coefficient with the first boundary on the right is c2, and the operation coefficient with the first boundary below is c3, and c1 is less than c2, and c2 is less than c3, then the minimum value of the coefficient determined is c1.

[0149] Furthermore, the boundary that generates the minimum coefficient is found from each first boundary as the second boundary, and the second boundary is used as the new boundary to be planned, that is, the new starting point of path planning. At the same time, because the running path and cutting path between the original boundary to be planned and the second boundary have been planned, it is necessary to update each boundary to be cut according to the original boundary to be planned and the second boundary, and remove both from each boundary to be cut to form a new boundary to be cut for cutting path planning. That is, for the new boundary to be planned and the new boundary to be cut, the boundary adjacent to the new boundary to be planned is determined from each new boundary to be cut, and the operation coefficient is calculated as the first boundary until each boundary to be cut is used as the boundary to be planned to calculate the corresponding minimum coefficient.

[0150] Furthermore, the minimum values ​​of each coefficient are added to generate an operation path coefficient with the initially selected boundary to be planned as the cutting starting point. After each boundary to be planned located at the edges of the effective cutting area is used as the cutting starting point to generate its corresponding operation path coefficient, each operation path coefficient is compared to determine the minimum path coefficient. Then, the starting boundary to be planned corresponding to the minimum path coefficient and the operation path corresponding to the starting boundary to be planned as the cutting starting point are found. The operation path is the formed cutting path. The cutting path thus determined is the path that takes the least time for the laser actuator to cut each pattern to be cut.

[0151] This embodiment combines the running time and cutting time of the laser actuator to calculate the operation coefficient between the boundary to be planned and the adjacent first boundary. The operation path coefficient is generated from the operation coefficient to reflect the time required for the laser actuator to cut along each path, and then determines the path with the shortest time spent by the laser actuator to cut each pattern to be cut, which is conducive to improving cutting efficiency.

[0152] In addition, an embodiment of the present invention also provides a cloth laser cutting system based on artificial intelligence. Figure 5 , Figure 5 It is a structural schematic diagram of the equipment hardware operating environment involved in the embodiment scheme of the artificial intelligence-based cloth laser cutting system of the present invention.

[0153] like Figure 5 As shown, the artificial intelligence-based cloth laser cutting system may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a storage 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The storage 1005 may be a high-speed RAM storage, or a stable storage (non-volatile memory), such as a disk storage. The storage 1005 may also be a storage device independent of the aforementioned processor 1001.

[0154] Those skilled in the art will understand that Figure 5 The hardware structure of the artificial intelligence-based cloth laser cutting system shown in the figure does not constitute a limitation of the artificial intelligence-based cloth laser cutting system, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.

[0155] like Figure 5 As shown, the storage 1005 as a storage medium may include an operating system, a network communication module, a user interface module and a control program. The operating system is a program for managing and controlling the artificial intelligence-based cloth laser cutting system and software resources, and supports the operation of the network communication module, the user interface module, the control program and other programs or software; the network communication module is used to manage and control the network interface 1004; the user interface module is used to manage and control the user interface 1003.

[0156] exist Figure 5 In the hardware structure of the artificial intelligence-based cloth laser cutting system shown, the network interface 1004 is mainly used to connect to the system server and communicate data with the system server; the user interface 1003 is mainly used to connect to the client (user end) and communicate data with the client; the processor 1001 can call the control program stored in the storage 1005 and perform the following operations:

[0157] When the sensing device detects that there is cloth to be cut on the material laying platform, it generates a recognition instruction and transmits it to the control device, and the control device controls the image acquisition device to acquire the cloth image of the cloth to be cut based on the recognition instruction;

[0158] The control device performs defect detection on the cloth image based on a preset detection model, and determines an effective cutting area of ​​the cloth to be cut in the cloth image based on the defect detection;

[0159] The control device performs pattern boundary recognition on the effective cutting area, determines the to-be-cut boundary of each to-be-cut pattern in the to-be-cut cloth in the cloth image, and plans a cutting path according to each to-be-cut boundary;

[0160] The control device controls the laser execution device based on the cutting path to cut each pattern to be cut in the cloth to be cut.

[0161] Furthermore, the control device performs pattern boundary recognition on the effective cutting area, and the step of determining the to-be-cut boundary of each to-be-cut pattern in the to-be-cut cloth in the cloth image includes:

[0162] The control device performs pattern edge detection on the effective cutting area to obtain edge pixel coordinate sets corresponding to each of the patterns to be cut, and performs the following steps for each edge pixel coordinate set:

[0163] Determining whether the edge pixel coordinate set matches a preset cutting coordinate set, and if so, generating the to-be-cut boundary based on the edge pixel coordinate set;

[0164] If the edge pixel coordinate set does not match the preset cutting coordinate set, a reference pattern template is established based on the preset cutting coordinate set, and the to-be-cut boundary is determined based on a first similarity value between the reference pattern template and the target to-be-cut pattern corresponding to the edge pixel coordinate set.

[0165] Further, the step of determining the to-be-cut boundary based on a first similarity value between the reference pattern template and the target to-be-cut pattern corresponding to the edge pixel coordinate set comprises:

[0166] Determine whether the first similarity value is greater than or equal to a preset similarity threshold, and if so, generate the to-be-cut boundary based on the reference pattern template;

[0167] If the first similarity value is less than a preset similarity threshold, rotating the reference pattern template multiple times based on a first preset angle to obtain multiple rotated reference patterns;

[0168] Generate a plurality of second similarity values ​​between the rotated reference patterns and the target pattern to be cut, perform difference calculation on each of the second similarity values ​​and a preset similarity threshold to obtain a difference calculation result, and generate the boundary to be cut according to each of the difference calculation results.

[0169] Furthermore, the step of generating the to-be-cut boundary according to each of the difference operation results comprises:

[0170] Performing absolute value calculation on each difference calculation result to obtain multiple similarity absolute difference values;

[0171] Determine a minimum value among a plurality of the similarity absolute differences, and judge whether the difference result corresponding to the minimum value is a non-negative value, and if it is a non-negative value, generate the to-be-cut boundary based on the rotated reference image corresponding to the minimum value;

[0172] If the difference result corresponding to the minimum value is a negative value, determining a target rotation reference pattern corresponding to the minimum value among the multiple rotation reference patterns, and rotating the target rotation reference pattern multiple times based on a second preset angle to obtain multiple new rotation reference patterns;

[0173] Based on a plurality of new rotated reference patterns, a step of generating second similarity values ​​between the plurality of rotated reference patterns and the target pattern to be cut is performed until the difference result corresponding to the minimum value is a non-negative value.

[0174] Furthermore, the step of the control device performing defect detection on the cloth image based on a preset detection model includes:

[0175] The control device controls the filtering process of the cloth image to obtain a filtered image, and divides the filtered image to obtain a plurality of regular images, each of which contains an image of a pattern to be cut;

[0176] For each of the regular images, a feature vector of each pixel in the regular image is extracted based on a preset detection model, and a saliency value of each pixel is calculated based on the feature vector of each pixel. The calculation formula is:

[0177]

[0178] The regular image is converted into a grayscale image based on each of the saliency values, and a grayscale threshold of the grayscale image is determined, wherein the conversion formula of the grayscale image is:

[0179]

[0180] Where Si represents saliency, n represents the number of pixels, Ri represents the feature vector of the i-th pixel, |·| represents the modulus of the vector, and Gi represents the grayscale value of the i-th pixel in the grayscale image;

[0181] The grayscale value of each pixel in the grayscale image is compared with the grayscale threshold value to generate a comparison result, and defect detection is performed on the fabric image based on the comparison result.

[0182] Furthermore, before the step of extracting the feature vector of each pixel in the regular image based on the preset detection model for each regular image, the processor 1001 may call the control program stored in the storage 1005 and perform the following operations:

[0183] Acquire a large number of sample images, and divide the sample images into training sample images and verification sample images based on a preset ratio;

[0184] Iteratively training a preset initial model based on the training sample images, and when the iterative training reaches a preset number of times, verifying the preset initial model based on the verification sample images to obtain a verification result;

[0185] The loss function value of the preset initial model is calculated based on the verification result, and it is determined whether the loss function value is less than a preset threshold, wherein the calculation formula of the loss function value is:

[0186]

[0187] Among them, L represents the loss function value, α represents the color weight value of the preset initial model, M represents the number of verification sample images, ‖·‖ represents the modulus of the matrix, and x krepresents the color feature matrix of the verification result corresponding to the kth verification sample image, x k0 represents the reference color feature matrix corresponding to the kth validation sample image, β represents the texture weight value of the preset initial model, and h k Represents the texture feature matrix of the verification result corresponding to the kth verification sample image, represents the transpose of the texture feature matrix, h k0 represents the reference color feature matrix corresponding to the kth verification sample image, represents the transpose of the reference color feature matrix;

[0188] If it is less than a preset threshold, the preset initial model is generated as a preset recognition model according to the loss function value;

[0189] If the loss function value is greater than a preset threshold, the model parameters of the preset initial model are updated, and for the preset initial model after the model parameters are updated, the step of iteratively training the preset initial model based on the training sample image is performed.

[0190] Furthermore, the step of generating the preset initial model into a preset recognition model according to the loss function value includes:

[0191] Find the historical loss function value generated by the previous preset number of iterative trainings, and fit the historical loss function value and the loss function value together into a function curve;

[0192] According to the function curve, determining whether the preset initial model converges, and if converged, generating the preset initial model as a preset recognition model;

[0193] If the preset initial model does not converge, the model parameters of the preset initial model are updated, and for the preset initial model after the model parameters are updated, the step of iteratively training the preset initial model based on the training sample images is performed.

[0194] Furthermore, the step of planning a cutting path according to each of the boundaries to be cut includes:

[0195] Determine the boundaries to be planned located at the edges of the effective cutting area among the boundaries to be cut, and perform the following steps for each boundary to be planned:

[0196] Determine the first boundary adjacent to the boundary to be planned in each boundary to be cut, and calculate the operation coefficient between the boundary to be planned and each first boundary, the calculation formula is:

[0197]

[0198] Among them, S jrepresents the operation coefficient between the boundary to be planned and the jth first boundary, p represents the number of first boundaries, G min (j) represents the function for calculating the shortest running time of the laser actuator from the boundary to be planned to the jth first boundary, δ min (j) represents a function for calculating the shortest cutting time for the laser actuator to cut the jth first boundary, u j Indicates the equalization coefficient corresponding to the running time and the cutting time;

[0199] Determine the minimum value of each of the operation coefficients, and find the second boundary corresponding to the minimum value of the coefficient in each of the first boundaries, and remove the boundary to be planned and the second boundary from each of the boundaries to be cut to obtain a new boundary to be cut;

[0200] The second boundary is used as a new boundary to be planned, and based on the new boundary to be planned and the new boundary to be cut, a step of determining a first boundary adjacent to the boundary to be planned in each boundary to be cut is performed until each boundary to be cut generates a corresponding minimum coefficient value;

[0201] The minimum values ​​of the coefficients are summed to generate an operation path coefficient corresponding to the boundary to be planned;

[0202] After each of the to-be-planned boundaries generates its own corresponding operation path coefficient, the operation path coefficients are compared to determine the minimum path coefficient among the operation path coefficients, and the operation path corresponding to the minimum path coefficient is used as the cutting path.

[0203] The specific implementation of the artificial intelligence-based cloth laser cutting system of the present invention is basically the same as the above-mentioned artificial intelligence-based cloth laser cutting method embodiments, and will not be repeated here.

[0204] The embodiment of the present invention further provides a medium. The medium is a readable storage medium, on which a control program is stored, and when the control program is executed by a processor, the steps of the above-mentioned artificial intelligence-based cloth laser cutting method are implemented.

[0205] The storage medium of the present invention may be a computer-readable storage medium, and its implementation method is basically the same as the above-mentioned embodiments of the artificial intelligence-based cloth laser cutting method, and will not be repeated here.

[0206] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims. All equivalent structures or equivalent process changes made using the contents of the specification and drawings of the present invention, or directly or indirectly used in other related technical fields, are protected by the present invention.

Claims

1. A cloth laser cutting method based on artificial intelligence, applied to a cloth laser cutting system based on artificial intelligence, characterized in that: The cloth laser cutting system comprises a material laying platform, an image acquisition device, a laser execution device and a control device, wherein the control device is communicatively connected with the execution device, the image acquisition device and the sensor device on the material laying platform; The cloth laser cutting method comprises: When the sensing device detects that there is cloth to be cut on the material laying platform, it generates a recognition instruction and transmits it to the control device, and the control device controls the image acquisition device to acquire the cloth image of the cloth to be cut based on the recognition instruction; The control device performs defect detection on the cloth image based on a preset detection model, and determines an effective cutting area of ​​the cloth to be cut in the cloth image based on the defect detection; The control device performs pattern boundary recognition on the effective cutting area, determines the to-be-cut boundary of each to-be-cut pattern in the to-be-cut cloth in the cloth image, and plans a cutting path according to each to-be-cut boundary; The control device controls the laser execution device based on the cutting path to cut each pattern to be cut in the cloth to be cut.

2. The cloth laser cutting method according to claim 1, characterized in that: The control device performs pattern boundary recognition on the effective cutting area to determine the to-be-cut boundary of each to-be-cut pattern in the to-be-cut cloth in the cloth image, comprising: The control device performs pattern edge detection on the effective cutting area to obtain edge pixel coordinate sets corresponding to each of the patterns to be cut, and performs the following steps for each edge pixel coordinate set: Determining whether the edge pixel coordinate set matches a preset cutting coordinate set, and if so, generating the to-be-cut boundary based on the edge pixel coordinate set; If the edge pixel coordinate set does not match the preset cutting coordinate set, a reference pattern template is established based on the preset cutting coordinate set, and the to-be-cut boundary is determined based on a first similarity value between the reference pattern template and the target to-be-cut pattern corresponding to the edge pixel coordinate set.

3. The cloth laser cutting method according to claim 2, characterized in that: The step of determining the to-be-cut boundary based on a first similarity value between the reference pattern template and the target to-be-cut pattern corresponding to the edge pixel coordinate set comprises: Determining whether the first similarity value is greater than or equal to a preset similarity threshold, and if so, generating the to-be-cut boundary based on the reference pattern template; If the first similarity value is less than a preset similarity threshold, rotating the reference pattern template multiple times based on a first preset angle to obtain multiple rotated reference patterns; Generate a plurality of second similarity values ​​between the rotated reference patterns and the target pattern to be cut, perform difference calculation on each of the second similarity values ​​and a preset similarity threshold to obtain a difference calculation result, and generate the boundary to be cut according to each of the difference calculation results.

4. The cloth laser cutting method according to claim 3, characterized in that: The step of generating the to-be-cut boundary according to each of the difference operation results comprises: Performing absolute value calculation on each difference calculation result to obtain multiple similarity absolute difference values; Determine a minimum value among a plurality of the similarity absolute differences, and judge whether the difference result corresponding to the minimum value is a non-negative value, and if it is a non-negative value, generate the to-be-cut boundary based on the rotated reference image corresponding to the minimum value; If the difference result corresponding to the minimum value is a negative value, determining a target rotation reference pattern corresponding to the minimum value among the multiple rotation reference patterns, and rotating the target rotation reference pattern multiple times based on a second preset angle to obtain multiple new rotation reference patterns; Based on a plurality of new rotated reference patterns, a step of generating second similarity values ​​between the plurality of rotated reference patterns and the target pattern to be cut is performed until the difference result corresponding to the minimum value is a non-negative value.

5. The cloth laser cutting method according to claim 1, characterized in that: The step of the control device performing defect detection on the cloth image based on a preset detection model comprises: The control device controls the filtering process of the cloth image to obtain a filtered image, and divides the filtered image to obtain a plurality of regular images, each of which contains an image of a pattern to be cut; For each of the regular images, a feature vector of each pixel in the regular image is extracted based on a preset detection model, and a saliency value of each pixel is calculated based on the feature vector of each pixel. The calculation formula is: The regular image is converted into a grayscale image based on each of the saliency values, and a grayscale threshold of the grayscale image is determined, wherein the conversion formula of the grayscale image is: Where Si represents saliency, n represents the number of pixels, Ri represents the feature vector of the i-th pixel, |·| represents the modulus of the vector, and Gi represents the grayscale value of the i-th pixel in the grayscale image; The grayscale value of each pixel in the grayscale image is compared with the grayscale threshold value to generate a comparison result, and defect detection is performed on the fabric image based on the comparison result.

6. The cloth laser cutting method according to claim 5, characterized in that: Before the step of extracting the feature vector of each pixel in the regular image based on the preset detection model for each regular image, the following steps are included: Acquire a large number of sample images, and divide the sample images into training sample images and verification sample images based on a preset ratio; Iteratively training a preset initial model based on the training sample images, and when the iterative training reaches a preset number of times, verifying the preset initial model based on the verification sample images to obtain a verification result; The loss function value of the preset initial model is calculated based on the verification result, and it is determined whether the loss function value is less than a preset threshold, wherein the calculation formula of the loss function value is: Among them, L represents the loss function value, α represents the color weight value of the preset initial model, M represents the number of verification sample images, ‖·‖ represents the modulus of the matrix, and x k represents the color feature matrix of the verification result corresponding to the kth verification sample image, x k0 represents the reference color feature matrix corresponding to the kth validation sample image, β represents the texture weight value of the preset initial model, and h k Represents the texture feature matrix of the verification result corresponding to the kth verification sample image, represents the transpose of the texture feature matrix, h k0 represents the reference color feature matrix corresponding to the kth verification sample image, represents the transpose of the reference color feature matrix; If it is less than a preset threshold, the preset initial model is generated as a preset recognition model according to the loss function value; If the loss function value is greater than a preset threshold, the model parameters of the preset initial model are updated, and for the preset initial model after the model parameters are updated, the step of iteratively training the preset initial model based on the training sample image is performed.

7. The cloth laser cutting method according to claim 6, characterized in that: The step of generating the preset initial model into a preset recognition model according to the loss function value comprises: Find the historical loss function value generated by the previous preset number of iterative trainings, and fit the historical loss function value and the loss function value together into a function curve; According to the function curve, determining whether the preset initial model converges, and if converged, generating the preset initial model as a preset recognition model; If the preset initial model does not converge, the model parameters of the preset initial model are updated, and for the preset initial model after the model parameters are updated, the step of iteratively training the preset initial model based on the training sample images is performed.

8. The cloth laser cutting method according to any one of claims 1 to 7, characterized in that: The step of planning a cutting path according to each of the boundaries to be cut comprises: Determine the boundaries to be planned located at the edges of the effective cutting area among the boundaries to be cut, and perform the following steps for each boundary to be planned: Determine the first boundary adjacent to the boundary to be planned in each boundary to be cut, and calculate the operation coefficient between the boundary to be planned and each first boundary, the calculation formula is: Among them, S j represents the operation coefficient between the boundary to be planned and the jth first boundary, p represents the number of first boundaries, G min (j) represents the function for calculating the shortest running time of the laser actuator from the boundary to be planned to the jth first boundary, δ min (j) represents a function for calculating the shortest cutting time for the laser actuator to cut the jth first boundary, u j Indicates the equalization coefficient corresponding to the running time and the cutting time; Determine the minimum value of each of the operation coefficients, and find the second boundary corresponding to the minimum value of the coefficient in each of the first boundaries, and remove the boundary to be planned and the second boundary from each of the boundaries to be cut to obtain a new boundary to be cut; The second boundary is used as a new boundary to be planned, and based on the new boundary to be planned and the new boundary to be cut, a step of determining a first boundary adjacent to the boundary to be planned in each boundary to be cut is performed until each boundary to be cut generates a corresponding minimum coefficient value; The minimum values ​​of the coefficients are summed to generate an operation path coefficient corresponding to the boundary to be planned; After each of the to-be-planned boundaries generates its own corresponding operation path coefficient, the operation path coefficients are compared to determine the minimum path coefficient among the operation path coefficients, and the operation path corresponding to the minimum path coefficient is used as the cutting path.

9. A cloth laser cutting system based on artificial intelligence, characterized in that: The cloth laser cutting system comprises a material laying platform, an image acquisition device, a laser execution device and a control device, wherein the control device is communicatively connected with the execution device, the image acquisition device and the sensor device on the material laying platform; The control device includes a memory, a processor, a communication bus, and a control program stored in the memory: The communication bus is used to realize the connection and communication between the processor and the storage; The processor is used to execute the control program to implement the steps of the artificial intelligence-based cloth laser cutting method as described in any one of claims 1-8.

10. A medium, characterized in that The medium is a readable storage medium, and a control program is stored on the readable storage medium. When the control program is executed by the processor, the steps of the artificial intelligence-based cloth laser cutting method as described in any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Machine vision cutting method applied to laser cutting machine

    CN108875740A

  • Cloth defect detection method with defect grading function

    CN110889837A

  • Metal plate cutting processing method and system based on image segmentation

    CN116630255A

  • Laser cutting control method

    CN118478113A

  • Artificial intelligence control method and system for automatic cloth cutting and conveying device

    CN118790806A

Cited By

  • Laser cutting path optimization method, device and equipment for shoe material sleeving

    CN122163026A