Appearance inspection device and appearance inspection method
Patent Information
- Application Number
- JP2021190177
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2021-11-24
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2041-11-24
AI Technical Summary
Conventional visual inspection methods struggle with images that are ambiguous, leading to inconsistent quality judgments and difficulty in determining whether trial-and-error adjustments of the inference model are necessary.
A visual inspection apparatus that assigns first and second flags to images based on their clarity in determining defective or non-defective status, allowing separate display of verification results and providing tools for users to manage and analyze these flags to assess model performance.
Enables accurate evaluation of the inference model's performance by distinguishing clear from ambiguous images, facilitating informed decisions on model adjustments and improving judgment consistency.
Smart Images

Figure 00000000_0000_ABST 
Figure 00000000_0001_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an appearance inspection apparatus and an appearance inspection method for inspecting the appearance of a workpiece.
Background Art
[0002] For example, Patent Document 1 discloses a processing apparatus that uses machine learning by a computer to determine whether a workpiece is a good product or a defective product. The processing apparatus of Patent Document 1 performs supervised machine learning on good product data to generate a good product learning model, and performs supervised machine learning on defective product data to generate a defective product learning model. Then, the data of the workpiece to be determined is input, and it is configured to be able to determine whether the workpiece is a good product or a defective product by the good product learning model and the defective product learning model. Such an apparatus is also called an appearance inspection apparatus for a workpiece.
Prior Art Documents
Patent Documents
[0003]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0004] By the way, in visual inspection equipment, after generating good product learning models and defective product learning models (hereinafter referred to as inference models), verification images are input into the inference models to check their quality judgment performance. Among the images input into the inference models, there are images in which even the user may have difficulty determining whether a product is good or defective. For example, a workpiece may have a small scratch, but in some cases, such a small scratch may be considered good, or it may be judged as defective initially, and the user may later return it to the good product line. In the inspection of such images, it does not matter whether it is judged as good or defective. In other words, in the case of images that do not have a true correct answer, the inference model cannot determine whether it is good or defective, but conventional methods could only assign a flag that was either good or defective. As a result, even if the inference model performed well, it was difficult to determine whether trial and error in adjusting the inference model was really necessary because of images that did not have a true correct answer.
[0005] This disclosure is made in view of the above points, and its purpose is to facilitate the verification of inference models. [Means for solving the problem]
[0006] To achieve the above objective, one aspect of this disclosure may be a visual inspection device that inputs work images of a work to be inspected into a machine learning network and performs a quality determination of the work based on the input work images. The visual inspection device includes a storage unit that stores an inference model after training; an input unit that assigns a first flag indicating whether an image is defective or good to a verification image of a defective product or a good product, respectively, for verifying the quality determination performance of the inference model; an inspection unit that inputs the verification image of a defective product or a good product into the inference model and obtains a quality determination result; and a display control unit that displays the verification result of the quality determination performance of the inference model on a display unit based on the quality determination result obtained by the inspection unit. The input unit can accept input of a second flag to be assigned to a verification image that is more difficult to determine as good or bad than the defective product image or good product image to which the first flag has been assigned. The inspection unit can input the image to which the second flag has been assigned into the inference model and obtain a quality determination result. Furthermore, the display control unit can display the verification results for images to which the second flag has been assigned separately from the verification results for images to which the first flag has been assigned.
[0007] In this configuration, for example, a first flag is assigned to verification images that can be clearly determined to be either defective or good products. On the other hand, a second flag is assigned to verification images that do not have a true correct answer, such as images that cannot be clearly determined to be either defective or good products, or images that are acceptable regardless of the judgment. The inspection unit inputs one or more images assigned the first flag into the inference model to obtain a pass / fail judgment result, and also inputs one or more images assigned the second flag into the inference model to obtain a pass / fail judgment result. The display unit can display the verification results of images assigned the first flag and the verification results of images assigned the second flag separately, so that the user can understand the pass / fail judgment performance of the inference model when images that do not have a true correct answer are excluded. This makes it easy for the user to determine whether the inference model is already performing sufficiently well, or whether further trial and error in adjusting the inference model is still necessary.
[0008] In other embodiments, the display control unit is configured to display information regarding the number of correct answers for good / bad judgments for images to which the first flag is assigned, excluding the verification results for images to which the second flag is assigned.
[0009] This configuration allows for the exclusion of verification results for images without a correct answer, and the display of quality judgment results for images where it is possible to clearly determine whether they are defective or good products. This makes it possible to accurately determine whether the inference model is already performing sufficiently well.
[0010] In other embodiments, the input unit is configured to accept a selection of whether or not to exclude the pass / fail judgment results for images to which the second flag has been assigned. Furthermore, if the input unit accepts a selection to exclude the pass / fail judgment results for images to which the second flag has been assigned, the display control unit is configured to exclude the verification results for images to which the second flag has been assigned and display information regarding the number of correct pass / fail judgments for images to which the first flag has been assigned. On the other hand, if the input unit accepts a selection not to exclude the pass / fail judgment results for images to which the second flag has been assigned, the display control unit is configured to display information regarding the number of correct pass / fail judgments for images to which the second flag has been assigned and the number of correct pass / fail judgments for images to which the first flag has been assigned, combined.
[0011] In other words, this approach can accommodate both users who want to evaluate the performance of an inference model while completely ignoring the validation results for images without a true correct answer, and users who want to consider the validation results for images without a true correct answer as well.
[0012] In another embodiment, the display control unit can display a list of the verification images on the display unit, and the input unit can accept the assignment of the first flag or the second flag to an image selected from the list of verification images displayed on the display unit, thereby facilitating the user's flag assignment process.
[0013] In other embodiments, the display control unit may select an image from the verification images that does not have both the first flag and the second flag assigned to it and display it on the display unit.
[0014] In other words, for images that do not have both the first and second flags assigned, the user can be prompted to assign either the first or second flag. As a result, if the quality judgment is accurately performed for images that have the first flag assigned, it can be determined that the inference model is already performing sufficiently. On the other hand, if the quality judgment is not accurately performed for images that have the first flag assigned, it can be determined that the inference model is not performing sufficiently.
[0015] In other embodiments, the display control unit may select images from the verification images that the inference model was unable to determine as good or bad, and display them on the display unit.
[0016] This configuration allows us to determine whether an image the inference model could not classify as good or bad is an image without a correct answer. If an image the inference model could not classify is an image without a correct answer, we can exclude that result and evaluate the performance of the inference model. On the other hand, if an image the inference model could not classify is an image with a correct answer, we can conclude that the performance of the inference model is insufficient.
[0017] In other embodiments, the display control unit can generate a cumulative histogram based on the frequency of images determined to be good products and the frequency of images determined to be defective products, and display it on the display unit.
[0018] The display control unit according to another aspect may generate a user interface screen that allows selection of whether to include the frequency of the image with the second flag when generating the cumulative histogram, display the screen on the display unit, and when it is selected to include the frequency of the image with the second flag, generate the cumulative histogram including the frequency of the image with the second flag, while when it is selected not to include the frequency of the image with the second flag, generate the cumulative histogram without including the frequency of the image with the second flag.
[0019] According to this configuration, the user can freely select and display a cumulative histogram including the frequency of images without true correct answers and a cumulative histogram not including the frequency of images without true correct answers.
[0020] In another aspect, the apparatus may further include a learning unit that inputs learning data into the machine learning network for learning to generate the inference model.
[0021] Also, the input unit may receive an input of the second flag to be given to a verification image having a lower defect level than a defective product image with the first flag, or may receive an input of the second flag to be given to a verification image having a lower non-defective level than a non-defective product image with the first flag.
Advantages of the Invention
[0022] As described above, since the verification result of an image that can clearly determine whether it is a defective product image or a non-defective product image and the verification result of an image without a correct answer can be separately displayed on the display unit, the verification of the inference model can be easily performed.
Brief Description of the Drawings
[0023] [Figure 1] It is a schematic diagram showing the configuration of an appearance inspection apparatus according to an embodiment of the present invention. [Figure 2] It is a block diagram showing the hardware configuration of the appearance inspection apparatus. [Figure 3] It is a flowchart showing an example of the procedure of the learning process. [Figure 4] It is a diagram showing examples of good product images, images that are difficult to judge, and defective product images. [Figure 5] It is a flowchart showing an example of the procedure of the verification process. [Figure 6] It is a diagram showing an example of a user interface when inputting the first flag and the second flag. [Figure 7] It is a diagram showing an example of a user interface displaying the number of images with the first flag and the second flag attached. [Figure 8] It is a diagram showing an example of a result display screen. [Figure 9] It is a diagram showing an example of the display of a cumulative histogram based on the frequency of the determination results.
Mode for Carrying Out the Invention
[0024] Hereinafter, embodiments of the present invention will be described in detail based on the drawings. Note that the following description of the preferred embodiments is merely exemplary in nature and is not intended to limit the present invention, its applications, or its uses.
[0025] FIG. 1 is a schematic diagram showing the configuration of an appearance inspection apparatus 1 according to an embodiment of the present invention. The appearance inspection apparatus 1 is an apparatus for determining the quality of a work image obtained by imaging a work, which is an inspection target such as various parts and products, and can be used at a production site such as a factory. Specifically, a machine learning network is constructed inside the appearance inspection apparatus 1. A work image obtained by imaging a work to be inspected is input into the generated machine learning network, and the machine learning network can perform a quality determination of the work image.
[0026] The entire work may be the inspection target, or only a part of the work may be the inspection target. Also, a single work may include a plurality of inspection targets. Further, a work image may include a plurality of works.
[0027] The visual inspection device 1 comprises a control unit 2, which serves as the main body of the device; an imaging unit 3; a display device (display unit) 4; and a personal computer 5. The personal computer 5 is not mandatory and can be omitted. Various information and images can be displayed using the personal computer 5 instead of the display device 4, or the functions of the personal computer 5 can be incorporated into the control unit 2 or the display device 4.
[0028] Figure 1 shows an example of the configuration of the visual inspection device 1, consisting of a control unit 2, an imaging unit 3, a display device 4, and a personal computer 5. However, any multiple of these components can be combined and integrated. For example, the control unit 2 and the imaging unit 3 can be integrated, or the control unit 2 and the display device 4 can be integrated. Furthermore, the control unit 2 can be divided into multiple units and some parts incorporated into the imaging unit 3 or the display device 4, or the imaging unit 3 can be divided into multiple units and some parts incorporated into other units.
[0029] (Configuration of imaging unit 3) As shown in Figure 2, the imaging unit 3 comprises a camera module (imaging unit) 14 and an illumination module (illumination unit) 15, and is a unit that performs the acquisition of workpiece images. The camera module 14 comprises an AF motor 141 that drives the imaging optical system and an imaging substrate 142. The AF motor 141 is the part that automatically adjusts the focus by driving the lens of the imaging optical system, and can perform focus adjustment using conventional methods such as contrast autofocus. The imaging substrate 142 is equipped with a CMOS sensor 143 as a light-receiving element that receives light incident from the imaging optical system. The CMOS sensor 143 is an imaging sensor configured to acquire color images. Instead of the CMOS sensor 143, a light-receiving element such as a CCD sensor can also be used.
[0030] The lighting module 15 includes an LED (light-emitting diode) 151 as a light-emitting element that illuminates the imaging area including the workpiece, and an LED driver 152 that controls the LED 151. The timing of light emission, the duration of light emission, and the amount of light emitted by the LED 151 can be arbitrarily controlled by the LED driver 152. The LED 151 may be provided integrally with the imaging unit 3, or it may be provided as a separate external lighting unit.
[0031] (Configuration of display device 4) The display device 4 has a display panel made of, for example, a liquid crystal panel or an organic EL panel. Work images and user interface images output from the control unit 2 are displayed on the display device 4. In addition, if the personal computer 5 has a display panel, the display panel of the personal computer 5 can be used as a substitute for the display device 4.
[0032] (operation equipment) Examples of operating devices for a user to operate the visual inspection device 1 include the keyboard 51 and mouse 52 of a personal computer 5, but are not limited to these; any device configured to accept various operations by the user is acceptable. For example, a pointing device such as the touch panel 41 of a display device 4 is also included as an operating device.
[0033] User operations on the keyboard 51 and mouse 52 can be detected by the control unit 2. The touch panel 41 is a conventional touch-type control panel equipped with, for example, a pressure sensor, and user touch operations can be detected by the control unit 2. The same applies when other pointing devices are used.
[0034] (Configuration of Control Unit 2) The control unit 2 comprises a main board 13, a connector board 16, a communication board 17, and a power supply board 18. The main board 13 is equipped with a processor 13a. The processor 13a controls the operation of each connected board and module. For example, the processor 13a outputs a lighting control signal to the LED driver 152 of the lighting module 15 to control the on / off state of the LED 151. The LED driver 152 switches the on / off state of the LED 151 and adjusts the on / off time, as well as the light intensity of the LED 151, in response to the lighting control signal from the processor 13a.
[0035] Furthermore, the processor 13a outputs an imaging control signal to the imaging substrate 142 of the camera module 14 to control the CMOS sensor 143. The CMOS sensor 143 starts imaging in response to the imaging control signal from the processor 13a and adjusts the exposure time to an arbitrary time to perform imaging. In other words, the imaging unit 3 images the area within the field of view of the CMOS sensor 143 in response to the imaging control signal output from the processor 13a. If there is a workpiece within the field of view, the workpiece will be imaged, but if there are objects other than workpieces within the field of view, those can also be imaged. For example, the visual inspection device 1 can use the imaging unit 3 to capture images of good products corresponding to good products and images of defective products corresponding to defective products as training images for a machine learning network. The training images do not have to be images captured by the imaging unit 3; they may be images captured by other cameras, etc.
[0036] On the other hand, when the visual inspection device is in operation, the imaging unit 3 can capture images of the workpiece. Furthermore, the CMOS sensor 143 is configured to output live images, i.e., the currently captured images, in real time at a short frame rate.
[0037] Once imaging by the CMOS sensor 143 is complete, the image signal output from the imaging unit 3 is input to the processor 13a on the main board 13 for processing and stored in the memory 13b of the main board 13. Details of the specific processing performed by the processor 13a on the main board 13 will be described later. The main board 13 may also be equipped with processing devices such as FPGAs and DSPs. Alternatively, the processor 13a may be an integrated processor with FPGAs and DSPs.
[0038] The main board 13 is equipped with a display control unit 13c. The display control unit 13c generates the display screen, controls the display device 4, and displays the display screen on the display device 4. The specific operation of the display control unit 13c will be described later.
[0039] The connector board 16 is the part that receives power from the outside via a power connector (not shown) provided on the power interface 161. The power supply board 18 is the part that distributes the power received by the connector board 16 to each board and module, and specifically distributes power to the lighting module 15, camera module 14, main board 13, and communication board 17. The power supply board 18 is equipped with an AF motor driver 181. The AF motor driver 181 supplies drive power to the AF motor 141 of the camera module 14, thereby realizing autofocus. The AF motor driver 181 adjusts the power supplied to the AF motor 141 according to the AF control signal from the processor 13a of the main board 13.
[0040] The communication board 17 is the part that performs communication between the main board 13 and the display device 4 and the personal computer 5, and communication between the main board 13 and external control equipment (not shown). Examples of external control equipment include programmable logic controllers. Communication may be wired or wireless, and either communication method can be implemented using conventionally known communication modules.
[0041] The control unit 2 is provided with a storage device (storage unit) 19, which may consist of, for example, a solid-state drive or a hard disk drive. The storage device 19 stores program files 80 and configuration files (software) that enable the hardware to execute the various controls and processes described later. The program files 80 and configuration files can be stored on a storage medium 90, such as an optical disc, and the program files 80 and configuration files stored on this storage medium 90 can be installed on the control unit 2. The program files 80 may also be downloaded from an external server using a communication line. In addition, the storage device 19 can store, for example, the image data described above, and parameters for constructing an inference model obtained after the learning process described later.
[0042] In Figure 2, the storage device 19 is shown as being integrated with the control unit 2, but the storage device 19 may be a separate unit from the control unit 2. An example of such a storage device 19 is a network-attached storage (NAS). The NSA and the control unit 2 are connected by a communication line such as a wired LAN or wireless LAN.
[0043] In other words, the visual inspection device 1 trains a machine learning network using training data, thereby adjusting the parameters of the machine learning network and generating an inference model. By inputting a work image of the work to be inspected into the inference model, the device can determine whether the work is good or bad based on the input work image. By using this visual inspection device 1, a visual inspection method that determines whether a work is good or bad based on a work image can be performed.
[0044] (Processor configuration) As shown in Figure 2, the processor 13a is provided with a learning unit 13d, an input unit 13e, and a test unit 13f. The learning unit 13d, input unit 13e, and test unit 13f may be hardware components or components that are executed by software. Furthermore, the learning unit 13d, input unit 13e, and test unit 13f do not necessarily have to be provided on the main board 13; some or all of them may be provided on boards other than the main board 13. Note that in this example, the learning unit 13d is not essential.
[0045] The learning unit 13d is the part that inputs training data into a machine learning network to train it and generates an inference model for determining the quality of input images. The learning unit 13d may be composed of a separate learning computer, for example, from the control unit 2. The learning computer is configured to perform machine learning at high speed. By connecting the learning computer and the control unit 2 so that they can communicate with each other, the parameters for constructing the inference model generated by the learning computer can be sent to and stored in the storage device 19. This allows the control unit 2 to construct the inference model.
[0046] (Learning process) Next, an example of the learning process procedure will be described based on the flowchart shown in Figure 3. In step SA1 after the start, the learning unit 13d prepares an untrained machine learning network. An untrained machine learning network is, for example, one in which the initial values of the parameters are randomly determined. In step SA2, the learning unit 13d reads multiple training images stored in the memory device 19 and inputs them sequentially into the machine learning network. After that, in step SA3, the parameters of the machine learning network are adjusted. At this time, it is possible to perform good product training by inputting only good product images, or to perform bad product training by inputting only bad product images, or to perform training for both. The parameters obtained in step SA3 are the parameters for constructing a trained inference model, and are stored in the memory device 19 in step SA4. Step SA4 is the storage step.
[0047] For example, if the training image is a defective product image, annotation should be performed on the defective product image before inputting it into the machine learning network in step SA2. That is, the user should perform the following actions in advance: clearly indicating that the image is defective, specifying the defective parts of the image, etc. The information added by the annotation is stored in the memory device 19 in association with the corresponding defective product image. Therefore, when training with defective products, the parameters of the machine learning network can be adjusted using the information that has been added in advance.
[0048] The training method for the machine learning network described above is not particularly limited, but for example, the following method can be used. That is, the machine learning network can be trained by minimizing the loss function. There are various definitions of loss, but Mean Square Error (MSE) can be given as an example.
[0049]
number
[0050] Here, T is the target anomaly score map, 0 is the output image (anomaly score map), n is the number of pixels where image T is 0, and x and y are the pixel positions. Note that loss functions such as Binary Cross Entropy can also be used. The above is merely an example.
[0051] (Example of a work image) Figure 4 shows images of a good product (image 200) of a good product (workpiece W1), a defective product (image 201) of a defective product (workpiece W2), and an image (image 202) of a workpiece W3 that is difficult to determine as good or defective. The good product W1 shown in Figure 4 has no scratches or other defects, so it is easy for the user to determine that it is a good product. Similarly, the defective product W2 has a large, noticeable scratch Wa, so it is easy for the user to determine that it is a defective product. However, the workpiece W3, which is difficult to determine, has a less noticeable scratch Wb. A workpiece W3 with a scratch of this magnitude Wb can be judged as a good product without any problems, but it may also be acceptable to judge it as a defective product and return it to the good product line later. In other words, even for a user, it is difficult to determine whether workpiece W3 is good or defective, and there is no particular problem regardless of which it is judged as; it is a workpiece that does not have a true correct answer. Even if an image 202 of such a workpiece W3 is input into a trained inference model, it may not be able to make a judgment.
[0052] Here, the learning process basically aims to eliminate errors in distinguishing between good and bad products. For example, if a good product image is judged as a bad product, or if an image is judged as unclassifiable, the inference model is adjusted through trial and error with the aim of correctly classifying that good product image as a good product. Similarly, if a bad product image is judged as a good product, or if an image is judged as unclassifiable, the inference model is adjusted through trial and error with the aim of correctly classifying that bad product image as a bad product.
[0053] However, if the image where the judgment error occurs is one that is acceptable to make a judgment error in the first place, such as image 202 in Figure 4 where the judgment is uncertain, then no further adjustment of the inference model is necessary. Yet, the user is forced to experiment with adjusting the inference model, which places an excessive burden on the user. On the other hand, if the image where the judgment error occurs is one that should be clearly judged, such as the good product image 200 or the defective product image 201 in Figure 4, then further adjustment of the inference model is necessary, and the user is in a situation where they should experiment. Thus, with previous machine learning methods, it was difficult to determine whether or not the user should experiment.
[0054] (Verification process) To address a problem in previous machine learning methods—namely, the difficulty in determining whether or not the user should still be experimenting with adjusting the learning process—this embodiment incorporates innovative features in the inference model validation process. This will be explained below based on the flowchart shown in Figure 5.
[0055] In step SB1 after the start, the input unit 13e acquires verification images to verify the quality judgment performance of the inference model. The verification images may consist only of images of defective products, only of good products, or both images of defective and good products. The verification images may be images acquired before the verification process, images newly acquired for the verification process, or images acquired during the operation of the visual inspection device 1. If the verification images are stored in the storage device 19, the input unit 13e can acquire them by reading the verification images from the storage device 19.
[0056] Step SB2 executes the process of assigning a defective product label or a good product label to the images for verification. The defective product label and good product label indicate attributes related to the quality of the images for verification. The defective product label indicates that the image for verification corresponds to a defective product. On the other hand, the good product label indicates that the image for verification corresponds to a good product. The user displays the images for verification on the display device 4 and checks each one, operating the mouse 52, etc., to specify a defective product label for images that correspond to defective products, and a good product label for images that correspond to good products. It is also possible to group multiple defective product images into one folder and specify the assignment of a defective product label to all defective product images in that folder at once, or to group multiple good product images into one folder and specify the assignment of a good product label to all good product images in that folder at once. The specified defective product label or good product label is assigned to the corresponding verification images by the input unit 13e. Information indicating which label has been assigned is stored in the storage device 19 as label assignment information, associated with the corresponding image.
[0057] To illustrate an example of a method for applying defective or good product labels in bulk, in step SB2, the input unit 13e first generates a user interface screen 250 as shown in Figure 6, and the display control unit 13c displays it on the display device 4. The user interface screen 250 is provided with a quantity information display area 251, a list display area 252, and an enlarged display area 253. Table 1 260 is displayed in the quantity information display area 251. Table 1 260 displayed in the quantity information display area 251 shows the number of "no label" images (neither good nor defective product labels applied), the number of "good product label" images (good product labels applied), and the number of "defective product label" images (defective product labels applied), respectively, as information regarding label application.
[0058] Table 1 260, displayed in the quantity information display area 251, also includes a "Display" column for selecting whether or not to display images of "no label" in the list display area 252, whether or not to display images of "good product label" in the list display area 252, and whether or not to display images of "defective product label" in the list display area 252. When the user operates the "Display" column with a mouse 52 or the like, the operation is accepted by the input unit 13e.
[0059] Table 1 260, displayed in the quantity information display area 251, also includes a column for "Batch Assignment." Images marked "No Label" do not have either a good product label or a defective product label assigned to them. Therefore, the user can use the mouse 52 or similar to perform the "Batch Assignment" operation to assign either a "Good Product Label" or a "Defective Product Label" to all "No Label" images in a batch. Images to which a "Good Product Label" or "Defective Product Label" has been assigned are classified as either "Good Product Label" images or "Defective Product Label" images in Table 1 260, and the "Quantity" is updated. The information of the labels assigned in a batch is stored in the storage device 19, associated with the corresponding images.
[0060] The list display area 252 displays the image selected by the operation in the "Display" column of Table 1 260 above. Specifically, when the input unit 13e detects that the user has operated in the "Display" column of Table 1 260 above, it accepts the operation and displays the corresponding image in the list display area 252. For example, if the image of "Good Product Label" is selected, the image of "Good Product Label" is displayed in the list display area 252; if the image of "Defective Product Label" is selected, the image of "Defective Product Label" is displayed in the list display area 252; and if the image of "No Label" is selected, the image of "No Label" is displayed in the list display area 252. Multiple types of images can also be displayed simultaneously.
[0061] In the enlarged display area 253, any one image selected by the user from among the images displayed in the list display area 252 is displayed in an enlarged state. Specifically, when the input unit 13e detects that an image has been selected from the images displayed in the list display area 252 by the user's mouse 52 or the like, it displays the selected image in the enlarged display area 253, making it larger than the one displayed in the list display area 252.
[0062] The above describes the processing in step SB2. After that, the process proceeds to step SB3. In step SB3, the process of assigning a first or second flag to the verification images is executed. The first flag is assigned to verification images where quality determination is easy, such as the good product image 200 and the defective product image 201 shown in Figure 4, and contains information on the good product label and the defective product label. This makes it possible to clearly indicate whether the defective product image or the good / bad product image is defective or good, respectively.
[0063] On the other hand, the second flag is assigned to verification images that are more difficult to judge as good or bad than defective or good product images that have been assigned the first flag. For example, the second flag is assigned to verification images that are less defective than defective product images that have been assigned the first flag. Also, the second flag is assigned to verification images that are less defective than good product images that have been assigned the first flag. Images that any user would judge as defective, or images that any user would judge as good, should be assigned the first flag. On the other hand, images that any user would have difficulty judging as defective (or good), or images that some users would judge as defective (or good), while others would judge as good (or defective), should be assigned the second flag. Also, images that are not perfectly good, but meet the criteria for being treated as good, should be assigned the second flag. The second flag may be assigned after the first flag, or vice versa. Step SB3 consists of a first flag assignment step and a second flag assignment step. The first flag assignment step and the second flag assignment step may be separated in the flow.
[0064] The method for assigning the first or second flag is not particularly limited, but one example is shown in Figure 6. When the user right-clicks the mouse 52 on or near a verification image on the list display area 252 of the user interface screen 250 in Figure 6 to which they intend to assign the first or second flag, the input unit 13e detects this and generates a window 254 for assigning the first or second flag. The display control unit 13c displays the generated window 254 on the display device 4.
[0065] Window 254 displays "Must" (also called the Must flag) as an example of the first flag, and "Want" (also called the Want flag) as an example of the second flag, allowing the user to select one of "Must" or "Want" using the mouse 52. Figure 6 shows the state where "Must" is selected. It is displayed in a way that allows identification of whether "Must" or "Want" has been selected. The input unit 13e accepts the input of "Must" or "Want" selected by the user. The accepted input of "Must" or "Want" is stored in the storage device 19 in association with the corresponding verification image. When "Must" or "Want" is selected, "Must" or "Want" may be displayed in the verification image.
[0066] Images marked "Must" for verification are easy to judge and should all be input into the inference model to ensure accurate judgment. On the other hand, images marked "Want" for verification are acceptable even if the inference model makes a judgment error. In this example, the first and second flags can be assigned in two stages, "Must" and "Want," but this is not limited to this; it may be possible to assign three or more stages, for example, using an expression such as "importance." If more than three stages are used, for example, there could be 10 stages from "1 to 10," with "1" being the lowest importance "Want," and assigned to verification images where a judgment error by the inference model is acceptable. The numerical value corresponding to "Want" could be, for example, "1 to 5." "6 to 10" would be the numerical value corresponding to "Must," and the higher the number, the more important the image needs to be judged accurately by the inference model, and the corresponding numerical value should be assigned accordingly. The first or second flag can also be assigned using symbols or characters other than numbers.
[0067] When a first or second flag is assigned to an image for verification, the display control unit 13c displays Table 261 in the image count information display area 251 of the user interface screen 250, as shown in Figure 7. Table 261 displays the number of images with neither the first nor the second flag assigned ("unflagred"), the number of images with the Must flag assigned ("Must"), and the number of images with the Want flag assigned ("Want"), respectively, as information on the assignment of the first or second flag.
[0068] When the user clicks with the mouse 52 on a number enclosed in a circle 262 in Table 261, the processor 13a extracts only the verification images that have a good product label and a Must flag. The display control unit 13c displays the verification images extracted by the processor 13a in the list display area 252 of the user interface screen 250. Circle 262 is just an example, and it is not necessary to actually display circle 262. If the user selects another column in Table 261 or a number within that column, the verification images corresponding to that column or number are extracted and displayed in the list display area 252.
[0069] In step SB4 shown in Figure 5, the inspection unit 13f reads the parameters of the learned inference model from the storage device 19 and constructs the inference model. After constructing the inference model, the process proceeds to step SB5, where verification images are input into the inference model. Specifically, the inspection unit 13f inputs images of defective or good products for verification into the inference model to obtain a pass / fail judgment result. Verification images with a Must flag and verification images with a Want flag are input into the inference model. In step SB5, verification images without either a Must flag or a Want flag may also be input into the inference model. Step SB5 is an inspection step.
[0070] In step SB6, the inspection unit 13f obtains the judgment result for the verification images input to the inference model in step SB5. Since this pass / fail judgment result is for the verification images, it can also be said to be the verification result for each image of the inference model. As described above, in step SB5, the inference model is input with verification images that have the Must flag and verification images that have the Want flag, so in step SB6, both the verification result of the inference model for the verification images with the Must flag and the verification result of the inference model for the verification images with the Want flag can be obtained.
[0071] In step SB7, the verification results are displayed on the display device 4. The display control unit 13c is responsible for displaying the verification results of the pass / fail judgment performance of the inference model on the display device 4, based on the pass / fail judgment results obtained by the inspection unit 13f. Specifically, the display control unit 13c is configured to display the verification results of the inference model for images with the Want flag assigned to them separately from the verification results of the inference model for images with the Must flag assigned to them on the display device 4. This step SB7 is a display step.
[0072] The display control unit 13c selects images from the verification images that do not have both the Must flag and the Want flag and displays them on the display device 4. For example, the display control unit 13c can generate a result display screen 263 as shown in Figure 8 and display it on the display device 4. The result display screen 263 displays the pass / fail judgment results for the verification images with good product labels and the pass / fail judgment results for the verification images with defective product labels. In this example, among the verification images with defective product labels, there is one image that could not be judged. "Could not be judged" means that the inference model could not determine whether the image was good or bad.
[0073] If an image that cannot be determined does not have either a Must flag or a Want flag assigned to it, the display control unit 13c selects that image. The display control unit 13c displays the selected image on the display device 4, prompting the user to assign either a Must flag or a Want flag. If there are multiple images that cannot be determined and do not have either a Must flag or a Want flag assigned to them, the display control unit 13c selects all of these images and displays them on the display device 4. The user can then be prompted to assign either a Must flag or a Want flag to each of these multiple images. If even one image among the undetermined images should have a Must flag assigned to it, the user can be made aware that trial and error is needed to adjust the inference model.
[0074] On the other hand, if a Want flag can be assigned to all images that cannot be classified, it means that all images that have a Must flag assigned to them have been accurately classified, and the user can determine that the inference model has finished training at that point. Instead of leaving the determination of whether the inference model has finished training to the user, for example, the inspection unit 13f could detect whether a Want flag has been assigned to all images that cannot be classified, and if so, notify the user that the inference model has finished training.
[0075] In addition to the Must and Want flags, a Hold flag may also be added to the images used for verification. Images that cannot be determined to be either good or defective, or defective images where it is difficult to identify the defect, can be given a Hold flag, and the Hold flag and the verification image to which it was assigned can be associated and stored in the storage device 19. In this case, the display device 4 can display both the verification results including the images with the Hold flag and the verification results excluding the images with the Hold flag. The user can select which verification results to display.
[0076] (Specific examples of how verification results can be displayed) Next, we will explain the display format for verification results for images with the Must flag and for images with the Want flag. However, the display format for verification results is not limited to the formats described below, and various display formats can be used.
[0077] Figure 9 shows an example of how the verification results can be displayed, specifically a cumulative histogram. That is, once the inspection unit 13f obtains the pass / fail judgment result for each of the multiple verification images, the display control unit 13c obtains from the inspection unit 13f the frequencies at which images were determined to be good and the frequencies at which images were determined to be defective. The display control unit 13c generates a cumulative histogram based on the frequencies at which images were determined to be good and the frequencies at which images were determined to be defective, and displays it on the display device 4. Since the cumulative histogram represents the frequencies of the number of correct answers for good and defective images, displaying the cumulative histogram allows for the display of information regarding the number of correct answers in the pass / fail judgment. The information regarding the number of correct answers is not limited to frequencies; it may also include a correct answer rate calculated based on the number of correct answers.
[0078] For example, a histogram display area 270, as shown in Figure 9, can be provided on the user interface screen, and a cumulative histogram can be displayed within the histogram display area 270. The histogram display area 270 is provided with a selection unit 271 for accepting the selection of whether or not to exclude the good / bad judgment results for images that have been assigned a "Want" flag from the verification images input to the inference model. The selection unit 271 consists of checkboxes that can be checked or unchecked by the user using a mouse 52, for example, and various buttons.
[0079] FIG.9A in Figure 9 shows the case where the user has checked "Include images with the Want flag in the results" by operating the selection unit 271. In this case, the pass / fail judgment results for images with the Want flag are not excluded. On the other hand, FIG.9B in Figure 9 shows the case where the user has not checked "Include images with the Want flag in the results" by operating the selection unit 271. In this case, the pass / fail judgment results for images with the Want flag are excluded. The input unit 13e is configured to accept the user's selection by the selection unit 271, that is, the selection of whether or not to exclude the pass / fail judgment results for images with the Want flag.
[0080] The selection result received by the input unit 13e is output to the display control unit 13c. If the selection unit 271 is not checked, the display control unit 13c excludes the pass / fail judgment results for images with the Want flag and generates a cumulative histogram based on the frequency of pass / fail judgments for images with the Must flag, and displays it on the display device 4 (see FIG. 9B). On the other hand, if the selection unit 271 is checked, the display control unit 13c does not exclude the pass / fail judgment results for images with the Want flag and generates a cumulative histogram based on the frequency of pass / fail judgments for images with the Want flag and the frequency of pass / fail judgments for images with the Must flag, and displays it on the display device 4 (see FIG. 9A).
[0081] In FIG. 9A, the cumulative histogram is generated including the pass / fail judgment results for images with the Want flag, so the distinction between good and defective products is not clear. However, in FIG. 9B, the cumulative histogram is generated without including the pass / fail judgment results for images with the Want flag, so the distinction between good and defective products is clear. Therefore, users can determine whether the inference model's judgment performance is sufficient by looking at the cumulative histogram.
[0082] (Effects of the embodiment) As explained above, users assign a "Must" flag to verification images that clearly indicate whether they are defective or good products, while assigning a "Want" flag to verification images that do not have a true correct answer. The inspection unit 13f inputs the images with the "Must" flag into the inference model to obtain a pass / fail judgment result, and also inputs the images with the "Want" flag into the inference model to obtain a pass / fail judgment result. Subsequently, the display device 4 can display the verification results for images with the "Must" flag and the verification results for images with the "Want" flag separately, so that the user can understand the pass / fail judgment performance of the inference model when images without a true correct answer are excluded. This makes it easy for the user to determine whether the inference model is already performing sufficiently well, or whether further trial and error in adjusting the inference model is still necessary.
[0083] The embodiments described above are merely illustrative in all respects and should not be interpreted restrictively. Furthermore, any modifications or changes that fall within the equivalent scope of the claims are all within the scope of the present invention. [Industrial applicability]
[0084] As described above, the present invention can be used when inspecting the appearance of a workpiece. [Explanation of Symbols]
[0085] 1. Visual inspection device 4 Display device (display section) 13a processor 13b Memory 13c Display Control Unit 13d Learning Department 13e Input section 13F Inspection Department
Claims
1. An appearance inspection device that inputs a work image of a work to be inspected into a machine learning network and judges the quality of the work based on the input work image, A memory unit that stores the inference model after the learning process; an input unit that assigns a first flag indicating that a defective product or a non-defective product is a defective product or a non-defective product, respectively, to a defective product image or a non-defective product image for verification to verify the pass / fail judgment performance of the inference model; an inspection unit that inputs the defective product image or the non-defective product image for verification into the inference model to obtain a pass / fail judgment result; A display control unit that displays a verification result of the pass / fail judgment performance of the inference model on a display unit based on the pass / fail judgment result obtained by the inspection unit, the input unit is capable of accepting input of a second flag for an image for verification, the second flag being different from the first flag; The inspection unit is configured to input the image to which the second flag is assigned into the inference model to obtain a pass / fail judgment result, The display control unit is configured to display the verification results for the image to which the second flag has been assigned on the display unit separately from the verification results for the image to which the first flag has been assigned.
2. 2. The visual inspection apparatus according to claim 1, The display control unit is configured to display information regarding the number of correct answers in pass / fail judgments for images to which the first flag has been assigned, excluding verification results for images to which the second flag has been assigned.
3. 3. The visual inspection apparatus according to claim 1, the input unit is configured to be able to accept a selection of whether or not to exclude a quality determination result for an image to which the second flag has been assigned, The display control unit is configured to, when the input unit accepts a selection to exclude the pass / fail judgment results for the image to which the second flag has been assigned, exclude the verification results for the image to which the second flag has been assigned and display information regarding the number of correct answers for the pass / fail judgment results for the image to which the first flag has been assigned, and, when the input unit accepts a selection to not exclude the pass / fail judgment results for the image to which the second flag has been assigned, display information regarding the combined number of correct answers for the verification results for the image to which the second flag has been assigned and the pass / fail judgment results for the image to which the first flag has been assigned.
4. 4. The visual inspection apparatus according to claim 1, The display control unit causes the display unit to display a list of the plurality of images for verification; The input unit is an appearance inspection apparatus that accepts the assignment of the first flag or the second flag to an image selected from a plurality of images for verification displayed in a list on the display unit.
5. 5. The visual inspection apparatus according to claim 4, The display control unit selects an image to which neither the first flag nor the second flag is assigned from among the images for verification and displays it on the display unit.
6. 4. The visual inspection apparatus according to claim 1, The display control unit causes the display unit to display a list of the plurality of images for verification; The input unit is an appearance inspection device that accepts the assignment of the second flag to an image selected from a plurality of verification images listed on the display unit and to which the first flag has been assigned.
7. 7. The visual inspection apparatus according to claim 4, The display control unit of this visual inspection device selects from the verification images those images for which the inference model was unable to determine whether they were good or bad, and displays them on the display unit.
8. 8. The visual inspection apparatus according to claim 1, The appearance inspection device is configured such that the display control unit can generate a cumulative histogram based on the frequency of images determined to be good quality images and the frequency of images determined to be defective images, and display the cumulative histogram on the display unit.
9. 9. The visual inspection apparatus according to claim 8, The display control unit generates a user interface screen that allows the user to select whether or not to include the frequency of images to which the second flag has been assigned when generating the cumulative histogram, and displays the generated screen on the display unit; when including the frequency of images to which the second flag has been assigned is selected, the cumulative histogram is generated including the frequency of images to which the second flag has been assigned, and when not including the frequency of images to which the second flag has been assigned is selected, the cumulative histogram is generated without including the frequency of images to which the second flag has been assigned.
10. 10. The visual inspection apparatus according to claim 1, The visual inspection apparatus further includes a learning unit that inputs learning data into the machine learning network to allow it to learn and generate the inference model.
11. 11. The visual inspection apparatus according to claim 1, The input unit is capable of accepting input of a second flag to be assigned to a verification image that is less defective than the defective image to which the first flag is assigned.
12. 12. The visual inspection apparatus according to claim 1, The input unit is capable of accepting input of a second flag to be assigned to a verification image having a lower degree of quality than a non-defective image to which the first flag is assigned.
13. A visual inspection method for inputting a workpiece image of an inspection target workpiece into a machine learning network and determining whether the workpiece is good or bad based on the input workpiece image, A storage step of storing the inference model after the learning process; a first flag assigning step of assigning a first flag indicating that the image is a defective product or a non-defective product to a defective product image or a non-defective product image for verification to verify the pass / fail judgment performance of the inference model; a second flag assignment step of accepting an input of a second flag different from the first flag for the verification image; an inspection step of inputting the image to which the first flag has been assigned and the image to which the second flag has been assigned into the inference model to obtain a pass / fail judgment result; and displaying, on a display unit, a verification result for the image to which the second flag has been assigned, distinguished from a verification result for the image to which the first flag has been assigned.
