Defective portion detection device, defective portion detection method, and computer program
The defect detection device enhances map generation accuracy by iteratively identifying and masking defective areas in images using orthogonal images and deep learning, addressing the inability of existing technologies to specify defect locations.
Patent Information
- Application Number
- JP2020210449
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-12-18
- Publication Date
- 2024-08-19
- Estimated Expiration
- 2040-12-18
AI Technical Summary
Existing defect detection technologies cannot accurately identify and specify the location of defective areas in images, which hinders high-precision map generation from multiple images, such as those taken by in-vehicle cameras, as they only determine the presence of defects without pinpointing their positions.
A defect detection device that includes an image acquisition unit for creating orthogonal images, a determination unit for identifying defects, an extraction unit for pinpointing defect locations, and a masking unit for repeatedly masking these areas until no defects are detected, using techniques like deep learning and heat map generation to enhance accuracy.
This approach allows for highly accurate map generation by precisely identifying and masking defective areas, reducing erroneous extractions and improving determination accuracy through iterative masking and learning-based defect detection.
Smart Images

Figure 0007535934000012 
Figure 0007535934000006 
Figure 0007535934000004
Abstract
Description
[Technical field]
[0001] The present invention relates to a defect detection device, a defect detection method, and a computer program. [Background technology]
[0002] There is known a technique for determining the presence or absence of a portion defined as a defective portion from an image of an object to be detected (see, for example, Patent Document 1). The detection device described in Patent Document 1 divides a single image of a resin composition film, which is the object to be detected, into multiple images, and detects air bubbles defined as defective portions from each of the divided images. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2020-85470 A Summary of the Invention [Problem to be solved by the invention]
[0004] Meanwhile, for example, in the technical field of map generation, there is a demand for generating a map using a plurality of road images captured by on-board cameras mounted on a plurality of vehicles. Here, the road images captured by each on-board camera include parts (i.e., defective parts) that are not suitable for use in map generation, such as parts where shadows of buildings, other vehicles, etc. are reflected, and parts where the image is unclear. Therefore, there has been a demand for enabling highly accurate map generation by extracting the positions of such defective parts from the captured road images and generating a map using road images other than the extracted defective parts (in other words, without using the road images of the extracted defective parts). In this regard, in the technology described in Patent Document 1, when air bubbles of a predetermined size or more are detected in the divided images, the captured resin composition film is judged to be defective, but the position of the defective part is not specified. In other words, the technology described in Patent Document 1 has a problem in that it is only possible to determine the presence or absence of a defective part, and no consideration is given to specifying the position of the defective part. Note that such a problem is a common problem in all technologies that create one image from multiple images, regardless of the technical field of map generation.
[0005] The present invention has been made to solve the above-mentioned problems, and has an object to identify the position of a defective part in an image and extract the defective part. [Means for solving the problem]
[0006] The present invention has been made to solve the above-mentioned problems, and can be realized in the following forms. A defect detection device comprising: an image acquisition unit that acquires an image of a detection target and creates an ortho-image by correcting a positional shift of an image on the image using the acquired image; a determination unit that determines the presence or absence of a defect in the detection target by performing image recognition on the ortho-image; an extraction unit that extracts the position of the defect in the ortho-image; and a mask unit that performs a mask process on a pixel at the position extracted by the extraction unit in the ortho-image, wherein the determination by the determination unit, the extraction by the extraction unit, and the mask process by the mask unit are repeatedly performed until the determination unit determines that there is no defect. In addition, the present invention can be realized in the following forms.
[0007] (1) According to one aspect of the present invention, there is provided a defect detection device comprising: an image acquisition unit that acquires an image of an object to be detected, a determination unit that determines the presence or absence of a defect in the object to be detected by performing image recognition on the acquired image, an extraction unit that extracts the position of the defect in the image, and a mask unit that performs a mask process on the pixel at the position extracted by the extraction unit in the image, wherein the determination by the determination unit, the extraction by the extraction unit, and the masking by the mask unit are repeatedly performed until the determination unit determines that there is no defect.
[0008] According to this configuration, the extraction unit extracts the position of the defective part in the image, and the mask unit performs mask processing on the pixels of the defective part at the extracted position. The image generated in this manner is an image of the object to be detected that does not include the defective part (in other words, the defective part is masked). By using such an image for generating a map image, for example, a highly accurate image can be created using multiple images of the object to be detected. In addition, by repeatedly executing the judgment by the judgment unit, the extraction by the extraction unit, and the mask processing by the mask unit, the mask processing is repeatedly performed on the defective part of the object to be detected in the image. In other words, the defective part is masked by multiple mask processings, not by a single mask processing. This prevents the extraction unit from erroneously extracting a part that is not a defective part. In other words, the position of the defective part of the object to be detected in the image is identified, and only the defective part is extracted as much as possible.
[0009] (2) In the defect detection device of the above aspect, the extraction unit may extract a range of the defect part including a position that is the greatest basis for the determination of the defect part by the determination unit, in addition to the position, and the mask unit may assign a predetermined value to an alpha channel of the pixel. According to this configuration, in addition to the position that is the most important basis for determining that the defective part is a defective part, the extraction unit simultaneously extracts the surrounding area including the position. This reduces the number of judgments by the judgment unit, extractions by the extraction unit, and masking processes by the mask unit, compared to when only the position that is the most important basis is extracted. As a result, the defective part detection device of this configuration can quickly extract defective parts. Also, the mask unit can easily mask defective parts by substituting a predetermined value for the alpha channel of the pixels of the defective part, setting the opacity of the defective part to 0 (zero), or by sufficiently lowering the opacity compared to parts other than the defective part.
[0010] (3) In the defect detection device according to the above aspect, the masking section may arrange objects by combining pixel sets that differ in at least one of size and shape so as to cover the range. According to this configuration, the masking section uses a combination of multiple objects that differ in at least one of size and shape, so that the range in which the objects are placed as the defective area can be made smaller than when the range of the defective area is masked all at once.
[0011] (4) In the defect detection device according to the above aspect, the masking section may change a hue of the object to a preset hue so that the object is not determined to be a defect. According to this configuration, the masking unit can mask the defective part with an object of a hue that is preset to indicate that no defective part exists, and therefore, in the determination by the determination unit and the extraction by the extraction unit that are repeatedly performed after the masking, it is possible to suppress the possibility that the masked defective part will be extracted as a new defective part.
[0012] (5) In the defect detection device of the above aspect, the determination unit may further include a learning unit that creates a learning model used to determine the presence or absence of the defect, and the learning unit may create the learning model by performing deep learning using a plurality of partial images extracted from an orthoimage of the object to be detected. According to this configuration, the judgment unit judges whether or not there is a defective part using a learning model obtained by deep learning, thereby improving the accuracy of the judgment.
[0013] The present invention can be realized in various forms, for example, in the form of a defect detection device, a map generation device, a learning device, a map generation system and a vehicle equipped with these devices, a defect detection method, a map generation method, a computer program for executing these devices and methods, a server device for distributing this computer program, a non-transitory storage medium on which a computer program is stored, etc. [Brief description of the drawings]
[0014] [Figure 1] 1 is a schematic block diagram of a map generating system including a map generating device (defect point detecting device) according to an embodiment of the present invention. [Diagram 2] FIG. 4 is an explanatory diagram of a learning process executed by a learning unit. [Diagram 3] FIG. 4 is an explanatory diagram of a learning process executed by a learning unit. [Figure 4] FIG. 11 is an explanatory diagram of the extraction of defective points using heat map generation. [Diagram 5] FIG. 11 is an explanatory diagram of the extraction of defective points using heat map generation. [Figure 6] 11 is an explanatory diagram of a masking process performed by a masking unit. FIG. [Figure 7] 11A and 11B are explanatory diagrams of mask processing by a mask unit. [Figure 8] 11 is an explanatory diagram of the process of an extraction unit and the mask process of a mask unit. FIG. [Figure 9] 11 is an explanatory diagram of the process of an extraction unit and the mask process of a mask unit. FIG. [Figure 10] 11 is an explanatory diagram of the process of an extraction unit and the mask process of a mask unit. FIG. [Figure 11] 11 is an explanatory diagram of the process of an extraction unit and the mask process of a mask unit. FIG. [Figure 12]11 is an explanatory diagram of the process of an extraction unit and the mask process of a mask unit. FIG. [Figure 13] 11 is an explanatory diagram of the process of an extraction unit and the mask process of a mask unit. FIG. [Figure 14] 11 is an explanatory diagram of the process of an extraction unit and the mask process of a mask unit. FIG. [Figure 15] 4 is a flowchart of a defective portion extraction process in the present embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0015] First Embodiment FIG. 1 is a schematic block diagram of a map generation system 100 including a map generation device (defect point detection device) 20 according to an embodiment of the present invention. The map generation system 100 generates one road map of an ortho-image using a plurality of images captured by an on-board camera 11 mounted on a plurality of traveling vehicles 10. As shown in FIG. 1, the map generation system 100 includes a vehicle 10 having an on-board camera 11 that captures an image of the lower front side of the vehicle 10, and a map generation device (defect point detection device) 20 that acquires the captured image of the on-board camera 11 from the vehicle 10 and generates a map. Although only one vehicle 10 is illustrated in FIG. 1, the map generation system 100 includes a plurality of vehicles 10.
[0016] The vehicle 10 transmits a plurality of images captured by the on-board camera 11 to the map generating device 20 using a wireless communication function of a communication unit not shown in FIG. 1. The images captured by the on-board camera 11 include images of roads and other objects to be detected that the vehicle 10 has passed through. Therefore, the captured images transmitted to the map generating device 20 are partial images including roads that the traveling vehicle 10 has passed through. The images captured by the on-board camera 11 include areas that are not suitable for use in map generation, such as areas where shadows of buildings or other objects are reflected, areas where other vehicles or other objects are reflected, or areas where the image is unclear (hereinafter referred to as "defective areas"). The vehicle 10 transmits the captured images including such defective areas to the map generating device 20.
[0017] The map generating device 20 of this embodiment is a personal computer. The map generating device 20 judges the presence or absence of a defective part in an image captured by the vehicle-mounted camera 11, extracts the position of the defective part, and masks the defective part by a process described later. As shown in Fig. 1, the map generating device 20 includes an input unit 60 that accepts various operations by a user, an output unit 70 that is composed of a monitor that displays various images and a speaker that outputs sound, a communication unit 50 that receives images captured by the vehicle-mounted camera 11 from multiple vehicles 10 via wireless communication, a CPU (Central Processing Unit) 30, a ROM (Read Only Memory) 21, a RAM (Random Access Memory) 22, and a storage unit 40 that stores various information.
[0018] The input unit 60 of this embodiment is composed of a keyboard, a mouse, and a microphone that accepts voice input. The storage unit 40 is composed of a hard disk drive (HDD: Hard Disk Drive) and the like. The storage unit 40 includes an image database (image DB) 41 that stores a plurality of captured images transmitted from the vehicle 10, a map database (map DB) 42 that stores a map generated by the map generating device 20, and a model database (model DB) 43 that stores a learning model described later.
[0019] The CPU 30 loads the computer program stored in the ROM 21 into the RAM 22. As a result, the CPU 30 functions as an image acquisition unit 31 that acquires a photographed image in which the detection target is captured, a determination unit 32 that determines whether or not there is a defective part in the detection target in the image, an extraction unit 33 that extracts the position of the defective part in the image, a mask unit 34 that performs a mask process on the position of the extracted defective part, a learning unit 35 that creates a learning model from learning data, and a map generation unit 36 that generates a map.
[0020] The image acquisition unit 31 acquires a plurality of captured images captured by the on-board cameras 11 of a plurality of vehicles 10 via the communication unit 50. The captured images are different from orthoimages in that the images have positional deviations due to differences in distances from the center of the lens of the on-board camera 11 to the target object. The image acquisition unit 31 of this embodiment uses the captured images to create orthoimages in which the positional deviations on the captured images are corrected.
[0021] The learning unit 35 creates a learning model that the determining unit 32 uses to determine the presence or absence of a defective portion. The learning unit 35 creates the learning model by deep learning using divided images, which are obtained by dividing a whole ortho-image of one road prepared in advance into a plurality of images, as learning data. Here, each divided image serving as learning data is an image obtained by dividing the whole ortho-image of one road along the trajectory of the vehicle 10.
[0022] 2 and 3 are explanatory diagrams of the learning process executed by the learning unit 35. Fig. 2 shows a part of an entire orthoimage of a road as learning data. As shown in Fig. 2, the learning unit 35 performs the learning process using each of divided images IM1 to IM3 divided into a plurality of parts along the trajectory of the vehicle 10.
[0023] 3 shows a flowchart of the learning process executed by the learning unit 35. As shown in FIG. 3, in the learning process flow, the learning unit 35 first acquires learning data (step S11). The learning data includes a training data set for training a learning model and a validation data set for evaluating the trained learning model. The acquired learning data may be stored in advance in the storage unit 40, or may be provided by an input received by the input unit 60.
[0024] When the learning unit 35 acquires the learning data, the learning unit 35 trains a learning model using the training data set (step S12). The learning unit 35 of the present embodiment trains the learning model by learning images including defective parts labeled with "0" and images including no defective parts labeled with "1" using a convolutional neural network (CNN).
[0025] The learning unit 35 judges whether the judgment of the presence or absence of a defective part using the learning model obtained by training is good or not (step S13). The learning unit 35 judges the learning model obtained by training by inputting the verification data into the trained learning model. The learning model is trained to output a value of 0.5 or more when a defective part is present in the divided orthoimage, and to output a value less than 0.5 when no defective part is present. The learning unit 35 judges whether a judgment performance of a preset threshold value (0.5) or more is obtained as a result of the multiple divided orthoimages included in the verification data set being correctly judged by the learning model. If the judgment performance is less than the threshold value (step S14: NO), the learning unit 35 repeats the process from step S12 onwards. If the judgment performance is equal to or greater than the threshold value (step S14: YES), the learning unit 35 creates a trained generation model and stores it in the model DB, and ends the learning process flow.
[0026] The determination unit 32 performs image recognition on the orthoimage obtained by correcting the photographed image acquired by the image acquisition unit 31, and determines the presence or absence of a defect in the object to be detected captured in the orthoimage using a learning model created by the learning unit 35. An orthoimage determined by the determination unit 32 to have no defect is stored in the map DB 42 as the original data of the map generated by the map generation unit 36. For an orthoimage determined by the determination unit 32 to have a defect, the extraction unit 33 extracts the position of the defect.
[0027] The extraction unit 33 of this embodiment uses a heat map generation technique of Score-CAM (Class Acitevation Mapping) to extract the position that is the strongest reason why the judgment unit 32 judges the area to be defective and the range of the defective area that includes that position.
[0028] 4 and 5 are explanatory diagrams of the extraction of defective parts using heat map generation. Fig. 4 shows an ortho-image IM11 in which an image captured by the in-vehicle camera 11 at a certain point in time is corrected. The ortho-image IM11 shown in Fig. 4 includes a defective area (defective part) RG1 in which the road is not clearly captured as a defective part. Therefore, the determination unit 32 outputs a value of "0" (<threshold value 0.5) for the ortho-image IM11 and determines that the ortho-image IM11 includes a defective part.
[0029] The extraction unit 33 generates the heat map MP11 shown in FIG. 5 by using a heat map generation technique. In the heat map MP11, the density of the hatching indicates the level of the score. The higher the score, the more reason it is determined to be a defective part. In other words, the position with the highest score is the position that is the most reason why the determination unit 32 has determined it to be a defective part. In the heat map MP11, the first region RG11 has the highest score, followed by the second region RG12, and then the third region RG13. In this way, the extraction unit 33 extracts the first region RG11, the second region RG12, and the third region RG13 as the positions and ranges of the defective parts.
[0030] The masking unit 34 performs masking processing on pixels of the defective portion for a predetermined range in the defective portion extracted by the extraction unit 33. FIGS. 6 and 7 are explanatory diagrams of the masking processing by the masking unit 34. The masking unit 34 performs masking processing by inputting a predetermined value to the alpha channel of the pixel to be masked (i.e., the pixel of the defective portion). The alpha channel is auxiliary data provided separately from the color expression data, and is a data area for storing an alpha value representing the opacity of the pixel. In this embodiment, 0 (zero) representing "transparent" is used as the predetermined value to be input to the alpha channel. However, instead of 0, any value that provides a sufficiently low opacity compared with the portion other than the defective portion may be used. As a result, in the orthoimage IM11 shown in FIG. 6, the masking unit 34 assigns 0 to the alpha channel in the mask region MR12 including a part of the defective region RG1. Note that the masking unit 34 of this embodiment performs masking processing on a range of the defective portion extracted by the extraction unit 33 that is equal to or higher than the score of the second region RG12 (FIG. 5).
[0031] The mask unit 34 of this embodiment assigns 0 to the alpha channel of the mask region MR12 as shown in FIG. 6, and replaces the mask region MR12 with a black object after the assignment as shown in FIG. 7. The mask unit 34 of this embodiment replaces the region MR12 with 0 assigned to the alpha channel with a black object. In this embodiment, it has been learned that the region other than the road to be detected is black, and that no defects exist in the black region. Therefore, the mask unit 34 replaces the region MR12 with black.
[0032] In the orthoimage IM12 in Fig. 7 in which the mask area MR12 has been replaced with black, the determination unit 32 determines whether or not there are any defects on roads other than the mask area MR12 replaced with black. The determination unit 32 outputs a value of "0" (<threshold value 0.5) for the orthoimage IM12 shown in Fig. 7, and determines that it contains a defective area. Note that the process of replacing the mask area MR12 after substitution with a black object is also called "mask processing", similar to the process of setting the alpha channel to a predetermined value (e.g., 0) described above.
[0033] Each of Fig. 8 to Fig. 14 is an explanatory diagram of the process of the extraction unit 33 and the mask process of the mask unit 34, which are repeatedly performed. The extraction unit 33 generates a heat map MP12 shown in Fig. 8 for the orthoimage IM12 (Fig. 7) after the mask process that has been determined to include a defective area. In the heat map MP12, the first region RG21, the second region RG22, and the third region RG23 are extracted as defective areas by the extraction unit 33 in descending order of score.
[0034] Fig. 9 shows an orthoimage IM12 in which 0 is assigned to the alpha channel of mask regions MR12 and MR22, which are the combined range of second regions RG12 (Fig. 5) and RG22 (Fig. 8) extracted by the extraction unit 33, for the orthoimage IM12 shown in Fig. 7. As shown in Fig. 9, the mask regions MR12 and MR22 are different in size, position, and range. In other words, the mask unit 34 combines the mask regions MR12 and MR22, which are different in size and shape, and assigns 0 to the alpha channel of the extracted range of the defective portion.
[0035] The extraction unit 33 creates an orthoimage IM13 shown in Fig. 10 by replacing the mask areas MR12, MR22 in which 0 has been assigned to the alpha channel in the orthoimage IM12 shown in Fig. 9 with black. The determination unit 32 determines whether or not there are any defective parts in the orthoimage IM13 shown in Fig. 10 other than the mask areas MR12, MR22 replaced with black. In this embodiment, the determination unit 32 outputs a value of "0.3" (<threshold value 0.5) for the orthoimage IM13 and determines that it contains a defective part.
[0036] The extraction unit 33 generates a heat map MP13 shown in Fig. 11 for the orthoimage IM13 (Fig. 10) after the mask process that is determined to have a defective part. In the heat map MP13, the first region RG31, the second region RG32, and the third region RG33 are extracted by the extraction unit 33 as defective parts in descending order of score.
[0037] Fig. 12 shows an orthoimage IM13 in which 0 is substituted into the alpha channel of the range including the second region RG32 (Fig. 11) in addition to the second region RG12 (Fig. 5) and second region RG22 (Fig. 8) extracted by the extraction unit 33 in the orthoimage IM13 shown in Fig. 10. The mask unit 34 creates an orthoimage IM14 shown in Fig. 13 in which the mask regions MR12, MR22, and MR32 in which 0 is substituted into the alpha channel in the orthoimage IM13 shown in Fig. 12 are replaced with black.
[0038] In the orthoimage IM14 shown in FIG. 13, the determination unit 32 determines whether or not there is a defective part other than the mask areas MR12, MR22, and MR32 replaced with black. In this embodiment, the determination unit 32 outputs a value of "1.0" (≧threshold value 0.5) for the orthoimage IM14 and determines that the orthoimage IM14 does not contain a defective part. In this case, the determination unit 32 stores an orthoimage IM15 of the hatched part in FIG. 14, excluding the mask areas MR12, MR22, and MR23 from the orthoimage IM14, in the map DB 42 as one image of data generated as a road map. Thus, in this embodiment, the determination of the presence or absence of a defective part by the determination unit 32, the extraction of the defective part by the extraction unit 33, and the mask processing by the mask unit 34 are repeatedly executed until the determination unit 32 determines that there is no defective part.
[0039] 1 creates an overall ortho-image as a road map by combining a plurality of ortho-images after the masking process stored in the map DB 42 by the masking unit 34. The map generating unit 36 generates a road map by complementing the parts masked as defective parts by the masking unit 34 with ortho-images corrected from images taken by other vehicles taking pictures of the same point.
[0040] Fig. 15 is a flowchart of the defect detection process in this embodiment. As shown in Fig. 15, in the defect detection flow, first, the image acquisition unit 31 acquires a plurality of images captured by the in-vehicle camera 11 from the vehicle 10 (step S21). The image acquisition unit 31 creates an orthoimage in which the positional deviation is corrected using the captured images.
[0041] The determination unit 32 determines whether or not there is a defect in the object to be detected (e.g., a road) captured in the orthoimage by using a learning model on the orthoimage corrected by the image acquisition unit 31 (step S22). If it is determined that there is a defect (step S23: YES), the extraction unit 33 uses a heat map generation (FIG. 5) technique to extract the position and range of the defect in the object to be detected in the orthoimage (step S24).
[0042] The mask unit 34 performs a masking process on the defective parts extracted by the extraction unit 33 (step S25). As shown in Figs. 6 and 7, the mask unit 34 assigns 0 to the alpha channel for the range of the defective parts extracted by the extraction unit 33. After that, the mask unit 34 places a black object in the mask region MR12 in which 0 has been assigned to the alpha channel, and creates an orthoimage after the masking process. After that, the processes from step S22 onwards are repeated for the created orthoimage.
[0043] In the processes of steps S22 and S23, when the determining unit 32 determines that there is no defective part in the object to be detected in the orthoimage (step S23: NO), the determining unit 32 stores the orthoimage in the image DB 41 (step S26).
[0044] Next, the determination unit 32 determines whether there is another photographed image for determining a defective portion and whether to continue the defective portion detection flow (step S27). If there is a photographed image to be determined and it is determined that the defective portion extraction flow is to be continued (step S27: YES), the image acquisition unit 31 acquires the photographed image to be determined (step S21), and the processing from step S22 onwards is repeated. If it is determined that the defective portion detection flow is not to be continued (step S27: NO), the defective portion detection flow is terminated. Thereafter, the map generation unit 36 creates one overall orthoimage using the multiple orthoimages stored in the image DB 41 in the processing of step S26.
[0045] As described above, the determination unit 32 of the map generating device 20 of this embodiment determines whether or not there is a defective part on the road that is the object to be detected in the image. The extraction unit 33 extracts the position of the defective part in the image. The mask unit 34 performs mask processing on the pixels of the defective part, for example as shown in FIG. 6, for the position of the defective part extracted by the extraction unit 33. In addition, in this embodiment, the determination of the presence or absence of a defective part by the determination unit 32, the extraction of the defective part by the extraction unit 33, and the mask processing by the mask unit 34 are repeatedly executed until the determination unit 32 determines that there is no defective part. Therefore, in the map generating device 20 of this embodiment, the mask processing is repeatedly performed on the defective part in the object to be detected in the image. That is, the defective part is masked by the mask processing multiple times, not by a single mask processing. This suppresses the erroneous extraction of a part that is not a defective part by the extraction unit. In other words, the position of the defective part in the object to be detected in the image is identified, and only the defective part is extracted as much as possible. As a result, by using an image including non-defective detection targets after extraction of the defective portions, it is possible to create a highly accurate image, such as a correct road map.
[0046] In addition, the extraction unit 33 of this embodiment uses a heat map generation technique to extract the position that is the most important reason for the determination by the determination unit 32 to be a defective part and the range of the defective part including the position. That is, in this embodiment, in addition to the position that is the most important reason for the determination to be a defective part, the surrounding range including the position is also extracted at the same time. This makes it possible to reduce the number of repetitions of the determination by the determination unit 32, the extraction by the extraction unit 33, and the mask processing by the mask unit 34, compared to the case where only the position that is the most important reason is extracted. As a result, the map generation device 20 of this embodiment can quickly extract the defective part. In addition, the mask unit 34 can set the opacity of the defective part to 0 by substituting a predetermined value (0 in the above embodiment) into the alpha channel of the pixel of the defective part. In addition, the mask unit 34 may lower the opacity of the defective part by inputting a value into the alpha channel that makes the opacity sufficiently lower compared to parts other than the defective part. In this way, the mask unit 34 can easily mask the defective part.
[0047] 9, the mask unit 34 of this embodiment combines mask areas MR12 and MR22, which are different in size and shape, and assigns 0 to the alpha channel in the range of the extracted defective area, and then places a black object. That is, in this embodiment, the determination by the determination unit 32, the extraction by the extraction unit 33, and the masking process by the mask unit 34 are repeated to gradually widen the range of the defective area. This makes the range in which the object is placed as the defective area smaller than when the range of the defective area is masked all at once. As a result, the map generating device 20 of this embodiment can further suppress erroneous extraction of areas that are not defective areas.
[0048] Further, the mask unit 34 of this embodiment replaces the mask area MR12 shown in Fig. 6 with a black object, which is a hue that has been learned to indicate that no defective portion exists, as shown in Fig. 7. That is, the mask unit 34 replaces the mask area MR12 with a color that is not a defective portion. Therefore, it is possible to suppress the risk that the masked mask area MR12 is extracted as a defective portion in the determination by the determination unit 32 and the extraction by the extraction unit 33, which are repeatedly performed after the masking process.
[0049] Moreover, the learning unit 35 of this embodiment performs deep learning using a training dataset including orthoimages of a plurality of roads prepared in advance, thereby creating a learning model used by the determination unit 32 to determine the presence or absence of a defective part. That is, since the determination unit 32 determines the defective part using the learning model obtained by deep learning, the accuracy of the determination is improved.
[0050] <Modifications of the above embodiment> The present invention is not limited to the above-described embodiment, and can be embodied in various forms without departing from the spirit and scope of the invention. For example, the following modifications are also possible.
[0051] The map generating device 20 of the above embodiment is an example of a defect location detection device that detects a defect location of a detection target in an image, but the defect location detection device can be modified in various ways without being limited to the configuration of the above embodiment. For example, the defect location detection device of the modified example may be independent as a single device instead of being a configuration of the map generating system 100, and may not have a function of generating a map. The masking unit 34 substitutes a predetermined value of 0 for the alpha channel of the pixel as a masking process for the pixel of the defect location, but other methods may be adopted and well-known techniques can be applied.
[0052] The detection target from which the defective portion is detected may be something other than a road. Moreover, the image from which the defective portion is extracted is not limited to an orthoimage, and may be the image itself captured by the in-vehicle camera 11. In this case, the image acquisition unit 31 does not need to create an orthoimage from the captured image. In the above embodiment, learning data including a verification data set and a training data set prepared in advance are used to create the learning model, but other data may be used. For example, the learning unit 35 may create a learning model using an image captured by the in-vehicle camera 11 in a specified area, and use the created learning model for an image captured in an area different from the specified area.
[0053] Although the extraction unit 33 in the above embodiment extracts defective parts using the heat map generation technology of Score-CAM [1], the extraction unit 33 may extract defective parts using other methods that do not use a heat map. The extraction unit 33 may use the technology of Grad-CAM [2] or may use a technology other than the heat map generation.
[0054] In the masking process by the masking unit 34, 0 is assigned to the alpha channel of the position determined to be a defective portion extracted by the extraction unit 33, and then the surrounding area including the position is replaced with a black object, but other methods may be used. After assigning 0 to the alpha channel, the masking unit 34 does not need to perform the subsequent process of replacing the black object. Also, instead of assigning 0 to the alpha channel of the area determined to be a defective portion, the masking unit 34 may place a black object and then replace it with a different hue that is arbitrarily set and has been learned to indicate that no defective portion exists.
[0055] In the repeated masking process, the mask unit 34 places black objects in the mask area MR12 (FIG. 6) and the mask area MR22 (FIG. 9) having the same score, but the setting of the mask area can be modified in various ways. For example, the mask unit 34 may change the score of the range in which 0 is substituted for the alpha channel between the first masking process and the second masking process. For example, the mask unit 34 may change the score that is the reference when substituting 0 for the alpha channel according to the magnitude (0 to 1) of the numerical value output by the determination unit 32 for each orthoimage. Furthermore, the mask unit 34 may always set the size and shape of the range in which 0 is substituted for the alpha channel to be constant in the repeated masking process.
[0056] In the above-described embodiments, a part of the configuration realized by hardware may be replaced by software, and conversely, a part of the configuration realized by software may be replaced by hardware. The present invention is not limited to the above-described embodiments, and can be embodied in various forms without departing from the spirit of the present invention.
[0057] Although the present aspect has been described above based on the embodiment and modified examples, the above-mentioned embodiment of the aspect is intended to facilitate understanding of the present aspect and does not limit the present aspect. The present aspect may be modified or improved without departing from the spirit and scope of the claims, and equivalents are included in the present aspect. Furthermore, if a technical feature is not described as essential in this specification, it may be deleted as appropriate. [Explanation of symbols]
[0058] 10. Vehicle 11…In-vehicle camera 20...Map generation device (defect detection device) 21...ROM 22…RAM 30…CPU 31…Image acquisition section 32…Judgment section 33...Extraction part 34…Mask section 35…Learning Department 36…Map generation section 40...Storage section 50…Communications Department 60...Input section 70...Output section 100…Map generation system 41…Image DB 42…Map DB 43…Model DB IM1~IM3…Split images IM11~IM15...Orthoimages MP11~MP13…Heat Map MR12, MR22...Mask area RG1: Defective area (defective point) RG11, RG21, RG31…1st area RG12, RG22, RG32…Second area RG13,RG23,RG33…3rd area
Claims
1. A defect detection device, comprising: an image acquisition unit that acquires an image of a detection target and creates an ortho-image by correcting a positional shift of an image on the image using the acquired image; A determination unit that determines the presence or absence of a defective portion in the detection target by performing image recognition on the ortho-image; An extraction unit that extracts a position of the defect in the orthoimage; A mask unit that performs a mask process on the pixel at the position extracted by the extraction unit in the orthoimage; Equipped with A defect detection device, wherein the determination by the determination unit, the extraction by the extraction unit, and the masking process by the masking unit are repeatedly performed until the determination unit determines that there is no defect.
2. The defect detection device according to claim 1, The extraction unit extracts a range of the defective portion including a position that is the most important reason for the determination of the defective portion by the determination unit, and The masking unit assigns a predetermined value to the alpha channel of the pixels in the range.
3. The defect detection device according to claim 2, The masking section places an object by combining a set of a plurality of pixels that differ in at least one of size and shape so as to cover the range.
4. The defect detection device according to claim 3, The masking unit changes the hue of the object to a preset hue so that the object is not determined to be a defective portion.
5. The defect detection device according to any one of claims 1 to 4, further comprising: a learning unit that creates a learning model used by the judgment unit to judge the presence or absence of the defective portion, The defect detection device, wherein the learning unit creates the learning model by performing deep learning using a plurality of partial images extracted from the orthoimage.
6. A defect detection method, comprising the steps of: an image acquisition step of acquiring an image of the object to be detected and creating an orthoimage by correcting the positional deviation of the image on the image using the acquired image; A determination step of determining the presence or absence of a defective portion in the detection target by image recognition of the ortho-image; Extracting the location of the defect in the orthoimage; a masking step of performing a masking process on the pixel at the position extracted by the extraction step in the orthoimage; Equipped with A defect detection method, wherein the determination in the determination step, the extraction in the extraction step, and the masking in the masking step are repeatedly performed until it is determined in the determination step that there is no defect.
7. A computer program comprising: an image acquisition function that acquires an image of a detected object and creates an ortho-image by correcting the positional deviation of the image on the image using the acquired image; A determination function for determining the presence or absence of a defective portion in the detection target by image recognition of the ortho-image; An extraction function for extracting the position of the defect in the orthoimage; A masking function that performs a masking process on the pixel at the position extracted by the extraction function in the orthoimage; This is realized on a computer. a computer program, the determination by the determination function, the extraction by the extraction function, and the masking process by the masking function being repeatedly executed until the determination function determines that there is no defective portion;
Citation Information
Patent Citations
Electronic camera, and image processing program
JP2004080709A
Bubble detection device, method and program
JP2020085470A
Surface defect identification method and apparatus
JP2020187735A
Analysis program, analysis device, and analysis method
JP2020197875A
Identifying image defects
JP2022538468A
