Artificial Intelligence Vision Detection Method, System and Device Based on Workpiece Production

By segmenting workpiece production data and applying artificial intelligence visual inspection methods, the shortcomings of traditional inspection methods in complex backgrounds and dynamic environments are solved, and high-precision and comprehensive workpiece production process inspection is achieved.

CN119205646BActive Publication Date: 2025-06-24WUXI INSTITUTE OF TECHNOLOGY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411224951.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-03
Publication Date
2025-06-24
Estimated Expiration
2044-09-03

AI Technical Summary

Technical Problem

Traditional visual detection methods have limited effects when dealing with complex backgrounds and lighting changes, and cannot meet the detection needs of high-precision and high-speed. Especially during the workpiece cleaning and drying stage, defect positioning is not accurate enough, and it is difficult to track dynamic abnormalities in the workpiece movement stage in real time.

Method used

By dividing the workpiece production data in stages, generating stage data and image sets, artificial intelligence visual detection methods are adopted, including non-coined area segmentation, abnormal area annotation, grayscale conversion, region segmentation and temperature distribution mapping, and integrating abnormal images of each stage for intelligent defect area marking.

Benefits of technology

It improves the comprehensiveness and accuracy of inspection in the workpiece production process, accurately identify and mark defects in each stage, enhances the ability to identify defects in key stages in the production process, optimizes the inspection process, and improves the overall inspection efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119205646B_ABST
    Figure CN119205646B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of vision detection technology, and particularly to an artificial intelligence vision detection method, system and device based on workpiece production. The method includes the following steps: acquiring workpiece production data; dividing the workpiece production data into workpiece production stages to generate workpiece production stage data, wherein the workpiece production stage division includes a workpiece loading stage, a workpiece cleaning stage, a workpiece drying stage and a workpiece moving stage; collecting stage images based on the workpiece production stage data to obtain a workpiece production stage image set; performing non-overlapping region segmentation on the workpiece loading stage images in the workpiece production stage image set and a preset workpiece standard shape template to generate a workpiece template matching non-overlapping region image. The present invention improves the accuracy and reliability of workpiece production vision detection by refining production stage detection, precise template matching, accurate defect positioning, enhancing dynamic detection capabilities and integrating system defect information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of visual inspection, and particularly to an artificial intelligence visual inspection method, system and device based on workpiece production. Background Art

[0002] With the development of computer vision technology, inspection methods based on image processing have been gradually introduced. These methods collect workpiece images by using cameras and perform analyses such as edge detection, contour extraction, and shape matching by using image processing algorithms, so as to realize the inspection of workpiece dimensions, shapes, and surface defects. However, traditional image processing algorithms have limited effects when dealing with complex backgrounds and illumination changes and cannot meet the requirements of high-precision and high-speed inspection. Entering the 21st century, the rise of artificial intelligence and deep learning technologies has brought new opportunities to visual inspection. Driven particularly by convolutional neural networks (CNNs), deep learning has significantly improved the ability of image feature extraction and classification. The visual inspection system based on deep learning can be trained with a large amount of labeled data to automatically learn the features of workpieces and can handle complex inspection tasks, such as the recognition of tiny defects and inspection under complex backgrounds. Especially in the fields of defect detection and quality control, deep learning models have shown performance superior to traditional methods. However, currently, traditional visual inspection methods are often not precise enough for defect localization, especially in the workpiece cleaning and drying stages. At the same time, for the workpiece moving stage, it is difficult for traditional inspection methods to track and detect dynamic anomalies in real time, thus resulting in low precision and reliability of visual inspection. Summary of the Invention

[0003] Based on this, it is necessary to provide an artificial intelligence visual inspection method, system and device based on workpiece production to solve at least one of the above technical problems.

[0004] To achieve the above object, an artificial intelligence visual inspection method based on workpiece production, the method includes the following steps:

[0005] Step S1: Obtain workpiece production data; divide the workpiece production data into workpiece production stages to generate workpiece production stage data, where the workpiece production stage division includes a workpiece loading stage, a workpiece cleaning stage, a workpiece drying stage, and a workpiece moving stage; perform stage image acquisition based on the workpiece production stage data to obtain a workpiece production stage image set;

[0006] Step S2: Perform non - overlapping region segmentation on the workpiece loading stage images in the workpiece production stage image set and a preset workpiece standard shape template to generate a workpiece template matching non - overlapping region image; perform abnormal workpiece loading region annotation on the workpiece template matching non - overlapping region image to generate an abnormal workpiece loading stage region image; perform abnormal cleaning visual inspection on the workpiece cleaning stage images in the workpiece production stage image set to generate an abnormal workpiece cleaning stage region image;

[0007] Step S3: Perform gray - scale conversion on the workpiece drying stage images in the workpiece production stage image set to generate a workpiece drying stage gray - scale image; perform region image segmentation on the local overheating region and local cooling region of the workpiece drying stage gray - scale image to generate a drying stage local overheating region image and a drying stage local cooling region image; perform abnormal region temperature distribution mapping and annotation on the drying stage local overheating region image and the drying stage local cooling region image to generate an abnormal workpiece drying stage region image; perform abnormal movement visual inspection on the workpiece movement stage images in the workpiece production stage image set to generate an abnormal workpiece movement stage image;

[0008] Step S4: Integrate the abnormal workpiece loading stage region image, the abnormal workpiece cleaning stage region image, the abnormal workpiece drying stage region image, and the abnormal workpiece movement stage image into a workpiece stage abnormal image set; perform intelligent defect region image marking on the workpiece stage abnormal image set to generate a workpiece intelligent defect detection map to perform artificial intelligence visual inspection operations for workpiece production.

[0009] The present invention divides the workpiece production data into stages, generates stage data and image sets, ensuring detailed monitoring of the entire workpiece production process, enabling subsequent detection work to cover all key production links, thereby improving the comprehensiveness and accuracy of detection. By performing non - overlapping region segmentation and abnormal region annotation on the workpiece loading stage images, and abnormal detection on the cleaning stage images, defects occurring in these stages can be accurately identified and marked, enhancing the detection ability and accuracy for abnormal situations in the workpiece production process. By performing gray - scale conversion and region image segmentation on the workpiece drying stage images, and temperature distribution mapping, abnormalities in local overheating and cooling regions can be detected, while abnormal detection on the movement stage images ensures more precise and detailed defect identification in key stages of the production process. Integrating the abnormal images of each stage into a workpiece stage abnormal image set and performing intelligent defect region marking to generate a workpiece intelligent defect detection map realizes the systematic integration and intelligent processing of defect information in the entire workpiece production process, optimizes the detection process, and improves the overall detection efficiency and accuracy. Therefore, the present invention improves the accuracy and reliability of workpiece production visual inspection by refining production stage detection, precise template matching, accurate defect positioning, enhancing dynamic detection capabilities, and systematically integrating defect information.

[0010] Preferably, step S1 includes the following steps:

[0011] Step S11: Obtain workpiece production data;

[0012] Step S12: Perform data preprocessing on the workpiece production data to generate standard workpiece production data, where the data preprocessing includes data cleaning, data denoising, filling missing data values, and data standardization;

[0013] Step S13: Divide the standard workpiece production data into workpiece production stages to generate workpiece production stage data, where the workpiece production stage division includes a workpiece loading stage, a workpiece cleaning stage, a workpiece drying stage, and a workpiece moving stage;

[0014] Step S14: Collect stage images based on the workpiece production stage data to obtain a workpiece production stage image set.

[0015] Through data preprocessing and standardization, the present invention ensures the integrity and accuracy of the workpiece production data, providing a reliable basis for subsequent analysis. Through stage image collection, image data of the workpiece production process is generated, facilitating visual monitoring and analysis of the production process. The standardized and stage-divided data provides detailed information support for quality control and process optimization in the workpiece production process, helping to improve production efficiency and product quality. The detailed production stage data and image data can be used to detect abnormal situations in the production process, take timely measures to prevent failures, and reduce production losses.

[0016] Preferably, collecting stage images based on the workpiece production stage data includes:

[0017] Use an RGB camera to take pictures of the workpiece loading stage in the workpiece production stage data to obtain workpiece loading stage images;

[0018] Use a thermal imaging camera to take pictures of the workpiece cleaning stage in the workpiece production stage data to generate workpiece cleaning stage images;

[0019] Use an infrared camera to take pictures of the workpiece drying stage in the workpiece production stage data to generate workpiece drying stage images;

[0020] Use a depth camera to take pictures of the workpiece moving stage in the workpiece production stage data to generate workpiece moving stage images; Integrate the workpiece loading stage images, workpiece cleaning stage images, workpiece drying stage images, and workpiece moving stage images to generate a workpiece production stage image set.

[0021] The present invention realizes the comprehensive monitoring of the workpiece production process by collecting images using different types of cameras at different stages. The combination of RGB cameras, thermal imaging cameras, infrared cameras, and depth cameras provides multi-dimensional and multi-angle production data. The meticulous collection and integration of images at each stage help to detect and analyze problems that occur during the production process, such as incomplete cleaning, uneven drying, incorrect feeding, and unsmooth movement, thereby improving the efficiency and accuracy of quality control. By analyzing the image data of the workpiece at each stage, bottlenecks and deficiencies in the production process can be discovered and optimized, enhancing production efficiency. The depth image data is particularly helpful for optimizing the movement path of the workpiece and reducing the stagnation time. Different types of image data can detect potential faults and abnormal situations in the production process at an early stage. For example, thermal imaging and infrared images can detect temperature anomalies, and depth images can detect problems such as workpiece position offset, providing timely warning and maintenance information. Integrating the image data at each stage to generate a complete set of production stage images helps to establish a data-driven production analysis system. By analyzing the integrated image set, detailed production reports and optimization suggestions can be generated, further improving the production management level.

[0022] Preferably, step S2 includes the following steps:

[0023] Step S21: Segment the workpiece contour of the workpiece feeding stage image in the workpiece production stage image set to generate a workpiece contour segmentation region image;

[0024] Step S22: Perform image template matching between the workpiece contour segmentation region image and a preset workpiece standard shape template to generate a workpiece template matching image; Segment the non-overlapping region of the workpiece template matching image to generate a workpiece template matching non-overlapping region image;

[0025] Step S23: Perform shape detection on the workpiece template matching non-overlapping region image to generate workpiece abnormal missing detection data; Perform key point position offset detection on the workpiece template matching non-overlapping region image to generate workpiece abnormal position offset data; Calculate the workpiece direction based on the workpiece abnormal missing detection data and the workpiece abnormal position offset data for the workpiece template matching non-overlapping region image to obtain workpiece direction error data;

[0026] Step S24: Label the abnormal image region of the workpiece contour segmentation region image based on the workpiece abnormal missing detection data, the workpiece abnormal position offset data, and the workpiece direction error data to generate an abnormal workpiece feeding stage region image;

[0027] Step S25: Perform abnormal cleaning visual detection on the workpiece cleaning stage image in the workpiece production stage image set to generate an abnormal workpiece cleaning stage region image.

[0028] Through workpiece contour segmentation and template matching, the present invention can accurately detect abnormal conditions such as contour missing, position deviation, or direction error during the production process of workpieces. This helps to improve the quality control level of the production process. Through shape detection and position deviation detection, comprehensive analysis of production defects of workpieces can be carried out to identify problems affecting product quality. This helps to timely adjust the production process or correct defects. Abnormal area annotation and visual detection can intuitively display the problem areas in the production process, enabling operators and managers to quickly identify and handle abnormalities and optimize the production process. Precise anomaly detection and clear annotation can reduce the workload of manual inspection, improve the automation level of the production process, and thus improve the overall production efficiency. Through careful anomaly detection and analysis, problems in production can be timely discovered and corrected to ensure that the quality of the final product meets the standards, thereby reducing the generation of unqualified products. Collecting and analyzing anomaly detection data can provide data support for production decision-making, helping enterprises optimize production processes, improve the stability of production lines, and product consistency.

[0029] Preferably, step S25 includes the following steps:

[0030] Step S251: Perform temperature gradient view conversion on the workpiece cleaning stage images in the workpiece production stage image set to generate a workpiece cleaning temperature gradient map;

[0031] Step S252: Perform pixel color difference uniformity analysis on the workpiece cleaning temperature gradient map to generate pixel color difference uniformity analysis data; segment and label the first abnormal cleaning area of the workpiece cleaning stage image through the pixel color difference uniformity analysis data to generate a first abnormal cleaning area image;

[0032] Step S253: Perform pixel temperature extreme value analysis on the workpiece cleaning temperature gradient map to generate a pixel temperature extreme value area; perform area mapping and annotation on the workpiece cleaning stage image according to the pixel temperature extreme value area to generate a second abnormal cleaning area image;

[0033] Step S254: Integrate the first abnormal cleaning area image and the second abnormal cleaning area image to generate an abnormal workpiece cleaning stage area image.

[0034] Through temperature gradient view conversion, the present invention can understand in detail the temperature distribution of the workpiece during the cleaning stage. This helps to discover temperature non-uniformity or anomalies, thereby ensuring the uniformity and effectiveness of the cleaning process. The combination of pixel color difference uniformity analysis and pixel temperature extreme value analysis can comprehensively detect various anomalies existing during the cleaning process. This multi-angle anomaly detection method can more comprehensively identify problem areas. Through precise anomaly area segmentation and annotation, it can help identify areas where the cleaning is incomplete, and then optimize the cleaning process to ensure the thorough cleaning of the workpiece, thereby improving product quality. The detection and annotation of anomaly areas can early detect potential problems in the cleaning equipment or process, provide timely fault warning information, and reduce production downtime. By integrating anomaly area images, a comprehensive understanding of the problems during the cleaning process can be obtained, so as to adjust and optimize the production process, improve the overall production efficiency and product consistency. The comprehensive analysis of data provides a detailed cleaning effect report, provides data support for production management and equipment maintenance decisions, helps to formulate improvement measures, and improves the production management level.

[0035] Preferably, step S3 includes the following steps:

[0036] Step S31: Perform grayscale conversion on the workpiece drying stage images in the workpiece production stage image set to generate a workpiece drying stage grayscale image;

[0037] Step S32: Use the threshold segmentation method to perform regional image segmentation on the local overheating area and local cooling area of the workpiece drying stage grayscale image to generate a drying stage local overheating area image and a drying stage local cooling area image;

[0038] Step S33: Calculate the temperature histogram of the extreme value areas of the drying stage, that is, generate a drying stage extreme value area temperature histogram; perform an abnormal temperature distribution uniformity analysis on the drying stage extreme value area temperature histogram to generate an abnormal temperature distribution area in the drying stage; map and annotate the abnormal temperature distribution area in the drying stage to the workpiece drying stage image to generate an abnormal workpiece drying stage area image;

[0039] Step S34: Perform abnormal movement visual detection on the workpiece movement stage images in the workpiece production stage image set to generate abnormal workpiece movement stage images.

[0040] Through gray-scale conversion and threshold segmentation, the present invention can clearly detect the overheated and cooled areas during the workpiece drying process. This helps to ensure that the temperature control during the drying process meets the requirements and avoid quality problems caused by uneven temperature. The temperature histogram and the analysis of the uniformity of abnormal temperature distribution provide detailed temperature data analysis to help identify and locate temperature anomalies during the drying process. This helps to discover and solve the problem of uneven temperature and improve the drying quality. By marking the abnormal areas, the problem areas during the drying process can be clearly identified, providing a basis for adjusting the drying process, thereby improving the drying effect and the final quality of the workpiece. The abnormal movement vision detection helps to identify abnormal conditions of the workpiece during the moving stage, such as position deviation or unstable movement. This helps to optimize the moving process of the workpiece and improve the efficiency and stability of the production line. The automated image processing and abnormal detection can reduce manual intervention, enhance the automation level of the production process, and improve the overall production efficiency and accuracy. Through the detailed abnormal detection data and image annotation, data support can be provided for quality control and equipment maintenance, which helps to formulate improvement measures and maintenance plans and enhance the production management level.

[0041] Preferably, step S34 includes the following steps:

[0042] Step S341: Perform temporal analysis on the workpiece moving stage images in the workpiece production stage image set to generate a workpiece moving stage temporal image set;

[0043] Step S342: Perform inter-frame difference on the workpiece moving stage temporal image set to generate a workpiece moving stage difference image; perform workpiece motion analysis on the workpiece moving stage difference image to generate workpiece motion change data, where the workpiece motion change data includes workpiece stationary data and workpiece moving data; perform the first workpiece moving abnormal image annotation on the workpiece moving stage temporal image set through the workpiece stationary data to generate a first workpiece moving abnormal image;

[0044] Step S343: Use the workpiece moving data to perform workpiece position tracking on the workpiece moving stage temporal image set to generate a workpiece position moving image; perform workpiece speed detection on the workpiece position moving image to generate workpiece displacement speed detection data; perform the second workpiece moving abnormal image annotation on the workpiece moving stage temporal image set through the workpiece displacement speed detection data to generate a second workpiece moving abnormal image;

[0045] Step S344: Integrate the first workpiece moving abnormal image and the second workpiece moving abnormal image to generate an abnormal workpiece moving stage image.

[0046] Through timing analysis and inter-frame difference, the present invention can accurately capture the changes of the workpiece during movement, comprehensively understand the movement of the workpiece, and ensure the stability of the production process. Static data and speed detection provide a detailed analysis of the abnormal state of the workpiece. It can identify the areas where the workpiece should not move and abnormal movement speeds, which helps to discover potential problems, such as equipment failures or inaccurate workpiece positioning. Combining the static data of the workpiece and the displacement speed detection data can identify abnormal situations in multiple dimensions and improve the accuracy of detection. In this way, problems in the production process can be effectively located and solved, reducing errors and defects. By annotating and integrating the abnormal movement of the workpiece, problems in the movement process of the workpiece can be found, and then the movement mechanism of the workpiece can be optimized or the production line settings can be adjusted to improve production efficiency and product quality. Automated image analysis and anomaly detection reduce manual intervention and improve the automation level of the production line. The system can monitor and adjust in real time, improving the overall production management level. Detailed anomaly detection and annotation data provide data support for production management and equipment maintenance. Improvement measures and maintenance plans can be formulated to ensure the smooth operation of the production line.

[0047] Preferably, step S4 includes the following steps:

[0048] Step S41: Integrate the images of the abnormal workpiece feeding stage area, the abnormal workpiece cleaning stage area, the abnormal workpiece drying stage area, and the abnormal workpiece movement stage into a workpiece stage abnormal image set, and divide the workpiece stage abnormal image set into an image data set to generate a model training set and a model test set;

[0049] Step S42: Train the model training set through the support vector machine algorithm to generate a workpiece defect classification training model; use the model test set to optimize and iterate the workpiece defect classification training model to generate a workpiece defect classification prediction model;

[0050] Step S43: Import the workpiece production stage image set into the workpiece defect classification prediction model for intelligent defect area image marking to generate a workpiece intelligent defect detection map to perform artificial intelligence vision detection operations for workpiece production.

[0051] By integrating abnormal images at different production stages, the present invention can comprehensively cover various defects in the workpiece production process and provide comprehensive anomaly detection capabilities. Using the support vector machine algorithm for model training and optimization can effectively improve the accuracy and reliability of defect classification. The powerful classification ability of SVM can handle complex abnormal data and generate high-quality prediction models. The generation of intelligent defect detection maps reduces the need for manual inspection, improving the detection efficiency and accuracy. Automatically marking the defective areas can quickly identify and handle problems in the workpiece, reducing the errors of manual operations. Through intelligent vision detection, defects in the production process can be discovered and corrected in a timely manner, improving the quality of the final product. Timely defect detection helps reduce the production of unqualified products, improve the overall efficiency of the production line, and the generated defect detection maps and prediction models provide data support for production decision-making, helping to optimize the production process and quality control strategies. Automated defect detection and classification can reduce labor costs and detection time, improving the utilization efficiency of production resources. Introducing artificial intelligence technology for vision detection promotes the intelligent upgrade of the production line, improving the automation level and intelligence level of the production system.

[0052] In this specification, an artificial intelligence vision detection system based on workpiece production is provided for performing the above-mentioned artificial intelligence vision detection method based on workpiece production. The artificial intelligence vision detection system based on workpiece production includes:

[0053] A workpiece stage division module, configured to obtain workpiece production data; divide the workpiece production data into workpiece production stages to generate workpiece production stage data, where the workpiece production stage division includes a workpiece loading stage, a workpiece cleaning stage, a workpiece drying stage, and a workpiece moving stage; perform stage image acquisition based on the workpiece production stage data to obtain a workpiece production stage image set;

[0054] A loading and cleaning abnormal area segmentation module, configured to perform non-overlapping area segmentation on the workpiece loading stage image in the workpiece production stage image set and a preset workpiece standard shape template to generate a workpiece template matching non-overlapping area image; perform abnormal workpiece loading area annotation on the workpiece template matching non-overlapping area image to generate an abnormal workpiece loading stage area image; perform abnormal cleaning vision detection on the workpiece cleaning stage image in the workpiece production stage image set to generate an abnormal workpiece cleaning stage area image;

[0055] The drying and moving abnormal area segmentation module is used to perform gray-scale conversion on the workpiece drying stage images in the workpiece production stage image set to generate gray-scale images of the workpiece drying stage; perform regional image segmentation on the local overheating area and local cooling area of the gray-scale images of the workpiece drying stage to generate local overheating area images of the drying stage and local cooling area images of the drying stage; perform abnormal area temperature distribution mapping and annotation on the local overheating area images of the drying stage and the local cooling area images of the drying stage, so as to generate abnormal workpiece drying stage area images; perform abnormal movement visual detection on the workpiece movement stage images in the workpiece production stage image set to generate abnormal workpiece movement stage images;

[0056] The intelligent defect detection module is used to integrate the abnormal workpiece loading stage area images, abnormal workpiece cleaning stage area images, abnormal workpiece drying stage area images and abnormal workpiece movement stage images into a workpiece stage abnormal image set; perform intelligent defect area image marking on the workpiece stage abnormal image set to generate a workpiece intelligent defect detection map to perform artificial intelligence visual detection operations for workpiece production.

[0057] The present invention also provides an artificial intelligence visual detection device, including a processor, a memory, and a computer program stored on the memory and executable on the processor, for the artificial intelligence visual detection method based on workpiece production as described above.

[0058] The beneficial effects of the present invention are as follows: By obtaining workpiece production data, detailed data during the workpiece production process is provided, laying a foundation for subsequent analysis and detection. Through the division of workpiece production stages, the production process is divided into feeding, cleaning, drying, and moving stages, enabling more accurate positioning and analysis of defects in different stages. By collecting images for each production stage to generate a workpiece production stage image set, detailed visual data is provided for subsequent defect detection. By comparing with a standard shape template, non-coincident areas are identified, which helps to discover abnormalities in the feeding stage of the workpiece. Labeling the abnormal areas in the feeding stage helps to identify and correct problems in the production process, ensuring the quality of the workpiece. Detecting and labeling abnormal areas in the cleaning stage helps to discover problems in the cleaning process, thereby improving the cleaning effect and the quality of the workpiece. Converting the drying stage image into a grayscale image and segmenting the overheating and cooling areas helps to identify temperature abnormalities in the drying process, ensuring the uniformity of the workpiece in the drying stage. By mapping and labeling the temperature distribution in a local area, abnormal temperature distribution areas can be identified, preventing workpiece defects caused by temperature problems. Conducting abnormal visual detection on the workpiece moving stage can discover and correct problems during the movement of the workpiece, ensuring the smooth operation of the production line. Integrating the abnormal images of each stage into a workpiece stage abnormal image set can provide an all-round perspective for abnormal detection. By using an intelligent model to label and analyze the abnormal images, a workpiece intelligent defect detection map is generated. This step can achieve efficient automatic defect detection, reduce manual intervention, and improve the detection efficiency and accuracy. Through multi-stage image acquisition and analysis, various types of defects during the workpiece production process can be covered, providing comprehensive quality control. Through accurate abnormal detection and labeling, problems in production can be discovered and corrected in a timely manner, thereby improving the quality of the final product. Introducing intelligent defect detection technology to automatically label and analyze abnormal areas, reducing manual intervention and improving the automation level of the production line. Through detailed defect detection and analysis, the production process can be optimized, the generation of unqualified products can be reduced, and the production efficiency can be improved. The detailed abnormal detection data provides strong data support for production management and decision-making, helping to formulate improvement measures and optimize production strategies. Therefore, the present invention improves the accuracy and reliability of workpiece production visual detection by refining production stage detection, precise template matching, accurate defect positioning, enhancing dynamic detection capabilities, and system integration of defect information. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 It is a schematic diagram of the step flow of an artificial intelligence visual detection method based on workpiece production;

[0060] Figure 2 is Figure 1 a schematic diagram of the detailed implementation step flow of step S2 in

[0061] Figure 3 is Figure 1Schematic diagram of the detailed implementation steps of step S3 in

[0062] Figure 4 For Figure 1 Schematic diagram of the detailed implementation steps of step S4 in

[0063] The realization, functional characteristics and advantages of the object of the present invention will be further described in conjunction with the embodiments with reference to the drawings. Specific implementation manners

[0064] The technical method of the present invention will be clearly and completely described below with reference to the drawings. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts fall within the scope of protection of the present invention.

[0065] In addition, the drawings are only schematic diagrams of the present invention and are not necessarily drawn to scale. The same reference numerals in the drawings represent the same or similar parts, and thus the repeated description thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. The functional entities can be implemented in software, or in one or more hardware modules or integrated circuits, or in different networks and / or processor methods and / or microcontroller methods.

[0066] It should be understood that although the terms "first", "second", etc. may be used here to describe various units, these units should not be limited by these terms. These terms are only used to distinguish one unit from another. For example, without departing from the scope of the exemplary embodiments, the first unit may be referred to as the second unit, and similarly the second unit may be referred to as the first unit. The term "and / or" used here includes any and all combinations of one or more of the listed associated items.

[0067] To achieve the above object, please refer to Figures 1 to 4 , an artificial intelligence vision detection method based on workpiece production, the method comprising the following steps:

[0068] Step S1: Obtain workpiece production data; divide the workpiece production data into workpiece production stages to generate workpiece production stage data, where the workpiece production stage division includes a workpiece loading stage, a workpiece cleaning stage, a workpiece drying stage, and a workpiece moving stage; perform stage image acquisition based on the workpiece production stage data to obtain a workpiece production stage image set;

[0069] Step S2: Perform non - overlapping region segmentation on the workpiece loading stage images in the workpiece production stage image set and a preset workpiece standard shape template to generate a workpiece template matching non - overlapping region image; perform abnormal workpiece loading region annotation on the workpiece template matching non - overlapping region image to generate an abnormal workpiece loading stage region image; perform abnormal cleaning visual inspection on the workpiece cleaning stage images in the workpiece production stage image set to generate an abnormal workpiece cleaning stage region image;

[0070] Step S3: Perform grayscale conversion on the workpiece drying stage images in the workpiece production stage image set to generate a workpiece drying stage grayscale image; perform region image segmentation on the local overheating region and local cooling region of the workpiece drying stage grayscale image to generate a drying stage local overheating region image and a drying stage local cooling region image; perform abnormal region temperature distribution mapping and annotation on the drying stage local overheating region image and the drying stage local cooling region image to generate an abnormal workpiece drying stage region image; perform abnormal movement visual inspection on the workpiece movement stage images in the workpiece production stage image set to generate an abnormal workpiece movement stage image;

[0071] Step S4: Integrate the abnormal workpiece loading stage region image, the abnormal workpiece cleaning stage region image, the abnormal workpiece drying stage region image, and the abnormal workpiece movement stage image into a workpiece stage abnormal image set; perform intelligent defect region image marking on the workpiece stage abnormal image set to generate a workpiece intelligent defect detection map to execute the artificial intelligence visual inspection operation for workpiece production.

[0072] The present invention divides the workpiece production data into stages, generates stage data and image sets, ensuring detailed monitoring of the entire workpiece production process, enabling subsequent detection work to cover all key production links, thereby improving the comprehensiveness and accuracy of detection. By performing non - overlapping region segmentation and abnormal region annotation on the workpiece loading stage images, and abnormal detection on the cleaning stage images, defects occurring in these stages can be accurately identified and marked, enhancing the detection ability and accuracy of abnormal situations in the workpiece production process. By performing grayscale conversion and region image segmentation on the workpiece drying stage images, and temperature distribution mapping, abnormalities in local overheating and cooling regions can be detected, while abnormal detection on the movement stage images ensures more precise and detailed defect identification in key stages of the production process. Integrating the abnormal images of each stage into a workpiece stage abnormal image set and performing intelligent defect region marking to generate a workpiece intelligent defect detection map realizes the systematic integration and intelligent processing of defect information in the entire workpiece production process, optimizes the detection process, and improves the overall detection efficiency and accuracy. Therefore, the present invention improves the accuracy and reliability of workpiece production visual inspection by refining production stage detection, precise template matching, accurate defect positioning, enhancing dynamic detection ability, and systematically integrating defect information.

[0073] In the embodiments of the present invention, with reference to Figure 1 As described, it is a schematic flow chart of the steps of an artificial intelligence vision detection method based on workpiece production according to the present invention. In this example, the artificial intelligence vision detection method based on workpiece production includes the following steps:

[0074] Step S1: Obtain workpiece production data; divide the workpiece production data into workpiece production stages to generate workpiece production stage data, where the workpiece production stage division includes the workpiece loading stage, the workpiece cleaning stage, the workpiece drying stage, and the workpiece moving stage; perform stage image acquisition based on the workpiece production stage data to obtain a workpiece production stage image set;

[0075] In the embodiments of the present invention, the workpiece production data is obtained from the workpiece production equipment, sensors, and monitoring systems. These data may include relevant information such as production time, workpiece position, temperature, humidity, etc. The workpiece production data is collected through a data acquisition system or database query to ensure data integrity and accuracy, including data from all production stages. Determine each stage of workpiece production, including the workpiece loading stage, the workpiece cleaning stage, the workpiece drying stage, and the workpiece moving stage. Preprocess the collected workpiece production data, clean the data, handle missing values and outliers, and sort and classify the preprocessed data according to production time and stage characteristics. Divide the data into different production stages according to the timestamps and stage identifiers in the data to generate workpiece production stage data, where the data for each stage is clearly marked, including the loading stage, the cleaning stage, the drying stage, and the moving stage. Select an RGB camera for the loading stage to record the process of workpiece loading. Select a thermal imaging camera for the cleaning stage to monitor the temperature distribution during the cleaning process. Select an infrared camera for the drying stage to obtain the heat distribution during the workpiece drying process. Select a depth camera for the moving stage to record the depth information of workpiece movement. Configure the position and angle of the camera to ensure that the key areas of each production stage can be covered. Adjust parameters such as the resolution and frame rate of the camera to obtain clear and continuous images. During the workpiece production process, perform image acquisition at preset time intervals and stages. Collect the image data of each production stage to ensure that there are sufficient samples for the images of each stage. Classify and organize the images collected in each stage according to the production stage. Name and archive the images to ensure that the images of each stage are easy to retrieve and manage. Create a workpiece production stage image set, including workpiece loading stage images, workpiece cleaning stage images, workpiece drying stage images, and workpiece moving stage images. Ensure that the images of each stage in the image set include samples at different time points for further analysis.

[0076] Step S2: Perform non - overlapping region segmentation on the workpiece loading stage images in the workpiece production stage image set and a preset workpiece standard shape template to generate a workpiece template matching non - overlapping region image; perform abnormal workpiece loading region annotation on the workpiece template matching non - overlapping region image to generate an abnormal workpiece loading stage region image; perform abnormal cleaning visual inspection on the workpiece cleaning stage images in the workpiece production stage image set to generate an abnormal workpiece cleaning stage region image;

[0077] In the embodiments of the present invention, by preparing a preset workpiece standard shape template as a reference for template matching. The template can be the standard shape image of the workpiece under normal conditions. Pre - process the workpiece loading stage images and the workpiece standard shape template, including grayscale conversion, denoising, edge detection, etc., to improve the matching accuracy. Use image matching algorithms (such as template matching algorithm, structural similarity index, etc.) to compare the workpiece loading stage images with the workpiece standard shape template. Calculate the similarity between the template and the workpiece image, and determine the regions in the image that do not match the template. According to the matching results, segment the non - overlapping regions of the workpiece template matching, where the non - overlapping regions represent the parts in the workpiece loading stage images that are inconsistent with the standard template, generate a workpiece template matching non - overlapping region image, and mark all non - matching regions. Further analyze the workpiece template matching non - overlapping region image to identify abnormal workpiece regions. Through methods such as shape detection and edge detection, judge whether there are abnormalities in these non - overlapping regions, such as shape distortion or defects. Perform abnormal annotation on the workpiece template matching non - overlapping region image. Mark all abnormal workpiece regions, such as workpiece defects and deformations, to generate an abnormal workpiece loading stage region image, clearly showing the abnormal regions. Pre - process the workpiece cleaning stage images, such as denoising and enhancing contrast, to more clearly identify abnormalities. Use abnormal detection algorithms (such as background subtraction, abnormal point detection, etc.) to analyze the workpiece cleaning stage images, identify the abnormal regions in the images, which include problems such as uneven cleaning and cleaning liquid leakage. Annotate the abnormal workpiece cleaning stage region image to display all detected abnormal regions, generating a clearly marked abnormal region image for subsequent manual inspection and processing.

[0078] Step S3: Perform grayscale conversion on the workpiece drying stage images in the workpiece production stage image set to generate workpiece drying stage grayscale images; perform region image segmentation on the local overheating regions and local cooling regions of the workpiece drying stage grayscale images to generate drying stage local overheating region images and drying stage local cooling region images; perform abnormal region temperature distribution mapping and annotation on the drying stage local overheating region images and drying stage local cooling region images, thereby generating an abnormal workpiece drying stage region image; perform abnormal movement visual inspection on the workpiece movement stage images in the workpiece production stage image set to generate an abnormal workpiece movement stage image;

[0079] In the embodiments of the present invention, the image of the workpiece drying stage is converted into a grayscale image. This step converts the color image into a grayscale image for subsequent temperature analysis and anomaly detection. A standard grayscale conversion method, such as the weighted average method (usually using 0.299R + 0.587G + 0.114*B), is used to convert the RGB image into a grayscale image. The pixel values in the grayscale image are mapped to a temperature range. It is assumed that the grayscale value is proportional to the temperature. The threshold segmentation method is applied to divide the image into a locally overheated area and a locally cooled area. A high temperature threshold is set, and the area in the grayscale image above this threshold is marked as the overheated area. A low temperature threshold is set, and the area in the grayscale image below this threshold is marked as the cooled area, generating two images, namely the locally overheated area image and the locally cooled area image respectively. The temperature histograms of the locally overheated area image and the locally cooled area image are calculated. The temperature histogram is analyzed to identify the non-uniformity or abnormal peaks in the temperature distribution, which usually indicate potential abnormal areas. The abnormal areas are marked on the image of the workpiece drying stage to generate an abnormal workpiece drying stage area image. The temperature abnormal areas are visualized and marked in the image. The time series analysis is performed on the image of the workpiece moving stage to generate a set of time series images of the workpiece moving stage. Ensure the coherence and integrity of the time series image data. The inter-frame difference of the time series images of the workpiece moving stage is performed to generate a difference image of the workpiece moving stage. The difference image is analyzed to identify the motion pattern of the workpiece. Motion analysis algorithms (such as optical flow method or background modeling) are used to extract motion data. Abnormal motion patterns in the image, such as sudden movement or irregular behavior of the workpiece, are identified. An abnormal workpiece moving stage image is generated, showing all the detected abnormal moving areas.

[0080] Step S4: Integrate the abnormal workpiece loading stage area image, the abnormal workpiece cleaning stage area image, the abnormal workpiece drying stage area image, and the abnormal workpiece moving stage image into a set of workpiece stage abnormal images; perform intelligent defect area image marking on the set of workpiece stage abnormal images to generate a workpiece intelligent defect detection map for performing artificial intelligence vision detection operations on workpiece production.

[0081] In the embodiments of the present invention, the area images of the abnormal workpiece during the loading stage, the area images of the abnormal workpiece during the cleaning stage, the area images of the abnormal workpiece during the drying stage, and the images of the abnormal workpiece during the moving stage are combined into a comprehensive image set. Image stitching can be performed using an image processing library (such as OpenCV or Pillow). Ensure that all images have the same resolution and size, or adjust the size before merging. Standardize the integrated images, such as adjusting brightness and contrast, to ensure consistency in the AI model. Input the set of abnormal workpiece stage images into a trained intelligent defect detection model. The model can be an object detection model based on deep learning (such as YOLO, Faster R-CNN) or a semantic segmentation model (such as U-Net). Use the model to perform inference on the images, identify and mark the defect areas. The model output includes the marked defect areas and the category and confidence of each area. Draw bounding boxes or segmentation masks of the defect areas on the integrated images to visualize the model detection results. Save or display the marked images to generate an intelligent defect detection map of the workpiece. Integrate the intelligent defect detection map and the model into the artificial intelligence vision detection system for workpiece production. The system receives and processes workpiece production images in real time, automatically detects defects, and generates detection reports or alerts. Record the detection results in a database for subsequent analysis and tracking, and provide real-time feedback based on the detection results to help the production line operator make adjustments and improvements.

[0082] Preferably, step S1 includes the following steps:

[0083] Step S11: Obtain workpiece production data;

[0084] Step S12: Perform data preprocessing on the workpiece production data to generate standard workpiece production data, where data preprocessing includes data cleaning, data denoising, filling missing data values, and data standardization;

[0085] Step S13: Divide the standard workpiece production data into workpiece production stages to generate workpiece production stage data, where the division of workpiece production stages includes the workpiece loading stage, the workpiece cleaning stage, the workpiece drying stage, and the workpiece moving stage;

[0086] Step S14: Collect stage images based on the workpiece production stage data to obtain a set of workpiece production stage images.

[0087] In the embodiments of the present invention, various sensors are arranged on the production line, including temperature sensors, humidity sensors, pressure sensors, displacement sensors, etc., for real-time collection of various parameter data during the production process of workpieces. Through the Industrial Internet of Things (IoT) platform, the production data of workpieces is obtained in real time from the sensors deployed on the production line. These data include but are not limited to production time, equipment status, workpiece position, temperature and humidity, pressure, vibration, etc. Filtering algorithms such as mean filtering, median filtering, etc. are used to remove noise from the data collected by the sensors to ensure the accuracy of the data. Statistical analysis methods such as box plots, Z-scores, etc. are used to detect outliers in the data, and interpolation or deletion methods are used to process these outliers. Methods such as wavelet transform, Fourier transform, etc. are applied to perform frequency domain analysis on the data to remove high-frequency noise and retain the effective signals. For the missing data that appears during the collection process, interpolation methods, mean filling methods, or regression methods are used to fill it to ensure data integrity. The data is converted to a unified scale, and normalization methods such as Min-Max normalization, Z-score standardization, etc. are used to standardize the data to generate standard workpiece production data. According to the different operation steps of the workpiece on the production line, the production process of the workpiece is divided into different stages, such as the feeding stage, cleaning stage, drying stage, and moving stage. Machine learning classification algorithms such as decision trees, support vector machines (SVM), etc. are used to analyze the sensor data to identify the characteristics of each stage. According to the recognition results, the standard workpiece production data is marked, marking the start time and end time of each stage, and generating workpiece production stage data with stage labels. Industrial cameras, infrared cameras, etc. are deployed on the production line to ensure clear images can be obtained at each key production stage. The image acquisition trigger conditions are set, and according to the real-time changes of the workpiece production stage data, the image acquisition device is triggered at the beginning of each stage to collect the workpiece production images of that stage. The collected images are classified and stored according to the production stage to form a workpiece production stage image set.

[0088] Preferably, the stage image acquisition based on the workpiece production stage data includes:

[0089] Taking pictures of the workpiece feeding stage in the workpiece production stage data with an RGB camera to obtain workpiece feeding stage images;

[0090] Taking thermal imaging camera pictures of the workpiece cleaning stage in the workpiece production stage data to generate workpiece cleaning stage images;

[0091] Taking infrared camera pictures of the workpiece drying stage in the workpiece production stage data to generate workpiece drying stage images;

[0092] Perform depth camera shooting on the workpiece movement stage in the workpiece production stage data to generate workpiece movement stage images; integrate the workpiece loading stage images, workpiece cleaning stage images, workpiece drying stage images, and workpiece movement stage images to generate a workpiece production stage image set.

[0093] In the embodiment of the present invention, by deploying an RGB camera near the loading table, it is ensured that the camera can cover the area where the workpiece is loaded. When the workpiece enters the loading stage, the sensor detects the presence of the workpiece and triggers the RGB camera to take pictures. The captured images include the entire process of workpiece loading, from the workpiece arriving at the loading table to being taken away by the conveyor belt. The collected loading stage images are stored in chronological order and marked as workpiece loading stage images. Deploy a thermal imaging camera in the workpiece cleaning area to ensure that the entire cleaning process can be covered. When the workpiece enters the cleaning stage, the sensor detects the arrival of the workpiece and triggers the thermal imaging camera to take pictures. The captured images include the temperature change of the workpiece during the cleaning process, and the cleaning effect is displayed through the thermal imaging images. The collected cleaning stage images are stored in chronological order and marked as workpiece cleaning stage images. Deploy an infrared camera in the workpiece drying area to ensure that the area where the workpiece is dried can be covered. When the workpiece enters the drying stage, the sensor detects the arrival of the workpiece and triggers the infrared camera to take pictures. The captured images include the infrared images of the workpiece during the drying process, and the drying condition and temperature distribution of the workpiece can be monitored through the infrared images. The collected drying stage images are stored in chronological order and marked as workpiece drying stage images. Deploy a depth camera on the moving path of the production line to ensure that the moving area of the workpiece can be covered. When the workpiece moves on the production line, the sensor detects the position of the workpiece in real time and triggers the depth camera to take pictures. The captured images include the three-dimensional images of the workpiece moving on the production line, and the posture and position changes of the workpiece can be monitored through the depth images. The collected moving stage images are stored in chronological order and marked as workpiece moving stage images. Synchronize the images of different stages according to the time stamp to ensure the consistency of the image data. Perform matching processing on the images of each stage to ensure that the images of different stages of the same workpiece can correspond. Integrate the workpiece loading stage images, workpiece cleaning stage images, workpiece drying stage images, and workpiece moving stage images together to form a complete workpiece production process image set. Use image processing technology to process the integrated images to generate a high-quality workpiece production stage image set.

[0094] As an example of the present invention, refer to Figure 2 shown, in this example, the step S2 includes:

[0095] Step S21: Perform workpiece contour segmentation on the workpiece loading stage images in the workpiece production stage image set to generate workpiece contour segmentation region images;

[0096] Step S22: Perform image template matching on the workpiece contour segmentation region image and a preset workpiece standard shape template to generate a workpiece template matching image; perform non-overlapping region segmentation on the workpiece template matching image to generate a workpiece template matching non-overlapping region image;

[0097] Step S23: Perform shape detection on the workpiece template matching non-overlapping region image to generate workpiece abnormal missing detection data; perform key point position offset detection on the workpiece template matching non-overlapping region image to generate workpiece abnormal position offset data; calculate the workpiece direction for the workpiece template matching non-overlapping region image based on the workpiece abnormal missing detection data and the workpiece abnormal position offset data to obtain workpiece direction error data;

[0098] Step S24: Perform abnormal image region annotation on the workpiece contour segmentation region image based on the workpiece abnormal missing detection data, the workpiece abnormal position offset data, and the workpiece direction error data to generate an abnormal workpiece loading stage region image;

[0099] Step S25: Perform abnormal cleaning visual detection on the workpiece cleaning stage image in the workpiece production stage image set to generate an abnormal workpiece cleaning stage region image.

[0100] In the embodiments of the present invention, by performing grayscale processing on the image in the workpiece loading stage, the computational complexity is reduced. The edge detection algorithm (such as the Canny algorithm) is used to detect the edges of the workpiece contour. The contour extraction algorithm (such as the findContours function in OpenCV) is applied to extract the external contour of the workpiece. The extracted workpiece contour area is marked on the image to generate an image of the workpiece contour segmentation area. A preset standard shape template of the workpiece is used, and the template can be a CAD model or a standard workpiece image. The template matching algorithm (such as the matchTemplate function in OpenCV) is used to match the image of the workpiece contour segmentation area to generate an image of workpiece-template matching. The non-coincident area between the workpiece and the template is detected in the workpiece-template matching image. The detected non-coincident area is marked on the image to generate an image of the non-coincident area of workpiece-template matching. Shape analysis is performed on the image of the non-coincident area of workpiece-template matching to detect whether there are missing or redundant parts on the workpiece. Key points on the workpiece (such as hole positions, corners, etc.) are identified, the position offsets between these key points and the corresponding points in the template are calculated, the position offset data is recorded, and the abnormal position offset data of the workpiece is generated. Based on the missing data and the position offset data, the deviation between the actual direction and the standard direction of the workpiece is calculated, and the workpiece direction error data is recorded. Combining the workpiece abnormal missing detection data, the workpiece abnormal position offset data, and the workpiece direction error data, abnormal area annotation is performed on the image of the workpiece contour segmentation area. The abnormal area is marked on the image to generate an image of the abnormal workpiece loading stage area. Thermal imaging processing is performed on the image in the workpiece cleaning stage, and the image is converted into a thermal map to better display the cleaning effect. By analyzing the temperature distribution in the thermal map, it is detected whether the cleaning effect is uniform and whether there are areas where the cleaning is not in place. The detected abnormal areas are marked on the image to generate an image of the abnormal workpiece cleaning stage area.

[0101] Preferably, step S25 includes the following steps:

[0102] Step S251: Convert the temperature gradient view of the workpiece cleaning stage image in the workpiece production stage image set to generate a workpiece cleaning temperature gradient map;

[0103] Step S252: Perform pixel color difference uniformity analysis on the workpiece cleaning temperature gradient map to generate pixel color difference uniformity analysis data; perform the first abnormal cleaning area segmentation and annotation on the workpiece cleaning stage image through the pixel color difference uniformity analysis data to generate a first abnormal cleaning area image;

[0104] Step S253: Perform pixel temperature extreme value analysis on the workpiece cleaning temperature gradient map to generate a pixel temperature extreme value area; perform area mapping and annotation on the workpiece cleaning stage image according to the pixel temperature extreme value area to generate a second abnormal cleaning area image;

[0105] Step S254: Integrate the first abnormal cleaning area image and the second abnormal cleaning area image to generate an abnormal workpiece cleaning stage area image.

[0106] In the embodiment of the present invention, the image noise is removed by denoising the workpiece cleaning stage image. Using thermal imaging data, the workpiece cleaning stage image is converted into a temperature gradient image. The temperature gradient image shows the temperature distribution on the surface of the workpiece, and the color represents different temperature values, generating a workpiece cleaning temperature gradient map showing the temperature distribution. Calculate the color difference value of each pixel in the workpiece cleaning temperature gradient map. The color difference reflects the temperature change. Analyze the distribution of the color difference values to detect whether the color change is uniform. The uniformity difference represents the uneven cleaning area, generating pixel color difference uniformity analysis data. According to the color difference uniformity analysis data, identify and segment the uneven cleaning areas, label these areas, and generate the first abnormal cleaning area image. Analyze the temperature value of each pixel in the workpiece cleaning temperature gradient map to find the extreme temperature areas (the highest temperature and the lowest temperature). According to the temperature extreme areas, perform area mapping on the workpiece cleaning stage image, mark the extreme areas on the image, and generate the second abnormal cleaning area image. Integrate the first abnormal cleaning area image and the second abnormal cleaning area image. During the integration process, ensure that both abnormal areas can be clearly marked in the final image. Perform unified labeling on the integrated image to generate the final abnormal workpiece cleaning stage area image.

[0107] As an example of the present invention, refer to Figure 3 As shown, in this example, the step S3 includes:

[0108] Step S31: Perform grayscale conversion on the workpiece drying stage image in the workpiece production stage image set to generate a workpiece drying stage grayscale image;

[0109] Step S32: Perform regional image segmentation on the workpiece drying stage grayscale image for local overheating areas and local cooling areas through a threshold segmentation method to generate a drying stage local overheating area image and a drying stage local cooling area image;

[0110] Step S33: Calculate the temperature histogram of the extreme areas in the drying stage by using the drying stage local overheating area image and the drying stage local cooling area image to generate a drying stage extreme area temperature histogram; Perform an abnormal temperature distribution uniformity analysis on the drying stage extreme area temperature histogram to generate a drying stage abnormal temperature distribution area; Map and label the abnormal area of the drying stage abnormal temperature distribution area on the workpiece drying stage image, thereby generating an abnormal workpiece drying stage area image;

[0111] Step S34: Perform abnormal movement visual detection on the workpiece movement stage images in the workpiece production stage image set to generate abnormal workpiece movement stage images.

[0112] In the embodiment of the present invention, noise removal processing is performed on the workpiece drying stage images. The workpiece drying stage images are converted into grayscale images to facilitate subsequent image analysis. Standard grayscale conversion algorithms (such as the average method, weighted average method) are used for conversion to generate the workpiece drying stage grayscale images, which display the brightness distribution on the workpiece surface. A temperature threshold is set, and pixels above the threshold in the grayscale image are segmented to generate the local overheating area image in the drying stage. Another temperature threshold is set, and pixels below this threshold in the grayscale image are segmented to generate the local cooling area image in the drying stage. Through the threshold segmentation method, an image showing the local overheating and local cooling areas is generated. Calculate the temperature histogram of the local overheating area image in the drying stage, count the number of pixels in each temperature interval, and generate the overheating area temperature histogram. Calculate the temperature histogram of the local cooling area image in the drying stage to generate the cooling area temperature histogram. Perform uniformity analysis on the generated temperature histograms, detect whether the temperature distribution is uniform, identify the areas with non-uniform temperature distribution, mark these areas on the original image, generate the abnormal temperature distribution area image in the drying stage, and mark the areas with abnormal temperature. Perform noise removal and enhancement processing on the workpiece movement stage images, and use computer vision algorithms (such as the optical flow method) to analyze the movement trajectory during the workpiece movement. Detect whether there are abnormal movements during the movement, such as offsets, uneven speeds, etc., mark the detected abnormal movement areas on the image, and generate abnormal workpiece movement stage images.

[0113] Preferably, step S34 includes the following steps:

[0114] Step S341: Perform temporal analysis on the workpiece movement stage images in the workpiece production stage image set to generate a workpiece movement stage temporal image set;

[0115] Step S342: Perform inter-frame difference on the workpiece movement stage temporal image set to generate a workpiece movement stage difference image; perform workpiece movement analysis on the workpiece movement stage difference image to generate workpiece movement change data, where the workpiece movement change data includes workpiece static data and workpiece movement data; perform the first workpiece movement abnormal image annotation on the workpiece movement stage temporal image set through the workpiece static data to generate the first workpiece movement abnormal image;

[0116] Step S343: Use the workpiece movement data to track the workpiece position in the sequential image set of the workpiece movement stage, generate the workpiece position movement image; detect the workpiece speed for the workpiece position movement image, generate the workpiece displacement speed detection data; perform the second workpiece movement abnormal image annotation on the sequential image set of the workpiece movement stage through the workpiece displacement speed detection data, and generate the second workpiece movement abnormal image.

[0117] Step S344: Integrate the first workpiece movement abnormal image and the second workpiece movement abnormal image to generate the abnormal workpiece movement stage image.

[0118] In the embodiment of the present invention, the noise removal process is performed on the workpiece movement stage image. Perform the time series analysis on the workpiece movement stage image, arrange the images in chronological order to form the sequential image set of the workpiece movement stage, and generate the sequential image set including the workpiece movement process. Perform the differential calculation on the adjacent image frames in the sequential image set to generate the differential image of the workpiece movement stage. The differential image reflects the change of the workpiece between adjacent time points. Analyze the differential image, extract the motion change data of the workpiece, and classify and generate the workpiece stationary data and the workpiece movement data according to the motion change data. According to the workpiece stationary data, perform the first workpiece movement abnormal image annotation on the sequential image set to generate the first workpiece movement abnormal image. Use the workpiece movement data to track the workpiece position in the sequential image set, generate the workpiece position movement image, and display the position change of the workpiece at different time points. Detect the workpiece speed for the workpiece position movement image, calculate the movement speed of the workpiece at each time point, generate the workpiece displacement speed detection data, which includes the speed information of the workpiece during the movement process. Perform the second workpiece movement abnormal image annotation on the sequential image set through the workpiece displacement speed detection data to generate the second workpiece movement abnormal image. Integrate the first workpiece movement abnormal image and the second workpiece movement abnormal image, combine the two abnormal detection results, generate the comprehensive abnormal image including all abnormal information, and generate the abnormal workpiece movement stage image.

[0119] As an example of the present invention, refer to Figure 4 shown, in this example, the step S4 includes:

[0120] Step S41: Integrate the abnormal workpiece loading stage area image, the abnormal workpiece cleaning stage area image, the abnormal workpiece drying stage area image and the abnormal workpiece movement stage image into the workpiece stage abnormal image set, and perform the image data set division on the workpiece stage abnormal image set to generate the model training set and the model test set.

[0121] Step S42: Train a model on the model training set through the support vector machine algorithm to generate a workpiece defect classification training model; use the model test set to perform model optimization iteration on the workpiece defect classification training model, thereby generating a workpiece defect classification prediction model;

[0122] Step S43: Import the workpiece production stage image set into the workpiece defect classification prediction model for intelligent defect area image marking to generate a workpiece intelligent defect detection map, so as to perform artificial intelligence vision detection operations for workpiece production.

[0123] In the embodiment of the present invention, the area images of the abnormal workpiece loading stage, the abnormal workpiece cleaning stage, the abnormal workpiece drying stage, and the abnormal workpiece moving stage are integrated into a unified workpiece stage abnormal image set. The integration process includes image format unification, resolution standardization, and label integration. The workpiece stage abnormal image set is divided according to a certain ratio (for example, 80% training set, 20% test set) to generate a model training set and a model test set. When dividing the data set, ensure that the image categories and quantities in the training set and the test set are balanced to avoid data deviation during the model training process. Use the support vector machine (SVM) algorithm to train the model training set. The training process includes feature extraction, feature standardization, training model construction, and model parameter tuning. Extract image features from the training set, and common methods include SIFT, HOG, LBP, etc. Standardize the extracted features to ensure the balance of feature values. Use the support vector machine algorithm to construct a workpiece defect classification training model. Optimize model parameters (such as C, γ) through methods such as cross-validation to improve the classification performance of the model. Use the model test set to verify and optimize the trained workpiece defect classification training model. Predict the images in the test set and calculate performance indicators such as the classification accuracy, recall rate, and F1 value of the model. According to the results of the performance indicators, adjust the model parameters and training strategies, and perform model optimization iteration until the model performance reaches the expected standard to generate the final workpiece defect classification prediction model.

[0124] In this specification, an artificial intelligence vision detection system based on workpiece production is provided for performing the above-mentioned artificial intelligence vision detection method based on workpiece production. The artificial intelligence vision detection system based on workpiece production includes:

[0125] A workpiece stage division module, configured to obtain workpiece production data; divide the workpiece production data into workpiece production stages to generate workpiece production stage data, where the workpiece production stage division includes a workpiece loading stage, a workpiece cleaning stage, a workpiece drying stage, and a workpiece moving stage; perform stage image acquisition based on the workpiece production stage data to obtain a workpiece production stage image set;

[0126] The feeding and cleaning abnormal area segmentation module is used to perform non - overlapping area segmentation on the workpiece feeding stage images in the workpiece production stage image set and a preset workpiece standard shape template to generate a workpiece template matching non - overlapping area image; perform abnormal workpiece feeding area annotation on the workpiece template matching non - overlapping area image to generate an abnormal workpiece feeding stage area image; perform abnormal cleaning visual detection on the workpiece cleaning stage images in the workpiece production stage image set to generate an abnormal workpiece cleaning stage area image;

[0127] The drying and moving abnormal area segmentation module is used to perform gray - scale conversion on the workpiece drying stage images in the workpiece production stage image set to generate a workpiece drying stage gray - scale image; perform area image segmentation on the local over - heat area and local cooling area of the workpiece drying stage gray - scale image to generate a drying stage local over - heat area image and a drying stage local cooling area image; perform abnormal area temperature distribution mapping and annotation on the drying stage local over - heat area image and the drying stage local cooling area image to generate an abnormal workpiece drying stage area image; perform abnormal moving visual detection on the workpiece moving stage images in the workpiece production stage image set to generate an abnormal workpiece moving stage image;

[0128] The intelligent defect detection module is used to integrate the abnormal workpiece feeding stage area image, the abnormal workpiece cleaning stage area image, the abnormal workpiece drying stage area image and the abnormal workpiece moving stage image into a workpiece stage abnormal image set; perform intelligent defect area image marking on the workpiece stage abnormal image set to generate a workpiece intelligent defect detection map to execute the artificial intelligence visual detection operation for workpiece production.

[0129] The present invention also provides an artificial intelligence visual detection device, including a processor, a memory, and a computer program stored on the memory and executable on the processor, for the artificial intelligence visual detection method based on workpiece production as described above.

[0130] The beneficial effects of the present invention are as follows: By obtaining workpiece production data, detailed data during the workpiece production process is provided, laying a foundation for subsequent analysis and detection. Through the division of workpiece production stages, the production process is divided into loading, cleaning, drying, and moving stages, enabling more accurate positioning and analysis of defects in different stages. By collecting images for each production stage to generate a workpiece production stage image set, detailed visual data is provided for subsequent defect detection. By comparing with a standard shape template, non-coincident areas are identified, which helps to discover anomalies in the loading stage of the workpiece. Marking the abnormal areas in the loading stage helps to identify and correct problems in the production process, ensuring the quality of the workpiece. Detecting and marking abnormal areas in the cleaning stage helps to discover problems in the cleaning process, thereby improving the cleaning effect and the quality of the workpiece. Converting the drying stage image into a grayscale image and segmenting overheated and cooled areas helps to identify temperature anomalies in the drying process, ensuring the uniformity of the workpiece in the drying stage. By mapping and marking the temperature distribution in local areas, abnormal temperature distribution areas can be identified, preventing workpiece defects caused by temperature problems. Conducting abnormal visual detection on the workpiece moving stage can discover and correct problems during the movement of the workpiece, ensuring the smooth operation of the production line. Integrating the abnormal images of each stage into a workpiece stage abnormal image set can provide an all-round perspective for abnormal detection. By using an intelligent model to mark and analyze the abnormal images, a workpiece intelligent defect detection map is generated. This step can achieve efficient automatic defect detection, reduce manual intervention, and improve the detection efficiency and accuracy. Through multi-stage image acquisition and analysis, various types of defects during the workpiece production process can be covered, providing comprehensive quality control. Through accurate abnormal detection and marking, problems in production can be discovered and corrected in a timely manner, thereby improving the quality of the final product. Introducing intelligent defect detection technology, automatically marking and analyzing abnormal areas, reducing manual intervention, and improving the automation level of the production line. Through detailed defect detection and analysis, the production process can be optimized, the generation of unqualified products can be reduced, and the production efficiency can be improved. The detailed abnormal detection data provides strong data support for production management and decision-making, helping to formulate improvement measures and optimize production strategies. Therefore, the present invention improves the accuracy and reliability of workpiece production visual detection by refining production stage detection, precise template matching, accurate defect positioning, enhancing dynamic detection capabilities, and system integration of defect information.

[0131] Therefore, from any perspective, the embodiments should be regarded as exemplary and non-restrictive. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, it is intended to encompass all changes falling within the meaning and scope of the equivalent elements of the application documents within the present invention.

[0132] The above are only specific embodiments of the present invention, enabling those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown herein, but rather will be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An artificial intelligence visual inspection method based on workpiece production, characterized in that: The following steps are involved: Step S1: Acquire workpiece production data; divide the workpiece production data into workpiece production stages to generate workpiece production stage data, wherein the workpiece production stage division includes workpiece loading stage, workpiece cleaning stage, workpiece drying stage and workpiece moving stage; perform stage image acquisition based on the workpiece production stage data to obtain a workpiece production stage image set; Step S2: performing non-overlapping area segmentation on the workpiece loading stage images in the workpiece production stage image set and the preset workpiece standard shape template to generate a workpiece template matching non-overlapping area image; performing abnormal workpiece loading area marking on the workpiece template matching non-overlapping area image to generate an abnormal workpiece loading stage area image; performing abnormal cleaning visual inspection on the workpiece cleaning stage images in the workpiece production stage image set to generate an abnormal workpiece cleaning stage area image; Step S3: grayscale conversion is performed on the workpiece drying stage image in the workpiece production stage image set to generate a workpiece drying stage grayscale image; regional image segmentation is performed on the local overheating area and the local cooling area of ​​the workpiece drying stage grayscale image to generate a drying stage local overheating area image and a drying stage local cooling area image; abnormal area temperature distribution mapping and annotation are performed on the drying stage local overheating area image and the drying stage local cooling area image to generate an abnormal workpiece drying stage area image; abnormal movement visual detection is performed on the workpiece moving stage image in the workpiece production stage image set to generate an abnormal workpiece moving stage image; Step S4: integrating the abnormal workpiece feeding stage area image, the abnormal workpiece cleaning stage area image, the abnormal workpiece drying stage area image and the abnormal workpiece moving stage image into a workpiece stage abnormal image set; performing intelligent defect area image marking on the workpiece stage abnormal image set to generate a workpiece intelligent defect detection map to perform workpiece production artificial intelligence visual inspection operations; Step S4 includes the following steps: Step S41: integrating the abnormal workpiece loading stage area images, the abnormal workpiece cleaning stage area images, the abnormal workpiece drying stage area images and the abnormal workpiece moving stage images into a workpiece stage abnormal image set, and dividing the workpiece stage abnormal image set into an image data set to generate a model training set and a model test set; Step S42: Performing model training on the model training set by using a support vector machine algorithm to generate a workpiece defect classification training model; performing model optimization iteration on the workpiece defect classification training model by using a model test set to generate a workpiece defect classification prediction model; Step S43: Import the workpiece production stage image set into the workpiece defect classification prediction model to perform intelligent defect area image marking, generate a workpiece intelligent defect detection map, and perform workpiece production artificial intelligence visual inspection operations.

2. The artificial intelligence visual inspection method based on workpiece production according to claim 1 is characterized in that: Step S1 includes the following steps: Step S11: Acquire workpiece production data; Step S12: performing data preprocessing on the workpiece production data to generate standard workpiece production data, wherein the data preprocessing includes data cleaning, data denoising, data missing value filling and data standardization; Step S13: dividing the standard workpiece production data into workpiece production stages to generate workpiece production stage data, wherein the workpiece production stage division includes a workpiece loading stage, a workpiece cleaning stage, a workpiece drying stage, and a workpiece moving stage; Step S14: collecting stage images based on the workpiece production stage data to obtain a workpiece production stage image set.

3. The artificial intelligence visual inspection method based on workpiece production according to claim 1 is characterized in that: Stage image acquisition based on workpiece production stage data includes: The workpiece loading stage in the workpiece production stage data is photographed by an RGB camera to obtain an image of the workpiece loading stage; The workpiece cleaning stage in the workpiece production stage data is photographed by a thermal imaging camera to generate a workpiece cleaning stage image; The workpiece drying stage in the workpiece production stage data is photographed by an infrared camera to generate a workpiece drying stage image; The workpiece moving stage in the workpiece production stage data is photographed with a depth camera to generate a workpiece moving stage image; the workpiece loading stage image, workpiece cleaning stage image, workpiece drying stage image and workpiece moving stage image are integrated to generate a workpiece production stage image set.

4. The artificial intelligence visual inspection method based on workpiece production according to claim 1 is characterized in that: Step S2 includes the following steps: Step S21: performing workpiece contour segmentation on the workpiece loading stage image in the workpiece production stage image set to generate a workpiece contour segmentation area image; Step S22: performing image template matching on the workpiece contour segmentation area image and the preset workpiece standard shape template to generate a workpiece template matching image; performing non-overlapping area segmentation on the workpiece template matching image to generate a workpiece template matching non-overlapping area image; Step S23: performing shape detection on the workpiece template matching non-overlapping area image to generate workpiece abnormal missing detection data; performing key point position offset detection on the workpiece template matching non-overlapping area image to generate workpiece abnormal position offset data; performing workpiece direction calculation on the workpiece template matching non-overlapping area image based on the workpiece abnormal missing detection data and the workpiece abnormal position offset data to obtain workpiece direction error data; Step S24: marking abnormal image regions on the workpiece contour segmentation region image by using the workpiece abnormal missing detection data, the workpiece abnormal position offset data and the workpiece direction error data, and generating an abnormal workpiece feeding stage region image; Step S25: performing abnormal cleaning visual inspection on the workpiece cleaning stage images in the workpiece production stage image set to generate abnormal workpiece cleaning stage area images.

5. The artificial intelligence visual inspection method based on workpiece production according to claim 4 is characterized in that: Step S25 includes the following steps: Step S251: performing temperature gradient view conversion on the workpiece cleaning stage image in the workpiece production stage image set to generate a workpiece cleaning temperature gradient map; Step S252: performing pixel color difference uniformity analysis on the workpiece cleaning temperature gradient map to generate pixel color difference uniformity analysis data; performing first abnormal cleaning area segmentation and labeling on the workpiece cleaning stage image using the pixel color difference uniformity analysis data to generate a first abnormal cleaning area image; Step S253: performing pixel temperature extreme value analysis on the workpiece cleaning temperature gradient map to generate a pixel temperature extreme value region; performing region mapping and labeling on the workpiece cleaning stage image according to the pixel temperature extreme value region, thereby generating a second abnormal cleaning region image; Step S254: integrating the first abnormal cleaning region image and the second abnormal cleaning region image to generate an abnormal workpiece cleaning stage region image.

6. The artificial intelligence visual inspection method based on workpiece production according to claim 1 is characterized in that: Step S3 includes the following steps: Step S31: performing grayscale conversion on the workpiece drying stage image in the workpiece production stage image set to generate a workpiece drying stage grayscale image; Step S32: performing regional image segmentation of the local overheating area and the local cooling area of ​​the grayscale image of the workpiece drying stage by a threshold segmentation method, and generating a drying stage local overheating area image and a drying stage local cooling area image; Step S33: performing temperature histogram calculation on the local overheating area image of the drying stage and the local cooling area image of the drying stage to generate a temperature histogram of the extreme value area of ​​the drying stage; performing abnormal temperature distribution uniformity analysis on the temperature histogram of the extreme value area of ​​the drying stage to generate an abnormal temperature distribution area of ​​the drying stage; mapping and marking the abnormal temperature distribution area of ​​the drying stage to the abnormal area of ​​the workpiece drying stage image, thereby generating an abnormal workpiece drying stage area image; Step S34: performing visual detection of abnormal movement on the workpiece movement phase images in the workpiece production phase image set to generate abnormal workpiece movement phase images.

7. The artificial intelligence visual inspection method based on workpiece production according to claim 6 is characterized in that: Step S34 includes the following steps: Step S341: performing time series analysis on the workpiece moving phase images in the workpiece production phase image set to generate a workpiece moving phase time series image set; Step S342: performing inter-frame difference on the time-series image set in the workpiece moving stage to generate a differential image in the workpiece moving stage; performing workpiece motion analysis on the differential image in the workpiece moving stage to generate workpiece motion change data, wherein the workpiece motion change data includes workpiece static data and workpiece moving data; performing a first workpiece motion abnormality image annotation on the time-series image set in the workpiece moving stage by using the workpiece static data to generate a first workpiece motion abnormality image; Step S343: using the workpiece movement data to track the workpiece position of the time-series image set during the workpiece movement phase, and generating a workpiece position movement image; performing workpiece speed detection on the workpiece position movement image, and generating workpiece displacement speed detection data; performing a second workpiece movement abnormality image annotation on the time-series image set during the workpiece movement phase, and generating a second workpiece movement abnormality image by using the workpiece displacement speed detection data; Step S344: integrating the first workpiece movement abnormality image and the second workpiece movement abnormality image to generate an abnormal workpiece movement stage image.

8. An artificial intelligence visual inspection system based on workpiece production, characterized in that: Used to execute the artificial intelligence visual inspection method based on workpiece production as claimed in claim 1, the artificial intelligence visual inspection system based on workpiece production comprises: A workpiece stage division module is used to obtain workpiece production data; divide the workpiece production data into workpiece production stages to generate workpiece production stage data, wherein the workpiece production stage division includes workpiece loading stage, workpiece cleaning stage, workpiece drying stage and workpiece moving stage; based on the workpiece production stage data, stage image acquisition is performed to obtain a workpiece production stage image set; The module for segmenting abnormal areas for loading and cleaning is used to segment the non-overlapping areas of the workpiece loading stage images in the workpiece production stage image set and the preset workpiece standard shape template, and generate the workpiece template matching non-overlapping area images; to mark the abnormal workpiece loading area on the workpiece template matching non-overlapping area images, and generate the abnormal workpiece loading stage area images; to perform abnormal cleaning visual inspection on the workpiece cleaning stage images in the workpiece production stage image set, and generate the abnormal workpiece cleaning stage area images; The drying movement abnormal area segmentation module is used to perform grayscale conversion on the workpiece drying stage images in the workpiece production stage image set to generate the workpiece drying stage grayscale images; perform regional image segmentation of the local overheating area and the local cooling area on the workpiece drying stage grayscale images to generate the drying stage local overheating area image and the drying stage local cooling area image; perform abnormal area temperature distribution mapping and annotation on the drying stage local overheating area image and the drying stage local cooling area image to generate the abnormal workpiece drying stage area image; perform abnormal movement visual detection on the workpiece moving stage images in the workpiece production stage image set to generate the abnormal workpiece moving stage image; The intelligent defect detection module is used to integrate the area images of the abnormal workpiece loading stage, the area images of the abnormal workpiece cleaning stage, the area images of the abnormal workpiece drying stage and the area images of the abnormal workpiece moving stage into a workpiece stage abnormal image set; to perform intelligent defect area image marking on the workpiece stage abnormal image set, and generate a workpiece intelligent defect detection map to perform artificial intelligence visual inspection operations for workpiece production.

9. An artificial intelligence visual inspection device, characterized in that: The method comprises a processor, a memory and a computer program stored in the memory and executable on the processor, and is used to execute the artificial intelligence visual inspection method based on workpiece production as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Intelligent control system for surface defect detection of cylindrical roller of ceramic bearing

    CN116713200A

  • Workpiece defect detection method and device, computer equipment and readable storage medium

    CN118521576A