A method and device for detecting clothing defects
By deploying machine vision systems and robot arms on the clothing production assembly line, combining image enhancement and generation network technology, efficient and accurate clothing defect detection is achieved, solving the problems of low detection efficiency and inaccurate detection in the prior art.
Patent Information
- Application Number
- CN202410986527.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2044-07-23
AI Technical Summary
In the prior art, the detection efficiency of clothing defects is low and inaccurate, which makes it impossible to effectively meet the high market requirements for clothing quality.
By obtaining the production information of the clothing, the clothing to be inspected is extracted from the production assembly line based on the machine vision system and the robot arm, and the images of it are obtained from each angle. Image enhancement processing is performed on the image, clothing feature parameters are determined, and defect areas are identified through the generation network, and finally the defect areas are marked in the image.
It improves the efficiency and accuracy of clothing quality inspection, reduces the cost of sampling inspection, and makes clothing production more refined and efficient.
Smart Images

Figure CN118982501B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a clothing defect detection method, device, computer-readable medium and electronic device. Background Art
[0002] With the continuous upgrading of consumption levels, the public has higher and higher requirements for the quality and appearance of clothing products. Good surface quality, such as no flaws, no deformation, no color difference, etc., has become an important indicator for measuring clothing quality. In order to meet market demand and improve product competitiveness, clothing manufacturers need to strengthen the control of product quality, and surface defect detection is an important means to achieve this goal. In the prior art, clothing quality is generally monitored during the production process through manual inspection. This method is inefficient and prone to omissions, which in turn causes the problem of inaccurate clothing defect detection. Summary of the invention
[0003] The embodiments of the present application provide a clothing defect detection method, device, computer-readable medium and electronic device, which can at least to some extent solve the problem of inaccurate and low efficiency clothing defect detection.
[0004] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.
[0005] According to one aspect of the present application, a clothing defect detection method is provided, comprising: obtaining production information of clothing; extracting clothing to be inspected from a production line based on the production information, and obtaining clothing images of the clothing to be inspected at various angles; performing image enhancement processing on the clothing image to generate an enhanced image; determining clothing feature parameters in the enhanced image according to pixel values of the enhanced image, and detecting defective areas from the enhanced image according to the pixel values and the clothing feature parameters; and marking the defective areas in the clothing image.
[0006] In the present application, based on the aforementioned scheme, the garments to be inspected are extracted from the production line based on the production information, and garment images of the garments to be inspected at various angles are obtained, including: determining the sampling frequency corresponding to the current moment based on the production time, production quantity and required quality level in the production information; deploying a machine vision system and a robot arm on the production line, identifying the position, color and style of the garments through machine vision technology, and controlling the robot arm to grab the garments to be inspected from the production line according to the sampling frequency and rules; and obtaining garment images of the garments to be inspected at various angles.
[0007] In the present application, based on the aforementioned scheme, it also includes: if the frequency of defects in the sampling results within a unit time is less than or equal to the set threshold, the sampling frequency is adaptively reduced; if the frequency of defects in the sampling results within a unit time is higher than the set threshold, the sampling frequency is increased and a quality investigation is triggered.
[0008] In the present application, based on the aforementioned scheme, the image enhancement processing is performed on the clothing image to generate an enhanced image, including: dividing the original image into multiple regional images, and converting the regional images from the spatial domain to the logarithmic domain; applying filtering templates of different scales to filter the regional images, and decomposing the filtered images in different dimensions to generate image components; based on the filtering templates, local contrast enhancement is performed on the image components to generate local enhancement features; the local enhancement features are synthesized to generate an enhanced image.
[0009] In the present application, based on the aforementioned solution, the dividing the original image into a plurality of regional images includes: determining the size of each grid area based on pixel information of the original image, and dividing the original image into a plurality of regional images.
[0010] In the present application, based on the aforementioned scheme, the clothing feature parameters of the enhanced image are determined according to the pixel values of the enhanced image, and the defective area is detected from the enhanced image according to the pixel values and the clothing feature parameters, including: determining the clothing feature parameters of the enhanced image according to the pixel values of the enhanced image; inputting a preset generation network according to the pixel values and the clothing feature parameters to generate a reconstructed feature; comparing the reconstructed feature with the clothing feature parameters to identify the defective area.
[0011] In the present application, based on the aforementioned solution, it also includes: feeding back the defect identification results to the production process to guide quality improvement and defect repair; collecting data in the defect identification process to optimize the deep learning model and difference generation algorithm.
[0012] According to one aspect of the present application, a clothing defect detection device is provided, comprising:
[0013] An acquisition unit, used for acquiring production information of clothing;
[0014] A sampling unit, used to sample garments to be inspected from the production line based on the production information, and obtain garment images of the garments to be inspected at various angles;
[0015] An enhancement unit, used for performing image enhancement processing on the clothing image to generate an enhanced image;
[0016] A detection unit, configured to determine a clothing feature parameter in the enhanced image according to a pixel value of the enhanced image, and detect a defective area from the enhanced image according to the pixel value and the clothing feature parameter;
[0017] The marking unit is used to mark the defective area in the clothing image.
[0018] In the present application, based on the aforementioned scheme, the garments to be inspected are extracted from the production line based on the production information, and garment images of the garments to be inspected at various angles are obtained, including: determining the sampling frequency corresponding to the current moment based on the production time, production quantity and required quality level in the production information; deploying a machine vision system and a robot arm on the production line, identifying the position, color and style of the garments through machine vision technology, and controlling the robot arm to grab the garments to be inspected from the production line according to the sampling frequency and rules; and obtaining garment images of the garments to be inspected at various angles.
[0019] In the present application, based on the aforementioned scheme, it also includes: if the frequency of defects in the sampling results within a unit time is less than or equal to the set threshold, the sampling frequency is adaptively reduced; if the frequency of defects in the sampling results within a unit time is higher than the set threshold, the sampling frequency is increased and a quality investigation is triggered.
[0020] In the present application, based on the aforementioned scheme, the image enhancement processing is performed on the clothing image to generate an enhanced image, including: dividing the original image into multiple regional images, and converting the regional images from the spatial domain to the logarithmic domain; applying filtering templates of different scales to filter the regional images, and decomposing the filtered images in different dimensions to generate image components; based on the filtering templates, local contrast enhancement is performed on the image components to generate local enhancement features; the local enhancement features are synthesized to generate an enhanced image.
[0021] In the present application, based on the aforementioned solution, the dividing the original image into a plurality of regional images includes: determining the size of each grid area based on pixel information of the original image, and dividing the original image into a plurality of regional images.
[0022] In the present application, based on the aforementioned scheme, the clothing feature parameters of the enhanced image are determined according to the pixel values of the enhanced image, and the defective area is detected from the enhanced image according to the pixel values and the clothing feature parameters, including: determining the clothing feature parameters of the enhanced image according to the pixel values of the enhanced image; inputting a preset generation network according to the pixel values and the clothing feature parameters to generate a reconstructed feature; comparing the reconstructed feature with the clothing feature parameters to identify the defective area.
[0023] In the present application, based on the aforementioned solution, it also includes: feeding back the defect identification results to the production process to guide quality improvement and defect repair; collecting data in the defect identification process to optimize the deep learning model and difference generation algorithm.
[0024] According to one aspect of the present application, a computer-readable medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the clothing defect detection method as described in the above embodiment is implemented.
[0025] According to one aspect of the present application, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the clothing defect detection method as described in the above embodiments.
[0026] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the clothing defect detection method provided in the above-mentioned various optional implementations.
[0027] In the technical solution of the present application, the production information of clothing is obtained; based on the production information, clothing to be inspected is extracted from the production line, and clothing images of the clothing to be inspected at various angles are obtained; the clothing image is subjected to image enhancement processing to generate an enhanced image; the clothing feature parameters in the enhanced image are determined according to the pixel values of the enhanced image, and the defective area is detected from the enhanced image according to the pixel values and the clothing feature parameters; and the defective area is marked in the clothing image. The technical solution of the present application improves the efficiency and accuracy of clothing quality inspection by performing random inspections on clothing in the production line through image enhancement and detection, reduces the cost of random inspections, and makes clothing production more refined and efficient.
[0028] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0030] Figure 1 The flowchart of the clothing defect detection method in one embodiment of the present application is schematically shown.
[0031] Figure 2 The flowchart for image enhancement in one embodiment of the present application is schematically shown.
[0032] Figure 3 A schematic diagram of a clothing defect detection device in an embodiment of the present application is schematically shown.
[0033] Figure 4 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION
[0034] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.
[0035] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.
[0036] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0037] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0038] The implementation details of the technical solution of this application are described in detail below:
[0039] Figure 1FIG. 1 is a flowchart of a method for detecting clothing defects according to an embodiment of the present application. Figure 1 As shown, the clothing defect detection method at least includes steps S110 to S150, which are described in detail as follows:
[0040] In step S110, the production information of the garment is obtained.
[0041] In one embodiment of the present application, specific clothing inspection is performed by acquiring production information of the clothing, wherein the production information may specifically include: production data, production time, required quality level and other information.
[0042] In one embodiment of the present application, the acquisition method can be through a database, or through a sensor to scan the completion information of each garment, and record the time after completion, so as to obtain the production time.
[0043] In step S120, garments to be inspected are extracted from the production line based on the production information, and garment images of the garments to be inspected at various angles are acquired.
[0044] In one embodiment of the present application, based on the production information, garments to be inspected are extracted from the production line, and garment images of the garments to be inspected at various angles are obtained, including:
[0045] Determine the sampling frequency corresponding to the current moment based on the production time, production quantity and required quality level in the production information;
[0046] Deploy a machine vision system and a robot arm on the production line, identify the position, color and style of the clothing through machine vision technology, and control the robot arm to grab the clothing to be inspected from the production line according to the sampling frequency and rules;
[0047] Acquire clothing images of the clothing to be inspected at various angles.
[0048] In one embodiment of the present application, a real-time quality monitoring system (such as machine vision, sensors, etc.) is used to monitor the production process and collect quality data in real time. Based on the production time t, production quantity Num_t and required quality level L in the production information, the sampling frequency Num_t corresponding to the current moment is determined as:
[0049] Num_t=θ t -1 L·Num_t
[0050] Among them, θ tIndicates the sampling factor corresponding to time t. In the above process, the production quantity is statistically analyzed to identify the production peak and stable period. Peak period may increase quality risk due to increased pressure on the production line, so it is necessary to increase the sampling frequency. In this way, adaptive production can be achieved according to actual production conditions.
[0051] In one embodiment of the present application, a machine vision system and a robot arm are deployed on a production line. The position, color, style and other information of clothing are identified through machine vision technology, and the robot arm is automatically guided to accurately grab the clothing to be inspected from the assembly line according to preset sampling frequency and rules.
[0052] Optionally, in this embodiment, a unique identifier is assigned to each garment to be inspected, and RFID or QR code technology is used to achieve real-time tracking during the production process. The inspection results are immediately fed back to the system for dynamic adjustment of subsequent inspection strategies.
[0053] In this embodiment, 3D scanning technology is used to obtain the three-dimensional model of the garment to be inspected, and the virtual image of the garment at various angles is automatically generated through an algorithm. This can not only reduce the workload of physical shooting, but also ensure the consistency and comprehensiveness of the image.
[0054] In one embodiment of the present application, it also includes:
[0055] If the frequency of defects in the sampling results per unit time is less than or equal to the set threshold, the sampling frequency is adaptively reduced;
[0056] If the frequency of defects in the sampling results per unit time is higher than the set threshold, the sampling frequency will be increased and a quality investigation will be triggered.
[0057] Specifically, in this embodiment, a reasonable defect frequency threshold is set according to product quality standards, historical sampling data and risk assessment results. This threshold represents the upper limit of the acceptable number of defects per unit time. The sampling results are monitored and counted in real time using an information system to calculate the frequency of defects per unit time. If the defect frequency in the sampling results is lower than or equal to the set threshold, the system automatically determines that the current product quality status is relatively stable, and the sampling frequency can be appropriately reduced to reduce interference with the production process and improve efficiency. If the defect frequency in the sampling results is higher than the set threshold, the system automatically determines that there is a risk in the current product quality, and the sampling frequency needs to be increased to strengthen the monitoring of product quality.
[0058] In the above process, by adaptively adjusting the sampling frequency, it is possible to reduce unnecessary sampling times and improve sampling efficiency while ensuring product quality. When the defect frequency in the sampling results is higher than the threshold, the quality investigation procedure can be quickly triggered to promptly discover and solve product quality problems and prevent them from expanding. By reducing unnecessary sampling times and promptly discovering and solving problems, the cost losses such as returns and compensation caused by quality problems can be reduced.
[0059] In step S130, image enhancement processing is performed on the clothing image to generate an enhanced image.
[0060] like Figure 2 As shown, in one embodiment of the present application, performing image enhancement processing on the clothing image to generate an enhanced image includes:
[0061] S210, dividing the original image into a plurality of region images, and converting the region images from a spatial domain to a logarithmic domain;
[0062] S220, applying filter templates of different scales to filter the regional image, and decomposing the filtered image in different dimensions to generate image components;
[0063] S230, performing local contrast enhancement on the image component based on the filtering template to generate a local enhancement feature;
[0064] S240: synthesize the local enhancement features to generate an enhanced image.
[0065] In one embodiment of the present application, the original image is divided into a plurality of regional images, including:
[0066] Based on the pixel information of the original image, the size of each grid area is determined, and the original image is divided into a plurality of area images.
[0067] In one embodiment of the present application, first, based on the pixel information of the original image, the size of each grid area is determined, and the original image is divided into multiple regional images so that different regions can be processed independently later. This partitioning can be based on uniform division of the grid or non-uniform division based on the image content.
[0068] In one embodiment of the present application, in the process of determining the size of each grid area, the length and width parameters (Len_x, Len_y) of the original image based on pixel units are first obtained, the edge density of the pixel points in the image is obtained using the edge detection algorithm as Den(i, j), and the texture complexity of the image pixel points is evaluated by the texture analysis algorithm as Com(i, j). Then, based on the size, edge density and texture complexity of the original image, the length and width parameters (mes_x, mes_y) of the grid area corresponding to the current pixel point are determined as follows:
[0069]
[0070] Among them, i and j represent the horizontal and vertical coordinates of the pixel in the image, and μ and γ represent the length factor and width factor obtained by training, respectively.
[0071] After obtaining the length and width parameters of the grid area corresponding to the current pixel, the length and width parameters of the adjacent pixels are traversed by sliding, and the adjacent pixels with the same length and width parameters are circled in the same grid area. In this way, the area with high edge density may contain more details or boundaries, so it has a smaller grid to capture these details. The area with complex texture also requires finer grid division.
[0072] Convert the image from the spatial domain to the logarithmic domain for processing. Logarithmic transformation can compress the dynamic range of the image, enhance the details of low-brightness areas, and keep the high-brightness areas from being overexposed. This step helps the subsequent multi-scale processing to be more effective. Specifically, the logarithmic transformation can stretch the low grayscale values with a narrow range, while compressing the high grayscale values with a wide range. It can be used to expand the dark pixel values in the image while compressing the bright pixel values. The specific transformation process is expressed as:
[0073] s=c·log a (1+r)
[0074] Among them, s represents the output pixel value, c is a constant, r represents the input pixel value, and r plus 1 can make the function shift one unit to the left, and the obtained s is greater than 0. In practical applications, it is necessary to select a suitable constant c and logarithmic base a according to the specific situation of the image and the desired enhancement effect. Traverse each pixel point of the image, substitute the value r of each pixel point into the logarithmic transformation formula, and calculate the corresponding output pixel value s. Since the domain of the logarithmic function is a positive number, in practical applications, r is usually added by 1 to ensure that the input value is always a positive number. The pixel value s after logarithmic transformation may exceed the range of image display or processing (such as 0-255). Therefore, s needs to be adjusted as needed, such as by normalization or truncation, so that it falls within the appropriate range. The values of all pixels that have been logarithmically transformed and adjusted are recombined into an image, that is, the image converted from the spatial domain to the logarithmic domain is obtained.
[0075] Apply filter templates of different scales to filter the image. These filter templates can be Gaussian filters, median filters, or other types of filters with different sizes and parameters to capture features of different scales in the image. Decompose the filtered image into different components (such as brightness, color, texture, etc.) and process each component independently. This component processing can adopt different enhancement strategies according to the characteristics of different components to achieve better enhancement effects.
[0076] Perform local contrast enhancement on the results of each component under different filter templates. This can be achieved by adjusting the difference between pixel values, making the details in the image more prominent and the edges clearer. Dynamically adjust the degree of contrast enhancement based on the local features of the image. Increase the contrast in areas with low contrast and avoid over-enhancement in areas with high contrast to maintain the naturalness and balance of the image.
[0077] The processed images of different scales and components are synthesized to restore the complete enhanced image. This step needs to ensure seamless fusion between different components to avoid problems such as artifacts or color distortion. The synthesized image is globally corrected to adjust image parameters such as brightness and contrast to meet visual habits or requirements of specific applications.
[0078] In step S140, clothing feature parameters in the enhanced image are determined according to the pixel values of the enhanced image, and defective areas are detected from the enhanced image according to the pixel values and the clothing feature parameters.
[0079] In one embodiment of the present application, determining clothing feature parameters of the enhanced image according to pixel values of the enhanced image, and detecting defective areas from the enhanced image according to the pixel values and the clothing feature parameters, comprises:
[0080] Determining clothing feature parameters of the enhanced image according to pixel values of the enhanced image;
[0081] According to the pixel value and the clothing feature parameter, a preset generation network is input to generate a reconstruction feature;
[0082] The reconstructed features are compared with the clothing feature parameters to identify defective areas.
[0083] In one embodiment of the present application, the pixel value distribution of the enhanced image, especially the pixel value changes in the clothing area, is analyzed to extract key clothing feature parameters, such as color, texture, pattern, etc. Algorithms such as scale-invariant feature transformation are used to detect and describe local features in the image, especially significant feature points of clothing, such as cuffs and necklines.
[0084] In this embodiment, a generative network based on deep learning is pre-designed, such as a generative adversarial network, a variational autoencoder, etc., for generating reconstruction features according to input pixel values and clothing feature parameters. The network is trained using a large amount of labeled clothing image data so that it can learn the mapping relationship from pixel values to clothing feature parameters. According to the pixel values and the clothing feature parameters, a preset generative network is input to generate reconstruction features. The generated reconstruction features are compared with the original clothing feature parameters, and potential defect areas are identified by calculating the similarity or difference between the two, or by determining a loss function to maximize the significant difference between the reconstruction features and the original features.
[0085] For example, it can detect problems such as damage, wrinkles, and mismatch of clothing. Based on the comparison results, the defective areas in the clothing model can be accurately located.
[0086] In step S150, the defective area is marked in the clothing image.
[0087] In one embodiment of the present application, an image annotation tool is used to directly draw a defect area on the image. A rectangular box, polygon or other shape is usually used to circle the defective part. A text annotation is added near the defective area to explain the type, degree or other relevant information of the defect. This is convenient for production managers to view.
[0088] In one embodiment of the present application, it also includes:
[0089] Feedback defect identification results to the production process to guide quality improvement and defect repair;
[0090] Collect data from the defect identification process to optimize deep learning models and difference generation algorithms.
[0091] In one embodiment of the present application, the results output by the defect recognition algorithm are collated, including information such as the type, location, size, and severity of the defect. This information may require further manual review or verification to ensure accuracy. A report is generated from the collated defect information, which may include a detailed description of the defect, pictures or video evidence, and recommended repair measures or improvement suggestions. An effective feedback mechanism is established to promptly deliver defect reports to relevant personnel in the production process, such as production line workers, quality control personnel, production managers, etc. This can be achieved through email, text messages, internal system notifications, etc.
[0092] The results of model optimization and algorithm updates are reapplied to the production process, and new defect identification data continues to be collected. This forms a continuous feedback loop that helps to continuously improve and optimize the defect identification system.
[0093] Ensure that the entire process from defect identification to quality improvement and defect repair is carried out under closed-loop management. This means that each step has clear responsibilities, timelines, and effect evaluation mechanisms to ensure that the problem is thoroughly resolved and prevent similar problems from happening again.
[0094] In the technical solution of the present application, the production information of the clothing is obtained; based on the production information, the clothing to be inspected is extracted from the production line, and clothing images of the clothing to be inspected at various angles are obtained; the clothing image is subjected to image enhancement processing to generate an enhanced image; the clothing feature parameters in the enhanced image are determined according to the pixel values of the enhanced image, and the defective area is detected from the enhanced image according to the pixel values and the clothing feature parameters; and the defective area is marked in the clothing image. The technical solution of the present application improves the efficiency and accuracy of clothing quality inspection by performing random inspections on the clothing in the production line through image enhancement and detection, reduces the cost of random inspections, and makes clothing production more refined and efficient.
[0095] The following describes an embodiment of the device of the present application, which can be used to execute the clothing defect detection method in the above embodiment of the present application. It can be understood that the device can be a computer program (including program code) running in a computer device, for example, the device is an application software; the device can be used to execute the corresponding steps in the method provided in the embodiment of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the clothing defect detection method in the above embodiment of the present application.
[0096] Figure 3 A block diagram of a clothing defect detection device according to an embodiment of the present application is shown.
[0097] Reference Figure 3 As shown, a clothing defect detection device according to an embodiment of the present application includes:
[0098] An acquisition unit 310 is used to acquire production information of clothing;
[0099] The sampling unit 320 is used to select garments to be inspected from the production line based on the production information, and obtain garment images of the garments to be inspected at various angles;
[0100] An enhancement unit 330, configured to perform image enhancement processing on the clothing image to generate an enhanced image;
[0101] A detection unit 340, configured to determine a clothing feature parameter in the enhanced image according to a pixel value of the enhanced image, and detect a defective area from the enhanced image according to the pixel value and the clothing feature parameter;
[0102] The marking unit 350 is used to mark the defective area in the clothing image.
[0103] In the present application, based on the aforementioned scheme, the garments to be inspected are extracted from the production line based on the production information, and garment images of the garments to be inspected at various angles are obtained, including: determining the sampling frequency corresponding to the current moment based on the production time, production quantity and required quality level in the production information; deploying a machine vision system and a robot arm on the production line, identifying the position, color and style of the garments through machine vision technology, and controlling the robot arm to grab the garments to be inspected from the production line according to the sampling frequency and rules; and obtaining garment images of the garments to be inspected at various angles.
[0104] In the present application, based on the aforementioned scheme, it also includes: if the frequency of defects in the sampling results within a unit time is less than or equal to the set threshold, the sampling frequency is adaptively reduced; if the frequency of defects in the sampling results within a unit time is higher than the set threshold, the sampling frequency is increased and a quality investigation is triggered.
[0105] In the present application, based on the aforementioned scheme, the image enhancement processing is performed on the clothing image to generate an enhanced image, including: dividing the original image into multiple regional images, and converting the regional images from the spatial domain to the logarithmic domain; applying filtering templates of different scales to filter the regional images, and decomposing the filtered images in different dimensions to generate image components; based on the filtering templates, local contrast enhancement is performed on the image components to generate local enhancement features; the local enhancement features are synthesized to generate an enhanced image.
[0106] In the present application, based on the aforementioned solution, the dividing the original image into a plurality of regional images includes: determining the size of each grid area based on pixel information of the original image, and dividing the original image into a plurality of regional images.
[0107] In the present application, based on the aforementioned scheme, the clothing feature parameters of the enhanced image are determined according to the pixel values of the enhanced image, and the defective area is detected from the enhanced image according to the pixel values and the clothing feature parameters, including: determining the clothing feature parameters of the enhanced image according to the pixel values of the enhanced image; inputting a preset generation network according to the pixel values and the clothing feature parameters to generate a reconstructed feature; comparing the reconstructed feature with the clothing feature parameters to identify the defective area.
[0108] In the present application, based on the aforementioned solution, it also includes: feeding back the defect identification results to the production process to guide quality improvement and defect repair; collecting data in the defect identification process to optimize the deep learning model and difference generation algorithm.
[0109] In the technical solution of the present application, the production information of the clothing is obtained; based on the production information, the clothing to be inspected is extracted from the production line, and clothing images of the clothing to be inspected at various angles are obtained; the clothing image is subjected to image enhancement processing to generate an enhanced image; the clothing feature parameters in the enhanced image are determined according to the pixel values of the enhanced image, and the defective area is detected from the enhanced image according to the pixel values and the clothing feature parameters; and the defective area is marked in the clothing image. The technical solution of the present application improves the efficiency and accuracy of clothing quality inspection by performing random inspections on the clothing in the production line through image enhancement and detection, reduces the cost of random inspections, and makes clothing production more refined and efficient.
[0110] Figure 4 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown.
[0111] It should be noted that the computer system 400 of the electronic device shown in the figure is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0112] The computer system 400 includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 402 or the program loaded from the storage part 408 to the random access memory (RAM) 403, such as executing the method described in the above embodiment. In the RAM 403, various programs and data required for system operation are also stored. The CPU 401, the ROM 402 and the RAM 403 are connected to each other through the bus 404. The input / output (I / O) interface 405 is also connected to the bus 404.
[0113] The following components are connected to the I / O interface 405: an input section 406 including a keyboard, a mouse, etc.; an output section 407 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the I / O interface 405 as needed. A removable medium 411, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 410 as needed so that a computer program read therefrom is installed into the storage section 408 as needed.
[0114] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 409, and / or installed from a removable medium 411. When the computer program is executed by a central processing unit (CPU) 401, various functions defined in the system of the present application are executed.
[0115] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable computer program is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0116] The flowchart and block diagram in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0117] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0118] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the above-mentioned various optional implementations.
[0119] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the method described in the above embodiment.
[0120] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0121] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation methods of the present application.
[0122] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.
[0123] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A clothing defect detection method, characterized in that: include: Get production information of clothing; Extracting garments to be inspected from the production line based on the production information, and obtaining garment images of the garments to be inspected at various angles; Performing image enhancement processing on the clothing image to generate an enhanced image; Determining clothing feature parameters in the enhanced image according to pixel values of the enhanced image, and detecting defective areas from the enhanced image according to the pixel values and the clothing feature parameters; marking the defective area in the clothing image; The step of performing image enhancement processing on the clothing image to generate an enhanced image includes: Get the length and width parameters (Len_x, Len_y) of the original image based on pixel units, use the edge detection algorithm to obtain the edge density of the pixel in the image as Den(i, j), and use the texture analysis algorithm to evaluate the texture complexity of the image pixel as Com(i, j). Then, based on the size, edge density and texture complexity of the original image, determine the length and width parameters (mes_x, mes_y) of the grid area corresponding to the current pixel as follows: Among them, i, j represent the horizontal and vertical coordinates of the pixel in the image, μ and γ represent the length factor and width factor obtained by training respectively; Sliding and traversing the length and width parameters of adjacent pixel points based on the length and width parameters, and enclosing adjacent pixel points with the same length and width parameters in the same grid area, so as to divide the original image into a plurality of regional images, and converting the regional images from the spatial domain to the logarithmic domain; Applying filter templates of different scales to filter the regional image, and decomposing the filtered image in different dimensions to generate image components; Performing local contrast enhancement on the image component based on the filtering template to generate local enhancement features; The local enhancement features are synthesized to generate an enhanced image.
2. The method according to claim 1, characterized in that Based on the production information, garments to be inspected are extracted from the production line, and garment images of the garments to be inspected at various angles are obtained, including: Determine the sampling frequency corresponding to the current moment based on the production time, production quantity and required quality level in the production information; Deploy a machine vision system and a robot arm on the production line, identify the position, color and style of the clothing through machine vision technology, and control the robot arm to grab the clothing to be inspected from the production line according to the sampling frequency and rules; Acquire clothing images of the clothing to be inspected at various angles.
3. The method according to claim 2, characterized in that Also includes: If the frequency of defects in the sampling results per unit time is less than or equal to the set threshold, the sampling frequency is adaptively reduced; If the frequency of defects in the sampling results per unit time is higher than the set threshold, the sampling frequency will be increased and a quality investigation will be triggered.
4. The method according to claim 1, characterized in that: The original image is divided into a plurality of region images, including: Based on the pixel information of the original image, the size of each grid area is determined, and the original image is divided into a plurality of area images.
5. The method according to claim 1, characterized in that Determining clothing feature parameters of the enhanced image according to pixel values of the enhanced image, and detecting defective areas from the enhanced image according to the pixel values and the clothing feature parameters, including: Determining clothing feature parameters of the enhanced image according to pixel values of the enhanced image; According to the pixel value and the clothing feature parameter, a preset generation network is input to generate a reconstruction feature; The reconstructed features are compared with the clothing feature parameters to identify defective areas.
6. The method according to claim 1, characterized in that Also includes: Feedback defect identification results to the production process to guide quality improvement and defect repair; Collect data from the defect identification process to optimize deep learning models and difference generation algorithms.
7. A clothing defect detection device, characterized in that: include: An acquisition unit, used for acquiring production information of clothing; A sampling unit, used to sample garments to be inspected from the production line based on the production information, and obtain garment images of the garments to be inspected at various angles; An enhancement unit, used for performing image enhancement processing on the clothing image to generate an enhanced image; A detection unit, configured to determine a clothing feature parameter in the enhanced image according to a pixel value of the enhanced image, and detect a defective area from the enhanced image according to the pixel value and the clothing feature parameter; A marking unit, used for marking the defective area in the clothing image; The step of performing image enhancement processing on the clothing image to generate an enhanced image includes: Get the length and width parameters (Len_x, Len_y) of the original image based on pixel units, use the edge detection algorithm to obtain the edge density of the pixel in the image as Den(i, j), and use the texture analysis algorithm to evaluate the texture complexity of the image pixel as Com(i, j). Then, based on the size, edge density and texture complexity of the original image, determine the length and width parameters (mes_x, mes_y) of the grid area corresponding to the current pixel as follows: Among them, i, j represent the horizontal and vertical coordinates of the pixel in the image, μ and γ represent the length factor and width factor obtained by training respectively; Sliding and traversing the length and width parameters of adjacent pixel points based on the length and width parameters, and enclosing adjacent pixel points with the same length and width parameters in the same grid area, so as to divide the original image into a plurality of regional images, and converting the regional images from the spatial domain to the logarithmic domain; Applying filter templates of different scales to filter the regional image, and decomposing the filtered image in different dimensions to generate image components; Performing local contrast enhancement on the image component based on the filtering template to generate local enhancement features; The local enhancement features are synthesized to generate an enhanced image.
8. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the clothing defect detection method according to any one of claims 1 to 6 is implemented.
9. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the clothing defect detection method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Apparel production monitoring system using image recognition
US20190311470A1