Machine vision inspection methods, equipment, media and systems

By placing sample products on the product detection line and monitoring and adjusting the machine vision detection model, the problem of lack of effective means to adjust the detection model in the existing technology is solved, and the detection accuracy is improved when environmental changes are achieved.

CN115541577BActive Publication Date: 2025-05-16CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing technology lacks effective means to adjust the machine vision detection model in a timely manner, resulting in the accuracy of the measurement results being unable to meet the requirements, especially when environmental changes are made.

Method used

By placing sample products on the product detection line, the first machine vision data and known actual results are used to monitor whether the current detection model needs to be adjusted. If necessary, the model is adjusted and the adjusted model is used for detection in subsequent detection.

Benefits of technology

When there are factors such as detection environment changes in the product detection line, the machine vision detection model can be adjusted in time to improve the accuracy of the detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115541577B_ABST
    Figure CN115541577B_ABST
Patent Text Reader

Abstract

The present invention provides a machine vision detection method, device, medium and system, which relates to the field of detection technology, and is used to solve the problem that there is a lack of effective means in the prior art to adjust the machine vision detection model in time, so that the accuracy of measurement may not meet the requirements. The method includes: receiving the first machine vision data of several sample products with known actual results that are placed between the products to be tested in a preset order and currently pass through the product detection line; if the current machine vision detection model needs to be adjusted using the first machine vision data and the corresponding known actual results, the current machine vision detection model is adjusted and the adjusted machine vision detection model is used for subsequent detection. The present invention can adjust the machine vision detection model in time when factors such as changes in the detection environment occur in the product detection line, thereby improving the accuracy of machine vision detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of detection technology, and in particular to a machine vision detection method, equipment, medium and system. Background Art

[0002] When inspecting products using machine vision, the environment in the workshop may be constantly changing, including changes in time (such as changes between day and night) and light intensity, which will cause the light and dark contrast of images captured by machine vision to constantly change.

[0003] The existing technology does not consider the impact of factors such as environmental changes on the accuracy of detection results obtained by machine vision detection models. After machine vision performs sample detection to obtain the corresponding detection model, when the detection model is actually applied to measure the products to be tested passing through the product inspection line, there is a lack of effective means to adjust the machine vision detection model in a timely manner according to factors such as environmental changes, which may cause immeasurable deviations in the measurement results, and the measurement accuracy may not meet the requirements. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a machine vision detection method, equipment, medium and system in view of the above-mentioned deficiencies in the prior art, so as to solve the problem that the prior art lacks effective means to adjust the machine vision detection model in time, resulting in that the measurement accuracy may not meet the requirements.

[0005] In a first aspect, the present invention provides a machine vision detection method, comprising:

[0006] Receiving first machine vision data of a plurality of sample products with known actual results that are placed between products to be tested in a preset order and currently pass through a product testing line;

[0007] If it is detected by using the first machine vision data and the corresponding known actual results that the current machine vision detection model needs to be adjusted, the current machine vision detection model is adjusted and the adjusted machine vision detection model is used for subsequent detection.

[0008] Optionally, before receiving first machine vision data of a plurality of sample products with known actual results that are placed between the products to be tested in a preset order and that currently pass through the product testing line, the method further comprises:

[0009] receiving second machine vision data of a sample product having known actual results passing through a product inspection line under different inspection environments;

[0010] The second machine vision data and the corresponding known actual results are used to train multiple machine vision inspection models for product inspection lines under different inspection environments.

[0011] Optionally, before the use of the first machine vision data and the corresponding known actual results to monitor that the current machine vision detection model needs to be adjusted, the method further includes:

[0012] Determine whether there is a current machine vision detection model. If not, use one of multiple machine vision detection models to detect the first machine vision data to obtain a first detection result, and use the machine vision detection model with the smallest deviation between the first detection result and the corresponding known actual result as the current machine vision detection model.

[0013] Optionally, if the current machine vision detection model needs to be adjusted by using the first machine vision data and the corresponding known actual result, adjusting the current machine vision detection model and using the adjusted machine vision detection model for subsequent detection specifically includes:

[0014] Using the current machine vision detection model to detect the first machine vision data to obtain a second detection result, if the deviation between the second detection result and the corresponding known actual result exceeds a preset range, determining that the current machine vision detection model needs to be adjusted;

[0015] The current machine vision inspection model is adjusted according to the deviation and subsequent inspections are performed using the adjusted machine vision inspection model.

[0016] Optionally, the subsequent detection using the adjusted machine vision detection model specifically includes:

[0017] The third machine vision data of the product to be tested that passes through the product testing line after the plurality of sample products is received, and the third machine vision data is tested using the adjusted machine vision testing model to obtain a final testing result corresponding to the product to be tested.

[0018] Optionally, adjusting the current machine vision detection model according to the deviation and using the adjusted machine vision detection model for subsequent detection specifically includes:

[0019] Determining whether the deviations show regularity;

[0020] If the deviation presents regularity, use the current machine vision detection model to detect the third machine vision data to obtain a third detection result, and correct the third detection result according to the presented regularity to obtain a final detection result of the corresponding product to be tested;

[0021] If the deviation is irregular, one of multiple machine vision detection models is used to detect the first machine vision data to obtain a fourth detection result, and the machine vision detection model with the smallest deviation between the fourth detection result and the corresponding known actual result is used to detect the third machine vision data to obtain the final detection result of the corresponding product to be tested.

[0022] Optionally, after adjusting the current machine vision detection model to a second machine vision detection model in which the fourth detection result has the smallest deviation from the corresponding known actual result, the method further includes:

[0023] The light source of the product inspection line is adjusted according to the inspection environment of the second machine vision inspection model.

[0024] Optionally, the first machine vision data is specifically 3D machine vision data, and the current machine vision detection model and the adjusted machine vision detection model are both 3D machine vision detection models.

[0025] In a second aspect, the present invention provides a machine vision inspection device, comprising:

[0026] A receiving module, used to receive first machine vision data of a plurality of sample products with known actual results that are placed between the products to be tested in a preset order and currently pass through a product testing line;

[0027] The detection monitoring module is connected to the receiving module and is used to adjust the current machine vision detection model and use the adjusted machine vision detection model for subsequent detection if it is detected that the current machine vision detection model needs to be adjusted using the first machine vision data and the corresponding known actual results.

[0028] In a third aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the machine vision detection method as described above is implemented.

[0029] In a fourth aspect, the present invention provides a machine vision inspection system, comprising:

[0030] Machine vision inspection equipment, used to perform the machine vision inspection method as described above;

[0031] A product inspection line is connected to the machine vision inspection device and is used to place a number of sample products with known actual results between the products to be inspected in a preset order.

[0032] Optionally, the machine vision inspection equipment is arranged at a product inspection line site, a network edge side or a machine vision inspection cloud platform.

[0033] Optionally, the product inspection line includes a 3D shooting terminal for acquiring first machine vision data.

[0034] The present invention provides a machine vision inspection method, equipment, medium and system. By placing certain sample products on a product inspection line, the sample products are continuously and synchronously tested during the inspection of the products to be tested. Whether the current machine vision inspection model needs to be adjusted is monitored based on the first machine vision data of the sample products and the known actual results. If adjustment is required, the adjusted machine vision inspection model is used for inspection in subsequent inspections. When factors such as changes in the inspection environment occur on the product inspection line, the machine vision inspection model can be adjusted in time to improve the accuracy of machine vision inspection. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 is a flow chart of a machine vision detection method according to an embodiment of the present invention;

[0036] Figure 2 is a structural schematic diagram of a machine vision inspection system according to an embodiment of the present invention;

[0037] Figure 3 is a structural schematic diagram of a machine vision inspection device according to an embodiment of the present invention;

[0038] Figure 4 It is a structural schematic diagram of another machine vision inspection system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0039] In order to enable those skilled in the art to better understand the technical solution of the present invention, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.

[0040] It should be understood that the specific embodiments and drawings described herein are only used to explain the present invention rather than to limit the present invention.

[0041] It can be understood that, in the absence of conflict, the various embodiments of the present invention and the various features in the embodiments can be combined with each other.

[0042] It can be understood that, for the convenience of description, the drawings of the present invention only show the parts related to the present invention, while the parts irrelevant to the present invention are not shown in the drawings.

[0043] It can be understood that each unit and module involved in the embodiments of the present invention may correspond to only one physical structure, or may be composed of multiple physical structures, or multiple units and modules may be integrated into one physical structure.

[0044] It can be understood that, without conflict, the functions and steps marked in the flowcharts and block diagrams of the present invention may occur in an order different from that marked in the drawings.

[0045] It is understood that the flowcharts and block diagrams of the present invention illustrate the possible architectures, functions, and operations of the systems, devices, equipment, and methods according to the various embodiments of the present invention. Each box in the flowchart or block diagram may represent a unit, module, program segment, or code, which contains executable instructions for implementing the specified functions. Moreover, each box or combination of boxes in the block diagram and flowchart may be implemented by a hardware-based system that implements the specified functions, or by a combination of hardware and computer instructions.

[0046] It can be understood that the units and modules involved in the embodiments of the present invention can be implemented by software or hardware. For example, the units and modules can be located in a processor.

[0047] In order to facilitate understanding of the present invention, machine vision detection technology is first introduced.

[0048] Machine vision uses machines to replace human eyes for measurement and judgment. It uses computers to analyze the images of captured objects and simulate human visual functions. Machine vision can extend human vision. A complete machine vision system mainly includes light source, image acquisition device, image analysis and processing system, display and control system. With the increasing importance of machine vision inspection to industrial automation, industrial applications have put forward new requirements for machine vision technology.

[0049] 2D (2-dimensional) machine vision can collect and output images containing light and dark information of the object based on the surface reflection / transmittance differences of the object being measured. In contrast, 3D (3-dimensional) machine vision can not only measure the reflection differences of the object being measured, but also further measure the height information of all positions of the object being measured, obtain images with depth information, and output its complete spatial coordinate information, which is more friendly to measurements related to object shapes such as surface smoothness, volume, and warping.

[0050] In industrial applications, 3D machine vision can be used to collect high-precision spatial information on the surface of the object to be detected and calculate the volume of the object to be detected, which can be used for product classification or flow measurement, such as coal flow detection. At the same time, based on the complete spatial coordinate information collected, it can be used for 3C (Computer, Communication and Consumer Electronics), SPI (Serial Peripheral Interface), PCB (Printed Circuit Board) and other precision structural parts to achieve three-dimensional rapid measurement including high-precision parameters such as warpage and fault difference. With the help of 3D machine vision technology to obtain complete geometric information of the real three-dimensional scene, it is also possible to achieve accurate digitization of the scene, thereby achieving high-precision recognition, positioning, reconstruction, scene understanding and other machine vision tasks.

[0051] Embodiment 1:

[0052] like Figure 1 As shown, Embodiment 1 of the present invention provides a machine vision detection method, comprising:

[0053] S11, receiving first machine vision data of a plurality of sample products with known actual results that are placed between the products to be tested in a preset order and currently pass through a product testing line;

[0054] S12: If it is detected by using the first machine vision data and the corresponding known actual results that the current machine vision detection model needs to be adjusted, the current machine vision detection model is adjusted and the adjusted machine vision detection model is used for subsequent detection.

[0055] Specifically, in this embodiment, by placing certain sample products on the product inspection line, the sample products are continuously and synchronously tested during the inspection of the products to be tested, and the current machine vision inspection model is monitored to determine whether it needs to be adjusted based on the first machine vision data of the sample products and the known actual results. If adjustment is required, the adjusted machine vision inspection model is used in subsequent inspections. When factors such as changes in the inspection environment occur on the product inspection line, the machine vision inspection model can be adjusted in a timely manner to improve the accuracy of machine vision inspection.

[0056] Optionally, before receiving first machine vision data of a plurality of sample products with known actual results that are placed between the products to be tested in a preset order and that currently pass through the product testing line, the method further comprises:

[0057] receiving second machine vision data of a sample product having known actual results passing through a product inspection line under different inspection environments;

[0058] The second machine vision data and the corresponding known actual results are used to train multiple machine vision inspection models for product inspection lines under different inspection environments.

[0059] Specifically, in this embodiment, the machine vision detection model collects the corresponding second machine vision data by pre-delivering sample products to the product inspection line. Since the actual results of the sample products are known, the machine vision detection model can be obtained by training with the second machine vision data and the known actual results. In order to adapt to the impact of environmental changes, when training the machine vision detection model, the product inspection line is in different inspection environments, and the second machine vision data in each inspection environment is obtained respectively, and the machine vision detection model corresponding to each inspection environment is obtained by training respectively. It should be noted that the training of the machine vision detection model can be carried out for a single product inspection line, or it can be carried out in a big data manner by obtaining training data from a large number of product inspection lines of the same type. The barriers between different enterprises can be broken by establishing a machine vision detection cloud platform, and the cloud platform collects training data from different enterprises. After the machine vision detection model is obtained through training, the enterprise can obtain the trained machine vision detection model from the cloud platform and use it on its own product inspection line.

[0060] Optionally, before the use of the first machine vision data and the corresponding known actual result to monitor that the current machine vision detection model needs to be adjusted, the method further includes:

[0061] Determine whether there is a current machine vision detection model. If not, use one of multiple machine vision detection models to detect the first machine vision data to obtain a first detection result, and use the machine vision detection model with the smallest deviation between the first detection result and the corresponding known actual result as the current machine vision detection model.

[0062] Specifically, in this embodiment, when a specific product inspection line starts machine vision inspection, it is first necessary to determine the machine vision inspection model that is suitable for the current inspection environment. This can be to select a machine vision inspection model with the smallest deviation in the inspection results for the sample product from multiple pre-trained machine vision inspection models, and use this machine vision inspection model to perform inspections for a period of time starting from the current time. At this time, the light source of the product inspection line can also be adjusted to create an inspection environment similar to that of the selected current machine vision inspection model.

[0063] Optionally, if the current machine vision detection model needs to be adjusted by using the first machine vision data and the corresponding known actual result, adjusting the current machine vision detection model and using the adjusted machine vision detection model for subsequent detection specifically includes:

[0064] Using the current machine vision detection model to detect the first machine vision data to obtain a second detection result, if the deviation between the second detection result and the corresponding known actual result exceeds a preset range, determining that the current machine vision detection model needs to be adjusted;

[0065] The current machine vision inspection model is adjusted according to the deviation and subsequent inspections are performed using the adjusted machine vision inspection model.

[0066] Specifically, in this embodiment, during the entire machine vision inspection process, whether the current machine vision inspection model needs to be adjusted is determined at any time based on the detection deviation of the current machine vision inspection model on the sample product. If the deviation is small and does not exceed the preset range, the current machine vision inspection model can continue to be used to inspect the current several sample products. If the deviation exceeds the preset range, it is necessary to adjust the current machine vision inspection model for subsequent inspections based on the specific circumstances of the deviation.

[0067] Optionally, the subsequent detection using the adjusted machine vision detection model specifically includes:

[0068] The third machine vision data of the product to be tested that passes through the product testing line after the plurality of sample products is received, and the third machine vision data is tested using the adjusted machine vision testing model to obtain a final testing result corresponding to the product to be tested.

[0069] Specifically, in this embodiment, the subsequent inspection is mainly to carry out precise inspection of the product to be tested. If the current machine vision inspection model cannot meet the inspection accuracy required by the product to be tested, a machine vision inspection model that can meet the inspection accuracy is used to inspect the third machine vision data of the product to be tested, so as to obtain the final inspection result of the corresponding product to be tested that meets the inspection accuracy. The final inspection result refers to the inspection result of the product to be tested that meets the specified inspection requirements in this machine vision inspection method.

[0070] Optionally, adjusting the current machine vision detection model according to the deviation and using the adjusted machine vision detection model for subsequent detection specifically includes:

[0071] Determining whether the deviations show regularity;

[0072] If the deviation presents regularity, use the current machine vision detection model to detect the third machine vision data to obtain a third detection result, and correct the third detection result according to the presented regularity to obtain a final detection result of the corresponding product to be tested;

[0073] If the deviation is irregular, use one of multiple machine vision detection models to detect the first machine vision data to obtain a fourth detection result, adjust the current machine vision detection model to a second machine vision detection model in which the deviation between the fourth detection result and the corresponding known actual result is the smallest, and use the second machine vision detection model to detect the third machine vision data to obtain the final detection result of the corresponding product to be tested.

[0074] Specifically, in this embodiment, there are two methods to adjust the current machine vision detection model. The first is not to replace the current machine vision detection model, but to correct the deviation of the detection result of the product to be tested according to the deviation of the detection result of the sample product. At this time, the deviation needs to show a certain regularity. For example, the second detection result of the sample product is generally larger or smaller than the corresponding known actual result. The deviation can be reduced and the accuracy can be improved by subtracting or adding the corresponding deviation value to the third detection result of the product to be tested. The second is to replace the current machine vision detection model, and use multiple machine vision detection models pre-trained for different detection environments to find a machine vision detection model with the smallest deviation in detecting the first machine vision data of the sample product under the current detection environment. The third machine vision detection data of the product to be tested is detected with the machine vision detection model with the smallest deviation to obtain the final detection result of the product to be tested with the smallest deviation and the highest accuracy.

[0075] Optionally, after adjusting the current machine vision detection model to a second machine vision detection model in which the fourth detection result has the smallest deviation from the corresponding known actual result, the method further includes:

[0076] The light source of the product inspection line is adjusted according to the inspection environment of the second machine vision inspection model.

[0077] Specifically, in this embodiment, each time the machine vision inspection model is replaced, the light source of the product inspection line can be adjusted accordingly so that the monitoring environment of the product inspection line is similar to the monitoring environment of the replaced machine vision inspection model.

[0078] Optionally, the first machine vision data is specifically 3D machine vision data, and the current machine vision detection model and the adjusted machine vision detection model are both 3D machine vision detection models.

[0079] Specifically, in this embodiment, a 3D shooting terminal can be used to take pictures of sample products and products to be tested on the product inspection line. Correspondingly, the data obtained is 3D machine vision data, and the machine vision inspection model used is a 3D machine vision inspection model.

[0080] In a more specific example, combining Figure 2Describe a complete machine vision inspection process for a product inspection line:

[0081] 1) First set up Figure 2 The machine vision inspection system shown includes: a product inspection line 2, a network edge side 3, and a machine vision cloud platform 4; the product inspection line 2 includes a 3D shooting terminal, a light source, and a computing device, etc. The 3D shooting terminal can shoot at different angles to obtain images of products passing through the product inspection line, and can realize 3D machine vision through one or more of structured light, TOF (Time of Flight), binocular, and laser triangulation technologies. When the 3D shooting terminal is working, the light source works according to the settings; the network edge side 3 includes a network and edge computing power, etc. The network may include 3G (3rd Generation Telecommunication), 4G (4th Generation Telecommunication), and 5G (5th Generation Telecommunication). Generation Telecommunication), WIFI (wireless network), wired network, etc.; the machine vision cloud platform 4 includes an algorithm library, a management library, etc. The management library can centrally manage the computing power, data, algorithms, users, etc. of the machine vision cloud platform. The algorithm library can include machine vision detection algorithms pre-trained for different industry applications, such as product classification and grading detection algorithms, filamentary product diameter detection algorithms, product size measurement algorithms, etc. The algorithms for each industry application include multiple machine vision detection models obtained for different detection environments (especially lighting conditions);

[0082] 2) Before a product inspection line 2 used in a certain industry starts formal inspection of the product to be inspected, a set number (for example, 500) of sample products are first put into the product inspection line 3 in a determined order. Each sample product has a known actual result (for example, the size of the sample product is known when the product size is measured). The known actual result can be recorded in the computing device of the product inspection line 2 in a determined order, or in the edge computing power of the network edge side 3, or in the computing power managed by the management library of the machine vision cloud platform 4. The machine vision inspection method described in the present invention can be implemented by any one of the computing device of the product inspection line 2, the edge computing power of the network edge side 3, or the computing power managed by the management library of the machine vision cloud platform 4. The following takes the product inspection line 2 as an example. Taking the computing device implementation as an example, the 3D shooting terminal obtains the 3D detection image (first machine vision data) of each sample product in the order of passing through the product inspection line, and sends the first machine vision data to the computing device of the product inspection line 2. The computing device of the product inspection line 2 obtains the corresponding algorithm in the algorithm library of the machine vision cloud platform 4 through the network of the network edge side 3, and selects the first machine vision detection model with the smallest deviation for detecting the current 500 sample products from the multiple machine vision detection models in the corresponding algorithm as the current machine vision detection model when officially starting to detect the product to be tested by itself. The light source of the product inspection line 2 can be appropriately adjusted to make the lighting conditions of the product inspection line 2 at this time as close as possible to the lighting conditions when the first machine vision detection model is obtained;

[0083] 3) After a period of time has passed since the product inspection line 2 began to formally inspect the products to be tested, the natural lighting conditions will change with the change of time. At this time, the first machine vision inspection model (current machine vision inspection model) that may have been selected at the beginning may no longer meet the inspection accuracy requirements. In order to verify the inspection accuracy of the current machine vision inspection model in real time, some sample products are placed at intervals among the products to be tested that are formally inspected to monitor the inspection accuracy. For example, 6 sample products are placed at intervals among 30 products to be tested. The computing device of the product inspection line 2 knows the actual results and placement order of these 6 sample products. If the 30 products to be tested are not passed, the first machine vision data of the 6 sample products are also collected. If the first machine vision inspection model is used to inspect these 6 first machine vision data, it is found that the deviation between the obtained second inspection result and the corresponding known actual result exceeds the preset range (for example, ±0.3%), then it is determined that the first machine vision inspection model needs to be adjusted. There are two ways to adjust:

[0084] 3.1) If the deviation between the second test result and the corresponding known actual result is regular, for example, the six second test results all show that the measurement value of a certain dimension is smaller than the corresponding known actual result (such as the known actual dimensions of the sample product: length 20mm, width 8mm, height 6mm, the six second test results all show that the length is less than 20mm, and each is about 0.5% smaller), then the current machine vision model can be maintained as the first machine vision model, and the third test result of the product to be tested calculated by the first machine vision model is corrected by increasing the value of the third test result by 0.5% accordingly;

[0085] 3.2) If the deviation between the second detection result and the corresponding known actual result is irregular, for example, the deviations between the 6 second detection results and the corresponding known actual results are both positive and negative, then it is necessary to replace the current machine vision detection model, that is, replace the first machine vision detection model with the second machine vision detection model, and use multiple machine vision detection models in the corresponding algorithm to detect the 6 first machine vision data to obtain the second machine vision detection model with the smallest deviation between the fourth detection result and the corresponding known actual result. The light source of the product inspection line 2 can be appropriately adjusted to make the lighting conditions of the product inspection line 2 as close as possible to the lighting conditions when the second machine vision detection model is obtained, and the second machine vision detection model is used as the current machine vision model to detect the subsequent 30 products to be tested and 6 sample products. In subsequent continuous detection, if the model does not need to be adjusted, continue to use the current machine vision model. If it is found that the model needs to be adjusted again, it will still be adjusted according to the above method.

[0086] Embodiment 2:

[0087] like Figure 3 As shown, Embodiment 2 of the present invention provides a machine vision inspection device, including:

[0088] A receiving module 11 is used to receive first machine vision data of a plurality of sample products with known actual results that are placed between the products to be tested in a preset order and currently pass through a product testing line;

[0089] The detection monitoring module 12 is connected to the receiving module 11, and is used to adjust the current machine vision detection model and use the adjusted machine vision detection model for subsequent detection if it is detected that the current machine vision detection model needs to be adjusted using the first machine vision data and the corresponding known actual results.

[0090] Optionally,

[0091] The receiving module 11 is also used to receive second machine vision data of sample products with known actual results that pass through the product inspection line under different inspection environments;

[0092] The detection monitoring module 12 is also used to use the second machine vision data and corresponding known actual results to train and obtain multiple machine vision detection models for product detection lines under different detection environments.

[0093] Optionally,

[0094] The detection monitoring module 12 is also used to determine whether there is a current machine vision detection model. If not, one of multiple machine vision detection models is used to detect the first machine vision data to obtain a first detection result, and the first machine vision detection model with the smallest deviation between the first detection result and the corresponding known actual result is used as the current machine vision detection model.

[0095] Optionally, the detection and monitoring module 12 specifically includes:

[0096] A current detection unit, configured to detect the first machine vision data using the current machine vision detection model to obtain a second detection result, and if a deviation between the second detection result and a corresponding known actual result exceeds a preset range, determine that the current machine vision detection model needs to be adjusted;

[0097] An adjustment detection unit is connected to the current detection unit and is used to adjust the current machine vision detection model according to the deviation and use the adjusted machine vision detection model for subsequent detection.

[0098] Optionally,

[0099] The receiving unit is also used to receive third machine vision data of the product to be tested that passes through the product inspection line after the sample products.

[0100] The adjustment detection unit is further used to detect the third machine vision data using the adjusted machine vision detection model to obtain a final detection result corresponding to the product to be tested.

[0101] Optionally, the adjustment detection unit specifically includes:

[0102] A judging subunit, used to judge whether the deviation presents regularity;

[0103] A first adjustment and detection unit, connected to the judgment subunit, is used to detect the third machine vision data using the current machine vision detection model to obtain a third detection result if the deviation presents regularity, and to correct the third detection result according to the presented regularity to obtain a final detection result of the corresponding product to be tested;

[0104] The second adjustment detection unit is connected to the judgment subunit and is used to use one of the multiple machine vision detection models to detect the first machine vision data to obtain a fourth detection result if the deviation is irregular, adjust the current machine vision detection model to a second machine vision detection model in which the deviation between the fourth detection result and the corresponding known actual result is the smallest, and use the second machine vision detection model to detect the third machine vision data to obtain a final detection result of the corresponding product to be tested.

[0105] Optionally, the machine vision inspection equipment further includes:

[0106] A light source adjustment unit is used to adjust the current machine vision detection model to a second machine vision detection model in which the fourth detection result has the smallest deviation from the corresponding known actual result, and then adjust the light source of the product detection line according to the detection environment of the second machine vision detection model.

[0107] Optionally, the first machine vision data is specifically 3D machine vision data, and the current machine vision detection model and the adjusted machine vision detection model are both 3D machine vision detection models.

[0108] Example 2 provides a machine vision inspection device corresponding to Example 1, which is used to place certain sample products on the product inspection line, continuously and synchronously test the sample products during the inspection of the products to be tested, and monitor whether the current machine vision inspection model needs to be adjusted based on the first machine vision data of the sample products and the known actual results. If adjustment is required, the adjusted machine vision inspection model is used for subsequent inspections. When factors such as changes in the inspection environment occur on the product inspection line, the machine vision inspection model can be adjusted in time to improve the accuracy of machine vision inspection.

[0109] Embodiment 3:

[0110] Embodiment 3 of the present invention provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the machine vision detection method as described in Embodiment 1 is implemented.

[0111] The computer-readable storage medium includes volatile or non-volatile, removable or non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, computer program modules or other data). Computer-readable storage media include, but are not limited to, RAM (Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable read only memory), flash memory or other memory technology, CD-ROM (Compact Disc Read-Only Memory), digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer.

[0112] Example 3 provides a computer-readable storage medium corresponding to Example 1. When the program therein is running, it can be achieved by placing certain sample products on the product inspection line. During the inspection of the products to be tested, the sample products can be continuously and synchronously tested. According to the first machine vision data of the sample products and the known actual results, it is monitored whether the current machine vision inspection model needs to be adjusted. If adjustment is required, the adjusted machine vision inspection model is used for inspection in subsequent inspections. When factors such as changes in the inspection environment occur on the product inspection line, the machine vision inspection model can be adjusted in time to improve the accuracy of machine vision inspection.

[0113] Embodiment 4:

[0114] like Figure 4 As shown, Embodiment 4 of the present invention provides a machine vision inspection system, including:

[0115] A machine vision inspection device 1, used to perform the machine vision inspection method as described in Example 1;

[0116] The product inspection line 2 is connected to the machine vision inspection device 1 and is used to place a number of sample products with known actual results between the products to be inspected in a preset order.

[0117] Alternatively, if Figure 2 As shown, the machine vision inspection equipment 1 can be set at the product inspection line site 2, the network edge side 3 or the machine vision inspection cloud platform 4.

[0118] Alternatively, if Figure 2 As shown, the product inspection line 2 includes a 3D shooting terminal for acquiring first machine vision data.

[0119] Example 4 provides a machine vision inspection system corresponding to Example 1, wherein the machine vision inspection equipment 1 can be implemented by placing certain sample products on the product inspection line 2, and continuously and synchronously testing the sample products during the inspection of the products to be tested. It can monitor whether the current machine vision inspection model needs to be adjusted based on the first machine vision data of the sample products and the known actual results. If adjustment is required, the adjusted machine vision inspection model is used for subsequent inspections. When factors such as changes in the inspection environment occur on the product inspection line 2, the machine vision inspection model can be adjusted in time to improve the accuracy of machine vision inspection.

[0120] It is to be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present invention, but the present invention is not limited thereto. For those of ordinary skill in the art, various modifications and improvements can be made without departing from the spirit and essence of the present invention, and these modifications and improvements are also considered to be within the scope of protection of the present invention.

Claims

1. A machine vision detection method, characterized in that: include: receiving second machine vision data of a sample product having known actual results passing through a product inspection line under different inspection environments; Using the second machine vision data and the corresponding known actual results to train multiple machine vision inspection models for product inspection lines under different inspection environments; Receiving first machine vision data of a plurality of sample products with known actual results that are placed between products to be tested in a preset order and currently pass through a product testing line; If it is detected by using the first machine vision data and the corresponding known actual result that the current machine vision detection model needs to be adjusted, adjusting the current machine vision detection model and using the adjusted machine vision detection model for subsequent detection; Before the first machine vision data and the corresponding known actual results are used to monitor that the current machine vision detection model needs to be adjusted, the method further includes: Determine whether there is a current machine vision detection model. If not, use one of the multiple machine vision detection models to detect the first machine vision data to obtain a first detection result, and use the first machine vision detection model with the smallest deviation between the first detection result and the corresponding known actual result as the current machine vision detection model; If the current machine vision detection model needs to be adjusted by using the first machine vision data and the corresponding known actual result, the current machine vision detection model is adjusted and the adjusted machine vision detection model is used for subsequent detection, specifically including: Using the current machine vision detection model to detect the first machine vision data to obtain a second detection result, if the deviation between the second detection result and the corresponding known actual result exceeds a preset range, determining that the current machine vision detection model needs to be adjusted; The current machine vision inspection model is adjusted according to the deviation and subsequent inspections are performed using the adjusted machine vision inspection model.

2. The method according to claim 1, characterized in that The subsequent detection using the adjusted machine vision detection model specifically includes: The third machine vision data of the product to be tested that passes through the product testing line after the plurality of sample products is received, and the third machine vision data is tested using the adjusted machine vision testing model to obtain a final testing result corresponding to the product to be tested.

3. The method according to claim 2, characterized in that The step of adjusting the current machine vision detection model according to the deviation and using the adjusted machine vision detection model for subsequent detection specifically includes: Determining whether the deviations show regularity; If the deviation presents regularity, use the current machine vision detection model to detect the third machine vision data to obtain a third detection result, and correct the third detection result according to the presented regularity to obtain a final detection result of the corresponding product to be tested; If the deviation is irregular, use one of multiple machine vision detection models to detect the first machine vision data to obtain a fourth detection result, adjust the current machine vision detection model to a second machine vision detection model in which the deviation between the fourth detection result and the corresponding known actual result is the smallest, and use the second machine vision detection model to detect the third machine vision data to obtain the final detection result of the corresponding product to be tested.

4. The method according to claim 3, characterized in that After adjusting the current machine vision detection model to a second machine vision detection model in which the fourth detection result has the smallest deviation from the corresponding known actual result, the method further includes: The light source of the product inspection line is adjusted according to the inspection environment of the second machine vision inspection model.

5. The method according to any one of claims 1 to 4, characterized in that: The first machine vision data is specifically 3D machine vision data, and the current machine vision detection model and the adjusted machine vision detection model are both 3D machine vision detection models.

6. A machine vision inspection device, characterized in that: include: A receiving module, used to receive first machine vision data of a plurality of sample products with known actual results that are placed between the products to be tested in a preset order and currently pass through a product testing line; A detection monitoring module connected to the receiving module, for adjusting the current machine vision detection model and using the adjusted machine vision detection model for subsequent detection if it is detected by using the first machine vision data and the corresponding known actual results that the current machine vision detection model needs to be adjusted; The receiving module is also used to receive second machine vision data of sample products with known actual results that pass through the product inspection line under different inspection environments; The detection monitoring module is also used to train multiple machine vision detection models for product detection lines under different detection environments using the second machine vision data and corresponding known actual results; The detection monitoring module is also used to determine whether there is a current machine vision detection model. If not, use one of the multiple machine vision detection models to detect the first machine vision data to obtain a first detection result, and use the first machine vision detection model with the smallest deviation between the first detection result and the corresponding known actual result as the current machine vision detection model; The detection and monitoring module specifically includes: A current detection unit, configured to detect the first machine vision data using the current machine vision detection model to obtain a second detection result, and if a deviation between the second detection result and a corresponding known actual result exceeds a preset range, determine that the current machine vision detection model needs to be adjusted; An adjustment detection unit is connected to the current detection unit and is used to adjust the current machine vision detection model according to the deviation and use the adjusted machine vision detection model for subsequent detection.

7. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the machine vision detection method as described in any one of claims 1 to 5 is implemented.

8. A machine vision inspection system, characterized in that: include: A machine vision inspection device, used to perform the machine vision inspection method according to any one of claims 1 to 5; A product inspection line is connected to the machine vision inspection device and is used to place a number of sample products with known actual results between the products to be inspected in a preset order.

9. The system according to claim 8, characterized in that The machine vision inspection equipment is arranged at a product inspection line site, a network edge side or a machine vision inspection cloud platform.

10. The system according to claim 8, characterized in that The product inspection line includes a 3D shooting terminal for acquiring first machine vision data.

Citation Information

Patent Citations

  • Accuracy verification method and device for workpiece visual inspection equipment, equipment and medium

    CN114935576A