Upper shaping defect recognition method and system based on machine vision

CN122989652APending Publication Date: 2026-10-27CHAOZHOU CHAOYUAN SHOES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611193041.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-07
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0006]本发明通过提供基于机器视觉的鞋面定型缺陷识别方法及系统,以解决现有技术鞋面定型缺陷检测过程中,由于鞋面表面结构变化不明显、检测过程易受到成像环境及材料特性的影响,导致难以准确识别局部定型异常区域的问题

Benefits of technology

[0019]本发明通过辅助光源增强鞋面定型缺陷区域的影像表现,并结合移动窗口特征梯度分析方式对鞋面局部区域进行细粒度特征提取,获得能够反映鞋面局部变化的特征梯度信息;进一步通过对多个鞋面样本中相同窗口位置的特征梯度进行一致性分析,降低因光照波动、材料纹理差异以及偶然成像变化造成的干扰,提高可疑异常区域筛选的可靠性;同时,通过可疑缺陷异常分类和置信度校正机制,对不同异常程度的窗口进行分类标注,提高缺陷识别结果的准确性和稳定性。因此,本发明能够有效提升鞋面定型缺陷检测过程中的自动化程度和识别可靠性,降低人工检测主观因素影响,适用于鞋产品生产过程中的质量检测。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122989652A_ABST
    Figure CN122989652A_ABST
Patent Text Reader

Abstract

The application discloses a vamp shaping defect recognition method and system based on machine vision, relates to the technical field of machine vision detection, and comprises the following steps: collecting images of vamp of a plurality of shoe products and performing standardization processing to obtain vamp images; performing mobile window feature gradient analysis on the vamp images to extract a suspicious defect gradient set; performing consistency analysis on the feature gradient of the same window to obtain a suspicious defect consistency parameter; performing abnormal classification according to the suspicious defect consistency parameter to obtain a defect window, and adopting confidence to perform labeling to obtain a defect recognition result. The application solves the problem of insufficient recognition accuracy of local shaping abnormal areas in the vamp shaping defect detection process in the prior art due to the small difference in vamp surface structure change and the influence of imaging environment and material characteristics.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of machine vision inspection technology, and more specifically to a method and system for identifying defects in shoe upper shaping based on machine vision. Background Technology

[0002] Upper shaping is a crucial step in shoe manufacturing, used to mold the upper material into a predetermined shape and improve its appearance stability and wearing comfort. However, in actual production, factors such as the characteristics of the upper material, fluctuations in processing parameters, and changes in the molding environment can cause defects such as wrinkles, localized depressions, and uneven shapes to appear on the upper after shaping, affecting the appearance quality and consistency of the shoe product. Therefore, it is necessary to inspect the shaped upper to promptly identify any abnormalities.

[0003] Current methods for detecting defects in shoe uppers mainly rely on manual visual inspection or image-based automated inspection. Manual inspection is susceptible to the influence of operator experience, fatigue, and subjective judgment, making it difficult to guarantee stability during long-term continuous inspections. While image-based automated inspection can improve efficiency, in practical applications, shoe upper materials often exhibit variations in texture, color, and surface reflectivity, leading to differences in image representation between different shoe products. This increases the difficulty of distinguishing abnormal areas from normal areas.

[0004] Furthermore, shoe upper shaping defects typically manifest as minor, localized morphological changes. Their appearance in images is easily affected by the shooting angle, lighting conditions, and the surface condition of the shoe upper. This can lead to indistinct image features in some defective areas, or even cause some normal areas to produce image responses similar to defects, thus affecting the accuracy of the test results. In addition, during continuous testing of multiple batches of shoe products, there are certain differences between different shoe upper samples, making it difficult for a single testing standard to adapt to changes in the actual production environment.

[0005] Therefore, improving the accuracy and stability of abnormal area identification during the detection of defects in shoe upper shaping has become a technical problem that urgently needs to be solved in this field. Summary of the Invention

[0006] This invention provides a machine vision-based method and system for identifying defects in shoe upper shaping, which solves the problem that in the existing technology for detecting defects in shoe upper shaping, the surface structure of the shoe upper does not change significantly and the detection process is easily affected by the imaging environment and material properties, making it difficult to accurately identify local abnormal shaping areas.

[0007] The technical solution of the present invention to solve the above-mentioned technical problems is as follows:

[0008] In a first aspect, the present invention provides a method for identifying shoe upper shaping defects based on machine vision, including:

[0009] Under auxiliary light, images of the uppers of multiple shoe products were acquired and standardized to obtain multiple upper images;

[0010] For each shoe upper image, a moving window feature gradient analysis is performed to obtain multiple feature gradient arrays, and multiple suspected defect gradient sets are extracted respectively.

[0011] Consistency analysis is performed on the feature gradients of multiple suspected defects within the same window to obtain consistency parameters for multiple suspected defects.

[0012] Based on the consistency parameters of multiple suspected defects, the suspected defects are classified and analyzed to obtain several defect windows. Several confidence levels are used to label them to obtain the defect identification results. Among them, several confidence levels are corrected for identification accuracy.

[0013] Secondly, the present invention provides a machine vision-based shoe upper shaping defect identification system, comprising:

[0014] The image acquisition module is used to acquire images of the uppers of multiple shoe products under auxiliary light and perform standardized processing to obtain multiple upper images;

[0015] The gradient feature extraction module is used to perform feature gradient analysis of each shoe upper image using a moving window, obtain multiple feature gradient arrays, and extract multiple suspected defect gradient sets respectively.

[0016] The consistency analysis module is used to perform consistency analysis on the feature gradients of multiple suspected defects within the same window to obtain consistency parameters for multiple suspected defects.

[0017] The defect identification module is used to classify and analyze suspicious defects based on multiple consistency parameters, obtain several defect windows, and label them with several confidence levels to obtain defect identification results. Among them, several confidence levels are corrected for identification accuracy.

[0018] One or more technical solutions provided in this invention have at least the following technical effects or advantages:

[0019] This invention enhances the image representation of defective areas in shoe uppers through auxiliary light sources and performs fine-grained feature extraction on local areas of the shoe upper using a moving window feature gradient analysis method, obtaining feature gradient information that reflects local changes in the shoe upper. Furthermore, by performing consistency analysis on the feature gradients at the same window positions in multiple shoe upper samples, interference caused by lighting fluctuations, material texture differences, and accidental imaging changes is reduced, improving the reliability of suspicious anomaly area screening. Simultaneously, through a suspicious defect anomaly classification and confidence correction mechanism, windows with different degrees of anomaly are classified and labeled, improving the accuracy and stability of defect identification results. Therefore, this invention effectively improves the automation level and identification reliability in the shoe upper shaping defect detection process, reduces the influence of subjective factors in manual inspection, and is suitable for quality inspection in the shoe product manufacturing process. Attached Figure Description

[0020] Figure 1 This is a schematic diagram of the process for identifying shoe upper shaping defects based on machine vision, provided in an embodiment of the present invention.

[0021] Figure 2 This is a schematic diagram of the intelligent agent structure for classifying suspected defects based on machine vision provided in an embodiment of the present invention;

[0022] Figure 3 This is a schematic diagram of the structure of a machine vision-based shoe upper shaping defect recognition system provided in an embodiment of the present invention.

[0023] In the attached diagram, the components represented by each number are as follows:

[0024] Image acquisition module 11, gradient feature extraction module 12, consistency analysis module 13, and defect identification module 14. Detailed Implementation

[0025] This invention provides a machine vision-based method and system for identifying defects in shoe upper shaping, which specifically addresses the problem in existing shoe upper shaping defect detection processes where the surface structure of the shoe upper is not significantly altered and the detection process is easily affected by the imaging environment and material properties, making it difficult to accurately identify local abnormal shaping areas.

[0026] It should be noted that the terms "comprising" and "having" are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or modules that are not explicitly listed or that are inherent to these processes, methods, products, or devices.

[0027] Example 1, as Figure 1 As shown, this invention provides a machine vision-based method for identifying defects in shoe upper shaping, including:

[0028] S100: Under auxiliary light source, images of the uppers of multiple shoe products are acquired and standardized to obtain multiple upper images;

[0029] Step S100 in the method provided in this embodiment of the invention includes:

[0030] Under auxiliary light, images of the uppers of multiple shoe products were acquired to obtain multiple initial upper images;

[0031] Multiple initial shoe upper images are standardized and grayscale processed to obtain multiple shoe upper images.

[0032] In this embodiment, in order to effectively identify defects in the shoe upper shaping, the shoe upper images of multiple shoe products after the shaping process are first acquired.

[0033] Specifically, the shoe product to be tested is placed on a preset testing platform, an industrial camera is set above the shoe surface, and auxiliary light sources are set on both sides of the industrial camera. The auxiliary light sources are controlled to illuminate the shoe surface area at a preset angle, and the industrial camera is used to capture initial images of the shoe surface area to obtain multiple initial shoe surface images.

[0034] The auxiliary light source is used to enhance the illumination difference between different height areas on the shoe surface, so that defects such as wrinkles, depressions and local deformations generated during the shoe upper shaping process can form obvious grayscale changes in the image.

[0035] For the defect of creases on the shoe upper, since the top area of ​​the crease faces the auxiliary light source, it can receive more incident light and its reflected light intensity is higher, so the gray value in the captured image is larger; while the bottom area of ​​the crease is blocked by the crease structure, forming a local shadow, and the received light intensity is reduced, so the corresponding gray value is smaller.

[0036] For example, in an actual data acquisition process, the brightness of the auxiliary light source was set to the preset detection brightness, and the incident angle of the light source was set to 45°, and an image of a certain shoe surface area was acquired. Among them, the gray value of the normal flat shoe surface area is about 140-160, the gray value of the top of the crease area is about 190-210, and the gray value of the bottom of the crease area is about 50-80.

[0037] Furthermore, to reduce image brightness deviations between different shoe products due to differences in shooting distance, light intensity, and shoe surface color, multiple initial shoe surface images were standardized.

[0038] Specifically, firstly, the average gray value of all pixels in each initial shoe upper image is calculated, and the dispersion of each pixel's gray value relative to the average gray value is calculated. Then, the gray values ​​of each pixel in the initial shoe upper image are normalized and adjusted according to the average gray value and the dispersion, so that the overall gray value distribution of different shoe upper images remains consistent.

[0039] The standardization process can be represented as follows:

[0040] Standardized pixel grayscale value = (original pixel grayscale value - average value of all pixels in the current shoe upper image) ÷ (dispersion of all pixels in the current shoe upper image + preset micro-correction value).

[0041] The preset micro-correction value is used to avoid division by zero anomalies when the overall grayscale change of the shoe image is small. In this embodiment, it is set to 0.001.

[0042] For example, in an initial shoe upper image, the average grayscale value of all pixels is 145, and the grayscale dispersion is 30. When the original grayscale value of a certain pixel is 205, the normalized grayscale value corresponding to that pixel is approximately (205-145) ÷ (30+0.001) ≈ 2. When another pixel is located in the bottom area of ​​the fold, and its original grayscale value is 65, the corresponding normalized grayscale value is approximately -2.67 (65-145) ÷ (30+0.001).

[0043] The above standardization process suppresses the brightness differences in different shoe upper images while preserving the grayscale variation characteristics generated by the top and bottom of the folds.

[0044] Subsequently, the standardized shoe upper image is converted to grayscale, transforming the color shoe upper image into a single-channel grayscale image.

[0045] Specifically, based on the differences in the contribution of different color channels to brightness, corresponding transformation weights are assigned to the red, green, and blue channels, and the grayscale value is calculated based on the weighted result of the three color channels. The grayscale value is calculated as follows:

[0046] Grayscale value = Red channel pixel value × 0.299 + Green channel pixel value × 0.587 + Blue channel pixel value × 0.114.

[0047] The weight values ​​are derived from the standard RGB grayscale conversion model. The green channel is assigned the largest weight of 0.587 because the human eye is most sensitive to changes in its brightness; the red channel is assigned the second largest weight of 0.299; and the blue channel contributes less to brightness and is assigned the largest weight of 0.114.

[0048] For example, for a certain pixel on the shoe surface, its red channel pixel value is 180, its green channel pixel value is 170, and its blue channel pixel value is 150. Then the corresponding grayscale value is 180×0.299+170×0.587+150×0.114≈170.

[0049] After the above processing, multiple initial shoe upper images are converted into corresponding grayscale shoe upper images, which are then used as input data for the subsequent moving window feature gradient analysis process.

[0050] In summary, this step enhances the differences in illumination response across different height areas of the shoe upper by using an auxiliary light source, enabling shaping defects such as wrinkles, depressions, and localized deformations to form stable grayscale variation features in the image. Furthermore, standardization processing reduces brightness deviations caused by different shoe products and different acquisition environments, and grayscale processing extracts single-channel grayscale information that can characterize changes in the surface structure of the shoe upper, thereby improving the accuracy of subsequent defect area localization based on feature gradient analysis and providing a reliable data foundation for identifying shaping defects in the shoe upper.

[0051] S200: Perform feature gradient analysis with a moving window on each shoe upper image to obtain multiple feature gradient arrays, and extract multiple suspected defect gradient sets respectively;

[0052] Step S200 in the method provided in this embodiment of the invention includes:

[0053] Select an image of a shoe upper and divide it into a first window according to a preset window size;

[0054] Calculate the feature gradient within the first window to obtain the first feature gradient;

[0055] Continue selecting the moving window and calculating the feature gradient to obtain the feature gradient array;

[0056] Continue to perform moving window selection and feature gradient calculation on all shoe upper images to obtain multiple feature gradient arrays;

[0057] Suspicious defect gradients are extracted from multiple feature gradient arrays to obtain multiple sets of suspicious defect gradients.

[0058] In this embodiment, after obtaining multiple shoe upper images that have undergone standardization and grayscale processing, a moving window approach is used to traverse and analyze each shoe upper image in order to extract the local variation features of different areas of the shoe upper.

[0059] Specifically, firstly, any shoe upper image is selected as the current detection object, and the first detection window is divided in the shoe upper image according to the preset window size.

[0060] The first detection window is used to limit the local shoe upper area currently being analyzed. By dividing the complete shoe upper image into multiple continuous local areas, it is possible to extract the corresponding image change features for different spatial locations.

[0061] In this embodiment, based on the spatial distribution characteristics of the shoe upper shaping defects and the acquisition resolution of the industrial camera, the detection window size is set to 16×16 pixels, so that a single detection window can cover the local texture area of ​​the shoe upper, while avoiding the weakening of local defect features due to an excessively large detection range.

[0062] After obtaining the first detection window, the feature gradient of the region corresponding to the first detection window is calculated to obtain the first feature gradient corresponding to the first window.

[0063] The first feature gradient is used to characterize the degree of local change in the shoe upper image within the first detection window. It serves as the feature description parameter corresponding to the current window and is used to subsequently construct the spatial feature distribution of the overall shoe upper image.

[0064] Subsequently, the detection window is controlled to move on the current shoe upper image according to the preset movement rules, and the feature gradient is calculated for each detection window after the movement.

[0065] Specifically, the detection window is controlled to move sequentially along the horizontal and vertical directions according to a preset moving step size, so that the detection window covers the entire effective area in the current shoe upper image.

[0066] For example, if the detection window size is set to 16×16 pixels and the movement step size is set to 8 pixels, there will be some overlap between adjacent detection windows. By adopting an overlapping movement method, local abnormal areas such as shoe creases and dents can be covered in multiple detection windows, improving the completeness of local feature acquisition.

[0067] After completing the traversal of all windows in the current shoe upper image, the feature gradients corresponding to each window are arranged according to their spatial position in the shoe upper image to obtain the feature gradient array corresponding to the current shoe upper image.

[0068] The feature gradient array preserves the spatial location information of each detection window in the original shoe upper image, so that each feature gradient value can correspond to a specific area in the shoe upper image.

[0069] Furthermore, to improve the coverage of the multi-shoe product inspection process, the above-mentioned moving window selection and feature gradient calculation process is performed on all shoe upper images.

[0070] Specifically, firstly, a moving window scan is performed on the first shoe upper image to obtain a first feature gradient array; then, the same processing is performed on the second shoe upper image, the third shoe upper image, and the remaining shoe upper images to obtain corresponding feature gradient arrays; finally, multiple feature gradient arrays corresponding one-to-one with multiple shoe upper images are obtained.

[0071] For example, when inspecting 100 shoe products, by performing moving window analysis on 100 shoe upper images respectively, 100 sets of feature gradient arrays can be obtained, and each set of feature gradient arrays corresponds to the local variation feature distribution of the shoe upper of a shoe product.

[0072] Furthermore, after obtaining multiple feature gradient arrays, suspected defect gradients are extracted from the feature gradients in each feature gradient array to filter gradient information that may reflect abnormalities in shoe upper shaping from multiple spatial location features.

[0073] Specifically, based on the distribution of feature gradients in each feature gradient array, feature gradients that meet the preset screening conditions are extracted and associated according to their corresponding window position information to obtain multiple sets of suspected defect gradients corresponding to the shoe upper image.

[0074] Among them, the suspected defect gradient set is used to represent the set of feature gradients of areas that may have shaped defects in the current shoe upper image, and serves as the data basis for subsequent defect consistency analysis and anomaly classification processing.

[0075] Step S200 in the method provided in this embodiment of the invention further includes:

[0076] Extract the minimum and maximum grayscale values ​​within the first window;

[0077] Calculate the absolute difference between the minimum and maximum grayscale values, and use it as the first feature gradient.

[0078] In this embodiment, after completing the acquisition of shoe upper image, standardization processing, grayscale processing and moving window division, in order to accurately characterize the degree of grayscale change of the shoe upper surface in each local window area, the grayscale distribution in the first window is analyzed and the first feature gradient is calculated.

[0079] Specifically, for the first window in any shoe upper image, obtain the grayscale values ​​of all pixels within the area covered by the window.

[0080] Among them, because the shaping defects of the shoe upper usually cause height changes on the surface of the shoe upper, the local light and dark differences are formed after the auxiliary light source is irradiated. Therefore, there is usually a large range of gray scale changes within the defect area.

[0081] Taking shoe upper wrinkling defects as an example, when wrinkles occur on the shoe upper, the top area of ​​the wrinkle receives higher light intensity because it faces the auxiliary light source, and thus appears as a larger gray value in the grayscale image; while the bottom area of ​​the wrinkle is obscured by the wrinkle structure, forming a local shadow, and thus appears as a smaller gray value in the grayscale image. Therefore, by statistically analyzing the difference between the maximum and minimum gray values ​​within the same window area, it is possible to effectively reflect whether there are significant changes in surface morphology within that area.

[0082] In the specific calculation process, the gray values ​​of all pixels in the first window are first extracted, and the minimum and maximum gray values ​​are determined from the gray values.

[0083] Subsequently, the absolute difference between the maximum and minimum grayscale values ​​is calculated, and this absolute difference is used as the first feature gradient corresponding to the first window. The first feature gradient is calculated as follows:

[0084] First feature gradient = |Maximum gray value within the first window - Minimum gray value within the first window|.

[0085] The first feature gradient is used to represent the grayscale variation within the first window area. The larger the value, the more obvious the change in brightness within the window area, and the higher the possibility of abnormal shoe upper shaping.

[0086] Step S200 in the method provided in this embodiment of the invention further includes:

[0087] Based on the test data of shoe upper shaping defects, the minimum feature gradient of shoe upper shaping defects is obtained and configured as the feature gradient threshold;

[0088] In multiple feature gradient arrays, feature gradients greater than or equal to the feature gradient threshold are selected as suspected defect gradients. All suspected defect gradients and their corresponding windows are integrated to obtain multiple suspected defect gradient sets.

[0089] In this embodiment, after obtaining the feature gradient arrays corresponding to multiple shoe upper images, in order to filter out local areas that may have shoe upper shaping defects from the feature gradient arrays, it is necessary to determine the feature gradient threshold based on the gradient change characteristics generated by the actual shoe upper shaping defects, and use the feature gradient threshold to filter multiple feature gradient arrays to obtain multiple suspected defect gradient sets.

[0090] Specifically, the first step is to obtain pre-established test data on shoe upper shaping defects.

[0091] The shoe upper shaping defect test data includes multiple shoe upper image samples that have been manually inspected and labeled. The shoe upper image samples include at least normal shaped shoe upper samples and shoe upper samples with defects such as wrinkles, local depressions, and surface deformation.

[0092] For the above shoe upper shaping defect test data, the window is divided according to the same moving window size and moving step size as the current detection process, and the feature gradient of the window corresponding to the marked defect area in each defect sample is obtained.

[0093] Since the shaping defect area of ​​the shoe upper usually has different lighting due to the change in surface height, the window corresponding to the defect area has a large gray scale change. Therefore, the minimum effective feature gradient corresponding to the actual defect area is used as the defect recognition boundary.

[0094] Specifically, the feature gradients of defect windows in all shoe upper shaping defect test data are statistically sorted, and the minimum feature gradient value is obtained. The feature gradient threshold is calculated as follows:

[0095] The minimum feature gradient of the shoe upper shaping defect is the minimum value among the feature gradients corresponding to all defect sample windows.

[0096] The characteristic gradient threshold determined by the above method can reflect the lowest gradient response when shoe upper shaping defects occur in the actual production process, and avoid insufficient detection adaptability under different shoe upper materials and different process parameters due to artificially set thresholds.

[0097] For example, in actual implementation, 1000 sets of shoe upper shaping defect test samples were collected, including 700 sets of wrinkle defect samples, 200 sets of local dent defect samples, and 100 sets of shaping deformation defect samples. After performing moving window analysis on the above defect samples, the maximum feature gradient of the defect window was found to be 185, the average feature gradient of the defect window was 126, and the minimum feature gradient of the defect window was 82. Therefore, 82 was configured as the feature gradient threshold.

[0098] After determining the feature gradient threshold, the feature gradient arrays corresponding to multiple shoe upper images are filtered.

[0099] Specifically, the feature gradient corresponding to each window in each feature gradient array is compared with the feature gradient threshold.

[0100] When the feature gradient corresponding to a certain window satisfies the condition that the feature gradient of the window is greater than or equal to the feature gradient threshold, the feature gradient corresponding to that window is determined to be a suspected defect gradient.

[0101] When the feature gradient corresponding to a certain window satisfies the condition that the window feature gradient is less than the feature gradient threshold, it is considered that the region corresponding to the window has not reached the gradient change level caused by historical shoe upper shaping defects, and is not extracted as a suspicious defect gradient.

[0102] For example, for a feature gradient array corresponding to a certain shoe upper image, some window feature gradients are as follows: Window A has a feature gradient of 35, Window B has a feature gradient of 96, Window C has a feature gradient of 120, and Window D has a feature gradient of 58. Since the current feature gradient threshold is 82, the feature gradient 35 corresponding to Window A is less than 82 and is not extracted; the feature gradient 96 corresponding to Window B is greater than 82 and is extracted as a suspected defect gradient; the feature gradient 120 corresponding to Window C is greater than 82 and is extracted as a suspected defect gradient; the feature gradient 58 corresponding to Window D is less than 82 and is not extracted.

[0103] Furthermore, in order to preserve the spatial distribution information of the suspicious defect gradient in the shoe upper image, after the suspicious defect gradient screening is completed, the screened suspicious defect gradient is associated with the corresponding window position.

[0104] Specifically, the feature gradient value, window spatial position, and corresponding shoe upper image number corresponding to each suspected defect gradient are combined to form a suspected defect gradient set for the corresponding shoe upper image.

[0105] For example, after filtering a shoe upper image, three suspected defect regions are obtained. The first window position corresponds to feature gradient 96, the second window position corresponds to feature gradient 120, and the third window position corresponds to feature gradient 105. Then, the suspected defect gradient set corresponding to the shoe upper image is represented as:

[0106] Suspicious defect gradient set = {(first window position, 96), (second window position, 120), (third window position, 105)}.

[0107] Subsequently, the above filtering process was performed on all shoe upper images to obtain multiple gradient sets of suspected defects that correspond one-to-one with the shoe upper images.

[0108] In summary, this step involves dividing the shoe upper image into local regions using a moving window approach and quantifying each window region using grayscale gradient change characteristics to obtain a feature gradient array that reflects changes in the shoe upper surface morphology. Furthermore, by combining feature gradient thresholds determined based on historical shoe upper shaping defect test data, multiple feature gradient arrays are filtered to extract a set of suspicious defect gradients with obvious abnormal gradient responses. This step, while preserving the spatial location information of defect areas, achieves preliminary localization of candidate areas for shoe upper shaping defects such as wrinkles, dents, and local deformations, providing a reliable data foundation for subsequent defect authenticity judgment and anomaly classification based on multi-sample consistency.

[0109] S300: Perform consistency analysis on the feature gradients of multiple suspected defects concentrated in the same window to obtain the consistency parameters of multiple suspected defects;

[0110] Step S300 in the method provided in this embodiment of the invention includes:

[0111] By statistically analyzing all windows in each set of multiple suspected defect gradients, multiple candidate windows are obtained;

[0112] Extract all feature gradients of multiple candidate windows in multiple feature gradient arrays to obtain multiple candidate window feature gradient sets;

[0113] Consistency analysis was performed on the feature gradients of multiple candidate window feature gradient sets to obtain multiple consistency parameters of suspected defects.

[0114] In this embodiment, after obtaining multiple suspected defect gradient sets corresponding to shoe upper images, in order to further distinguish between the abnormal gradient response generated by shoe upper shaping wrinkles and the high gradient response generated by normal structures such as shoe upper seams and texture edges, this embodiment further performs correlation analysis on the window positions in the suspected defect gradient sets, and evaluates the consistency of gradient responses at the same window position in multiple feature gradient arrays to obtain multiple suspected defect consistency parameters.

[0115] Specifically, since defects in shoe upper shaping usually cause changes in local surface morphology, resulting in obvious grayscale changes and gradient enhancement in the corresponding area, wrinkle defect areas are usually identified as suspicious defect gradient areas when performing preliminary detection based on gradient features.

[0116] However, normal structures such as seams, embossed edges, and printed textures on the shoe upper also have obvious edge features and may produce large grayscale gradient responses. Since these normal structures are structures that are fixed during the shoe upper design and manufacturing process, their gradient distribution in different shoe upper images usually has a high degree of similarity; while shaping defects such as wrinkles and depressions are affected by the material deformation state, local stress conditions, and molding process, and their morphology and gradient response in different shoe upper images usually show significant differences.

[0117] Therefore, judging defects solely based on gradient amplitude can easily misclassify normal seam areas as defective areas. This embodiment further utilizes the gradient change patterns at the same window positions among multiple shoe upper images to perform secondary discrimination of suspicious areas.

[0118] First, all window positions in multiple sets of suspected defect gradients are determined as candidate windows.

[0119] Specifically, the gradient sets of suspected defects corresponding to multiple shoe upper images are traversed, and all window regions that meet the initial gradient anomaly conditions are summarized to obtain multiple candidate windows.

[0120] The candidate windows include abnormal gradient areas caused by actual shoe upper shaping defects, as well as high gradient areas caused by normal structures such as shoe upper seams, texture edges, and local reflections.

[0121] By retaining all suspicious windows, we can avoid prematurely eliminating some real defect areas due to large differences in defect morphology during the initial gradient screening stage, thereby improving the completeness of subsequent defect identification.

[0122] Furthermore, after obtaining multiple candidate windows, the corresponding feature gradients of each candidate window in multiple feature gradient arrays are obtained respectively.

[0123] Specifically, based on the spatial position of the candidate window in the shoe upper image, the gradient response value corresponding to the same spatial position is searched in the feature gradient array corresponding to multiple shoe upper images, and arranged according to the image acquisition order to form a candidate window feature gradient set.

[0124] The alternative window feature gradient set is used to describe the gradient response variation of the same spatial location in different shoe upper images.

[0125] For example, for a certain candidate window, its feature gradients in the feature gradient array corresponding to the 5 shoe upper images are 82, 86, 90, 85, and 88, respectively. Then, the candidate window feature gradient set = {82, 86, 90, 85, 88} is formed.

[0126] Furthermore, consistency analysis was performed on the feature gradients of multiple candidate window feature gradient sets to obtain multiple consistency parameters for suspected defects.

[0127] Specifically, to evaluate the degree of gradient response variation of the same candidate window in different shoe upper images, the average gradient value corresponding to the candidate window is first calculated:

[0128] The average gradient is equal to the sum of all feature gradients in the candidate window feature gradient set, divided by the number of feature gradients.

[0129] Subsequently, the gradient dispersion is calculated based on the degree of deviation between each feature gradient and the average gradient:

[0130] .

[0131] The gradient variance is used to characterize the degree of gradient variation of the same window location in different shoe upper images. When the gradient variance is small, it indicates that the gradient response of the window changes little in different shoe upper images, indicating that the region has strong stability; when the gradient variance is large, it indicates that the gradient response of the window differs significantly in different shoe upper images, indicating that the region has strong instability.

[0132] Furthermore, the consistency parameter of the suspected defect is calculated based on the gradient variance:

[0133] The consistency parameter for suspected defects is 1 ÷ (gradient variance + smoothing correction amount).

[0134] The smoothing correction is a preset value greater than zero, used to avoid division-by-zero anomalies when the gradient variance is zero. The smoothing correction is determined based on the feature gradient sampling accuracy in historical shoe upper images. Specifically, the normal regions in historical shoe upper detection samples are statistically analyzed to obtain the minimum gradient fluctuation range generated by the normal window under repeated sampling conditions, and a certain proportion of this fluctuation range is used as the smoothing correction.

[0135] For example, statistical analysis was performed on the seam and flat areas in 1000 sets of normal shoe upper images, and the lowest gradient variance of the normal area window was found to be approximately 0.001. To avoid excessive correction affecting consistency judgment, and to ensure calculation stability when the variance is zero, one-tenth of this value was used as the smoothing correction amount, i.e., smoothing correction amount = 0.0001.

[0136] Furthermore, candidate windows are distinguished based on the consistency parameter of suspected defects.

[0137] Specifically, due to the fixed processing characteristics of normal shoe upper structures, the gradient response of their corresponding windows in multiple shoe upper images is usually relatively stable, resulting in a small gradient variance, a large consistency parameter for suspected defects, and a concentrated distribution of consistency parameters among multiple normal windows.

[0138] However, due to differences in their formation states, the gradient response of windows corresponding to different defect areas varies greatly, resulting in a large gradient variance. Consequently, the consistency parameter of suspected defects is small, and the consistency parameter of different defect areas is usually discretely distributed.

[0139] For example, for the above candidate windows, the feature gradient set of the candidate windows is {82, 86, 90, 85, 88}. The average gradient is (82 + 86 + 90 + 85 + 88) ÷ 5 = 86.2, and the gradient variance is [(82 - 86.2)² + (86 - 86.2)² + (90 - 86.2)² + (85 - 86.2)² + (88 - 86.2)²] ÷ 5 = 7.36. Therefore, the consistency parameter for suspected defects is 1 ÷ (7.36 + 0.0001) ≈ 0.136. This result indicates that the gradient response corresponding to this window exhibits some fluctuation and low consistency, suggesting the possibility of further identification as a wrinkle defect region.

[0140] In summary, this step involves correlation analysis of feature gradients at the same window location in multiple shoe upper images, converting high-gradient responses in a single image into cross-sample stability evaluation indicators. By calculating the gradient variance and combining it with smoothing correction, a consistency parameter for suspected defects is obtained, enabling a quantitative evaluation of the degree of gradient change in candidate regions. Specifically, gradient responses of normal seams, textures, and other fixed structures are stable, with relatively large and concentrated consistency parameters; while gradient changes in defective areas such as wrinkles and indentations are significant, with smaller and discrete consistency parameters, thus providing a basis for subsequent defect window classification.

[0141] S400: Based on multiple consistency parameters of suspected defects, perform anomaly classification and analysis of suspected defects to obtain several defect windows, and label them with several confidence levels to obtain defect identification results. Among them, several confidence levels are corrected for identification accuracy.

[0142] Step S400 in the method provided in this embodiment of the invention includes:

[0143] Invoke the suspicious defect classification agent, which includes multi-layer consistency partitioning nodes;

[0144] Multiple suspected defect consistency parameters are input into the suspected defect classification agent for multi-level binary classification. The suspected defect consistency parameters that are classified into individual data are used as defect consistency parameters, and the corresponding windows are used as defect windows, resulting in several defect windows.

[0145] Obtain the ratio of the number of consistent partitioning nodes to the maximum number of consistent partitioning nodes for each defect consistency parameter, and calculate the confidence scores of several negatively correlated first defects.

[0146] Extract suspicious defect consistency parameters that are not divided into individual data as normal consistency parameters, and use the corresponding windows as normal windows;

[0147] Based on the feature gradients of several normal windows, the recognition accuracy compensation coefficient is calculated, and the confidence scores of several first defects are compensated and adjusted to obtain several confidence scores. Several defect windows are then labeled to obtain the defect recognition result.

[0148] like Figure 2 As shown in this embodiment, after obtaining the consistency parameters of suspected defects corresponding to multiple shoe upper images, in order to further identify abnormal windows caused by real shoe upper shaping defects from multiple candidate regions, a pre-built suspected defect classification agent is invoked to perform multi-level isolated division processing on multiple suspected defect consistency parameters, so as to distinguish between defect windows and normal windows.

[0149] Specifically, the suspicious defect classification agent adopts a multi-layered consensus partitioning structure based on an isolated tree, which includes multiple sequentially connected consensus partitioning nodes.

[0150] Each consistency partitioning node is used to perform binary classification based on the consistency parameters of the suspected defects in the current input data set, and inputs the partitioned sub-data sets into the next layer consistency partitioning node for further analysis.

[0151] In this embodiment, the maximum number of consistent partitioning node layers is determined based on the number of windows to be analyzed in the current detection task and the distribution of consistency parameters between normal and abnormal windows in historical detection data.

[0152] Specifically, the maximum consistency partitioning node layer is used to limit the maximum partitioning depth of the consistency parameter of suspicious defects, so that the suspicious defect classification agent can meet the requirement of isolating abnormal data while avoiding the misseparation of normal window data due to excessive partitioning.

[0153] The maximum number of nodes with the highest consistency is determined based on the logarithmic relationship of the number of windows to be analyzed and the average isolation depth of abnormal windows in historical detection samples.

[0154] Specifically, when the number of windows to be analyzed increases, the number of partitioning layers needs to be increased to ensure that the abnormal data has sufficient separation space; when the abnormal windows in the historical detection data can usually be isolated at a shallow level, there is no need to set a large maximum partitioning depth.

[0155] For example, in a shoe upper inspection task, 1000 windows need to be analyzed. According to historical inspection data, abnormal shoe upper windows can usually be isolated within 10 layers, while normal windows remain clustered. To retain some redundant partitioning space, the maximum number of consistent partitioning node layers is set to 20 layers.

[0156] If a certain suspected defect consistency parameter is still not isolated after 20 layers of division, it is considered that the parameter has a high similarity to the normal window parameter distribution, and the number of division layers will not be increased further.

[0157] During the defect classification process, multiple consistency parameters of suspected defects are input into the suspected defect classification agent.

[0158] First, the consistency parameters of all suspected defects are divided by the first-level consistency partitioning node, and the current data set is divided into two subsets.

[0159] Subsequently, the next level of consistency partitioning is performed on each subset. During each partitioning process, it is determined whether the current data set satisfies the consistency parameter that the current data set contains only one suspected defect or whether the current partitioning level has reached the maximum number of consistent partitioning node levels.

[0160] When a certain suspected defect consistency parameter is separated into a single data point after being divided into several layers, it indicates that there is a significant difference between this parameter and other suspected defect consistency parameters.

[0161] Because the shaping defect area of ​​the shoe upper is affected by the fold height, the degree of local deformation and the change of light reflection direction, the gray-scale gradient change pattern of its corresponding window is different from that of the normal area. Therefore, the corresponding feature gradient consistency parameter usually deviates from the normal distribution and is more likely to be isolated in shallower layers.

[0162] Conversely, the surface state of the normal shoe upper area is stable, and the gradient change patterns between different normal windows are relatively similar. The corresponding consistency parameters are usually concentrated in a similar range, so a deeper level of division is required or it may not be able to be divided into individual data.

[0163] Therefore, suspected defect consistency parameters that are isolated as individual data are identified as defect consistency parameters, and the window corresponding to the defect consistency parameter is identified as a defect window; suspected defect consistency parameters that are not classified as individual data are identified as normal consistency parameters, and the window corresponding to the defect consistency parameter is identified as a normal window.

[0164] For example, five consistency parameters for suspected defects are currently obtained: 0.03, 0.06, 0.09, 0.36, and 0.40. Among them, 0.03, 0.06, and 0.09 correspond to three different degrees of upper shaping wrinkle defects. Due to the influence of local deformation degree and defect morphology differences on different wrinkle defects, their corresponding gradient responses vary greatly, resulting in high gradient variance and thus low consistency parameters. Furthermore, there is a certain degree of dispersion in the parameter distribution among different defect regions. On the other hand, 0.36 and 0.40 correspond to the upper seam area and texture edge area, respectively. Since the above-mentioned normal structures have stable spatial morphology in multiple upper images, their gradient response changes little, resulting in low gradient variance and high suspected defect consistency parameters. Moreover, the two parameters are within similar ranges.

[0165] After inputting the above data into the suspected defect classification agent, in the first layer of partitioning, the parameter corresponding to 0.03 deviates significantly from other parameters and belongs to the low consistency parameter region, so it is first partitioned separately. The remaining parameters continue to the next layer of partitioning. In the second layer of partitioning, the window corresponding to 0.06 also has low consistency parameters and differs significantly from the parameters of normal windows, so it is further isolated. In the third layer of partitioning, the window corresponding to 0.09 is further partitioned into the abnormal set because its parameters are still in the low consistency region. 0.36 and 0.40 remain in the same data set. Since both belong to the high consistency parameter region and their parameter distribution is relatively concentrated, they are not partitioned separately until the maximum consistency partitioning node layer is reached. Therefore, the windows corresponding to 0.03, 0.06, and 0.09 are identified as shoe upper shaping defect windows; the windows corresponding to 0.36 and 0.40 are identified as normal shoe upper structure windows.

[0166] Furthermore, to evaluate the reliability of different defect windows being identified as abnormal regions, the first defect confidence level is calculated based on the segmentation depth corresponding to when the defect consistency parameter is isolated.

[0167] Specifically, the number of consistency partitioning nodes corresponding to each defect consistency parameter being divided into individual data points is obtained, and the maximum number of consistency partitioning nodes corresponding to the suspected defect classification agent is obtained.

[0168] Calculate the confidence level of the first defect based on the ratio between the two. The specific calculation method is as follows:

[0169] First defect confidence = 1 - (number of consistency partitioning nodes corresponding to defect consistency parameter ÷ number of maximum consistency partitioning nodes).

[0170] Among them, the consistent partitioning node layer number represents the partitioning depth that this parameter goes through from the initial data set to being isolated, and the maximum consistent partitioning node layer number represents the maximum partitioning depth that the classification agent is allowed to execute.

[0171] Because abnormal defect windows have significant differences, they are more likely to be isolated in shallower nodes, so their corresponding number of partitioning layers is smaller, and the confidence of the first defect is higher.

[0172] If a parameter needs to pass through deeper nodes to be isolated, it means that it is close to normal data, and its reliability as a defect window is low. Therefore, the confidence of the first defect is reduced.

[0173] For example, the maximum number of consistency partitioning nodes is set to 20. If a certain defect window's corresponding consistency parameter is isolated at level 4, then the first defect confidence score = 1 - (4 ÷ 20) = 0.8. If another defect window's corresponding consistency parameter is isolated at level 12, then the first defect confidence score = 1 - (12 ÷ 20) = 0.4. Therefore, it is evident that the data isolated at level 4 exhibits more obvious anomaly characteristics, and its defect confidence score is higher than that of the data isolated at level 12.

[0174] Step S400 in the method provided in this embodiment of the invention further includes:

[0175] Obtain recorded data from image acquisition and recognition tests of similar shoe products, extract and process the feature gradient consistency parameters of the normal window, and obtain a set of normal consistency parameters for the samples;

[0176] A sample normal consistency parameter is randomly selected from the sample normal feature gradient set to construct a consistency partitioning node. The consistency partitioning node performs binary classification on the input suspicious defect consistency parameters, and the suspicious defect consistency parameters that are classified into individual data are used as defect consistency parameters.

[0177] Continue to build multi-layer consistency partitioning nodes to obtain a suspicious defect classification agent.

[0178] Specifically, a smart agent for classifying suspected defects is constructed based on historical shoe upper inspection data.

[0179] First, obtain the recorded data generated from image acquisition and recognition tests during the historical production and inspection processes of similar shoe products.

[0180] Among them, similar shoe products are those manufactured using the same upper material, the same shaping process, and the same production parameters. Recorded data includes upper image data, the moving window segmentation results corresponding to the upper image, the feature gradient data corresponding to each window, the annotation results of normal windows, and the feature gradient consistency parameters corresponding to normal windows.

[0181] The normal window labeling results are marked by manual inspectors based on the actual condition of the shoe upper, and are used to screen out normal shoe upper areas that do not have wrinkles, dents, or deformation.

[0182] In practice, 1,000 pairs of shoes of the same model were selected as historical test samples. Images were captured from each of the 1,000 pairs of shoes, and the shoe images were divided according to a preset window size.

[0183] In this embodiment, the window size is set to 16×16 pixels and the movement step is set to 8 pixels.

[0184] Subsequently, feature gradients are calculated for window regions in each shoe upper image, and feature gradient consistency parameters are calculated for the corresponding windows based on the feature gradient changes at the same window positions in multiple similar shoe products.

[0185] Specifically, the stable distribution characteristics of the normal shoe upper area are characterized by the feature gradient changes of the same location window in multiple historical samples.

[0186] After manual inspection and labeling, normal windows without wrinkles, dents, or deformation are selected from historical test samples.

[0187] For example, 50,000 normal windows were obtained from 1,000 pairs of shoes. The feature gradient consistency parameters corresponding to these 50,000 normal windows were extracted to obtain a sample normal consistency parameter set. The sample normal consistency parameter set = {0.82, 0.85, 0.86, 0.87, 0.88, 0.89, 0.90...}. This set describes the distribution range of normal shoe upper regions in the consistency parameter space, providing a data foundation for the subsequent construction of consistency partitioning nodes.

[0188] After obtaining the set of normal consistency parameters for the samples, the first layer of consistent partitioning nodes is constructed.

[0189] Specifically, a normal consistency parameter is randomly selected from the set of normal consistency parameters for samples, and this parameter is used as the reference value for the first-level consistency partitioning node.

[0190] Among them, the partitioning reference parameters are generated by random selection, so that different consistent partitioning nodes have different data partitioning boundaries, thereby improving the ability of the suspicious defect classification agent to distinguish abnormal data.

[0191] For example, a first partitioning reference value of 0.88 is randomly selected from the set of normal consistency parameters of the samples to construct a first-level consistency partitioning node. The first-level consistency partitioning node receives the input suspected defect consistency parameters and performs binary classification based on the first partitioning reference value. Specifically, when the input suspected defect consistency parameter satisfies ≥ 0.88, the parameter is assigned to the first data set; when the input suspected defect consistency parameter satisfies < 0.88, the parameter is assigned to the second data set. In this way, multiple suspected defect consistency parameters are divided into two sub-data sets.

[0192] Furthermore, the next layer of consistent partitioning nodes is constructed for the first data set and the second data set respectively.

[0193] Specifically, a sample normal consistency parameter is randomly selected from the sample normal consistency parameters corresponding to the current data set and used as the partitioning reference value for the next layer of consistency partitioning nodes.

[0194] For example, for the first dataset, a second partitioning reference value of 0.91 is randomly selected to construct a second-level consistent partitioning node. For the second-level consistent partitioning node, when the input parameter is ≥0.91, it proceeds to the first child node; when the input parameter is <0.91, it proceeds to the second child node. The above process is repeated to construct multiple consistent partitioning nodes layer by layer.

[0195] Furthermore, the maximum number of consistency partitioning node layers is set based on the number of windows in the current detection task. Specifically, the maximum number of consistency partitioning node layers is set according to the number of shoe upper windows to be detected.

[0196] Among them, the maximum consistency partitioning node layer is used to limit the maximum partitioning depth of the suspicious defect classification agent, so that the agent can control the amount of computation while meeting the recognition requirements.

[0197] For example, when analyzing 1000 windows in a single shoe upper inspection task, the maximum number of consistent partitioning nodes is set to 20, based on the distribution range of the consistency parameters of normal windows in historical test data. During the construction process, if the current dataset already meets the preset partitioning conditions, the generation of the next layer of consistent partitioning nodes is stopped; if the current dataset still contains a large number of data samples, the construction of the next layer of consistent partitioning nodes continues.

[0198] The above method enables the constructed consistent partitioning structure to cover the normal window parameter distribution range while retaining the ability to separate abnormal data.

[0199] Furthermore, after all consistent partitioning nodes have been constructed, the consistent partitioning nodes at each layer are connected according to the partitioning relationship to form a suspected defect classification agent.

[0200] The suspicious defect classification agent includes multi-layered consistent partitioning nodes, partitioning reference parameters for each node, and data transmission relationships between nodes.

[0201] Multiple consistent partitioning nodes are connected in a hierarchical relationship from shallow to deep, enabling the input data to be analyzed layer by layer along the preset partitioning path.

[0202] Step S400 in the method provided in this embodiment of the invention further includes:

[0203] Obtain several baseline feature gradients extracted from images acquired within a historical timeframe using several normal windows;

[0204] Calculate the similarity between the feature gradients of several normal windows and several baseline feature gradients, and use this as the recognition accuracy;

[0205] Calculate the recognition accuracy compensation coefficient for negative correlation based on the recognition accuracy.

[0206] By using an accuracy compensation coefficient, several confidence levels of the first defect are compensated and adjusted to obtain several confidence levels. Several defect windows are then labeled to obtain the defect identification results.

[0207] In this embodiment, after obtaining the defect window and the corresponding first defect confidence level through the suspected defect classification agent, in order to further eliminate the influence of differences in shoe upper material texture, changes in illumination and changes in the collection environment on the defect identification results, the first defect confidence level is compensated and adjusted according to the historical gradient stability of the normal window to obtain the final confidence level.

[0208] Specifically, we first acquire feature gradient data corresponding to normal windows in images of similar shoe products collected over a historical period.

[0209] The images collected during the historical period include images of the shoe uppers of the same model of shoe product collected in different batches, at different collection times, and in different production cycles.

[0210] Since there are no shaping defects in the normal shoe upper area, its surface structure remains stable. Therefore, the feature gradient changes are small in images acquired at different times for the same type of normal window.

[0211] Based on the above characteristics, normal shoe upper images collected at multiple historical time points were selected, and the feature gradients corresponding to the current detection window position were extracted as the baseline feature gradients.

[0212] In practice, 1000 pairs of shoes of the same model were selected as historical inspection samples. Images of each pair of shoes were captured at different production times. For normal windows that were manually confirmed to be free of defects, the feature gradients at their corresponding positions were extracted.

[0213] For example, for a certain normal window position, the feature gradients obtained in five historical acquisitions are 86, 87, 85, 88, and 86, respectively. These data are then used as the baseline feature gradient set corresponding to that normal window. That is, the baseline feature gradient set = {86, 87, 85, 88, 86}. Multiple baseline feature gradient sets corresponding to multiple normal windows are obtained in this way.

[0214] Furthermore, the real-time feature gradients corresponding to multiple normal windows during the current detection process are obtained.

[0215] The similarity between the feature gradient of the current normal window and the baseline feature gradient in the corresponding historical images is calculated to obtain the recognition accuracy.

[0216] Specifically, the gradient difference is used to evaluate the degree of change between the current feature gradient and the baseline feature gradient. The gradient difference is calculated as follows:

[0217] Gradient difference = Absolute difference between the current normal window feature gradient and the average of the baseline feature gradients ÷ Average of the baseline feature gradients.

[0218] Furthermore, the recognition accuracy is calculated based on the gradient difference:

[0219] Recognition accuracy = 1 - gradient difference.

[0220] Among them, the closer the recognition accuracy is to 1, the more consistent the normal window gradient response is with the historical normal state under the current acquisition environment; the lower the recognition accuracy, the greater the acquisition deviation or environmental change in the current shoe image.

[0221] For example, the historical baseline feature gradient set for a normal window is 86, 87, 85, 88, and 86. First, the average baseline feature gradient is calculated as (86 + 87 + 85 + 88 + 86) ÷ 5 = 86.4. The current detection obtains a feature gradient of 85 for this normal window, so the gradient difference is |85 - 86.4| ÷ 86.4 ≈ 0.016. Therefore, the recognition accuracy is 1 - 0.016 ≈ 0.984. This indicates that during the current detection process, this normal window is highly consistent with the historical normal state, and the current detection result has high reliability.

[0222] Furthermore, the recognition accuracy compensation coefficient is calculated based on the recognition accuracy corresponding to multiple normal windows.

[0223] Specifically, the recognition accuracy of multiple normal windows is statistically analyzed to obtain the overall recognition stability.

[0224] The recognition accuracy compensation coefficient is negatively correlated with the recognition accuracy. The specific calculation method is as follows:

[0225] Recognition accuracy compensation coefficient = 1 - average recognition accuracy of multiple normal windows.

[0226] When the accuracy of normal window recognition is high, it indicates that the current detection environment is stable and the confidence level of the first defect does not need to be significantly reduced, so the compensation coefficient is small; when the accuracy of normal window recognition is low, it indicates that there are large fluctuations in the current image acquisition and the confidence level of defect recognition needs to be reduced, so the compensation coefficient is increased.

[0227] For example, during the current detection process, the recognition accuracies of 10 normal windows are 0.98, 0.97, 0.96, 0.99, 0.95, 0.97, 0.98, 0.96, 0.97, and 0.98. Therefore, the average recognition accuracy is (0.98 + 0.97 + 0.96 + 0.99 + 0.95 + 0.97 + 0.98 + 0.96 + 0.97 + 0.98) ÷ 10 = 0.971. Thus, the recognition accuracy compensation coefficient is 1 - 0.971 = 0.029. This indicates that the current image acquisition environment is stable, and only a minor adjustment to the defect confidence level is needed.

[0228] Furthermore, the confidence level of the first defect obtained above is adjusted using an identification accuracy compensation coefficient. The specific calculation method is as follows:

[0229] Confidence level = Confidence level of first defect × (1 - recognition accuracy compensation coefficient).

[0230] Among them, the first defect confidence score is used to represent the degree of abnormality of the defect window in the isolated segmentation process; the recognition accuracy compensation coefficient is used to represent the degree of deviation of the current detection environment from the historical normal state.

[0231] Subsequently, the defect windows are labeled based on the final obtained confidence level.

[0232] The defect labeling threshold is derived from the statistical results of historical shoe upper shaping defect test data, that is, the confidence distribution range corresponding to the real defect window and the normal window is statistically analyzed, and the optimal dividing value that can distinguish between the two is determined to be 0.70.

[0233] For example, after isolating and dividing a defect window, the first defect confidence score is 0.80. The current detection environment calculates the recognition accuracy compensation coefficient to be 0.029. Therefore, the confidence score is 0.80 × (1 - 0.029) ≈ 0.777. Since 0.777 ≥ 0.70, this window is marked as a defect window.

[0234] In summary, this step constructs a suspicious defect classification agent based on multi-layer consistency partitioning nodes, performs anomaly isolation analysis on the consistency parameters of multiple suspicious defects, and effectively distinguishes between defect windows and normal windows. Furthermore, it calculates the first defect confidence level based on the partitioning depth when the defect parameters are isolated, and combines the gradient stability of historical normal windows to compensate for the accuracy of the identification results, reducing the impact of misjudgment caused by changes in illumination, material differences, and fluctuations in the acquisition environment. Finally, it obtains defect identification results after confidence correction, improving the accuracy and reliability of shoe upper shaping defect detection.

[0235] Example 2, as Figure 3 As shown, this invention provides a machine vision-based shoe upper shaping defect identification system, comprising:

[0236] The image acquisition module 11 is used to acquire images of the uppers of multiple shoe products under an auxiliary light source and perform standardized processing to obtain multiple upper images.

[0237] The gradient feature extraction module 12 is used to perform feature gradient analysis of each shoe upper image using a moving window, obtain multiple feature gradient arrays, and extract multiple suspected defect gradient sets respectively.

[0238] Consistency analysis module 13 is used to perform consistency analysis on the feature gradients of multiple suspected defect gradient sets in the same window to obtain consistency parameters of multiple suspected defects;

[0239] The defect identification module 14 is used to classify and analyze suspicious defects based on multiple consistency parameters, obtain several defect windows, and label them with several confidence levels to obtain defect identification results. Among them, several confidence levels are corrected for identification accuracy.

[0240] In this embodiment of the invention, the image acquisition module 11 is further configured to:

[0241] Under auxiliary light, images of the uppers of multiple shoe products were acquired to obtain multiple initial upper images;

[0242] Multiple initial shoe upper images are standardized and grayscale processed to obtain multiple shoe upper images.

[0243] In this embodiment of the invention, the gradient feature extraction module 12 is further configured to:

[0244] Select an image of a shoe upper and divide it into a first window according to a preset window size;

[0245] Calculate the feature gradient within the first window to obtain the first feature gradient;

[0246] Continue selecting the moving window and calculating the feature gradient to obtain the feature gradient array;

[0247] Continue to perform moving window selection and feature gradient calculation on all shoe upper images to obtain multiple feature gradient arrays;

[0248] Suspicious defect gradients are extracted from multiple feature gradient arrays to obtain multiple sets of suspicious defect gradients.

[0249] The calculation of the feature gradient within the first window to obtain the first feature gradient includes:

[0250] Extract the minimum and maximum grayscale values ​​within the first window;

[0251] Calculate the absolute difference between the minimum and maximum grayscale values, and use it as the first feature gradient.

[0252] Specifically, suspected defect gradients are extracted from multiple feature gradient arrays to obtain multiple suspected defect gradient sets, including:

[0253] Based on the test data of shoe upper shaping defects, the minimum feature gradient of shoe upper shaping defects is obtained and configured as the feature gradient threshold;

[0254] In multiple feature gradient arrays, feature gradients greater than or equal to the feature gradient threshold are selected as suspected defect gradients. All suspected defect gradients and their corresponding windows are integrated to obtain multiple suspected defect gradient sets.

[0255] In this embodiment of the invention, the consistency analysis module 13 is further configured to:

[0256] By statistically analyzing all windows in each set of multiple suspected defect gradients, multiple candidate windows are obtained;

[0257] Extract all feature gradients of multiple candidate windows in multiple feature gradient arrays to obtain multiple candidate window feature gradient sets;

[0258] Consistency analysis was performed on the feature gradients of multiple candidate window feature gradient sets to obtain multiple consistency parameters of suspected defects.

[0259] In this embodiment of the invention, the defect identification module 14 is further configured to:

[0260] Invoke the suspicious defect classification agent, which includes multi-layer consistency partitioning nodes;

[0261] Multiple suspected defect consistency parameters are input into the suspected defect classification agent for multi-level binary classification. The suspected defect consistency parameters that are classified into individual data are used as defect consistency parameters, and the corresponding windows are used as defect windows, resulting in several defect windows.

[0262] Obtain the ratio of the number of consistent partitioning nodes to the maximum number of consistent partitioning nodes for each defect consistency parameter, and calculate the confidence scores of several negatively correlated first defects.

[0263] Extract suspicious defect consistency parameters that are not divided into individual data as normal consistency parameters, and use the corresponding windows as normal windows;

[0264] Based on the feature gradients of several normal windows, the recognition accuracy compensation coefficient is calculated, and the confidence scores of several first defects are compensated and adjusted to obtain several confidence scores. Several defect windows are then labeled to obtain the defect recognition result.

[0265] The construction steps of the suspected defect classification agent include:

[0266] Obtain recorded data from image acquisition and recognition tests of similar shoe products, extract and process the feature gradient consistency parameters of the normal window, and obtain a set of normal consistency parameters for the samples;

[0267] A sample normal consistency parameter is randomly selected from the sample normal feature gradient set to construct a consistency partitioning node. The consistency partitioning node performs binary classification on the input suspicious defect consistency parameters, and the suspicious defect consistency parameters that are classified into individual data are used as defect consistency parameters.

[0268] Continue to build multi-layer consistency partitioning nodes to obtain a suspicious defect classification agent.

[0269] Specifically, based on the feature gradients of several normal windows, an accuracy compensation coefficient is calculated; several first defect confidence scores are compensated and adjusted to obtain several confidence scores; and several defect windows are labeled to obtain the defect identification results, including:

[0270] Obtain several baseline feature gradients extracted from images acquired within a historical timeframe using several normal windows;

[0271] Calculate the similarity between the feature gradients of several normal windows and several baseline feature gradients, and use this as the recognition accuracy;

[0272] Calculate the recognition accuracy compensation coefficient for negative correlation based on the recognition accuracy.

[0273] By using an accuracy compensation coefficient, several confidence levels of the first defect are compensated and adjusted to obtain several confidence levels. Several defect windows are then labeled to obtain the defect identification results.

[0274] In summary, the machine vision-based shoe upper shaping defect recognition system provided in this embodiment of the invention acquires, standardizes, and grayscales shoe upper images through an image acquisition module, reducing the impact of differences in the acquisition environment on the detection results. A gradient feature extraction module extracts local grayscale variation features of the shoe upper using a moving window approach, and combines this with a defect gradient threshold to screen and obtain suspicious defect areas. Furthermore, a consistency analysis module performs correlation analysis on the gradient responses at the same spatial location in multiple shoe upper samples to obtain suspicious defect consistency parameters that reflect defect stability. Finally, a defect recognition module uses a suspicious defect classification agent to classify anomalies and combines this with a recognition accuracy correction mechanism to optimize the defect confidence level, achieving accurate identification of shoe upper shaping defect areas. This system can reduce false detections caused by shoe upper texture, lighting changes, and material differences, improving the stability and reliability of shoe upper shaping defect detection.

[0275] It should be noted that the processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some implementations, multitasking and parallel processing are possible or may be advantageous.

[0276] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

[0277] This specification and accompanying drawings are merely illustrative examples of the invention and are intended to cover any and all modifications, variations, combinations, or equivalents within the scope of the invention. Clearly, those skilled in the art can make various alterations and modifications to the invention without departing from its scope. Therefore, if such modifications and modifications fall within the scope of the invention and its equivalents, the invention is intended to include these modifications and modifications.

Claims

1. A method for identifying shoe upper shaping defects based on machine vision, characterized in that, The method includes: Under auxiliary light, images of the uppers of multiple shoe products were acquired and standardized to obtain multiple upper images; For each shoe upper image, a moving window feature gradient analysis is performed to obtain multiple feature gradient arrays, and multiple suspected defect gradient sets are extracted respectively. Consistency analysis is performed on the feature gradients of multiple suspected defects within the same window to obtain consistency parameters for multiple suspected defects. Based on the consistency parameters of multiple suspected defects, the suspected defects are classified and analyzed to obtain several defect windows. Several confidence levels are used to label them to obtain the defect identification results. Among them, several confidence levels are corrected for identification accuracy.

2. The method for identifying shoe upper shaping defects based on machine vision according to claim 1, characterized in that, Under auxiliary lighting, images of multiple shoe uppers were acquired and standardized to obtain multiple shoe upper images, including: Under auxiliary light, images of the uppers of multiple shoe products were acquired to obtain multiple initial upper images; Multiple initial shoe upper images are standardized and grayscale processed to obtain multiple shoe upper images.

3. The method for identifying shoe upper shaping defects based on machine vision according to claim 1, characterized in that, For each shoe upper image, a moving window feature gradient analysis is performed to obtain multiple feature gradient arrays. Multiple suspected defect gradient sets are then extracted, including: Select an image of a shoe upper and divide it into a first window according to a preset window size; Calculate the feature gradient within the first window to obtain the first feature gradient; Continue selecting the moving window and calculating the feature gradient to obtain the feature gradient array; Continue to perform moving window selection and feature gradient calculation on all shoe upper images to obtain multiple feature gradient arrays; Suspicious defect gradients are extracted from multiple feature gradient arrays to obtain multiple sets of suspicious defect gradients.

4. The method for identifying shoe upper shaping defects based on machine vision according to claim 3, characterized in that, The first feature gradient is obtained by calculating the feature gradient within the first window, including: Extract the minimum and maximum grayscale values ​​within the first window; Calculate the absolute difference between the minimum and maximum grayscale values, and use it as the first feature gradient.

5. The method for identifying shoe upper shaping defects based on machine vision according to claim 3, characterized in that, Suspicious defect gradients are extracted from multiple feature gradient arrays to obtain multiple sets of suspicious defect gradients, including: Based on the test data of shoe upper shaping defects, the minimum feature gradient of shoe upper shaping defects is obtained and configured as the feature gradient threshold; In the multiple feature gradient arrays, feature gradients greater than or equal to the feature gradient threshold are selected as suspected defect gradients. All suspected defect gradients and their corresponding windows are integrated to obtain multiple suspected defect gradient sets.

6. The method for identifying shoe upper shaping defects based on machine vision according to claim 1, characterized in that, Consistency analysis is performed on the feature gradients within the same window of multiple suspected defect gradient sets to obtain consistency parameters for multiple suspected defects, including: By statistically analyzing all windows in each set of multiple suspected defect gradients, multiple candidate windows are obtained; Extract all feature gradients of multiple candidate windows in multiple feature gradient arrays to obtain multiple candidate window feature gradient sets; Consistency analysis was performed on the feature gradients of multiple candidate window feature gradient sets to obtain multiple consistency parameters of suspected defects.

7. The method for identifying shoe upper shaping defects based on machine vision according to claim 1, characterized in that, Based on multiple consistency parameters of suspected defects, anomaly classification and analysis are performed to obtain several defect windows. These windows are then labeled using several confidence levels to obtain defect identification results, including: Invoke the suspicious defect classification agent, which includes multi-layer consistency partitioning nodes; Multiple suspected defect consistency parameters are input into the suspected defect classification agent for multi-level binary classification. The suspected defect consistency parameters that are divided into individual data are used as defect consistency parameters, and the corresponding windows are used as defect windows to obtain several defect windows. Obtain the ratio of the number of consistent partitioning nodes to the maximum number of consistent partitioning nodes for each defect consistency parameter, and calculate the confidence scores of several negatively correlated first defects. Extract suspicious defect consistency parameters that are not divided into individual data as normal consistency parameters, and use the corresponding windows as normal windows; Based on the feature gradients of several normal windows, the recognition accuracy compensation coefficient is calculated, and the confidence scores of the several first defects are compensated and adjusted to obtain several confidence scores. Several defect windows are then labeled to obtain the defect recognition result.

8. The method for identifying shoe upper shaping defects based on machine vision according to claim 7, characterized in that, The steps for constructing the suspected defect classification agent include: Obtain recorded data from image acquisition and recognition tests of similar shoe products, extract and process the feature gradient consistency parameters of the normal window, and obtain a set of normal consistency parameters for the samples; A sample normal consistency parameter is randomly selected from the sample normal feature gradient set to construct a consistency partitioning node. The consistency partitioning node performs binary classification on the input suspicious defect consistency parameters, and the suspicious defect consistency parameters that are classified into individual data are used as defect consistency parameters. Continue to build multi-layer consistency partitioning nodes to obtain a suspicious defect classification agent.

9. The method for identifying shoe upper shaping defects based on machine vision according to claim 7, characterized in that, Based on the feature gradients of several normal windows, a recognition accuracy compensation coefficient is calculated. The confidence scores of the several first defects are then adjusted to obtain several confidence scores. Several defect windows are then labeled to obtain the defect recognition result, including: Obtain several baseline feature gradients extracted from images acquired within a historical timeframe using several normal windows; Calculate the similarity between the feature gradients of several normal windows and several baseline feature gradients, and use this as the recognition accuracy; Based on the recognition accuracy, calculate the negative correlation recognition accuracy compensation coefficient; Using the aforementioned recognition accuracy compensation coefficient, the confidence levels of the several first defects are compensated and adjusted to obtain several confidence levels. Several defect windows are then labeled to obtain the defect recognition result.

10. A machine vision-based shoe upper shaping defect recognition system, characterized in that, The method for implementing the machine vision-based shoe upper shaping defect identification method according to any one of claims 1 to 9 includes: The image acquisition module is used to acquire images of the uppers of multiple shoe products under auxiliary light and perform standardized processing to obtain multiple upper images; The gradient feature extraction module is used to perform feature gradient analysis of each shoe upper image using a moving window, obtain multiple feature gradient arrays, and extract multiple suspected defect gradient sets respectively. The consistency analysis module is used to perform consistency analysis on the feature gradients of multiple suspected defects within the same window to obtain consistency parameters for multiple suspected defects. The defect identification module is used to classify and analyze suspicious defects based on multiple consistency parameters, obtain several defect windows, and label them with several confidence levels to obtain defect identification results. Among them, several confidence levels are corrected for identification accuracy.