Learning model generation method, determination method, learning model generation program, determination program, determination device and visual inspection device
The learning model generation method addresses inaccuracies in existing systems by extracting and combining normal and abnormal feature amounts, enhancing the precision of product classification in appearance inspection.
Patent Information
- Application Number
- JP2023021919
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-02-15
- Publication Date
- 2024-08-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing appearance inspection systems inaccurately determine normal products as defective due to slight deviations or inclinations of electronic components on circuit boards, leading to erroneous judgments.
A learning model generation method that extracts both normal and abnormal feature amounts from image data, using a teacher dataset to associate these features, and performs determination based on a weighted combination of distances between feature amounts.
Improves the accuracy of determining whether a product is normal or abnormal by considering both normal and abnormal feature distances, reducing false positives and enabling precise classification.
Smart Images

Figure 2024115977000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a learning model generation method, a judgment method, a learning model generation program, a judgment program, a judgment device, and an appearance inspection device, and is suitable for application to, for example, an appearance inspection device that inspects the appearance of industrial products. [Background technology]
[0002] Conventionally, a widely used appearance inspection device is installed in a manufacturing factory for industrial products such as electronic circuit boards, captures an image of the manufactured industrial product (hereinafter also referred to as the object) to obtain image data, and performs a judgment process based on the image data to judge whether the industrial product is normal (good) or abnormal (defective).
[0003] In this judgment process, for example, based on the difference between the feature amount extracted from the obtained image data and the feature amount extracted from the image data of a non-defective product, it is possible to judge the presence or absence of defects such as the presence or absence of chip components on a circuit board, misalignment of mounting positions, etc. Also, as an appearance inspection device, a device has been proposed that aims to improve judgment accuracy by generating multiple filter image data with different colors such as red, green, and blue based on the obtained image data and using one that satisfies conditions such as the highest contrast (for example, see Patent Document 1). [Prior art documents] [Patent documents]
[0004] [Patent Document 1] JP 2012-7952 A (Fig. 3, etc.) Summary of the Invention [Problem to be solved by the invention]
[0005] In the above-mentioned judgment process, for example, normal features may be extracted from image data of a product that has been determined to be normal (good), and a learning model may be generated by performing a learning process using the good features.
[0006] However, for example, in an electronic circuit board where electronic components are mounted with a slight deviation or inclination from the normal position on the circuit board, even if there is no problem as a product and the electronic circuit functions normally, there may be a certain degree of difference between the feature amount extracted from the image data and the normal feature amount. In such a case, the above-mentioned judgment process may erroneously judge the electronic circuit board as defective even though the product is normal.
[0007] The present invention has been made in consideration of the above points, and aims to propose a learning model generation method, a judgment method, a learning model generation program, a judgment program, a judgment device, and an appearance inspection device that can improve the accuracy of judgments regarding objects. [Means for solving the problem]
[0008] In order to solve such problems, the learning model generation method of the present invention is a learning model generation method that, when data related to an object is input, generates a learning model that outputs features extracted from the data, and includes an acquisition step of acquiring first data obtained from an object belonging to a first classification and acquiring second data obtained from an object belonging to a second classification different from the first classification, a feature extraction step of extracting the first feature based on the first data and extracting the second feature based on the second data, and a learning step of performing a learning process for the learning model using a teacher dataset in which information representing the first classification and the first feature are associated, and information representing the second classification and the second feature are associated.
[0009] In addition, the determination method of the present invention includes an acquisition step of acquiring data obtained from an object, a feature extraction step of extracting features from the data, a first feature extracted from first data acquired in advance from an object belonging to a first classification, a second feature extracted from second data acquired in advance from an object belonging to a second classification different from the first classification, and a determination step of determining whether the object belongs to the first classification or the second classification based on the features.
[0010] Furthermore, in the learning model generation program of the present invention, when data related to an object is input to an information processing device, the learning model generation program generates a learning model that outputs features extracted from the data, and is configured to execute an acquisition step of acquiring first data obtained from an object belonging to a first classification and acquiring second data from an object belonging to a second classification different from the first classification, a feature extraction step of using the learning model to extract the first feature based on the first data and extract the second feature based on the second data, and a learning step of performing a learning process for the learning model using a teacher dataset in which information representing the first classification and the first feature are associated, and information representing the second classification and the second feature are associated.
[0011] Furthermore, in the judgment program of the present invention, the information processing device is configured to execute an acquisition step of acquiring data obtained from an object, a feature extraction step of extracting features from the data, and a judgment step of judging whether the object belongs to the first classification or the second classification based on a first feature extracted from first data acquired in advance from an object belonging to a first classification and a second feature extracted from second data acquired in advance from an object belonging to a second classification different from the first classification.
[0012] Furthermore, the judgment device of the present invention is provided with an acquisition unit that acquires data obtained from the object, a feature extraction unit that extracts features based on the data, a first feature extracted by the feature extraction unit based on first data obtained in advance from an object belonging to a first classification, a second feature extracted by the feature extraction unit based on second data obtained in advance from an object belonging to a second classification different from the first classification, and a judgment unit that judges whether the object belongs to the first classification or the second classification based on the features.
[0013] Furthermore, the visual inspection device of the present invention is provided with an imaging unit that images an object to generate image data representing the object, an acquisition unit that acquires image data, a feature extraction unit that extracts features based on the image data, normal features extracted in advance by the feature extraction unit based on normal image data acquired from an object previously classified as normal, abnormal features extracted in advance by the feature extraction unit based on abnormal image data acquired from an object previously classified as abnormal, a judgment unit that judges whether the object is normal or abnormal based on the features, and an output unit that outputs the result of the judgment.
[0014] The present invention can generate two types of features, namely, a first feature (normal feature) and a second feature (abnormal feature), using a learning model. Therefore, by performing a determination process using these two types of features, the present invention can determine whether an object belongs to the first class or the second class with higher accuracy than when performing a determination process using only one type of feature. Effect of the Invention
[0015] According to the present invention, it is possible to realize a learning model generation method, a judgment method, a learning model generation program, a judgment program, a judgment device, and an appearance inspection device that can improve the accuracy of judgment regarding an object. [Brief description of the drawings]
[0016] [Figure 1] FIG. 2 is a schematic block diagram showing a hardware configuration of the appearance inspection device. [Diagram 2] 1 is a schematic diagram showing a state in which a chip component is mounted on a circuit board; [Diagram 3] 1 is a schematic diagram showing a state in which a defect occurs in a circuit board; [Figure 4] 11 is a schematic diagram illustrating an example of image data acquired from a circuit board. [Diagram 5] FIG. 2 is a schematic diagram showing a functional block configuration according to the first embodiment. [Figure 6] 4 is a flowchart showing a learning process procedure according to the first embodiment. [Figure 7] 1 is a flowchart showing a procedure of a determination process according to the first embodiment. [Figure 8] 11A and 11B are schematic diagrams showing frequency distribution graphs of the degree of abnormality when a frequency filter is not applied and when a frequency filter is applied. [Figure 9] 11 is a schematic diagram showing normal determination rates in the cases where a frequency filter is not applied and where a frequency filter is applied; [Figure 10] FIG. 13 is a schematic diagram showing a functional block configuration according to a second embodiment. [Figure 11] 13 is a flowchart showing a normal learning process procedure according to the second embodiment. [Figure 12] 13 is a flowchart showing an abnormality learning process according to the second embodiment. [Figure 13] 13 is a flowchart showing a procedure of a determination process according to the second embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0017] Hereinafter, modes for carrying out the invention (hereinafter referred to as embodiments) will be described with reference to the drawings.
[0018] 1. First embodiment [1-1. Configuration of visual inspection equipment] The appearance inspection device 1 according to the first embodiment is installed in, for example, a manufacturing factory where electronic components are mounted on a circuit board, and performs a judgment process to judge whether the circuit board on which the electronic components are mounted is a pass or fail, as an inspection target. In this manufacturing factory, a mounting process is performed to mount surface mount components (so-called chip components) such as minute chip-shaped resistors and capacitors, for example, by performing a reflow process on the circuit board. Hereinafter, the circuit board on which the electronic components are mounted is also referred to as the target.
[0019] As shown in a schematic block diagram in FIG. 1, an appearance inspection device 1 serving as a judgment device is configured as an information processing device centered around a control unit 2, to which a memory unit 3 and a communication unit 4 are connected, and which are further connected to a display unit 5, an operation unit 6, and an imaging unit 7.
[0020] The control unit 2 has a CPU (Central Processing Unit) 11 that performs various arithmetic processing, a ROM (Read Only Memory) 12 in which various information is stored in advance, and a RAM (Random Access Memory) 13 that temporarily stores various information, etc. The control unit 2 performs various processes by using the CPU 11 to execute various programs read from the ROM 12, the storage unit 3, etc. while using the RAM 13 as a work area.
[0021] The storage unit 3 is a non-volatile storage medium such as an SSD (Solid State Drive) or an HDD (Hard Disk Drive), and stores various programs, various information, etc. The communication unit 4 has an interface for a wired LAN (Local Area Network) conforming to a standard such as IEEE (Institute of Electrical and Electronics Engineers) 802.3 (IEEE802.3u / ab / an / ae). The communication unit 4 is connected to a network (not shown), and transmits and receives various information to and from other devices installed in the manufacturing plant and external server devices, etc., via the network.
[0022] The display unit 5 as an output unit is a display device such as a liquid crystal panel or an organic EL (Electro Luminescence) panel, and displays various information under the control of the control unit 2. The operation unit 6 is, for example, a touch sensor or a pressable operation button provided on the surface of the liquid crystal panel constituting the display unit 5, and receives operation instructions from a user who uses the appearance inspection apparatus 1.
[0023] The imaging unit 7 has, for example, a lens for collecting light and an imaging element for converting light into an electrical signal. The imaging unit 7 is installed in a location where it can capture a good image of an object, for example, near a belt conveyor on which a circuit board (object) on which electronic components are mounted is transported in a manufacturing factory. The imaging unit 7 captures a multidimensional image including the object using light obtained from an imaging range centered on the optical axis of the lens under the control of the control unit 2, generates image data, and supplies the image data to the control unit 2. In response to this, the control unit 2 stores the supplied image data in the storage unit 3. In this embodiment, a three-dimensional image represented by brightness, saturation, and hue is captured to generate three-dimensional image data, but two-dimensional image data of only brightness and saturation may be used as a multidimensional image, or image data may be generated based on a stereoscopic image as a multidimensional image.
[0024] [1-2. Basic principles of judgment processing] Next, we will explain the basic principle of the judgment process for judging whether an object is normal (good) or abnormal (defective) in the visual inspection device 1. On the circuit board on which the chip component is mounted, an ideal mounting location for the chip component is set in advance, and electrodes are provided according to the shape, etc., of the chip component.
[0025] For example, Fig. 2(A), (B) and (C) respectively show a schematic diagram of only the circuit board 100, only the chip component 110 and the circuit board 100 on which the chip component 110 is normally mounted. The circuit board 100 shown in Fig. 2(A) has electrodes 101 formed at two locations on the front surface (the front side of the paper), and a virtual mounting area 102 (shown by a dashed line in the figure) is set. The chip component 110 shown in Fig. 2(B) is formed in a tiny rectangular parallelepiped shape and has two electrode portions 111. The surface of the chip component 110 that faces the circuit board 100 when it is mounted on the circuit board 100, i.e., the surface on the back side of the paper in the figure, is called a mounting surface 110S.
[0026] 2(C) shows a circuit board 100 in which a chip component 110 is appropriately mounted in a mounting area 102, and solder 120 is attached so as to extend across each electrode portion 111 of the chip component 110 and each electrode 101 of the circuit board 100. The solder 120 is melted at a predetermined high temperature in, for example, a reflow process and then solidified, thereby physically fixing and electrically connecting the electrode portion 111 of the chip component 110 to the electrode 101 of the circuit board 100. The mounting surface 110S of the chip component 110 faces the surface of the circuit board 100 and is in contact with or in close contact with the surface.
[0027] 3A, 3B, and 3C are examples of a state in which the chip component 110 is not properly mounted on the circuit board 100, and each diagrammatically shows a state that is determined to be defective. FIG. 3A shows a state in which the chip component 110 is not mounted on the circuit board 100, which is called "missing". FIG. 3B shows a state in which the chip component 110 is mounted on the circuit board 100, but its position, inclination, etc. are significantly deviated from the mounting area 102 (FIG. 2A), which is called "misalignment". FIG. 3C shows a state in which the chip component 110 is mounted in a proper position on the circuit board 100, but the amount of attached solder 120 is insufficient, which is called "insufficient solder".
[0028] 4(A) and (B) shown below show a partial area of image data obtained by imaging the circuit board 100 with the imaging unit 7 (FIG. 1). Of these, FIG. 4(A) is an image obtained by imaging the circuit board 100 in a state where the chip component 110 is properly mounted on the circuit board 100 and is determined to be a non-defective product, similar to the case shown in FIG. 2(C).
[0029] 4(B) is an image capturing one type of defect called "chip standing." This shows a state in which the mounting surface 110S of the chip component 110 is separated from the surface of the circuit board 100 and is nearly vertical, that is, the chip component 110 stands upright relative to the circuit board 100. At this time, one electrode portion 111 of the chip component 110 is fixed to one electrode 101 of the circuit board 100 by solder 120.
[0030] In this way, various types of defects may occur on the circuit board 100 after the mounting process of the chip components 110 has been completed. Therefore, the appearance inspection device 1 needs to appropriately determine the presence or absence of various types of expected defects on the circuit board 100.
[0031] Therefore, in this embodiment, a learning model is constructed to extract feature values based on image data of a circuit board (hereinafter referred to as the object) to be judged, and this model is used. Specifically, in this embodiment, in the learning process at the previous stage, feature values are extracted from the image data using this learning model. Next, in the judgment process at the subsequent stage, the presence or absence of a defect in the object is judged based on the difference (i.e., distance) between the feature values obtained from the image data of the object using this learning model and the feature values obtained in the learning process.
[0032] Furthermore, in this embodiment, when performing the learning process of the learning model, in addition to image data obtained from circuit boards that are known to be normal, the learning process is also performed on image data obtained from circuit boards that are known to be defective.
[0033] Incidentally, whether a circuit board is good (normal) or bad (abnormal) can also be considered as a classification attribute according to a classification criterion such as "mounting state of chip components." Therefore, hereinafter, a good (normal) product will also be called the first classification, and an abnormal (defective) product will also be called the second classification.
[0034] [1-3. Visual inspection processing] Next, the appearance inspection process in the appearance inspection device 1 will be described. In the appearance inspection process in the appearance inspection device 1, as described above, machine learning processing is performed on feature quantities obtained from image data, with a learning process in the front stage and a judgment process in the rear stage. Furthermore, the control unit 2 of the appearance inspection device 1 is configured to form a plurality of functional blocks therein when performing the learning process and the judgment process. Below, the configuration of the functional blocks, the learning process in the front stage, and the judgment process in the rear stage will each be described in detail.
[0035] It is also assumed here that a circuit board (i.e., an object) on which electronic components are mounted in a manufacturing factory is imaged in advance by the imaging unit 7 (FIG. 1) of the visual inspection device 1, and the generated image data is stored in the storage unit 3. This image data includes normal image data and abnormal image data for learning that are used in the learning process, and judgment image data that is used in the judgment process.
[0036] Among these, the normal image data for learning is image data obtained from an object (a non-defective product) that has been found to be normal in advance, has attribute information indicating that the object is normal, and is used in the learning process. Hereinafter, this normal image data for learning is also referred to as normal data for learning or first data. Meanwhile, the abnormal image data for learning is image data obtained from an object (a defective product) that has been found to have an abnormality in advance, has attribute information indicating that the object is abnormal, and is used in the learning process. Hereinafter, this abnormal image data for learning is also referred to as abnormal data for learning or second data.
[0037] The image data for judgment is image data obtained from an object that is to be inspected because electronic components have been mounted on a circuit board in a manufacturing factory but the presence or absence of defects has not been confirmed. Hereinafter, this image data for judgment is also referred to as judgment data or data. This image data for judgment is provided with information that indicates a correspondence relationship with the object, such as a serial number assigned to the circuit board, which is the object, or a manufacturing date and time.
[0038] [1-3-1. Functional block configuration] Next, the configuration of the functional blocks will be described. The control unit 2 (FIG. 1) of the visual inspection device 1 reads out and executes a learning processing program or a judgment processing program pre-stored in the storage unit 3, thereby forming each functional block as shown in FIG. 5. Specifically, the control unit 2 forms an acquisition unit 21, a feature amount processing unit 22, an abnormality degree calculation unit 23, and a judgment unit 24, and further forms a feature amount extraction unit 27 and a feature amount management unit 28 within the feature amount processing unit 22.
[0039] The memory unit 3 is also formed with a data storage unit 31, a normal feature storage unit 32, and an abnormal feature storage unit 33. The data storage unit 31 stores learning normal image data, learning abnormal image data, and judgment image data together with their respective attribute information. The normal feature storage unit 32 and the abnormal feature storage unit 33 are both provided within the feature processing unit 22, and store normal feature values extracted from learning normal image data and abnormal feature values extracted from learning abnormal image data (described in detail later), respectively.
[0040] The acquisition unit 21 reads out one or more image data (learning normal image data, learning abnormal image data, or judgment image data) from the data storage unit 31, and supplies it to the feature extraction unit 27 of the feature processing unit 22. Furthermore, in the learning process, the acquisition unit 21 reads out classification information (either normal or abnormal) from the attribute information of the image data (learning normal image data or learning abnormal image data), and supplies this to the feature management unit 28. Incidentally, the acquisition unit 21 can also selectively read out learning normal image data, learning abnormal image data, or judgment image data while referring to the attribute information of each image data.
[0041] The feature amount processing unit 22 corresponds to a learning model in machine learning processing (also simply referred to as learning processing). The feature amount extraction unit 27 extracts features from image data (learning normal image data, learning abnormal image data, or judgment image data) as an extraction process, and supplies the features to the feature amount management unit 28 or the abnormality degree calculation unit 23. Specifically, the feature amount extraction unit 27 is configured as, for example, a neural network, and uses a weight parameter learned using a public data set or the like. The feature amount extraction unit 27 can also appropriately hold machine learning parameters and the like by appropriately using the RAM 13 or the storage unit 3 (FIG. 1) as necessary. In addition, in these learning processes, a teacher data set in which image data and features are associated with each other is used.
[0042] In the learning process, the feature amount management unit 28 appropriately classifies and stores the feature amount based on the feature amount supplied from the feature amount extraction unit 27 and the classification information supplied from the acquisition unit 21. Specifically, if the classification information is normal, the feature amount management unit 28 stores the feature amount as a normal feature amount in the normal feature amount storage unit 32, and if the classification information is abnormal, the feature amount management unit 28 stores the feature amount as an abnormal feature amount in the abnormal feature amount storage unit 33. Therefore, the feature amount processing unit 22 can be considered to have two types of learning models, such as a learning model that outputs a normal feature amount when normal image data for learning is input, and a learning model that outputs an abnormal feature amount when abnormal image data for learning is input. In addition, in the judgment process, the feature amount management unit 28 reads out the normal feature amount from the normal feature amount storage unit 32 and the abnormal feature amount from the abnormal feature amount storage unit 33, and supplies these to the abnormality degree calculation unit 23.
[0043] In the judgment process, the abnormality degree calculation unit 23, which serves as an evaluation value calculation unit, calculates a degree of abnormality (hereinafter also referred to as an evaluation value) that numerically represents the degree of abnormality in the judgment image data based on the features (hereinafter referred to as judgment features) supplied from the feature extraction unit 27 and the normal features and abnormal features supplied from the feature management unit 28, and supplies this to the judgment unit 24.
[0044] Specifically, the abnormality degree calculation unit 23 first calculates a normal distance DN (hereinafter also referred to as a first distance) representing the distance (i.e., the magnitude of difference) between the judgment feature and the normal feature, and an abnormal distance DA (hereinafter also referred to as a second distance) representing the distance between the judgment feature and the abnormal feature. At this time, the abnormality degree calculation unit 23 calculates the distance (difference) between the features in the multidimensional space by, for example, a nearest neighbor method using Euclidean distance or an arithmetic process using Mahalanobis distance.
[0045] Next, the abnormality degree calculation unit 23 calculates the abnormality degree (hereinafter also referred to as an evaluation value) by multiplying the normal distance DN and the abnormal distance DA by a predetermined coefficient and adding them, that is, performing weighted addition. Specifically, the abnormality degree calculation unit 23 uses a preset coefficient λ (for example, 0≦λ≦1) to calculate the abnormality degree S by the following formula (1). Incidentally, in formula (1), the abnormal distance DA multiplied by the coefficient λ is subtracted from the normal distance DN, which is synonymous with multiplying the normal distance DN by the weighting coefficient "1" and multiplying the abnormal distance DA by a negative weighting coefficient and adding them, that is, performing a weighted addition calculation process.
[0046] S = DN - λ DA ……(1)
[0047] As can be seen from formula (1), the smaller the normal distance DN, i.e., the closer the judgment feature is to the normal feature, the smaller the value of the degree of abnormality S. Also, the larger the abnormal distance DA, i.e., the farther the judgment feature is from the abnormal feature, the smaller the value of the degree of abnormality S. From this relationship, if the value of the degree of abnormality S is relatively small, it means that there is a high possibility that the object is a good product (normal). On the other hand, if the value of the degree of abnormality S is relatively large, it means that there is a high possibility that the object is defective (abnormal).
[0048] In the judgment process, the judgment unit 24 compares the degree of abnormality supplied from the abnormality degree calculation unit 23 with a predetermined threshold value to determine the judgment result. Specifically, the judgment unit 24 determines the judgment result as "normal" if the degree of abnormality is less than the threshold value, and determines the judgment result as "abnormal" if the degree of abnormality is equal to or greater than the threshold value. In other words, the judgment unit 24 classifies the degree of abnormality according to the comparison result with the threshold value. For this reason, hereinafter, the judgment process is also referred to as a classification process, and the judgment result is also referred to as a classification result.
[0049] [1-3-2. Learning process] Next, the learning process will be described. When performing the learning process, the control unit 2 (FIG. 1) of the visual inspection device 1 reads out and executes a predetermined learning process program from the storage unit 3. At this time, the control unit 2 performs a predetermined initialization process and the like, forms each of the functional blocks shown in FIG. 5, and then starts the learning process procedure RT1 shown in FIG. 6 and proceeds to the first step SP11.
[0050] In step SP11 (acquisition step), the control unit 2 acquires one or more pieces of learning image data (learning normal image data or learning abnormal image data) from the data storage unit 31 using the acquisition unit 21, acquires attribute information assigned to the learning image data, and proceeds to the next step SP12. At this time, the acquisition unit 21 supplies the acquired learning image data (hereinafter referred to as target learning image data) to the feature extraction unit 27, and supplies classification information (normal or abnormal) of the acquired attribute information to the feature management unit 28.
[0051] In step SP12 (feature amount extraction step), the control unit 2 causes the feature amount extraction unit 27 to extract feature amounts from the target learning image data, supplies the feature amount to the feature amount management unit 28, and proceeds to the next step SP13.
[0052] In step SP13 (learning step), the control unit 2 judges whether the attribute information supplied from the acquisition unit 21 is normal. If a positive result is obtained here, the control unit 2 proceeds to the next step SP14 (learning step), where the feature amount management unit 28 stores the feature amount supplied from the feature amount extraction unit 27 as a normal feature amount in the normal feature amount storage unit 32, and proceeds to the next step SP16. On the other hand, if a negative result is obtained in step SP13, the control unit 2 proceeds to the next step SP15 (learning step), where the feature amount management unit 28 stores the feature amount supplied from the feature amount extraction unit 27 as an abnormal feature amount in the abnormal feature amount storage unit 33, and proceeds to the next step SP16.
[0053] In step SP16, the control unit 2 determines whether a predetermined learning end condition is met. The learning end condition is preset, for example, "processing 100 pieces of learning image data" or "processing all learning image data stored in the data storage unit 31". If a negative result is obtained in step SP16, the control unit 2 returns to step SP11 again to repeatedly execute the series of processes for the next learning image data. On the other hand, if a positive result is obtained in step SP16, the control unit 2 proceeds to the next step SP17 and ends the learning process procedure RT1.
[0054] [1-3-3. Judgment process] Next, the judgment process will be described. When the judgment process is performed, the control unit 2 reads out a predetermined judgment process program from the storage unit 3 and executes it. At this time, the control unit 2 performs a predetermined initialization process and the like, as in the case of the learning process, and forms each of the functional blocks shown in Fig. 5, and then starts the judgment process procedure RT2 shown in Fig. 7 corresponding to Fig. 6, and proceeds to the first step SP21.
[0055] In step SP21 (acquisition step and post-acquisition step), the control unit 2 acquires one or more pieces of judgment image data (hereinafter also referred to as post-acquisition data) from the data storage unit 31 by the acquisition unit 21 (FIG. 7), and acquires attribute information associated with the judgment image data, and proceeds to the next step SP22. At this time, the acquisition unit 21 supplies the acquired judgment image data (hereinafter referred to as target judgment image data) to the feature extraction unit 27.
[0056] In step SP22 (feature extraction step and post-event feature extraction step), the control unit 2 causes the feature extraction unit 27 to extract features from the object determination image data and supplies these features to the abnormality degree calculation unit 23 as determination features, and then proceeds to the next step SP23.
[0057] In step SP23 (distance calculation step), the control unit 2 first causes the feature management unit 28 to read out the normal feature from the normal feature storage unit 32 and the abnormal feature from the abnormal feature storage unit 33, and supplies the normal feature and the abnormal feature to the abnormality degree calculation unit 23. Next, the control unit 2 causes the abnormality degree calculation unit 23 to calculate a normal distance DN which is the distance (magnitude of difference) between the normal feature and the judgment feature, and calculates an abnormal distance DA which is the distance (magnitude of difference) between the abnormal feature and the judgment feature, and proceeds to the next step SP24.
[0058] In step SP24, the control unit 2 continues to cause the abnormality degree calculation unit 23 to calculate the abnormality degree S, which is the weighted sum of the normal distance DN and the abnormal distance DA, according to the above-mentioned equation (1), and supplies this to the judgment unit 24, before proceeding to the next step SP25.
[0059] As a result, for example, if the judgment image data is similar to the learning normal image data but not similar to the learning abnormal image data, the difference between the judgment feature amount and the normal feature amount is relatively small, and the difference between the judgment feature amount and the abnormal feature amount is relatively large, the value of the degree of abnormality S will be relatively small. This means that the object is highly likely to be "normal". On the other hand, for example, if the judgment image data is not very similar to the learning normal image data but similar to the learning abnormal image data, the difference between the judgment feature amount and the normal feature amount is relatively large, and the difference between the judgment feature amount and the abnormal feature amount is relatively small, the value of the degree of abnormality will be relatively large. This means that the judgment item of the object is highly likely to be "abnormal".
[0060] In step SP25 (judgment step), the control unit 2 first causes the judgment unit 24 to compare the degree of abnormality S with a threshold value and determine a judgment result. At this time, the judgment unit 24 judges the result to be "normal" if the degree of abnormality is less than the threshold value, and judges the result to be "abnormal" if the degree of abnormality is equal to or greater than the threshold value. Next, the control unit 2 causes the display unit 5 (FIG. 1) to display a judgment result display screen showing the obtained comparison result, and then proceeds to the next step SP26. This judgment result display screen displays, for example, characters and figures showing the judgment result, as well as information such as the serial number of the circuit board. Furthermore, for example, if the judgment result is "abnormal", the judgment result display screen can also read out judgment image data from the data storage unit 31 and display the image on the judgment result display screen.
[0061] In step SP26, the control unit 2 judges whether a predetermined judgment end condition is satisfied. The learning end condition is preset, for example, "processing 100 pieces of judgment image data", "processing all judgment image data stored in the data storage unit 31", or "completion of mounting process for mounting electronic components on a circuit board". If a negative result is obtained here, the control unit 2 returns to step SP21 again to repeatedly execute the series of processes for the next judgment image data. On the other hand, if a positive result is obtained in step SP26, the control unit 2 proceeds to the next step SP27 and ends the judgment process procedure RT2.
[0062] [1-4. Effects, etc.] In the above configuration, in the learning process, the appearance inspection device 1 according to the first embodiment stores normal features extracted from the learning normal image data in the normal feature storage unit 32, and stores abnormal features extracted from the learning abnormal image data in the abnormal feature storage unit 33. Thereafter, in the judgment process, the appearance inspection device 1 calculates judgment features from the judgment image data, calculates a normal distance DN which is the distance between the judgment features and the normal features, and an abnormal distance DA which is the distance between the judgment features and the abnormal features, and determines a judgment result by comparing the abnormality degree S which is a weighted sum of both, with a threshold value.
[0063] Therefore, the appearance inspection device 1 can calculate the degree of abnormality S that takes into account both the degree of similarity between the judgment image data and the normal image data and the degree of dissimilarity between the judgment image data and the abnormal image data. By using this degree of abnormality S, the appearance inspection device 1 can appropriately judge whether the judgment items are normal or abnormal, and can perform appearance inspection with extremely high accuracy.
[0064] Here, we introduce experimental examples in which abnormality features based on abnormal image data were used and not used. In this experimental example, the type of defect to be judged was a chip standing (Fig. 4(B)), and multiple image data were prepared for which the visual evaluation of the defect (i.e., "normal" or "abnormal") was known in advance. In this experimental example, the degree of abnormality S for each image data was calculated for both the case where only normal features were used and the case where both normal features and abnormal features were used, and statistical processing was then performed.
[0065] FIG. 8(A) is a graph showing the frequency distribution of the degree of abnormality S obtained from each image data when only normal features are used, unlike the present embodiment, where the horizontal axis represents the degree of abnormality S and the vertical axis represents the frequency (number of data). Incidentally, the degree of abnormality S in this case corresponds to the value calculated by setting the value of the coefficient λ in equation (1) to "0". Also, in FIG. 8(A), the patterns in the bar graph are different for cases where the visual evaluation is "normal" (indicated as "OK" in the figure) and cases where it is "abnormal" (indicated as "NG" in the figure).
[0066] 8(A), in the area where the degree of abnormality is slightly greater than 2.4, the degree of abnormality obtained from image data that was visually evaluated as "OK" (hereinafter referred to as "OK abnormality") is close to the degree of abnormality obtained from image data that was visually evaluated as "NG" (hereinafter referred to as "NG abnormality") This means that it is difficult to set an appropriate threshold value that can easily separate the OK abnormality degree from the NG abnormality degree, and erroneous judgment may occur if the threshold value cannot be set appropriately.
[0067] In general, in statistical processing, when data is normally distributed or similarly distributed, the percentage of the data that falls within a range of a certain multiple of the variance σ, with the data's average value AVR at the center, is sometimes used as a variety of indexes. For example, in a normal distribution, 99.7% of the data falls within a range of up to three times the variance σ (so-called 3σ), with the average value AVR at the center.
[0068] Therefore, in this experimental example, the average value AVR and the variance σ were calculated for the NG abnormality level obtained when only the normal feature was used, and a threshold value TH3 that was 3σ away from the average value AVR toward the OK abnormality level and a threshold value TH6 that was 6σ away from the average value AVR were set. In these cases, as shown in FIG. 9, the rate at which the OK abnormality level was less than the threshold, that is, the rate at which normal objects were judged to be normal (hereinafter referred to as the normal judgment rate), was 0.995 and 0.969, respectively. This means that when only the normal feature was used, the remaining 0.005 (i.e., 0.5%) or 0.031 (i.e., 3.1%) was judged to be "abnormal" even though it was actually "normal", that is, erroneous judgment occurred. In other words, when only the normal feature was used, it was not necessarily easy to set an appropriate threshold value that could suppress erroneous judgment.
[0069] On the other hand, Fig. 8(B), which corresponds to Fig. 8(A), is a graph showing the frequency distribution of the degree of abnormality S obtained from each image data when both normal feature values and abnormal feature values are used, as in the present embodiment. Incidentally, in Fig. 8(B), the range of the value of the degree of abnormality S is slightly different from that in Fig. 8(A) because subtraction is performed in formula (1).
[0070] In Fig. 8(B), the OK abnormality degree is distributed in a range of approximately -0.5 or less, while the NG abnormality degree is distributed in a range of approximately 0.0 or more, and the two distributions are relatively far apart compared to Fig. 8(A). This means that it is relatively easy to set an appropriate threshold value that can easily separate the OK abnormality degree from the NG abnormality degree, and that by setting the appropriate threshold value, erroneous judgment can be easily prevented.
[0071] For the NG abnormality degree obtained when both the normal feature amount and the abnormal feature amount were used, the average value AVR and the variance σ were calculated, and a threshold value TH3 that was 3σ away from the average value AVR and a threshold value TH6 that was 6σ away from the average value AVR were set. In these cases, as shown in Fig. 9, the rate at which the OK abnormality degree was less than the threshold value (normal determination rate) was 1.000 or 0.993. This means that misjudgment does not occur or is extremely reduced by simply setting the value calculated statistically in this way as the threshold value.
[0072] In this manner, in this embodiment, the abnormal feature is used in addition to the normal feature to calculate the degree of abnormality S based on the distance from the judgment feature, so that it is extremely easy to set an appropriate threshold value that can suppress erroneous judgment.
[0073] According to the above configuration, the appearance inspection device 1 according to the first embodiment extracts normal features from the learning normal image data and abnormal features from the learning abnormal image data, calculates the degree of abnormality S using the normal distance DN and abnormal distance DA, which are the distances between the respective features and the judgment features extracted from the judgment image data, and determines the judgment result based on this. In this way, the appearance inspection device 1 can calculate the degree of abnormality S taking into account both the degree of similarity between the judgment image data and the normal image data and the degree of dissimilarity between the judgment image data and the abnormal image data, and can obtain a highly accurate judgment result using this degree of abnormality S.
[0074] 2. Second embodiment An appearance inspection apparatus 201 (FIG. 1) according to the second embodiment differs from the appearance inspection apparatus 1 according to the first embodiment in that it has a control unit 202 and a memory unit 203 instead of the control unit 2 and the memory unit 3, but is otherwise configured similarly. The control unit 202 has a CPU 11, ROM 12, RAM 13, etc., like the first embodiment, but by reading and executing various programs from the memory unit 203, it forms functional blocks that are partially different from those of the first embodiment, as shown in FIG. 10, which corresponds to FIG. 5.
[0075] Specifically, the control unit 202 differs from the first embodiment in that it has a feature amount processing unit 222 and an abnormality degree calculation unit 223 instead of the feature amount processing unit 22 and the abnormality degree calculation unit 23, but is otherwise configured similarly. Compared to the feature amount processing unit 22, the feature amount processing unit 222 has a feature amount extraction unit 227 and a feature amount management unit 228 instead of the feature amount extraction unit 27 and the feature amount management unit 28, and also has a feature amount update unit 229.
[0076] The storage unit 203, like the storage unit 3 according to the first embodiment, is a non-volatile storage medium such as an SSD or HDD, and stores various programs, various information, etc. This storage unit 203 has the same data storage unit 31 and abnormal feature storage unit 33 as in the first embodiment, but omits the normal feature storage unit 32.
[0077] In the appearance inspection device 201, in the appearance inspection process, for feature quantities obtained from image data, machine learning processing is performed by a learning process in the front stage and a judgment process in the back stage, as in the first embodiment. Furthermore, the control unit 202 of the appearance inspection device 201 is configured to execute a normal learning process based on normal image data for learning in the front stage of the learning process, and then execute an abnormal learning process based on abnormal image data for learning.
[0078] Although the feature amount processing unit 222 corresponds to a machine learning model in machine learning processing, unlike the feature amount processing unit 22, it is configured as an autoencoder (autoencoder) that is widely used in processing such as anomaly detection using a neural network. That is, when learning the feature amount of a non-defective product in normal learning processing, the feature amount processing unit 222 learns the value of a weight parameter so that the feature amount approaches the initial feature amount when the number of dimensions is reduced once and then restored to the original number of dimensions. Incidentally, in the feature amount processing unit 222, a plurality of machine learning models corresponding to each judgment item are configured. In addition, the parameters of each machine learning model are appropriately stored in the RAM 13 or the storage unit 203 (FIG. 1).
[0079] The feature extraction unit 227 has a plurality of parameters (also called weight parameters) of a machine learning model. The feature extraction unit 227 uses the machine learning model to extract features from the image data (learning normal image data, learning abnormal image data, or judgment image data) supplied from the acquisition unit 21, and supplies the features to the feature management unit 228, the feature update unit 229, or the abnormality degree calculation unit 223.
[0080] In the normal learning process, the feature amount updating unit 229 calculates an update amount of the parameter based on the feature amount supplied from the feature amount extraction unit 227, and supplies the calculated update amount to the feature amount extraction unit 227. In response to this, the feature amount extraction unit 227 updates the value of the parameter using the supplied update amount.
[0081] In the anomaly learning process, when an abnormality feature is supplied from the feature extraction unit 227, the feature management unit 228 stores the abnormality feature in the abnormality feature storage unit 33. In addition, in the determination process, the feature management unit 228 reads out the abnormality feature from the abnormality feature storage unit 33 and supplies it to the anomaly degree calculation unit 223.
[0082] In the judgment process, the anomaly calculation unit 223 calculates the degree of anomaly based on the judgment feature, which is a feature supplied from the feature extraction unit 227, and the anomaly feature supplied from the feature management unit 228. Specifically, the anomaly calculation unit 223 first calculates the normal distance DN based on the judgment feature. At this time, the anomaly calculation unit 223 can use a calculation method used in a general anomaly detection model in calculating the normal distance DN. For example, if the judgment feature supplied from the feature extraction unit 227 is the output of an autoencoder that reduces and restores the number of dimensions for input data, the anomaly calculation unit 223 calculates the difference between the input data and output data of the autoencoder, and sets the magnitude of this difference as the normal distance DN.
[0083] The abnormality degree calculation unit 223 also calculates an abnormality distance DA that indicates the distance (i.e., the magnitude of difference) between the determination feature and the abnormal feature, similarly to the first embodiment. Furthermore, the abnormality degree calculation unit 223 calculates the abnormality degree S by multiplying the normal distance DN and the abnormal distance DA by a predetermined coefficient, respectively, and adding them, specifically, by performing a calculation process according to equation (1), similarly to the first embodiment.
[0084] Next, the appearance inspection process in the appearance inspection device 201 will be divided into a normal learning process, an abnormality learning process, and a judgment process, and each process will be described in detail.
[0085] First, the normal learning process will be described. When performing normal learning process, the control unit 202 (FIG. 1) of the visual inspection device 201 reads out a predetermined normal learning process program from the storage unit 203 and executes it. At this time, the control unit 202 performs a predetermined initialization process and the like, forms each of the functional blocks shown in FIG. 10, starts a normal learning process procedure RT21 shown in FIG. 11, which partially corresponds to FIG. 6, and proceeds to the first step SP211.
[0086] In step SP211, the control unit 202 acquires one or more pieces of learning normal image data from the data storage unit 31 using the acquisition unit 21, and proceeds to the next step SP212. In step SP212, the control unit 202 causes the feature extraction unit 227 to extract features from the learning normal image data, supplies the features to the feature update unit 229, and proceeds to the next step SP213.
[0087] In step SP213, the control unit 202 causes the feature amount update unit 229 to update the parameters of the machine learning model based on the features supplied from the feature amount extraction unit 227. The control unit 202 also causes the feature amount update unit 229 to supply the updated parameters to the feature amount extraction unit 227, thereby updating the parameters of the feature amount extraction unit 227, and proceeds to the next step SP214.
[0088] In step SP214, the control unit 202 determines whether a predetermined termination condition is met, similarly to step SP16, and if a negative result is obtained, returns to step SP211 and repeats the series of processes for the next learning normal image data. On the other hand, if a positive result is obtained in step SP214, the control unit 202 proceeds to the next step SP215 and ends the normal learning processing procedure RT21.
[0089] Next, the abnormality learning process will be described. When the normal learning process is completed and the parameters of the feature extraction unit 227 are updated, the control unit 202 (FIG. 1) of the visual inspection device 201 starts the abnormality learning process. At this time, the control unit 202 reads out a predetermined abnormality learning process program from the storage unit 203 and executes it to perform a predetermined initialization process, etc., and then forms each of the functional blocks shown in FIG. 10. Then, the control unit 202 starts the abnormality learning process procedure RT22 shown in FIG. 12, which partially corresponds to FIG. 6 and FIG. 11, and proceeds to the first step SP221.
[0090] In step SP221, the control unit 202 acquires one or more learning abnormal image data from the data storage unit 31 using the acquisition unit 21, and proceeds to the next step SP222. In step SP222, the control unit 202 causes the feature extraction unit 227 to extract features from the learning abnormal image data, supplies the features to the feature management unit 228, and proceeds to the next step SP223. In step SP223, the control unit 202 causes the feature management unit 228 to store the features supplied from the feature extraction unit 227 as abnormal features in the abnormal feature storage unit 33, and proceeds to the next step SP224.
[0091] In step SP224, the control unit 202 determines whether or not a predetermined termination condition is satisfied, similarly to step SP16, and if a negative result is obtained, the control unit 202 returns to step SP221 and repeats the series of processes for the next learning abnormal image data. On the other hand, if a positive result is obtained in step SP224, the control unit 202 proceeds to the next step SP225 and ends the abnormality learning processing procedure RT22.
[0092] Next, the determination process will be described. When performing the determination process, the control unit 202 reads out a predetermined determination process program from the storage unit 203 and executes it. At this time, the control unit 202 performs a predetermined initialization process and the like, similar to the normal learning process and the abnormal learning process, and forms each of the functional blocks shown in Fig. 10, and then starts the determination process procedure RT23 shown in Fig. 13 corresponding to Fig. 7, and proceeds to the first step SP231.
[0093] In steps SP231 and SP232, the control unit 202 performs the same processes as in steps SP21 and SP22, respectively, to extract determination feature amounts from the determination image data, supplies them to the abnormality degree calculation unit 223, and proceeds to the next step SP233.
[0094] In step SP233, the control unit 202 causes the abnormality degree calculation unit 223 to calculate the normal distance DN and the abnormal distance DA based on the determination feature supplied from the feature extraction unit 227, and proceeds to the next step SP234. Specifically, as described above, the abnormality degree calculation unit 223 calculates the normal distance DN based on the difference between the input data and output data of the autoencoder, and also calculates the abnormal distance DA representing the distance between the determination feature and the abnormal feature.
[0095] In step SP234, the control unit 202 continues to calculate the degree of abnormality S based on the normal distance DN and the abnormal distance DA using the abnormality degree calculation unit 223, supplies this degree of abnormality S to the judgment unit 24, and proceeds to the next step SP235. At this time, the abnormality degree calculation unit 223 calculates the degree of abnormality S by subtracting the abnormal distance DA multiplied by a predetermined coefficient λ from the normal distance DN in accordance with equation (1), as in the first embodiment.
[0096] In step SP235, the control unit 202 causes the judgment unit 24 to compare the abnormality degree S supplied from the abnormality degree calculation unit 223 with a predetermined threshold value and determine a judgment result, similar to step SP25. Next, the control unit 202 causes the display unit 5 (FIG. 1) to display a judgment result display screen showing the obtained judgment result, similar to the first embodiment, and proceeds to the next step SP236.
[0097] In step SP236, the control unit 202 determines whether or not a predetermined end condition is satisfied, similarly to step SP26, and if a negative result is obtained, the control unit 202 returns to step SP231 and repeats the series of processes for the next determination image data. On the other hand, if a positive result is obtained in step SP236, the control unit 202 proceeds to the next step SP237 and ends the determination processing procedure RT23.
[0098] In the above configuration, the appearance inspection device 201 according to the second embodiment extracts features from the learning normal image data by a normal learning process to update the parameters of the machine learning model, and then extracts features from the learning abnormal image data by an abnormal learning process to store them in the abnormal feature storage unit 33. Thereafter, in the judgment process, the appearance inspection device 201 calculates judgment features from the judgment image data in the same manner as in the first embodiment, calculates a normal distance DN which is the distance between the judgment features and the normal features, and an abnormal distance DA which is the distance between the judgment features and the abnormal features, and determines a judgment result by comparing an abnormality degree S which is a weighted sum of both, with a threshold value.
[0099] Therefore, the appearance inspection device 201 can calculate the degree of abnormality S that takes into account both the degree of similarity between the judgment image data and the normal image data and the degree of dissimilarity between the judgment image data and the abnormal image data, similar to the first embodiment. By using this degree of abnormality S, the appearance inspection device 201 can appropriately judge whether something is normal or abnormal, similar to the first embodiment, and can perform appearance inspection with extremely high accuracy.
[0100] In other respects as well, the appearance inspection apparatus 201 according to the second embodiment can achieve the same effects as the appearance inspection apparatus 1 according to the first embodiment.
[0101] 3. Other embodiments In the above-mentioned first embodiment, a case has been described in which an object is judged to be normal or abnormal based on the degree of abnormality S calculated using two types of feature amounts, namely, a normal feature amount and an abnormal feature amount, based on image data acquired from an electronic circuit, that is, a case in which the object is classified into two types. However, the present invention is not limited to this, and an evaluation value such as the degree of abnormality S may be calculated using, for example, three or more types of feature amounts. The same applies to the second embodiment.
[0102] In the above-mentioned first embodiment, the determination unit 24 (FIG. 5) compares the degree of abnormality S supplied from the abnormality degree calculation unit 23 with a predetermined threshold value to determine whether the object is normal or abnormal, i.e., classifies the object into one of two types. However, the present invention is not limited to this, and for example, the object may be classified into three or more types based on the result of comparing the degree of abnormality S supplied from the abnormality degree calculation unit 23 with two or more threshold values. The same applies to the second embodiment.
[0103] Furthermore, in the above-mentioned first embodiment, in the formula (1) for calculating the degree of abnormality S, the coefficient of the normal distance DN is set to "1" and the coefficient of the abnormal distance DA is set to "-λ", and the normal distance DN and the abnormal distance DA are weighted and added together. However, the present invention is not limited to this, and a weighted sum of the normal distance DN and the abnormal distance DA may be calculated by multiplying each of them by an arbitrary coefficient, and this may be used as the degree of abnormality S. For example, the degree of abnormality S may be calculated based only on the abnormal distance DA by multiplying the normal distance DN by a coefficient of "0". The same applies to the second embodiment.
[0104] Furthermore, in the above-mentioned first embodiment, a form has been described in which feature amounts are extracted from normal image data for learning by normal learning processing to update the parameters of the machine learning model, and then feature amounts are extracted from abnormal image data for learning by abnormal learning processing to store in the abnormal feature amount storage unit 33. However, the present invention is not limited to this. For example, when the amount of abnormal feature amounts stored by updating increases, at least one of the coefficients of the normal distance DN and the abnormal distance DA may be changed according to the degree of learning, etc., as a coefficient value change step, such as gradually increasing the value of the coefficient λ. This is based on the fact that in many cases, the number of teacher data of defective board images that can be prepared at the time of generating the learning model is relatively small. For example, when generating a learning model, the effect of the variation in the feature amounts of defective board images learned using the teacher data can be suppressed by setting the value of the coefficient λ of the abnormal distance DA to a relatively small value at a stage where the number of defective data is small. After that, when the teacher data of defective board images is collected and increases to a certain number, the variation in the feature amounts in the defective board images becomes small, so that the accuracy of the judgment process can be improved without being affected by the variation by setting the value of the coefficient λ of the abnormal distance DA to a relatively large value. In addition, if the number of teacher data of non-defective board images is smaller than the number of teacher data of defective board images at the time of generating the learning model, the value of the coefficient of the normal distance DN can be set to a relatively small value. In other words, if the number of teacher data that can be prepared at the time of generating the learning model differs for each classification result, the value of the coefficient for the side with the smaller number of teacher data can be set to a small value. The same applies to the second embodiment.
[0105] Furthermore, in the above-mentioned first embodiment, the coefficients of equation (1) for calculating the degree of abnormality S are set to fixed values, and the degree of abnormality S is calculated using only equation (1). However, the present invention is not limited to this, and different values may be used depending on the type of abnormality to be determined, such as a missing electronic component on an electronic circuit board (FIG. 3(A)), misalignment (FIG. 3(B)), or insufficient solder (FIG. 3(C)). Similarly, the threshold value used in the determination unit 24 may also be set to different values depending on the type of abnormality to be determined. The same applies to the second embodiment.
[0106] Furthermore, in the above-mentioned first embodiment, the feature extraction unit 27 (FIG. 7) of the feature processing unit 22 is configured as a neural network, and a weight parameter learned using a public data set or the like is used. In the second embodiment, the feature processing unit 222 is configured as an autoencoder. However, the present invention is not limited to this, and the feature processing unit 22 or 223 may be provided with various functional blocks that can calculate the degree of anomaly based on the feature using various machine learning mechanisms, and arithmetic processing may be performed using these. That is, in the present invention, the degree of anomaly based on the feature can be calculated using various well-known machine learning methods, and the determination process can be performed using this degree of anomaly.
[0107] Furthermore, in the above-mentioned first embodiment, when performing the judgment process after the learning process, the feature amounts stored in the normal feature amount storage unit 32 and the abnormal feature amount storage unit 33 of the feature amount processing unit 22 are not updated, i.e., the learning model is not updated. However, the present invention is not limited to this. For example, in the judgment process after the learning process, when a feature amount is newly extracted based on judgment image data, the feature amount stored in the normal feature amount storage unit 32 or the abnormal feature amount storage unit 33 may be updated using the extracted feature amount in accordance with the judgment result as an update step. The same applies to the second embodiment.
[0108] Furthermore, in the above-mentioned first embodiment, the appearance inspection device 1 is provided with the imaging unit 7 (FIG. 1), and the image data captured by the imaging unit 7 is stored in the data storage unit 31. However, the present invention is not limited to this, and image data may be acquired from another device connected via the communication unit 4 and stored in the data storage unit 31. In this case, the other device may be, for example, a network camera having an imaging function similar to that of the imaging unit 7 or a communication function similar to that of the communication unit 4. In addition, the image data acquired from the other device may be associated with the judgment item information in advance by an external information processing device (not shown), or may be set by the user via the operation unit 6 (FIG. 1). In these cases, the imaging unit 7 may be omitted. The same applies to the second embodiment.
[0109] Furthermore, in the above-mentioned first embodiment, when a judgment result is obtained in the judgment process, a predetermined judgment screen display screen is displayed on the display unit 5 to inform the user of the judgment result. However, the present invention is not limited to this. For example, if the user has an information processing device having a communication function and a display function such as a smartphone or a tablet terminal, the information processing device may be configured to communicate information with the communication unit 4 (FIG. 1). In this case, information representing the judgment result may be transmitted from the communication unit 4 to the information processing device, and a predetermined screen representing the judgment result may be displayed on the information processing device. In this case, the display unit 5 and the operation unit 6 (FIG. 1) may be omitted from the appearance inspection device 1. The same applies to the second embodiment.
[0110] Furthermore, in the above-mentioned first embodiment, the image data obtained by imaging an object by the imaging unit 7 is processed, and feature values are extracted from the image data. However, the present invention is not limited to this. For example, the processing target may be multidimensional data representing various physical quantities obtained from various objects by various acquisition methods, such as acoustic data collected during a tapping test to inspect the internal conditions of structures such as tunnels and bridges, buildings, etc., and feature values may be extracted from the data through various calculation processes. The same applies to the second embodiment.
[0111] Furthermore, in the above-mentioned first embodiment, a configuration has been described in which the control unit 2 executes a program such as a learning processing program, and each functional block shown in Fig. 5 is configured by software. However, the present invention is not limited to this, and for example, at least a part of each functional block shown in Fig. 7 may be configured by hardware. The same applies to the second embodiment.
[0112] Furthermore, in the above-mentioned first embodiment, the configuration has been described in which each program, such as the learning process program, is stored in advance in the storage unit 3. However, the present invention is not limited to this, and for example, each program may be stored in a predetermined server device (not shown), and the program may be downloaded from the server device via a predetermined network (not shown) by the communication unit 4 (FIG. 1) and executed. The same applies to the second embodiment.
[0113] Furthermore, the present invention is not limited to the above-mentioned embodiments and other embodiments. That is, the scope of application of the present invention extends to embodiments in which the above-mentioned embodiments and the other embodiments are combined in part or in whole in any manner. The scope of application of the present invention also extends to embodiments in which a part of the configuration described in any of the above-mentioned embodiments and other embodiments is extracted and replaced or diverted with a part of the configuration of any of the above-mentioned embodiments and other embodiments, or an embodiment in which a part of the extracted configuration is added to any of the embodiments.
[0114] Furthermore, in the above-mentioned embodiment, a configuration has been described in which the appearance inspection device 1 is configured as a judgment device by the acquisition unit 21 as an acquisition unit, the feature amount extraction unit 27 as a feature amount extraction unit, the normal feature amount storage unit 32 as a first feature amount storage unit, the abnormal feature amount storage unit 33 as a second feature amount storage unit, and the judgment unit 24 as a judgment unit. However, the present invention is not limited to this, and the judgment device may be configured by an acquisition unit, a feature amount extraction unit, a first feature amount storage unit, a second feature amount storage unit, and a judgment unit having various other configurations. [Industrial Applicability]
[0115] The present invention can be used, for example, in an appearance inspection device installed in a factory where products are manufactured. [Explanation of symbols]
[0116] 1, 201...appearance inspection device, 2, 202...control unit, 3, 203...memory unit, 5...display unit, 7...imaging unit, 21...acquisition unit, 22, 222...feature processing unit, 23, 223...anomaly calculation unit, 24...judgment unit, 26...feature management unit, 27, 227...feature extraction unit, 28, 228...feature management unit, 31...data storage unit, 32...normal feature storage unit, 33...abnormal feature storage unit, 229...feature update unit, DA...abnormal distance, DN...normal distance, S...abnormality level, λ...coefficient.
Claims
1. A learning model generation method for generating a learning model that outputs a feature quantity extracted from data relating to an object when the data is input, comprising the steps of: an acquiring step of acquiring first data obtained from the object belonging to a first classification and acquiring second data obtained from the object belonging to a second classification different from the first classification; a feature extraction step of extracting a first feature based on the first data and extracting a second feature based on the second data; a learning step of performing a learning process of a learning model using a teacher data set in which the information representing the first classification and the first feature amount are associated with each other and the information representing the second classification and the second feature amount are associated with each other; A learning model generation method comprising the steps of:
2. a post-event acquisition step of acquiring post-event data after the learning process is performed by the learning step; a posterior feature extraction step of extracting a posterior feature from the posterior data; a distance calculation step of calculating a first distance which is a distance between the first feature amount and the posterior feature amount, and calculating a second distance which is a distance between the second feature amount and the posterior feature amount; The learning model generating method according to claim 1, further comprising:
3. a determination step of determining whether the object belongs to the first classification or the second classification based on the first distance and the second distance after the first distance and the second distance are calculated by the distance calculation step; The learning model generating method according to claim 2, further comprising:
4. The determining step determines whether the object belongs to the first classification or the second classification based on a comparison result between a value obtained by multiplying the second distance by a predetermined weighting coefficient and a predetermined threshold. The learning model generating method according to claim 3 .
5. The determining step determines whether the object belongs to the first classification or the second classification based on a comparison result between a weighted sum of the first distance and the second distance and a predetermined threshold value. The learning model generating method according to claim 3 .
6. an updating step of updating the learning model by using the posterior features extracted in the posterior feature extraction step; a coefficient value changing step of changing at least one value of weighting coefficients to be multiplied by the first distance and the second distance after the learning model is updated by the updating step; The learning model generating method according to claim 5, further comprising:
7. The determining step determines that the object belongs to the first class if the weighted sum is less than the threshold value, and determines that the object belongs to the second class if the weighted sum is equal to or greater than the threshold value. The learning model generating method according to claim 5 .
8. an updating step of updating the learning model using the posterior feature extracted in the posterior feature extraction step; The learning model generating method according to claim 2, further comprising:
9. The first data and the second data are multi-dimensional image data obtained by capturing an image of the object.
9. The learning model generating method according to claim 1, wherein the learning model generating method comprises:
10. The first data and the second data are multi-dimensional acoustic data collected from the object.
9. The learning model generating method according to claim 1, wherein the learning model generating method comprises:
11. An acquisition step of acquiring data obtained from the object; A feature extraction step of extracting features from the data; a first feature amount extracted from first data previously acquired from the object belonging to a first classification, and a second feature amount extracted from second data previously acquired from the object belonging to a second classification different from the first classification, and a determination step of determining whether the object belongs to the first classification or the second classification based on the feature amounts; A method for determining whether or not a particular
12. a distance calculation step of calculating a first distance which is a distance between the first feature amount and the feature amount, and calculating a second distance which is a distance between the second feature amount and the feature amount; and The determining step determines whether the object belongs to the first classification or the second classification based on the first distance and the second distance. The method according to claim 11, further comprising:
13. The determining step determines whether the object belongs to the first classification or the second classification based on a comparison result between a weighted sum of the first distance and the second distance and a predetermined threshold value. The method according to claim 12 .
14. The determination step uses a learning model in which a learning process is performed using a teacher data set in which the information representing the first classification and the first feature amount are associated with each other and the information representing the second classification and the second feature amount are associated with each other. The method according to any one of claims 11 to 13.
15. For the information processing device, A learning model generation program that, when data on an object is input, generates a learning model that outputs a feature amount extracted from the data, an acquisition step of acquiring first data obtained from the object belonging to a first classification and acquiring second data from the object belonging to a second classification different from the first classification; a feature extraction step of extracting a first feature based on the first data and extracting a second feature based on the second data by using the learning model; a learning step of performing a learning process of the learning model using a teacher data set in which the information representing the first classification and the first feature amount are associated with each other and the information representing the second classification and the second feature amount are associated with each other; A learning model generation program for executing the above.
16. For the information processing device, An acquisition step of acquiring data obtained from the object; A feature extraction step of extracting features from the data; a first feature amount extracted from first data previously acquired from the object belonging to a first classification, and a second feature amount extracted from second data previously acquired from the object belonging to a second classification different from the first classification, and a determination step of determining whether the object belongs to the first classification or the second classification based on the feature amounts; A judgment program for executing the above.
17. An acquisition unit that acquires data obtained from the object; A feature extraction unit that extracts features based on the data; a first feature extracted by the feature extraction unit based on first data previously obtained from the object belonging to a first classification, a second feature extracted by the feature extraction unit based on second data previously obtained from the object belonging to a second classification different from the first classification, and a determination unit that determines whether the object belongs to the first classification or the second classification based on the feature amounts; A determination device comprising:
18. an evaluation value calculation unit that calculates a first distance, which is a distance between the first feature amount and the feature amount, and a second distance, which is a distance between the second feature amount and the feature amount, and calculates a weighted sum of the first distance and the second distance as an evaluation value; Further comprising: The determination unit determines whether the object belongs to the first classification or the second classification based on a result of comparing the evaluation value with a predetermined threshold.
18. The determination device according to claim 17.
19. an imaging unit that captures an image of an object to generate image data representing the object; An acquisition unit that acquires the image data; A feature extraction unit that extracts features based on the image data; a determination unit that determines whether the object is normal or abnormal based on normal feature amounts extracted in advance by the feature amount extraction unit on the basis of normal image data acquired from the object previously classified as normal, and abnormal feature amounts extracted in advance by the feature amount extraction unit on the basis of abnormal image data acquired from the object previously classified as abnormal, and the feature amounts; an output unit that outputs a result of the determination; An appearance inspection apparatus comprising:
Citation Information
Patent Citations
Visual inspection device
JP2012007952A
Cited By
JPWO2026062915A1
Abnormality inspection device, abnormality inspection method, and abnormality inspection program
WO2026062915A1
