Virtual defect image generation device
By designing a virtual defect image generation device and using the defect library and defect configuration rules to configure defects on normal product images, the problem in the existing technology that it is difficult to generate virtual defective product images of different specifications and locations is solved, and the efficient generation of a variety of virtual defective product images is achieved. Virtual defective part images reduce labor effort in preparing defective part images.
Patent Information
- Application Number
- CN202380041107.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-06-10
- Filing Date
- 2023-05-11
- Publication Date
- 2025-01-21
AI Technical Summary
The prior art is difficult to generate virtual defective images of processed products of different specifications, and it is impossible to generate virtual defective images at different locations, resulting in a large number of labor-to-preparation images of defective parts during the appearance inspection of multi-specific specifications.
A virtual defect image generation device is designed. Through the combination of defect library, defect configuration rules and virtual defect image generation part, the common defect part image is used to configure defects on the normal product image to generate virtual defective product images with different specifications.
When generating virtual defective product images for multiple processed products with different specifications, it is possible to easily generate multiple virtual defective product images by using a common defective part image, thus reducing the preparation of defective part images for each specification and location. Work.
Smart Images

Figure CN119343693A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a virtual defect image generating device for providing a virtual defect image for machine learning to a learning device for generating a judgement device for appearance inspection. Background Art
[0002] When it is desired to apply machine learning to the appearance inspection of processed products of specified specifications, first, it is necessary to perform machine learning on a large number of defective product images and normal product images of processed products of the same specifications to generate a judgement machine. In addition, when it is desired to improve the inspection accuracy of the judgement machine, it is necessary to perform machine learning on the same number of defective product images as the number of normal product images. However, the number of defective products is usually much smaller than the number of normal products, so it is difficult to prepare the same number of defective product images as the number of normal product images.
[0003] Therefore, various methods for compensating for the deficiencies of defective product images have been proposed. For example, the following learning data generation device is disclosed in the abstract of Patent Document 1: it comprises: a defective part data storage unit that stores defective part data as image data of defective part images; a qualified product data storage unit that stores qualified product data as image data of qualified product images; a learning data generation unit that generates image data of a learning image synthesized with the defective part image on the qualified product image based on the defective part data, the qualified product data and generation parameters, i.e., learning data; a learning data storage unit that stores the learning data; and a generation parameter setting unit that sets the generation parameters.
[0004] As described above, in Patent Document 1, a defective product image is generated by combining a defective portion image with a good product image, thereby compensating for the shortcomings of the defective product image. Prior art literature Patent Literature
[0005] Patent Document 1: Japanese Patent Laid-Open No. 2020-027424 Summary of the invention Problem that the invention aims to solve
[0006] However, the learning data generated in Patent Document 1, as shown in paragraphs 0047 to 0048, Figure 6As exemplified in, for example, by changing the size, angle, color, brightness, etc. of the defective part image, and then synthesizing it at the same position on the qualified product image, a virtual defective product image is thus obtained. Therefore, the virtual defective product image that can be generated in Patent Document 1 is limited to the virtual defective product image of the processed product with the same specifications as the actually photographed defective product image, and the virtual defective product image of the processed product with different specifications cannot be generated. In addition, in Patent Document 1, even if the processed product has the same specifications, a virtual defective product image with a defective part at a position different from the actually photographed defective product image cannot be generated.
[0007] Therefore, in Patent Document 1, when one wants to generate a large number of virtual defective product images for processed products of multiple specifications, it is necessary to prepare defective part images for each specification of the processed product or for each position of the defective part, and a considerable amount of labor is required in the preparation work before generating learning data.
[0008] In view of this problem, an object of the present invention is to provide a virtual defect image generating device which can easily generate a plurality of virtual defect images by utilizing a common defect portion image when generating virtual defect images of a plurality of processed products of different specifications. Technical means of solving problems
[0009] In order to solve the above-mentioned problem, the virtual defect image generating device of the present invention generates a virtual defect image for a learning device to learn, and comprises: a defect library, which stores defective part images; a defect configuration rule, which specifies the defects and inspection areas corresponding to the processing items based on the management information corresponding to the processing items and the contents allowed for the processing; and a virtual defect image generating unit, which generates the virtual defect image by configuring the defective part image in the inspection area on the normal product image based on the defect configuration rule. Effects of the Invention
[0010] According to the virtual defect image generating device of the present invention, when generating virtual defective product images of a plurality of processed products having different specifications, a plurality of virtual defective product images can be easily generated by using a common defective portion image. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 This is a schematic diagram of the appearance inspection system. Figure 2 This is a diagram schematically showing a virtual defect image generating device according to the first embodiment. Figure 3 is a flowchart of the virtual defect image generation process. Figure 4A This is a diagram showing an example of a GUI of a setting unit according to the first embodiment. Figure 4BThis is a diagram showing an example of a GUI of a setting unit according to the first embodiment. Figure 4C This is a diagram showing an example of a GUI of a setting unit according to the first embodiment. Figure 4D This is a diagram showing an example of a GUI of a setting unit according to the first embodiment. Figure 5 This is a diagram schematically showing a virtual defect image generating device according to a second embodiment. Figure 6 It is a diagram showing the configuration of defects in the second embodiment. Figure 7 This is a diagram showing a normal product image of Example 3. Figure 8 This is a diagram schematically showing a virtual defect image generating device according to a fourth embodiment. Fig. 9 This is a diagram schematically showing a virtual defect image generating device of the fifth embodiment. Fig.10 This is a diagram showing a normal product image of Example 5. DETAILED DESCRIPTION
[0012] Hereinafter, embodiments of the virtual defect image generating device of the present invention will be described with reference to the drawings. Embodiment 1
[0013] First, use Figures 1 to 4D , describing a virtual defect image generating device 10 according to a first embodiment of the present invention.
[0014] Figure 1 1 is a schematic diagram of an appearance inspection system for inspecting the appearance of a processed product 1. As shown in the figure, the appearance inspection system includes: a camera 2 for photographing the processed product 1; an appearance inspection device 3 for inspecting the appearance of the processed product 1 based on the image P photographed by the camera 2; and a conveying device 4 for conveying the processed product 1 within the imaging range of the camera 2. Figure 1 In the embodiment, two kinds of processed products 1A and 1B having different specifications are exemplified as the inspection targets, but there may be three or more kinds of processed products 1 as the inspection targets.
[0015] The visual inspection device 3 is equipped with a judgement device 3a generated by a learning device 20. The learning device 20 is a device that uses machine learning such as Deep Neural Network and Support Vector Machine to generate the judgement device 3a, in addition to the normal product image and defective product image actually taken, and also uses the virtual defect image supplied from the virtual defect image generating device 10 described later as an object. The generated judgement device 3a can perform any visual inspection on the processed products 1 with different specifications manufactured through the same processing step, and can sequentially judge whether the processed products 1 with various specifications sequentially conveyed by the conveying device 4 are normal products.
[0016] For example, the inspection object of the judgment device 3a is an engine piston (processed product 1A, 1B) of different specifications manufactured by the casting process and the crown cutting process at the same time, and the metal processing part W (W A , W B ) is taken as the inspection object, in the learning device 20, by machine learning the normal product image and the defective product image of the metal processing part W according to each specification, a judgement device 3a is generated that can perform appearance inspection on any processed product 1.
[0017] Hereinafter, the virtual defect image generating device 10 of the present embodiment which can easily generate various defective product images to be provided to the learning device 20 will be described in detail.
[0018] Figure 2 1 is a diagram schematically showing a virtual defect image generating device 10 of the first embodiment. As shown here, the virtual defect image generating device 10 of the present embodiment is composed of a defective product image library 11, a normal product image library 12, a defect library 13, a setting user interface (hereinafter referred to as "setting UI 14") and a virtual image generating unit 15. A virtual defective product image is generated according to the setting input from the setting UI 14 and output to the learning device 20. In addition, specifically, the virtual defect image generating device 10 is a computer having hardware such as a CPU and other computing devices, a semiconductor memory and other main storage devices, a hard disk and other auxiliary storage devices, and a communication device. Secondly, the computing device executes a prescribed program read into the main storage device and the auxiliary storage device stores prescribed data, thereby realizing the various functions described later. In the following, such known technologies are appropriately omitted, and the details of each part are described in sequence.
[0019] The defective product image library 11 is a storage unit that stores defective product images Pa of at least one specification of the processed product 1 (for example, the processed product 1A). In addition, the defective product image Pa is an image including a defect spot b described later. The normal product image library 12 is a storage unit that stores normal product images Pn (for example, normal product images PnA , Pn B The defect library 13 is a storage unit that stores at least one set of defect labels I and defect patches p extracted from the defective product image Pa. The details of the defect labels I and the defect patches p will be described later.
[0020] The setting UI 14 is a user interface used by the user to set and input defect labels I, inspection areas R, and generate virtual defective product images. Specifically, it is a display device such as a monitor and an input device such as a keyboard, a mouse, and a touch panel. In addition, the details of the setting UI 14 will be used FIG. 4A to FIG. 4D Described later.
[0021] The virtual image generating unit 15 is composed of a defect library generating unit 15 a , an inspection region generating unit 15 b , a defect arrangement rule generating unit 15 c , and a virtual defective product image generating unit 15 d .
[0022] The defect library generation unit 15a is mainly a functional unit that generates a defect label I and a defect patch p based on the defective product image Pa. Therefore, first, the defect library generation unit 15a obtains the defective product image Pa from the defective product image library 11 and displays it on the display of the setting UI 14. Then, when the user specifies an arbitrary defective spot b on the defective product image Pa displayed on the display, the defect library generation unit 15a stores the position and shape of the defective spot b in the defect library 13 as a defect label I. In addition, the defect library generation unit 15a cuts out the same part as the defect label I from the defective product image Pa and stores it in the defect library 13 as a defect patch p. Furthermore, the defect library generation unit 15a also stores the defect type of the defective spot b registered by the user in the defect library 13.
[0023] exist Figure 2 In the example, the defect spot b of the defective product image Pa is a casting hole, and the defect label I as information for determining the position and shape of the casting hole and the defect patch p as image data near the casting hole are stored as a pair of data in the defect library 13. Generally, if the processing steps of the processed product 1 are the same, the appearance of the defect does not depend on the specifications, so the defect library generated here can also be shared by the processed products 1 (for example, the processed product 1B) with different specifications manufactured in the same processing step.
[0024] The inspection region generating unit 15b is a functional unit that generates the inspection region R on the normal product image Pn. A Generate inspection area R accordingly A In the case of A, and is displayed on the display of the setting UI 14. When the user traces the periphery of the inspection target area (for example, the metal processing part W) with the mouse cursor on the displayed image A When the inspection area generating unit 15b uses the contour line data drawn by the mouse cursor as the inspection area R A Keep it.
[0025] If the specifications of the processed product 1 to be inspected are different, the shape and size of the product will be different, so it is necessary to generate the inspection area R for each specification. Therefore, the inspection area generating unit 15b maintains the normal product image Pn of the processed product 1B in the same manner as described above. B Corresponding inspection area R B .
[0026] In addition, multiple inspection areas R can be generated for one processed product 1. For example, the casting surface and the metal processing part of the crown surface of the engine piston can be used as different inspection areas, or the interior of the metal processing part can be divided into multiple inspection areas according to importance.
[0027] The defect configuration rule generation unit 15c is a functional unit that generates a defect configuration rule r based on the management information i prepared in advance. In the management information i, management items (inspection area R, defect type) and permitted contents (defect size specifications, etc.) are described correspondingly for each inspection process. The defect configuration rule generation unit 15c stores the inspection area type, defect type, defect size, and configuration method specified by the user on the setting UI 14 based on the management information i as the defect configuration rule r.
[0028] Regarding the inspection area R, an inspection area corresponding to the inspection area R described in the management information i is selected and specified from the inspection area types generated by the inspection area generation unit 15b. Regarding the defect type, a defect type corresponding to the defect type described in the management information i is selected and specified from the defect types stored in the defect library 13. Regarding the defect size, the defect size described in the management information i is specified. Regarding the configuration method, a specified configuration method is selected for each inspection area from pre-prepared configuration methods, such as random configuration, equal-interval configuration, configuration along the contour of the inspection area R, etc. Generally, if the processing steps are the same, the occurrence area of defects in the processing area does not depend on the variety, so the defect configuration rules can be shared between varieties.
[0029] The virtual defective product image generating unit 15d is a functional unit that generates a virtual defective product image Pv based on the defect arrangement rule r. Figure 3 Flow chart for generating a virtual defective image Pv of the processed product 1A A Taking the case of as an example, the virtual defective product image generation process is described in detail.
[0030] First, in step S1, the virtual defective product image generating unit 15d acquires a normal product image Pn of the processed product 1A from the normal product image library 12. A .
[0031] Next, in step S2, the virtual defective product image generating unit 15d acquires the normal product image Pn corresponding to the inspection area R specified by the defect arrangement rule r from the inspection area generating unit 15b. A Inspection area R A data.
[0032] In step S3, the virtual defective product image generating unit 15d obtains the defect patch p and the defect label I corresponding to the defect type and defect size specified by the defect configuration rule r from the defect library 13. Specifically, the defect patch p and the defect label I of the same defect type as the defect type specified by the defect configuration rule r and a size larger than the defect size specified by the defect configuration rule r are obtained. This is to enable the determiner 3a to learn based on the virtual defective product image Pv in which only the defect patch p larger than the specified size is configured.
[0033] In step S4, the virtual defective product image generating unit 15d cuts out a portion corresponding to the defect label I from the defect patch p and places it on the normal product image Pn according to the arrangement method specified by the defect arrangement rule r. A Inspection area R on A The virtual defective product image Pv is generated by synthesizing A For example, in the case where the defect configuration rule r specifies the configuration along the contour of the inspection area R as the configuration method, Figure 2 Virtual defective product image Pv A As shown in the example, along the inspection area R A The defect patch p is configured according to the contour of the virtual defective product image Pv. In addition, although not shown in the figure, a defective patch p is also generated on the virtual defective product image Pv. A A virtual defect label image with a defect label is configured at the same position of the defect patch p.
[0034] On the other hand, when generating a virtual defective product image Pv of the processed product 1B having a different specification from that of the metal processed portion W of the processed product 1A, B In this case, you can also Figure 3 The same process is used to generate the B The virtual defective image Pv of the defect patch p is configured with the contour of B , but in generating the virtual defective image Pv B The defect patch p and defect label I used in the process are shared, so even if the defective image of the processed product 1B cannot be prepared, as long as the defective image of the processed product 1A can be prepared, the virtual defective image Pv can be generated.B .
[0035] <Example of GUI Setting UI 14> Next, use FIG. 4A to FIG. 4D , a specific example of setting the GUI (Graphical User Interface) of UI14 is described.
[0036] Figure 4A 1 shows a GUI when a defect library is generated. As shown here, in the process menu M on the display of the setting UI 14, processes that can be executed by the virtual defect image generating device 10 are listed, and the user can select a desired process from them.
[0037] For example, when the user selects defect library generation M1, the defect library generation unit 15a obtains the defective product image Pa from the defective product image library 11 and displays it on the image display area V. When the user draws the defect area in the defective product image Pa with the mouse cursor C, the drawn area is displayed as a defect spot b. In addition, the user inputs the defect type (e.g., casting hole) and defect size (e.g., 0.5 mm) of the defect spot b into the defect type setting area B1. Then, when the user selects save M2 from the processing menu M, the defect library generation unit 15a stores the defect spot b as a defect label I in the defect library 13, and stores the same part as the defect label I cut from the defective product image Pa as a defect patch p in the defect library 13 together with the defect type (e.g., casting hole) specified by the user.
[0038] Figure 4B The GUI for generating the inspection area R is illustrated. As shown here, the name of the product to be inspected can be input in the product setting area B2. After the user selects the inspection area generation M3 from the processing menu M, if the product name is input (the processed product 1A is input in the figure), the inspection area generation unit 15b obtains the normal product image Pn of the processed product 1A from the normal product image library 12. A The inspection area R is displayed on the image display area V. Then, the area drawn by the user with the mouse cursor C on the displayed image is displayed as the inspection area R. In addition, the inspection area name can be input in the inspection area type input area B3. A is input), and when the save M2 is selected from the processing menu M, the inspection area generating unit 15b sets the inspection area R as the inspection area R of the processed product 1A. A Keep it.
[0039] Figure 4CThe GUI for generating defect configuration rule r is shown. In the configuration rule setting area B4, the configuration method of defects for the virtual defective product image Pv can be input. After the user selects the configuration rule setting M4 from the processing menu M, the inspection area type, defect type, defect size, and configuration method are input (in the figure, the inspection area R is input in sequence). A , casting hole, 0.5mm, along the inspection area contour), and then, if Save M2 is selected from the processing menu M, the defect configuration rule generation unit 15c will set the inspection area type, defect type, defect size, and configuration method specified by the user as a group and maintain them as the defect configuration rule r.
[0040] Figure 4D The GUI for generating a virtual defect image Pv is shown. When the user selects the virtual defect image generation M5 from the processing menu M and inputs the product type and the inspection area type (the processed product 1A and the inspection area R in the figure) A ), the virtual defective product image generating unit 15d obtains the normal product image Pn of the processed product 1A from the normal product image library 12 A , and displayed on the image display area V. Then, the inspection area R is acquired from the inspection area generating unit 15b. A , and overlays and displays it on the image display area V. Furthermore, the defect patch p and defect label I corresponding to the specified defect type and defect size are obtained from the defect library 13, and are overlayed and displayed on the image display area V in the specified configuration method (along the outline in the figure). When the user selects Save M2, the virtual defective product image generating unit 15d keeps the displayed image as the virtual defective product image Pv. In addition, this process is the same as Figure 3 The processing is the same as that described in the flowchart.
[0041] According to the present embodiment described above, it is possible to provide a virtual defect image generating device that can share the patch image and label of the defect part between varieties, and can reduce the effort of collecting images of the defect part for each variety. In addition, it is possible to provide a virtual defect image generating device that can share the defect configuration rules when configuring defects in the inspection area between varieties, and can reduce the effort of specifying defect configuration for each variety. In addition, it is possible to provide a virtual defect image generating device that can determine the defect size and defect interval based on the image area size and processing density settings during learning and evaluation of the learning device, and generate a virtual defect image that implements defect configuration with high learning efficiency. Embodiment 2
[0042] Next, use Figure 5 , Figure 6 A second embodiment of the present invention will be described. Note that duplicate descriptions of points common to the above-described embodiments will be omitted.
[0043] In the first embodiment, the virtual defective product image Pv is generated without particular consideration of the specification of the learning device 20, but in the virtual defective product image generating device 10 of the present embodiment, the virtual defective product image Pv is generated in consideration of the specification of the learning device 20. In the machine learning in the learning device 20, in order to determine the presence or absence of a defective portion and further output it together with the position of the defect, for example, it is preferable to divide the input image into small rectangular areas, determine the presence or absence of a defective portion for each of the divided rectangular areas, and use the position of the rectangular area corresponding to the defect as the position of the defect.
[0044] Therefore, in the learning device 20 of the present embodiment, the image area size and processing density during learning and evaluation are set as specifications. The image area size is the size of the above-mentioned rectangular area. In addition, the processing density means the degree of overlap when divided into rectangular areas. For example, processing density = 1 means that the rectangular areas do not overlap with each other, processing density = 2 means that the rectangular areas overlap with each other by only 1 / 2, and processing density = 3 means that the rectangular areas overlap with each other by only 2 / 3.
[0045] In this embodiment, the operation of the virtual defective product image generating unit 15d is basically the same as that of the first embodiment, but is different in the following aspects: That is, the virtual defective product image generating unit 15d of this embodiment also generates a virtual defective product image Pv based on the information (image area size, processing density) obtained from the learning device 20.
[0046] For example, when generating a virtual defective product image Pv of the processed product 1A A In the case of , the virtual defective product image generating unit 15d of this embodiment first implements steps S1 and S2 which are equivalent to those of the first embodiment.
[0047] Then, in step S3, the following defect patch p and defect label I are obtained: the defect type is the same as the defect type specified by the defect configuration rule r, and the defect size is larger than the defect size specified by the defect configuration rule r and smaller than the image area size Ls obtained from the learning device 20. Here, the reason for limiting the acquisition to defect patches p smaller than the image area size Ls obtained from the learning device 20 is that only defect patches p smaller than the image area size Ls as the specification of the learning device 20 are arranged in the virtual defective product image Pv A In this way, when the input image to the learning device 20 is divided into small rectangular areas, rectangular areas containing only defects are avoided, thereby avoiding a decrease in learning efficiency.
[0048] Next, in step S4, a portion corresponding to the defect label I is cut out from the defect patch p and is placed on the normal product image Pn A Inspection area R on AIn the above example, according to the configuration method specified by the defect configuration rule r, based on the image area size Ls, processing density Ld and defect label size DI obtained from the learning device 20, as shown in FIG. Figure 6 As shown in FIG. 1 , the defect interval Δx is arranged so as to satisfy the following two equations, and a virtual defective image Pv is generated. A .
[0049] Ls+DI≦Δx This is to avoid arranging two or more defect patches in the image area, thereby preventing the learning efficiency from being reduced by arranging the defect patches p in the rectangular area 60 so that the number of defect patches p is one or less.
[0050] Δx <Ls+DI+Ls / Ld This is to avoid the situation where no defect patch is configured within the image area size Ls, thereby reducing the learning efficiency. Figure 6 The defect configuration in the horizontal direction is shown in , but the defect configuration in the vertical direction is the same.
[0051] According to this embodiment, a virtual defect image generating device can be provided, which can determine the defect size and defect interval according to the image area size and processing density settings during learning and evaluation of the learning device, and generate a virtual defect image with a defect configuration having high learning efficiency. Embodiment 3
[0052] Next, use Figure 7 The third embodiment of the present invention will be described. In addition, the common points with the above-mentioned embodiments will be omitted from repeated description.
[0053] For example, according to this embodiment, when generating a virtual defective product image Pv of the processed product 1A, A In this case, the virtual defective product image generating unit 15d of this embodiment first implements steps S1, S2, and S3 which are equivalent to those of the first embodiment.
[0054] Then, in step S4, a portion corresponding to the defect label I is cut out from the defect patch p and arranged in the normal product image Pn according to the arrangement method specified by the defect arrangement rule r. A Inspection area R on A The virtual defective product image Pv is generated by synthesizing A .
[0055] At this time, the grayscale value of the defect patch p is corrected and synthesized. Figure 7 As shown, the synthesized normal image Pn AThe grayscale value of part 70 of the defect patch p on the image is set to Ba, the grayscale value of part 71 of the defect label I corresponding to the defect patch p is set to Bc, and the grayscale value of part 72 of the defect label I corresponding to the background which is not equivalent to the defect patch p is set to Bb. The corrected grayscale value Bd of the defect patch is determined according to the following formula and synthesized.
[0056] Bd=Ba×Bc / Bb According to the present embodiment, it is possible to provide a virtual defect image generating device that generates a virtual defect image with a natural grayscale when the grayscale value of a normal product image and the grayscale value of the background of a defect patch are different. Embodiment 4
[0057] Next, use Figure 8 A fourth embodiment of the present invention will be described. Note that duplicate descriptions of points common to the above-described embodiments will be omitted.
[0058] like Figure 8 As shown, a normal defect comparison unit 80 is added to the defect library generation unit 15a of this embodiment, and a defect patch p and a defect label I are generated according to the defective product image Pa by a method different from that of the first embodiment.
[0059] Specifically, the defect library generation unit 15a first obtains the defective product image Pa from the defective product image library 11 and obtains the normal product image Pn from the normal product image library 12. Then, the normal defect comparison unit 80 compares the two images, regards the area with a difference greater than a specified value as a defect spot b, regards the defect spot b as a defect label I, cuts out an image of the same part as the defect label I from the defective product image Pa as a defect patch p, and stores it in the defect library 13 together with the defect type specified by the user, such as a casting hole.
[0060] That is, according to the present embodiment, it is possible to provide a virtual defect image generating apparatus that can generate a defect library without requiring the user to specify defect spots b, thereby reducing the user's effort in creating the defect library. Embodiment 5
[0061] Next, use Fig. 9 , Fig.10 A fifth embodiment of the present invention will be described. Note that duplicate descriptions of points common to the fourth embodiment will be omitted.
[0062] like Fig.10 As shown, in addition to the normal defect comparison unit 80, the defect library generation unit 15a of this embodiment further adds a texture cutting unit 90, which generates a defect patch p and a defect label I according to the defective product image Pa by a method different from that of the first and fourth embodiments.
[0063] Specifically, the defect library generation unit 15a first obtains the normal product image Pn from the normal product image library 12 and displays it on the display of the setting UI 14. Before the inspection, the processed product 1A as the inspection object is subjected to some processing. For example, the processed product 1A as the inspection object is a casting component, and a part of its surface is subjected to mechanical processing.
[0064] At this time, if Fig.10 As shown, the normal product image Pn A The processed product 1A on the image is divided into a casting surface portion 101 and a machined portion 102. The texture cutting unit 90 sets the region corresponding to the casting surface cutting portion 103 designated by the user on the displayed image, for example, drawn on the casting surface portion 101 by the mouse cursor C, as a defect label I, and removes the defect label from the normal product image Pn A The cut part with the same defect label I is set as a defect patch p, and is stored together with the defect type, such as casting surface residue, in the defect library 13. From this defect library, by referring to the defect configuration rule and configuring it in the metal processing part, the casting surface residue defect can be synthesized.
[0065] According to the present embodiment, a virtual defect image generating device can be provided which can generate a defect library from normal product images Pn without requiring defective product images Pa, thereby reducing the user's effort in collecting images of defective parts. Embodiment 6
[0066] Next, the sixth embodiment of the present invention is described. In addition, the common points with the above-mentioned embodiments are omitted from repeated description. In the above-mentioned embodiment, the defect library generation unit 15a generates a defect patch p based on the defective product image Pa, but for example, an image artificially generated by imitating a defective part can also be used as the defect patch p. In addition, the image artificially generated by imitating a defective part is an image equivalent to a defect drawn by a user using drawing software, etc. Explanation of symbols
[0067] 1…processed product, 2…camera, 3…appearance inspection device, 3a…judgment device, 4…transport device, 10…virtual defect image generation device, 11…defective product image library, 12…normal product image library, 13…defect library, 14…setting UI, 15…virtual image generation unit, 15a…defect library generation unit, 15b…inspection area generation unit, 15c…defect configuration rule generation unit, 15d…virtual defect image generation unit, 20…learning device, Pn…normal product image, Pa…defective product image, Pv…virtual Defective product image, V…image display area, C…mouse cursor, M…processing menu, M1…defect library generation, M2…save, M3…inspection area generation, M4…configuration rule setting, M5…virtual defective product image generation, B1…defect type setting area, B2…variety setting area, B3…inspection area type input area, B4…configuration rule setting area, i…management information, r…defect configuration rule, b…defect spot, I…defect label, p…defect patch, R…inspection area, W…metal processing part.
Claims
1. A virtual defect image generating device, which generates a virtual defect image for a learning device to learn, wherein the virtual defect image generating device is characterized by comprising: A defect library, which stores images of defective parts; a defect configuration rule that specifies defects and inspection areas corresponding to processing items based on management information that associates processing items with permitted contents of processing; and The virtual defect image generating unit generates a virtual defect image by arranging the defect portion image in the inspection area on the normal product image based on the defect arrangement rule.
2. The virtual defect image generating device according to claim 1, characterized in that: Also includes: A defective product image library storing defective product images of at least one specification of processed products; as well as A normal product image library stores normal product images of at least two specifications of processed products. The defective part image stored in the defect library is cut out from the defective product image. When the virtual defect image generating unit generates the virtual defect image, a common defect portion image is used when generating a virtual defect image of a processed product of any specification.
3. The virtual defect image generating device according to claim 1, characterized in that: In the learning device, the image area size for learning and the processing density for learning are set, and the virtual defect image generating unit generates a virtual defect image in such a way that the configuration interval of the defects is greater than the image area size and less than the processing density.
4. The virtual defect image generating device according to claim 1, characterized in that: The virtual defect image generating unit generates the virtual defect image by correcting the grayscale value of the defective portion image according to the grayscale value of a normal product image.
5. The virtual defect image generating device according to claim 1, characterized in that: The virtual defect image generating unit compares the defective product image with the normal product image to extract the defective portion image and stores it in the defect library.
6. The virtual defect image generating device according to claim 1, characterized in that: The virtual defect image generating unit stores an image of a region designated by a user from a normal product image in the defect library as a defective portion image.
7. The virtual defect image generating device according to claim 1, characterized in that: The defective part image is an image artificially generated by imitating an actual defect.
Citation Information
Patent Citations
Learning data generating device, discrimination model generating device, and program
JP2020027424A
Cited By
Defect contour generation method of machine vision deep learning surface defect sample, electronic equipment and storage medium
CN120047438A