Garment piece quality inspection method, device, electronic device and storage medium

Through machine vision technology, the use of garment image acquisition, contour matching and similarity calculation has solved the problems of slow manual visual quality inspection and high error rate, and achieved efficient and accurate garment quality inspection.

CN115457016BActive Publication Date: 2025-09-16INSPUR COMM TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211196833.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-29
Publication Date
2025-09-16
Estimated Expiration
2042-09-29

AI Technical Summary

Technical Problem

Existing garment quality inspection mainly relies on manual vision, resulting in slow inspection speed, high misjudgment rate and unstable test results, which is difficult to meet the needs of industrial production.

Method used

Machine vision is used to replace human vision. By collecting garment images, the first contour is extracted and matched with the target contour, and the similarity is calculated for quality inspection, including minimum circumscribed rectangle rotation, contour matching and similarity sampling point calculation.

Benefits of technology

It improves the efficiency and accuracy of quality inspection, reduces the burden on quality inspectors, and improves productivity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115457016B_ABST
    Figure CN115457016B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of computer vision technology and provides a method, apparatus, electronic device, and storage medium for inspecting garment parts. The method comprises: acquiring an image of a garment part to be inspected on a workbench; extracting a first contour of the garment part to be inspected based on the image, and determining a first target contour that matches the first contour; and determining the similarity between a second contour of the garment part to be inspected and the first target contour, thereby inspecting the garment part based on the similarity. The first and second contours are extracted from different images. By using machine vision to replace manual visual inspection, the present invention can reduce the workload of inspectors and improve inspection efficiency and accuracy, thereby increasing productivity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision technology, and in particular to a garment piece quality inspection method, device, electronic equipment and storage medium. Background Art

[0002] Currently, surface defect detection for garment pieces is largely performed by human vision. However, manual inspection is slow and unsuitable for large-scale industrial production. Furthermore, manual inspection primarily relies on the inspector's meticulousness and experience. Different inspectors may have inconsistent standards, making missed inspections a common occurrence. Even experienced inspectors can make misjudgments. Consequently, human vision is subject to bias, resulting in high error rates and unstable test results, making it difficult to guarantee quality. Summary of the Invention

[0003] The present invention provides a garment piece quality inspection method, device, electronic device and storage medium to solve the problem of low garment piece quality inspection accuracy. By using machine vision instead of manual visual quality inspection, the workload of quality inspectors can be reduced and the quality inspection efficiency and accuracy can be improved, thereby improving productivity.

[0004] The present invention provides a method for inspecting garment pieces, comprising:

[0005] Collect images of garment pieces to be inspected on the workbench;

[0006] extracting a first contour of the garment piece to be inspected according to the image, and determining a first target contour that matches the first contour;

[0007] The similarity between the second contour of the garment piece to be inspected and the first target contour is determined, so as to perform quality inspection on the garment piece to be inspected based on the similarity, wherein the first contour and the second contour are extracted from different images.

[0008] In one embodiment, extracting the first contour of the garment piece to be inspected based on the image includes:

[0009] Determine the minimum circumscribed rectangle of the garment piece to be inspected according to the image;

[0010] The minimum circumscribed rectangle is rotated by a set rotation angle, and the first outline of the garment piece to be inspected is extracted from the rotated minimum circumscribed rectangle.

[0011] In one embodiment, determining a first target profile that matches the first profile includes:

[0012] determining a matching result between the first contour and each second target contour;

[0013] A first target contour matching the first contour is determined according to the matching result, and the second target contour includes the first target contour.

[0014] In one embodiment, determining the second contour of the garment piece to be inspected includes:

[0015] cropping the image of the garment piece to be inspected according to the minimum circumscribed rectangle after rotation;

[0016] A second contour of the garment piece to be inspected is extracted from the cropped image.

[0017] In one embodiment, determining the similarity between the second contour of the garment piece to be inspected and the first target contour includes:

[0018] Sampling the contour points of the second contour to obtain sampling points;

[0019] The distance between the sampling point and the first object contour is determined, and the similarity between the second contour and the first object contour is determined based on the distance.

[0020] In one embodiment, the quality inspection of the garment pieces to be inspected based on the similarity includes:

[0021] Determine a comparison result between the similarity and a set threshold;

[0022] The quality inspection status of the garment piece to be inspected is determined according to the comparison result.

[0023] In one embodiment, a second target contour is projected onto the workbench, and the second target contour is used for adjusting position information of the garment piece to be inspected on the workbench.

[0024] The present invention also provides a garment piece quality inspection device, comprising:

[0025] An acquisition module is used to acquire images of garment pieces to be inspected on the workbench;

[0026] a determination module, configured to extract a first contour of the garment piece to be inspected based on the image, and determine a first target contour that matches the first contour;

[0027] The quality inspection module is used to determine the similarity between the second contour of the garment piece to be inspected and the first target contour, so as to perform quality inspection on the garment piece to be inspected based on the similarity, wherein the first contour and the second contour are extracted from different images.

[0028] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above-described garment piece quality inspection methods is implemented.

[0029] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-mentioned garment piece quality inspection methods.

[0030] The garment piece quality inspection method, device, electronic device, and storage medium provided by the present invention collect an image of a garment piece to be inspected on a workbench; extract a first contour of the garment piece from the image, determine a first target contour that matches the first contour; and determine the similarity between a second contour of the garment piece to be inspected and the first target contour, thereby inspecting the garment piece based on the similarity. The first and second contours are extracted from different images. By using machine vision instead of manual visual inspection, the present invention can reduce the workload of quality inspectors and improve inspection efficiency and accuracy, thereby increasing productivity. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0032] Figure 1 This is one of the flow charts of the garment piece quality inspection method provided by the present invention;

[0033] Figure 2 This is the second flow chart of the garment piece quality inspection method provided by the present invention;

[0034] Figure 3 It is a structural schematic diagram of the garment piece quality inspection device provided by the present invention;

[0035] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0036] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0037] The following combination Figures 1-4 The invention describes a garment piece quality inspection method, device, electronic device and storage medium.

[0038] Specifically, the present invention provides a method for quality inspection of garment pieces, referring to Figure 1 , Figure 1 This is one of the flow charts of the garment piece quality inspection method provided by the present invention.

[0039] The garment piece quality inspection method provided by the embodiment of the present invention includes:

[0040] Step 100, collecting images of garment pieces to be inspected on a workbench;

[0041] It should be noted that the garment piece quality inspection device includes a workbench, a projection device, a shooting device, and a quality inspection unit, wherein the workbench has a holding surface for holding the garment piece to be inspected; the projection device is used to project the standard outline onto the workbench; the shooting device is used to shoot the garment piece to be inspected held on the holding surface; the quality inspection unit performs image recognition processing on the garment piece to be inspected based on the shooting data of the garment piece to be inspected obtained by the shooting device, and determines whether the garment piece to be inspected is qualified based on the processing result.

[0042] A second target outline is projected onto the workbench. This second target outline refers to the outline of a standard garment piece, i.e., a standard outline. This second target outline is used to adjust the position of the garment piece to be inspected on the workbench. For example, an original standard garment piece outline file in txt format is parsed into an image, where a txt file contains a set of standard garment piece outlines. The parsed image contains the outlines of all standard garment pieces. The parsed image is then projected onto the workbench using a projector. The garment piece to be inspected is then ironed flat and placed on the workbench in the direction of the second target outline. This ensures that the placement information (e.g., placement direction, placement area, etc.) of the garment piece to be inspected is consistent with the placement information of the second target outline. This improves the efficiency of image acquisition of the garment piece to be inspected, thereby improving the efficiency of garment piece quality inspection.

[0043] After the garment pieces to be inspected are placed on a workbench, an image of the garment pieces to be inspected on the workbench is captured by a photographing device (such as an industrial camera).

[0044] Step 200: extracting a first contour of the garment piece to be inspected based on the image, and determining a first target contour that matches the first contour;

[0045] After capturing an image of the garment piece to be inspected, a first contour of the garment piece to be inspected is extracted based on the image, and then a first target contour matching the first contour is determined. The first target contour matching the first contour may include multiple first target contours, and the first target contour refers to a contour within the second target contour (i.e., the standard contour) that matches the first contour of the garment piece to be inspected.

[0046] It should be noted that the purpose of determining the first target contour that matches the first contour is to perform a rough quality inspection on the garment pieces to be inspected, thereby screening out defective garment pieces. For example, a contour matching algorithm is used to match the first contour with each second target contour. If the degree of match between the first contour and each second target contour falls below a set threshold, the first contour is determined to be mismatched with each second target contour, indicating that the garment piece to be inspected has a defect, such as a missing edge or corner.

[0047] Step 300 : Determine the similarity between the second contour of the garment piece to be inspected and the first target contour, so as to perform quality inspection on the garment piece to be inspected based on the similarity, wherein the first contour and the second contour are extracted from different images.

[0048] After a rough quality inspection of the garment piece, further fine quality inspection is required to improve the accuracy of the inspection. Specifically, the similarity between the second contour of the garment piece and the first target contour is determined, and then the garment piece is inspected using this similarity. For example, if the similarity between the second contour of the garment piece and the first target contour is greater than or equal to a set threshold, the garment piece is deemed qualified. If the similarity between the second contour of the garment piece and the first target contour is less than the set threshold, the garment piece is deemed unqualified. The first contour and the second contour are extracted from different images, and the second contour has a higher accuracy than the first contour.

[0049] The garment piece quality inspection method provided by an embodiment of the present invention collects an image of a garment piece to be inspected on a workbench; extracts a first contour of the garment piece from the image, determines a first target contour that matches the first contour; and determines the similarity between a second contour of the garment piece to be inspected and the first target contour. The garment piece to be inspected is inspected based on this similarity, with the first and second contours extracted from different images. By using machine vision instead of manual visual inspection, the present invention can reduce the workload of inspectors while improving inspection efficiency and accuracy, thereby increasing productivity.

[0050] Based on the above embodiment, extracting the first contour of the garment piece to be inspected based on the image includes: determining a minimum circumscribed rectangle of the garment piece to be inspected based on the image; rotating the minimum circumscribed rectangle using a set rotation angle, and extracting the first contour of the garment piece to be inspected from the rotated minimum circumscribed rectangle.

[0051] After capturing an image of the garment piece to be inspected, the contour of the garment piece to be inspected is detected based on the image, and then the minimum bounding rectangle of the contour of the garment piece to be inspected is determined. To further improve the accuracy of the quality inspection, the position information of the minimum bounding rectangle needs to be adjusted so that the minimum bounding rectangle matches the two-dimensional coordinate system. For example, the rotation angle of the minimum bounding rectangle is calculated, and then the calculated rotation angle is rotated around a certain point in the image so that the angle between the width of the minimum bounding rectangle and the X-axis in the two-dimensional coordinate system is 0, and the angle between the height of the minimum bounding rectangle and the Y-axis in the two-dimensional coordinate system is 0. Finally, a contour extraction algorithm is used to extract the first contour of the garment piece to be inspected from the rotated minimum bounding rectangle. For example, the rotated minimum bounding rectangle image is converted into a binary image, and the first contour of the garment piece to be inspected is extracted based on the binary image.

[0052] In an embodiment of the present invention, the minimum circumscribed rectangle of the contour of the garment piece to be inspected is determined, the minimum circumscribed rectangle is rotated by a set rotation angle, and the first contour of the garment piece to be inspected is extracted from the rotated minimum circumscribed rectangle. Based on this, the accuracy of the first contour extraction can be improved, thereby improving the accuracy of the garment piece quality inspection.

[0053] Based on the above embodiment, determining the first target contour matching the first contour includes: determining matching results between the first contour and each second target contour; and determining the first target contour matching the first contour based on the matching results, wherein the second target contour includes the first target contour.

[0054] A contour matching algorithm is used to match the first contour with each second target contour to obtain a matching result. Then, a first target contour matching the first contour is determined based on the matching result. For example, the matching degree between the first contour and each second target contour is obtained through the matching result, and the second target contour with a matching degree greater than a set threshold is used as the first target contour. That is, one or more first target contours greater than the set threshold are used as similar contours of the garment piece to be inspected. Based on this, a rough quality inspection of the garment piece to be inspected is achieved.

[0055] The embodiment of the present invention determines the matching results between the first contour and each second target contour, and then determines the first target contour matching the first contour based on the matching results, thereby achieving a rough quality inspection of the garment parts to be inspected and improving the accuracy of the garment part quality inspection.

[0056] Based on the above embodiment, determining the second contour of the garment piece to be inspected includes: cropping the image of the garment piece to be inspected according to the rotated minimum circumscribed rectangle; and extracting the second contour of the garment piece to be inspected from the cropped image.

[0057] After determining the minimum bounding rectangle after rotation, the image of the garment piece to be inspected is cropped according to the minimum bounding rectangle after rotation. For example, the image of the garment piece to be inspected is cropped according to the contour of the minimum bounding matrix. A contour extraction algorithm is then used to extract a second contour of the garment piece to be inspected from the cropped image. It will be appreciated that the first contour is extracted from the captured image of the garment piece to be inspected, and the second contour is extracted from the cropped image.

[0058] In an embodiment of the present invention, the image of the garment part to be inspected is cropped according to the rotated minimum circumscribed rectangle, and then the second contour of the garment part to be inspected is extracted from the cropped image. Based on this, the accuracy of the second contour extraction can be improved, thereby improving the accuracy of the garment part quality inspection.

[0059] Based on the above embodiment, determining the similarity between the second contour of the garment piece to be inspected and the first target contour includes: sampling contour points of the second contour to obtain sampling points; determining the distance between the sampling points and the first target contour, and determining the similarity between the second contour and the first target contour based on the distance.

[0060] After extracting the second contour of the garment piece to be inspected, the contour points of the second contour are sampled to obtain sampling points, and then the distance between the sampling points and the first target contour is determined. The similarity between the second contour and the first target contour is determined based on the distance. For example, the contour points of the second contour of the garment piece to be inspected are sampled to obtain sampling points, the proportion of the sampling points is customized, the distance from the sampling points to each first target contour is calculated, and a distance threshold is set according to the actual production standard of the garment piece to be inspected. The similarity between the second contour and the first target contour is determined based on the distance, wherein the smaller the similarity value, the smaller the similarity between individuals, and the larger the similarity value, the greater the individual difference. For example, the distance between the sampling points and the first target contour is calculated using Euclidean distance (considering the distance between vectors). The Euclidean distance determines the degree of similarity by the distance between vectors. The closer the distance, the more similar, that is, the higher the similarity.

[0061] The cosine distance (considering the direction between the vectors) can also be used to calculate the similarity between the second contour and the first target contour, wherein the cosine distance judges the similarity of the vectors by the size of the angle between the vectors. The smaller the angle, the higher the similarity.

[0062] You can also use the Euclidean distance and cosine similarity normalization method to calculate the contour similarity. For example, the image of the garment piece to be inspected and the image of the standard garment piece are binarized, and then the image is evenly segmented. The binary feature extraction of the segmented local image is performed to construct a convolution matrix. Finally, the Euclidean distance and cosine similarity normalization method is used to calculate the contour similarity.

[0063] In the embodiment of the present invention, sampling points are obtained by sampling the contour points of the second contour, and then the distance between the sampling points and the first target contour is determined. Based on the distance, the similarity between the second contour and the first target contour is determined. Based on this, the accuracy of the similarity is improved, thereby improving the accuracy of garment piece quality inspection.

[0064] Based on the above embodiment, the quality inspection of the garment pieces to be inspected based on the similarity includes: determining a comparison result between the similarity and a set threshold; and determining a quality inspection status of the garment pieces to be inspected according to the comparison result.

[0065] After determining the similarity between the second contour of the garment piece to be inspected and the first target contour, the similarity is compared with a set threshold, and then the quality inspection status of the garment piece to be inspected is determined based on the comparison result. For example, if the comparison result is greater than or equal to the set threshold, the garment piece to be inspected is judged to be qualified; if the comparison result is less than the set threshold, the garment piece to be inspected is judged to be unqualified.

[0066] The embodiment of the present invention compares the similarity between the second contour of the garment piece to be inspected and the first target contour with a set threshold, and then determines the quality inspection status of the garment piece to be inspected based on the comparison result, thereby improving the accuracy of garment piece quality inspection.

[0067] refer to Figure 2 The embodiment of the present invention provides a specific method for implementing garment piece quality inspection. In the embodiment of the present invention, the garment piece quality inspection includes the following steps:

[0068] Step 1: Projection Contour Analysis: The original standard garment piece contour file (in txt format) is parsed into an image. The parsed standard garment piece contour (i.e., the standard contour) is then projected onto the workbench using a projector. A txt file contains a set of standard garment piece contours, and the parsed image contains the contours of all standard garment pieces.

[0069] Step 2: Ironing and Arranging the Pieces for Inspection: After ironing the garments neatly, place them on a workbench according to the standard outline and place them under an industrial camera for photography. This captures images of the garments for inspection. This can be done manually or via a smart device.

[0070] Step 3: Image rotation: Detect the outline of the garment piece to be inspected based on the captured image, determine the minimum bounding rectangle of the outline, and then calculate the rotation angle of the minimum bounding rectangle. Then, rotate the image around a certain point to make the angle between the width of the minimum bounding rectangle and the X-axis in the two-dimensional coordinate system equal to 0, and the angle between the height of the minimum bounding rectangle and the Y-axis in the two-dimensional coordinate system equal to 0.

[0071] Step 4: Contour Matching: Extract the first contour of the garment piece rotated in Step 3 and match it against all the standard contours analyzed in Step 1 using a contour matching algorithm. A threshold is set and a matching result is obtained. If the garment piece has defects, such as missing edges or corners, no matching result will be obtained, and the user will be prompted with a direct indication that the garment piece is defective or incorrectly positioned. If the matching result indicates that at least one first target contour similar to the first contour exists among the standard contours, further matching is performed to find the contour that most closely matches the size and scale of the garment piece.

[0072] Step 5: Image cropping and contour extraction: Crop the image according to the minimum bounding rectangle of the garment piece to be inspected, and extract the second contour of the garment piece to be inspected in the cropped image. The first target contour matched in step 4 also needs to be cropped according to the minimum bounding rectangle, and the contour in the cropped image is extracted.

[0073] Step 6: Calculate Contour Similarity: Sample the contour points of the garment piece to be inspected to obtain sampling points. The proportion of sampling points is customized. The distances from the sampling points to each of the first target contours in Step 5 are calculated and counted. A distance threshold is set according to the actual production standard of the garment piece to be inspected. Ultimately, the contour most similar to the garment piece to be inspected is matched, and the garment piece to be inspected is deemed qualified. For example, the Euclidean distance (considering the distance between vectors) is used to calculate the distance between the sampling points and the first target contour. The Euclidean distance determines the degree of similarity by the distance between vectors. The closer the distance, the greater the similarity, i.e., the higher the similarity.

[0074] The embodiment of the present invention uses an industrial camera and projector to inspect garment pieces. First, the outline of the standard garment piece is analyzed into an image and projected onto a workbench using a projector. The garment piece to be inspected is then ironed flat and placed on the workbench in the direction of the standard outline. A photo is taken and transmitted back to the quality inspection unit. The quality inspection unit extracts the outline of the garment piece to be inspected and the outline in the standard outline image. A contour matching algorithm is used to match the contour of the garment piece to the corresponding contour in the standard outline. If no match is found, it indicates that the garment piece is defective or the garment piece is placed incorrectly. After a match is found, the contour is cropped using the minimum circumscribed rectangle and the contour is extracted from the cropped image. Finally, a sampling method is used to calculate the similarity of the contours. The ratio of sampling points is customized. The distance from the sampling point to the matched contour is calculated and counted. A distance threshold is set according to the actual production standard of the garment piece. Finally, the contour that is most similar to the garment piece to be inspected is matched. By using machine vision to replace manual visual inspection, the present invention can not only reduce the workload of quality inspectors, but also improve the efficiency and accuracy of quality inspection, thereby increasing productivity.

[0075] Figure 3 This is a schematic diagram of the structure of the garment piece quality inspection device provided by the present invention, referring to Figure 3An embodiment of the present invention provides a garment piece quality inspection device, including a collection module 301, a determination module 302 and a quality inspection module 303.

[0076] The acquisition module 301 is used to acquire images of garment pieces to be inspected on the workbench;

[0077] The determining module 302 is configured to extract a first contour of the garment piece to be inspected based on the image, and determine a first target contour that matches the first contour;

[0078] The quality inspection module 303 is configured to determine the similarity between the second contour of the garment piece to be inspected and the first target contour, so as to perform quality inspection on the garment piece to be inspected based on the similarity, wherein the first contour and the second contour are extracted from different images.

[0079] The garment piece inspection device provided by an embodiment of the present invention collects an image of a garment piece to be inspected on a workbench; extracts a first contour of the garment piece from the image, determines a first target contour that matches the first contour; and determines the similarity between a second contour of the garment piece to be inspected and the first target contour, thereby inspecting the garment piece based on the similarity. The first contour and the second contour are extracted from different images. By using machine vision instead of manual visual inspection, the present invention can reduce the workload of quality inspectors and improve inspection efficiency and accuracy, thereby increasing productivity.

[0080] In one embodiment, the determining module 302 is specifically configured to:

[0081] Determine the minimum circumscribed rectangle of the garment piece to be inspected according to the image;

[0082] The minimum circumscribed rectangle is rotated by a set rotation angle, and the first outline of the garment piece to be inspected is extracted from the rotated minimum circumscribed rectangle.

[0083] In one embodiment, the determining module 302 is specifically configured to:

[0084] determining a matching result between the first contour and each second target contour;

[0085] A first target contour matching the first contour is determined according to the matching result, and the second target contour includes the first target contour.

[0086] In one embodiment, the determining module 302 is specifically configured to:

[0087] cropping the image of the garment piece to be inspected according to the minimum circumscribed rectangle after rotation;

[0088] A second contour of the garment piece to be inspected is extracted from the cropped image.

[0089] In one embodiment, the quality inspection module 303 is specifically configured to:

[0090] Sampling the contour points of the second contour to obtain sampling points;

[0091] The distance between the sampling point and the first object contour is determined, and the similarity between the second contour and the first object contour is determined based on the distance.

[0092] In one embodiment, the quality inspection module 303 is specifically configured to:

[0093] Determine a comparison result between the similarity and a set threshold;

[0094] The quality inspection status of the garment piece to be inspected is determined according to the comparison result.

[0095] A second target contour is projected onto the workbench, and the second target contour is used for adjusting position information of the garment piece to be inspected on the workbench.

[0096] Figure 4 An example of a physical structure diagram of an electronic device is shown below. Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430, and a communication bus 440, wherein the processor 410, the communication interface 420, and the memory 430 communicate with each other via the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the garment piece quality inspection method, which includes:

[0097] Collect images of garment pieces to be inspected on the workbench;

[0098] extracting a first contour of the garment piece to be inspected according to the image, and determining a first target contour that matches the first contour;

[0099] The similarity between the second contour of the garment piece to be inspected and the first target contour is determined, so as to perform quality inspection on the garment piece to be inspected based on the similarity, wherein the first contour and the second contour are extracted from different images.

[0100] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0101] On the other hand, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the garment piece quality inspection method provided by the above methods, the method comprising:

[0102] Collect images of garment pieces to be inspected on the workbench;

[0103] extracting a first contour of the garment piece to be inspected according to the image, and determining a first target contour that matches the first contour;

[0104] The similarity between the second contour of the garment piece to be inspected and the first target contour is determined, so as to perform quality inspection on the garment piece to be inspected based on the similarity, wherein the first contour and the second contour are extracted from different images.

[0105] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0106] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.

[0107] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A method for quality inspection of garment pieces, characterized in that: include: Collect images of garment pieces to be inspected on the workbench; extracting a first contour of the garment piece to be inspected according to the image, and determining a first target contour that matches the first contour; determining a similarity between a second contour of the garment piece to be inspected and the first target contour, so as to perform a quality inspection on the garment piece to be inspected based on the similarity, wherein the first contour and the second contour are extracted from different images; The step of extracting a first contour of the garment piece to be inspected according to the image includes: Determine the minimum circumscribed rectangle of the garment piece to be inspected according to the image; Rotating the minimum circumscribed rectangle by a set rotation angle, and extracting the first outline of the garment piece to be inspected from the rotated minimum circumscribed rectangle; The determining of a first target contour matching the first contour comprises: Determining a matching result between the first contour and each second target contour, wherein the second target contour is a contour of a standard garment piece; determining a first target contour matching the first contour according to the matching result, wherein the second target contour includes the first target contour; Determining the second contour of the garment piece to be inspected includes: cropping the image of the garment piece to be inspected according to the minimum circumscribed rectangle after rotation; A second contour of the garment piece to be inspected is extracted from the cropped image.

2. The garment piece quality inspection method according to claim 1, characterized in that: Determining the similarity between the second contour of the garment piece to be inspected and the first target contour includes: Sampling the contour points of the second contour to obtain sampling points; The distance between the sampling point and the first object contour is determined, and the similarity between the second contour and the first object contour is determined based on the distance.

3. The method for inspecting garment parts according to claim 1, wherein: The performing quality inspection on the garment pieces to be inspected based on the similarity comprises: Determine a comparison result between the similarity and a set threshold; The quality inspection status of the garment piece to be inspected is determined according to the comparison result.

4. The method for inspecting garment parts according to claim 1, wherein: A second target contour is projected onto the workbench, and the second target contour is used for adjusting position information of the garment piece to be inspected on the workbench.

5. A garment piece quality inspection device, characterized in that: include: An acquisition module is used to acquire images of garment pieces to be inspected on the workbench; a determination module, configured to extract a first contour of the garment piece to be inspected based on the image, and determine a first target contour that matches the first contour; a quality inspection module, configured to determine a similarity between a second contour of the garment piece to be inspected and the first target contour, so as to perform quality inspection on the garment piece to be inspected based on the similarity, wherein the first contour and the second contour are extracted from different images; The determination module is further configured to determine a minimum bounding rectangle of the garment piece to be inspected based on the image; rotate the minimum bounding rectangle using a set rotation angle, and extract a first contour of the garment piece to be inspected from the rotated minimum bounding rectangle; The determining module is further configured to determine a matching result between the first contour and each second target contour; determine a first target contour matching the first contour based on the matching result, wherein the second target contour includes the first target contour; and the second target contour is a contour of a standard garment piece; The quality inspection module is further configured to crop the image of the garment piece to be inspected according to the rotated minimum circumscribed rectangle; and extract the second contour of the garment piece to be inspected from the cropped image.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the garment piece quality inspection method according to any one of claims 1 to 4 is implemented.

7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the garment piece quality inspection method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Shape context-based clothing style retrieval method

    CN110458020A

  • Method and device for detecting surface defects of products on assembly line and storage medium

    CN112164050A