AI visual inspection method based on supervised and unsupervised deep learning
By combining AI visual inspection methods with supervised and unsupervised deep learning, the problems of traditional visual algorithms having difficulty identifying microscopic defects in industrial wire harnesses and the scarcity of defect samples have been solved, achieving high-precision and high generalization capability of industrial wire harness inspection.
Patent Information
- Application Number
- CN202511190642.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-25
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-08-25
AI Technical Summary
Traditional visual algorithms have difficulty capturing microscopic defects in industrial wiring harnesses. The scarcity of defect samples leads to insufficient model generalization capabilities. Traditional supervised detection methods require large-scale labeled data, which is difficult to obtain and cannot identify new types of defects.
Combining supervised and unsupervised deep learning, we can quickly locate the target area through unsupervised learning, and finely identify defects through supervised learning. We can also use the anomaly detection capabilities of unsupervised deep learning and the precise recognition capabilities of supervised learning to establish an AI visual feature analysis model.
High-precision and high-robustness visual inspection can be achieved with a small amount of labeled data, which improves the ability to identify new types of defects and meets the high-precision and high-generalization requirements of industrial inspection.
Smart Images

Figure CN120689699A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of AI visual inspection, and specifically to an AI visual inspection method based on supervised and unsupervised deep learning. Background Art
[0002] Currently, the application of AI technology in industrial product inspection is becoming increasingly widespread. Intelligent inspection of industrial wiring harnesses, due to their unique characteristics, has become an industry challenge. AI inspection of industrial wiring harnesses faces three technical challenges: First, the characteristics of defects in industrial wiring harnesses are often microscopic (such as micron-level scratches and terminal deformation), making them difficult to capture with traditional visual algorithms. Second, industry standards require a defect detection rate of over 99.9%, a stringent standard close to zero missed detection. Third, in actual production, the pass rate is as high as over 99.5%, resulting in an extremely scarce number of defective samples (the positive to negative sample ratio can exceed 1000:1).
[0003] Traditional supervised detection methods have obvious limitations: on the one hand, they require large-scale labeled data sets (usually tens of thousands of positive and negative sample images), but it is difficult to obtain sufficient defect samples in actual production; on the other hand, the model can only recognize defect patterns that have appeared in the training set and lacks the ability to generalize to new defects (such as unknown defects caused by sudden process anomalies on the production line). Summary of the Invention
[0004] In response to the shortcomings of the existing technology, the present invention provides an AI visual inspection method based on supervised and unsupervised deep learning. It quickly locates the target area through unsupervised learning, combines supervised learning to fine-tune defect identification, and finally outputs reliable results through multi-level verification.
[0005] To achieve the above objectives, the present invention provides an AI visual inspection method based on supervised and unsupervised deep learning, comprising: S1. Using real-time sampled image data to establish sampled image visual features; S2. Establishing an AI visual feature analysis model based on supervised and unsupervised deep learning using the visual features of the sampled image; S3. Obtain AI visual detection results according to the AI visual feature analysis model.
[0006] Preferably, the establishing of visual features of the sampled image using the real-time sampled image data includes: S1-1, collecting real-time sampling image data; S1-2, establishing a real-time sampling image data pixel matrix according to the real-time sampling image data; S1-3, using the real-time sampling image data pixel matrix to respectively obtain the target area and the non-target area according to the color characteristics of the industrial wire harness; S1-4. Utilize the target area and the non-target area as visual features of the sampled image.
[0007] Furthermore, establishing an AI visual feature analysis model based on supervised and unsupervised deep learning using the visual features of the sampled image includes: S2-1. Establishing a basic AI visual feature rough recognition model based on unsupervised deep learning using the visual features of the sampled image; S2-2. Using the visual features of the sampled images, establish a basic AI visual feature fine recognition model based on supervised deep learning; S2-3. Obtain an AI visual feature analysis model using the basic AI visual feature coarse recognition model and the basic AI visual feature fine recognition model.
[0008] Furthermore, establishing a basic AI visual feature rough recognition model based on unsupervised deep learning using the visual features of the sampled image includes: S2-1-1. Establishing a first data set using the target area of the visual features of the sampled image; S2-1-2, establishing a second data set using the non-target area of the visual features of the sampled image; S2-1-3. Using the first dataset and the second dataset as input and the corresponding region boundaries of the first dataset and the second dataset as output, establish a basic AI visual feature rough recognition model based on unsupervised deep learning; The region boundary is a line connecting the boundary pixels between the target region and the non-target region.
[0009] Furthermore, using the visual features of the sampled images to establish a basic AI visual feature fine recognition model based on supervised deep learning includes: S2-2-1. Acquire historical target areas corresponding to the visual features of the sampled image based on the target areas of the visual features of the sampled image to establish a third data set; S2-2-2. Acquire historical non-target areas corresponding to the visual features of the sampled image based on the non-target areas of the visual features of the sampled image to establish a fourth data set; S2-2-3. Using the third data set as input and the boundary pixels corresponding to the third data set as output, establish a target area boundary segmentation model based on supervised deep learning; S2-2-4. Using the fourth data set as input and the boundary pixels corresponding to the fourth data set as output, establish a non-target area boundary segmentation model based on supervised deep learning; S2-2-5. Utilize the target area boundary segmentation model and the non-target area boundary segmentation model as a basic AI visual feature fine recognition model; The boundary pixels corresponding to the third data set and the boundary pixels corresponding to the fourth data set do not have the same pixel points.
[0010] Furthermore, obtaining an AI visual feature analysis model using the basic AI visual feature coarse recognition model and the basic AI visual feature fine recognition model includes: S2-3-1. Use the real-time sampled image data corresponding to the sampled image visual features to input the basic AI visual feature coarse recognition model and the basic AI visual feature fine recognition model to obtain the basic AI visual feature coarse recognition results and the basic AI visual feature fine recognition results; S2-3-2. Determine whether the pixel connection lines of the basic AI visual feature coarse recognition result and the basic AI visual feature fine recognition result are aligned. If so, use the basic AI visual feature coarse recognition model and the basic AI visual feature fine recognition model as the AI visual feature analysis model. Otherwise, update the resolution of the real-time sampled image data and return to S1-2.
[0011] Furthermore, the AI visual detection results obtained according to the AI visual feature analysis model include: S3-1. Obtaining initial AI visual detection results using the AI visual feature analysis model; S3-2. Perform trend feedback verification based on the initial AI visual inspection result to obtain an AI visual inspection result.
[0012] Furthermore, obtaining initial AI visual detection results using the AI visual feature analysis model includes: S3-1-1. Obtaining visual features of historical risk sampling images corresponding to the real-time sampling image data according to the real-time sampling image data; S3-1-2. Obtain a risk pixel matrix as a primary comparison template based on the visual features of the historical risk sampling image; S3-1-3, obtaining adjacent pixels according to the primary proofreading template as a secondary comparison template; S3-1-4. Obtain initial AI visual inspection results based on the primary comparison template and the secondary comparison template using the AI visual feature analysis model; The visual features of the historical risk sampling image include historical risk target areas and historical risk non-target areas.
[0013] Furthermore, obtaining an initial AI visual detection result based on the primary comparison template and the secondary comparison template using the AI visual feature analysis model includes: S3-1-4-1. Use the real-time sampled image data corresponding to the sampled image visual features to input into the AI visual feature analysis model to obtain a comprehensive analysis result of the industrial wiring harness data; S3-1-4-2. Determine whether the comprehensive analysis result of the industrial wiring harness data corresponds to the same area as the primary comparison template. If so, obtain adjacent pixels corresponding to the same area as the auxiliary verification area and execute S3-1-4-3. Otherwise, directly execute S3-1-4-3. S3-1-4-3. Determine whether the comprehensive analysis result of the industrial wiring harness data and the secondary comparison template have corresponding identical areas. If so, obtain the pixels contained in the corresponding identical areas as the auxiliary verification area and execute S3-1-4-4. Otherwise, execute S3-1-4-4 directly. S3-1-4-4. When any auxiliary verification area exists, the auxiliary verification area is used as the initial AI visual detection result; when no auxiliary verification area exists, the initial AI visual detection result is empty.
[0014] Furthermore, the AI visual inspection results obtained by performing trend feedback verification based on the initial AI visual inspection results include: S3-2-1. Obtain the corresponding time of the real-time sampling image data as the starting time t of trend feedback verification; S3-2-2, obtain the initial AI visual detection results at time t+1 and time t+2 respectively; S3-2-3. Determine whether the initial AI visual inspection result at time t+1 is the same as the initial AI visual inspection result at the trend feedback verification starting time t. If so, execute S3-2-4. Otherwise, output the initial AI visual inspection result at the trend feedback verification starting time t as the AI visual inspection result. S3-2-4. Determine whether the initial AI visual detection result at time t+2 is the same as the initial AI visual detection result at the starting time t of trend feedback verification. If so, update the real-time sampling image data and return to S1-1. Otherwise, output the initial AI visual detection result at the starting time t of trend feedback verification as the AI visual detection result.
[0015] Compared with the closest prior art, the present invention has the following beneficial effects: Through a hybrid learning architecture of supervised and unsupervised learning, combining the discriminative ability of deep learning with the anomaly detection advantages of unsupervised learning, high-precision and high-robustness visual inspection is achieved with a small amount of labeled data. The supervised main model is trained based on labeled data to ensure accurate identification of known defects. The unsupervised auxiliary model has the ability to autonomously identify new and unseen defects through self-supervised learning and anomaly detection algorithms (such as GAN and contrastive learning). The unsupervised module only requires a small number of normal samples for modeling. Combined with virtual defect generation technology (such as data augmentation and synthetic anomalies), it reduces training data, breaks through the limitations of traditional supervised models, and improves generalization ability while ensuring high precision, making it suitable for complex and changeable industrial inspection scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 This is a flowchart of an AI visual inspection method based on supervised and unsupervised deep learning provided by the present invention; Figure 2 This is a specific implementation flow chart of an AI visual detection method based on supervised and unsupervised deep learning provided by the present invention. DETAILED DESCRIPTION
[0017] The specific embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0019] Example 1: The present invention provides an AI visual detection method based on supervised and unsupervised deep learning, such as Figure 1 As shown, including: S1. Using real-time sampled image data to establish sampled image visual features; S2. Establishing an AI visual feature analysis model based on supervised and unsupervised deep learning using the visual features of the sampled image; S3. Obtain AI visual detection results according to the AI visual feature analysis model.
[0020] S1 specifically includes: S1-1, collecting real-time sampling image data; S1-2, establishing a real-time sampling image data pixel matrix according to the real-time sampling image data; S1-3, using the real-time sampling image data pixel matrix to respectively obtain the target area and the non-target area according to the color characteristics of the industrial wire harness; S1-4. Utilize the target area and the non-target area as visual features of the sampled image.
[0021] S2 specifically includes: S2-1. Establishing a basic AI visual feature rough recognition model based on unsupervised deep learning using the visual features of the sampled image; S2-2. Using the visual features of the sampled images, establish a basic AI visual feature fine recognition model based on supervised deep learning; S2-3. Obtain an AI visual feature analysis model using the basic AI visual feature coarse recognition model and the basic AI visual feature fine recognition model.
[0022] S2-1 specifically includes: S2-1-1. Establishing a first data set using the target area of the visual features of the sampled image; S2-1-2, establishing a second data set using the non-target area of the visual features of the sampled image; S2-1-3. Using the first dataset and the second dataset as input and the corresponding region boundaries of the first dataset and the second dataset as output, establish a basic AI visual feature rough recognition model based on unsupervised deep learning; The region boundary is a line connecting the boundary pixels between the target region and the non-target region.
[0023] S2-2 specifically includes: S2-2-1. Acquire historical target areas corresponding to the visual features of the sampled image based on the target areas of the visual features of the sampled image to establish a third data set; S2-2-2. Acquire historical non-target areas corresponding to the visual features of the sampled image based on the non-target areas of the visual features of the sampled image to establish a fourth data set; S2-2-3. Using the third data set as input and the boundary pixels corresponding to the third data set as output, establish a target area boundary segmentation model based on supervised deep learning; S2-2-4. Using the fourth data set as input and the boundary pixels corresponding to the fourth data set as output, establish a non-target area boundary segmentation model based on supervised deep learning; S2-2-5. Utilize the target area boundary segmentation model and the non-target area boundary segmentation model as a basic AI visual feature fine recognition model; The boundary pixels corresponding to the third data set and the boundary pixels corresponding to the fourth data set do not have the same pixel points.
[0024] S2-3 specifically includes: S2-3-1. Use the real-time sampled image data corresponding to the sampled image visual features to input the basic AI visual feature coarse recognition model and the basic AI visual feature fine recognition model to obtain the basic AI visual feature coarse recognition results and the basic AI visual feature fine recognition results; S2-3-2. Determine whether the pixel connection lines of the basic AI visual feature coarse recognition result and the basic AI visual feature fine recognition result are aligned. If so, use the basic AI visual feature coarse recognition model and the basic AI visual feature fine recognition model as the AI visual feature analysis model. Otherwise, update the resolution of the real-time sampled image data and return to S1-2.
[0025] S3 specifically includes: S3-1. Obtaining initial AI visual detection results using the AI visual feature analysis model; S3-2. Perform trend feedback verification based on the initial AI visual inspection result to obtain an AI visual inspection result.
[0026] S3-1 specifically includes: S3-1-1. Obtaining visual features of historical risk sampling images corresponding to the real-time sampling image data according to the real-time sampling image data; S3-1-2. Obtain a risk pixel matrix as a primary comparison template based on the visual features of the historical risk sampling image; S3-1-3, obtaining adjacent pixels according to the primary proofreading template as a secondary comparison template; S3-1-4. Obtain initial AI visual inspection results based on the primary comparison template and the secondary comparison template using the AI visual feature analysis model; The visual features of the historical risk sampling image include historical risk target areas and historical risk non-target areas.
[0027] S3-1-4 specifically includes: S3-1-4-1. Use the real-time sampled image data corresponding to the sampled image visual features to input into the AI visual feature analysis model to obtain a comprehensive analysis result of the industrial wiring harness data; S3-1-4-2. Determine whether the comprehensive analysis result of the industrial wiring harness data corresponds to the same area as the primary comparison template. If so, obtain adjacent pixels corresponding to the same area as the auxiliary verification area and execute S3-1-4-3. Otherwise, directly execute S3-1-4-3. S3-1-4-3. Determine whether the comprehensive analysis result of the industrial wiring harness data and the secondary comparison template have corresponding identical areas. If so, obtain the pixels contained in the corresponding identical areas as the auxiliary verification area and execute S3-1-4-4. Otherwise, execute S3-1-4-4 directly. S3-1-4-4. When any auxiliary verification area exists, the auxiliary verification area is used as the initial AI visual detection result; when no auxiliary verification area exists, the initial AI visual detection result is empty.
[0028] S3-2 specifically includes: S3-2-1. Obtain the corresponding time of the real-time sampling image data as the starting time t of trend feedback verification; S3-2-2, obtain the initial AI visual detection results at time t+1 and time t+2 respectively; S3-2-3. Determine whether the initial AI visual inspection result at time t+1 is the same as the initial AI visual inspection result at the trend feedback verification starting time t. If so, execute S3-2-4. Otherwise, output the initial AI visual inspection result at the trend feedback verification starting time t as the AI visual inspection result. S3-2-4. Determine whether the initial AI visual detection result at time t+2 is the same as the initial AI visual detection result at the starting time t of trend feedback verification. If so, update the real-time sampling image data and return to S1-1. Otherwise, output the initial AI visual detection result at the starting time t of trend feedback verification as the AI visual detection result.
[0029] In this embodiment, an AI visual detection method based on supervised and unsupervised deep learning is used. Figure 2 As shown in the figure, for the field of visual AI inspection, the minimum learning sample size (denoted as Smin) of the deep learning algorithm depends on many factors, such as different visual inspection scenarios, different types of visual defects, different visual defect recognition levels, etc. Once Smin is determined, the optimal actual sample size (denoted as Sact) for training, validating, and testing the deep learning model will be further determined based on the actual conditions of image data collection. The actual sample size of the supervised learning AI model is different from that of the unsupervised learning AI model. The specific steps are as follows: S0-1: Determine the common Smin of the supervised learning AI model and the unsupervised learning AI model; S0-1-1: Based on the actual application scenario, determine the minimum learning sample size for the supervised learning AI model, recorded as S1min; then determine the minimum learning sample size for the unsupervised learning AI model, recorded as S2min; S0-1-2 Since supervised learning AI models and unsupervised learning AI models are used together for sample prediction in the same application scenario, it is necessary to determine the minimum learning sample size that satisfies the training of both models. This is denoted as Smin and is calculated as: Smin = max{S1min, S2min}; S0-2: Determine the actual sample size of the supervised learning AI model, denoted as S1act; S0-2-1 Assuming that the number of folds in multi-fold cross-validation is n, and the minimum learning sample size Smin is used for both training and validation, then: Number of samples required for training: Strain=((n-1) / n) * Smin Number of samples required for verification: Sval=(1 / n)* Smin Additionally, a sample set is needed for independent testing: Number of samples required for testing: Stest=(1 / n)* Smin Therefore, the actual sample size Sact= Strain+ Sval+ Stest=((n+1) / (n-1)) * Smin; S0-2-2. In this embodiment, the number of folds n of cross-validation is in the interval [3,10], then: When n=3, Sact=((3+1) / (3-1))* Smin=2 Smin When n=10, Sact=((10+1) / (10-1))* Smin=1.222 Smin Therefore, according to the actual imaging conditions, 1.222-2 times the minimum learning sample size is collected; S0-3: Determine the actual sample size of the unsupervised learning AI model, recorded as S2act; S0-3-1. Unlike supervised learning AI models, unsupervised learning AI models mainly train models by learning the features of positive samples and applying positive and negative samples for verification. Therefore, the number of folds of positive sample multi-fold cross-validation is optimized and designed by this patent as n=3. The minimum learning sample size Smin will include 3 positive samples (denoted as Sp) and 1 negative sample (denoted as Sn): Smin=3Sp+Sn, denoted as: Smin-p=3Sp, Smin-n=Sn, Smin= Smin-p+ Smin-n S0-3-1. Sample allocation method for unsupervised learning AI model: The sample distribution in the training and validation stages is: Number of samples required for training: Strain=2Sp Number of samples required for verification: Sval=Sp+Sn Additionally, a sample set is needed for independent testing: Number of samples required for testing: Stest= Sp+Sn Therefore, the actual sample size Sact= Strain+ Sval+ Stest= 4Sp+2Sn Finally, the actual sample size Sact=(4 / 3)*Smin-p+ 2*Smin-n.
[0030] In this embodiment, an AI visual detection method based on supervised and unsupervised deep learning is specifically implemented as follows: Hardware preparation and configuration: Image acquisition module: Industrial camera (20 million pixels, RGB+polarized light mode); Ring LED light source (adjustable wavelength, adaptable to different harness colors); Conveyor belt synchronization trigger device (to ensure the harness positioning accuracy of ±0.1mm); Processing terminal: NVIDIA Jetson AGX Orin edge computing unit; 64GB of RAM, 2TB of SSD storage; Real-time sampling image feature establishment (S1) Image acquisition (S1-1) The camera captures images of the wire harness moving on the conveyor belt at 30fps, with the resolution set to 4096×2160 and the polarized light mode enhanced to suppress surface reflections.
[0031] Example: Acquire an image of a red power line (target area) compared to a black background (non-target area).
[0032] Pixel matrix construction (S1-2) Convert the image to the HSV color space matrix and extract the saturation (S) and value (V) channels: The deployment code includes: import cv2 img_hsv = cv2.cvtColor(raw_img, cv2.COLOR_BGR2HSV) saturation_matrix = img_hsv[:,:,1] # saturation channel; Region segmentation (S1-3): Target area: Extract the main body of the harness through threshold segmentation (such as the red area with saturation > 100 and brightness > 50).
[0033] Non-target area: Use morphological closing operation to fill small holes in the background.
[0034] Output: Binarized mask (target area = 1, non-target area = 0).
[0035] Visual feature generation (S1-4) Combine the target / non-target area coordinates and HSV statistical features (mean, variance) as the visual feature vector.
[0036] AI model training (S2) Unsupervised coarse recognition model (S2-1) Dataset: 100,000 unlabeled wire harness images, automatically divided into regions through K-means clustering (k=3).
[0037] Model output: Generates the approximate boundary of the target area (such as Figure 1 (as shown in the red box).
[0038] Supervised fine-grained recognition model (S2-2) Dataset: 50,000 annotated images (labelme annotation tool marks precise boundaries).
[0039] Model Architecture: Target area segmentation: U-Net model, input is HSV matrix, output is pixel-level boundary (IoU>0.95).
[0040] Non-target area segmentation: Same architecture, but pixels overlapping with the target area are excluded during training.
[0041] Model fusion verification (S2-3) Fit determination: Calculate the Hausdorff distance between the output boundaries of the two models (threshold < 5 pixels).
[0042] Resolution adjustment: If verification fails, increase the image resolution to 5120×2700 and reprocess it.
[0043] Defect Detection and Verification (S3) Initial testing (S3-1) Risk Template Library: Level 1 template: HSV characteristics of historical defects (e.g., insulation layer damage manifests as local low saturation).
[0044] Secondary template: gradient change features within 10 pixels around the defect.
[0045] The deployment comparison code is as follows: graph TD A[Input real-time image] -->B{Match the first-level template?} B -->|Yes| C[Mark defect core area] B -->|No| D{Match secondary template?} D -->|Yes| E[Mark suspected defect area] D -->|No| F[output "no defect"] Trend Feedback Verification (S3-2) Multi-period verification:
[0046] False alarm handling: If the same defect is detected three times in a row, an alarm will be triggered, otherwise resampling will be performed.
[0047] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0048] The present invention is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0049] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0050] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0051] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered by the scope of protection of the claims of the present invention.
Claims
1. An AI visual inspection method based on supervised and unsupervised deep learning, characterized in that: include: S1. Using real-time sampled image data to establish sampled image visual features; S2. Establishing an AI visual feature analysis model based on supervised and unsupervised deep learning using the visual features of the sampled image; S3. Obtain AI visual detection results according to the AI visual feature analysis model.
2. The AI visual inspection method based on supervised and unsupervised deep learning according to claim 1, characterized in that: The method of establishing the visual features of the sampled image by using the real-time sampled image data includes: S1-1, collecting real-time sampling image data; S1-2, establishing a real-time sampling image data pixel matrix according to the real-time sampling image data; S1-3, using the real-time sampling image data pixel matrix to respectively obtain the target area and the non-target area according to the color characteristics of the industrial wire harness; S1-4. Utilize the target area and the non-target area as visual features of the sampled image.
3. The AI visual inspection method based on supervised and unsupervised deep learning according to claim 2, characterized in that: Establishing an AI visual feature analysis model based on supervised and unsupervised deep learning using the visual features of the sampled image includes: S2-1. Establishing a basic AI visual feature rough recognition model based on unsupervised deep learning using the visual features of the sampled image; S2-2. Using the visual features of the sampled images, establish a basic AI visual feature fine recognition model based on supervised deep learning; S2-3. Obtain an AI visual feature analysis model using the basic AI visual feature coarse recognition model and the basic AI visual feature fine recognition model.
4. The AI visual inspection method based on supervised and unsupervised deep learning according to claim 3, characterized in that: Using the visual features of the sampled image to establish a basic AI visual feature rough recognition model based on unsupervised deep learning includes: S2-1-1. Establishing a first data set using the target area of the visual features of the sampled image; S2-1-2, establishing a second data set using the non-target area of the visual features of the sampled image; S2-1-3. Using the first dataset and the second dataset as input and the corresponding region boundaries of the first dataset and the second dataset as output, establish a basic AI visual feature rough recognition model based on unsupervised deep learning; The region boundary is a line connecting the boundary pixels between the target region and the non-target region.
5. The AI visual inspection method based on supervised and unsupervised deep learning according to claim 4, characterized in that: Establishing a basic AI visual feature fine recognition model based on supervised deep learning using the visual features of the sampled image includes: S2-2-1. Acquire historical target areas corresponding to the visual features of the sampled image based on the target areas of the visual features of the sampled image to establish a third data set; S2-2-2. Acquire historical non-target areas corresponding to the visual features of the sampled image based on the non-target areas of the visual features of the sampled image to establish a fourth data set; S2-2-3. Using the third data set as input and the boundary pixels corresponding to the third data set as output, establish a target area boundary segmentation model based on supervised deep learning; S2-2-4. Using the fourth data set as input and the boundary pixels corresponding to the fourth data set as output, establish a non-target area boundary segmentation model based on supervised deep learning; S2-2-5. Utilize the target area boundary segmentation model and the non-target area boundary segmentation model as a basic AI visual feature fine recognition model; The boundary pixels corresponding to the third data set and the boundary pixels corresponding to the fourth data set do not have the same pixel points.
6. The AI visual inspection method based on supervised and unsupervised deep learning according to claim 5, characterized in that: Obtaining an AI visual feature analysis model using the basic AI visual feature coarse recognition model and the basic AI visual feature fine recognition model includes: S2-3-1. Use the real-time sampled image data corresponding to the sampled image visual features to input the basic AI visual feature coarse recognition model and the basic AI visual feature fine recognition model to obtain the basic AI visual feature coarse recognition results and the basic AI visual feature fine recognition results; S2-3-2. Determine whether the pixel connection lines of the basic AI visual feature coarse recognition result and the basic AI visual feature fine recognition result are aligned. If so, use the basic AI visual feature coarse recognition model and the basic AI visual feature fine recognition model as the AI visual feature analysis model. Otherwise, update the resolution of the real-time sampled image data and return to S1-2.
7. The AI visual inspection method based on supervised and unsupervised deep learning according to claim 3, characterized in that: The AI visual detection results obtained according to the AI visual feature analysis model include: S3-1. Obtaining initial AI visual detection results using the AI visual feature analysis model; S3-2. Perform trend feedback verification based on the initial AI visual inspection result to obtain an AI visual inspection result.
8. The AI visual inspection method based on supervised and unsupervised deep learning according to claim 7, characterized in that: Obtaining initial AI visual detection results using the AI visual feature analysis model includes: S3-1-1. Obtaining visual features of historical risk sampling images corresponding to the real-time sampling image data according to the real-time sampling image data; S3-1-2. Obtain a risk pixel matrix as a primary comparison template based on the visual features of the historical risk sampling image; S3-1-3, obtaining adjacent pixels according to the primary proofreading template as a secondary comparison template; S3-1-4. Obtain initial AI visual inspection results based on the primary comparison template and the secondary comparison template using the AI visual feature analysis model; The visual features of the historical risk sampling image include historical risk target areas and historical risk non-target areas.
9. The AI visual inspection method based on supervised and unsupervised deep learning according to claim 8, characterized in that: Obtaining initial AI visual inspection results using the AI visual feature analysis model according to the primary comparison template and the secondary comparison template includes: S3-1-4-1. Use the real-time sampled image data corresponding to the sampled image visual features to input into the AI visual feature analysis model to obtain a comprehensive analysis result of the industrial wiring harness data; S3-1-4-2. Determine whether the comprehensive analysis result of the industrial wiring harness data corresponds to the same area as the primary comparison template. If so, obtain adjacent pixels corresponding to the same area as the auxiliary verification area and execute S3-1-4-3. Otherwise, directly execute S3-1-4-3. S3-1-4-3. Determine whether the comprehensive analysis result of the industrial wiring harness data and the secondary comparison template have corresponding identical areas. If so, obtain the pixels contained in the corresponding identical areas as the auxiliary verification area and execute S3-1-4-4. Otherwise, execute S3-1-4-4 directly. S3-1-4-4. When any auxiliary verification area exists, the auxiliary verification area is used as the initial AI visual detection result; when no auxiliary verification area exists, the initial AI visual detection result is empty.
10. The AI visual inspection method based on supervised and unsupervised deep learning according to claim 8, characterized in that: The AI visual inspection results obtained by performing trend feedback verification based on the initial AI visual inspection results include: S3-2-1. Obtain the corresponding time of the real-time sampling image data as the starting time t of trend feedback verification; S3-2-2, obtain the initial AI visual detection results at time t+1 and time t+2 respectively; S3-2-3. Determine whether the initial AI visual inspection result at time t+1 is the same as the initial AI visual inspection result at the trend feedback verification starting time t. If so, execute S3-2-4. Otherwise, output the initial AI visual inspection result at the trend feedback verification starting time t as the AI visual inspection result. S3-2-4. Determine whether the initial AI visual detection result at time t+2 is the same as the initial AI visual detection result at the starting time t of trend feedback verification. If so, update the real-time sampling image data and return to S1-1. Otherwise, output the initial AI visual detection result at the starting time t of trend feedback verification as the AI visual detection result.
Citation Information
Patent Citations
Curved surface defect automatic detection method and apparatus thereof
CN106127780A
Strip steel surface defect classification method based on combination of statistical features and image features
CN108846831A
Supervision and non-supervision combined industrial defect detection method
CN118505608A
Target detection method and device, terminal and storage medium
CN118587556A
Defect identification method and system based on semi-supervised learning and change detection
CN120495299A
Cited By
Semiconductor lead bonding high-precision 3D detection method based on monocular visible light camera
CN121962154A
Semiconductor wire bonding high-precision 3D detection method based on monocular visible light camera
CN121962154B