IMAGE GENERATION SYSTEM, IMAGE GENERATION METHOD, AND IMAGE GENERATION PROGRAM

The image generation system uses a machine learning model to remove lens deposits, addressing the inability of conventional systems to automatically resolve image quality issues, enhancing image quality and facilitating efficient maintenance.

JP7539621B2Active Publication Date: 2024-08-26NAGOYA ELECTRIC WORKS
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2021197779
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-12-06
Publication Date
2024-08-26
Estimated Expiration
2041-12-06

AI Technical Summary

Technical Problem

Conventional techniques can detect image quality deterioration due to lens deposits but cannot automatically resolve it, requiring manual intervention by a supervisor.

Method used

An image generation system that utilizes a machine learning model to remove lens deposits from captured images, generating a post-removal image and providing it to users while automatically detecting and warning about excessive deposits.

Benefits of technology

Automatically reduces the impact of lens deposits on images, enabling efficient maintenance and preventing unnecessary manual checks, while allowing image-based analysis and judgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007539621000002
    Figure 0007539621000002
  • Figure 0007539621000003
    Figure 0007539621000003
  • Figure 0007539621000005
    Figure 0007539621000005
Patent Text Reader

Abstract

To provide a technique that reduces an effect of an adhered substance on a lens on a captured image.SOLUTION: An image generation system is configured by including a captured image acquisition unit that acquires a captured image captured by a camera, an adhered substance removal unit that inputs the captured image to a machine learning model that is machine-learned to output an image in which an adhered subject to a lens of the camera is removed by inputting the image captured by the camera, and outputs a removed image after the adhered substance is removed, and a display control unit that causes the removed image to be displayed on a display unit.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to an image generation system, an image generation method, and an image generation program. [Background technology]

[0002] It is known that if a substance adheres to a camera lens, the captured image will be deteriorated. Patent Document 1 discloses a technology that uses a discrimination model to determine whether or not a defect caused by a dirty or cloudy lens occurs in an image. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] Patent No. 6616906 Summary of the Invention [Problem to be solved by the invention]

[0004] In the conventional technology, it is possible to detect deterioration in image quality, but it is not possible to automatically eliminate the deterioration in image quality. Therefore, in the conventional technology, when deterioration is detected, a monitor is notified and the monitor goes to the camera installation site to clean the camera or take other measures, otherwise the deterioration in image quality cannot be eliminated. The present invention has been made in consideration of the above-mentioned problems, and has an object to reduce the effect that adhesions to a lens have on a captured image. [Means for solving the problem]

[0005] In order to achieve the above-mentioned objective, the image generation system includes an image acquisition unit that acquires an image captured by a camera, and an object removal unit that inputs the image captured by the camera into a machine learning model that has been trained by machine learning to input the image and output an image from which any object adhering to the camera lens has been removed, and outputs a post-removal image from which the object adhering has been removed.

[0006] That is, in the image generation system, a machine learning model that generates an image in which the adhering matter on the lens is removed from an image captured by a camera is generated in advance by machine learning. Therefore, when the captured image captured by the camera is input to the machine learning model, a post-removal image in which the adhering matter has been removed can be generated. In addition, the captured image can be provided to the user in a state in which the effect of the adhering matter on the lens on the captured image has been reduced. [Brief description of the drawings]

[0007] [Figure 1] FIG. 1 is a block diagram of an image generation system. [Diagram 2] FIG. 2 is a diagram illustrating a generative model and a discriminative model. [Diagram 3] 1 is a flowchart of a machine learning process. [Figure 4] 13 is a flowchart of an image generating process. [Diagram 5] FIG. 13 is a diagram illustrating a comparative example of an image. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0008] Here, the embodiments of the present invention will be described in the following order. (1) Image generation system configuration: (2) Administrator terminal configuration: (3) Image generation processing: (4) Other embodiments:

[0009] (1) Image generation system configuration: 1 is a block diagram showing the configuration of an image generation system 10. The image generation system 10 includes a camera 40, and is installed in a position where the camera 40 can capture an image of a subject. The image generation system 10 generates a post-removal image in which any adhesions on the lens have been removed from the image captured by the camera 40, and displays the post-removal image on the display unit 400 of the administrator terminal 100.

[0010] The subject photographed by the camera 40 may be various objects, and there may be a plurality of objects. In this embodiment, the subject is a road, and an image generation system 10 is installed at each of a plurality of positions where each of the plurality of subjects can be photographed by the camera 40. Although one image generation system 10 is illustrated in FIG. 1, in reality, a plurality of image generation systems 10 are in operation, and the other image generation systems 10 are omitted from the illustration. There may be a plurality of administrator terminals 100, but in this embodiment, it is assumed that one administrator terminal 100 is used.

[0011] The image generation system 10 includes a control unit 20, a storage medium 30, a camera 40, and a communication unit 50. The control unit 20 includes a CPU, RAM, ROM, etc. (not shown), and can execute various programs recorded in the storage medium 30, etc. The communication unit 50 is a device that communicates with the administrator terminal 100. The form of communication is not limited, and wired communication or wireless communication can be used. The control unit 20 can transmit various information to the administrator terminal 100 via the communication unit 50, and can also receive various information from the administrator terminal 100.

[0012] The camera 40 is a device that forms an image of a landscape within a field of view on an image sensor using a lens. The control unit 20 controls the camera 40 and can acquire a captured image captured by the camera 40. In this embodiment, the camera 40 is installed outdoors. Therefore, rain, snow, mud, and the like may adhere to the lens during the operation of the image generating system 10. If a captured image is acquired with a substance adhering to the lens, the captured image includes an image of the substance, and therefore, a part of the landscape within the field of view that is originally intended may not be captured.

[0013] Therefore, in this embodiment, the control unit 20 executes the image generating program 21 to remove the attached matter. To execute such processing, the image generating program 21 has the functions of a photographed image acquiring unit 21a, an attached matter removing unit 21b, a display control unit 21c, and a warning control unit 21d. The photographed image acquiring unit 21a causes the control unit 20 to execute a function of acquiring a photographed image captured by the camera 40. In this embodiment, the control unit 20 acquires the photographed image output from the camera 40 at a default frame rate by the function of the photographed image acquiring unit 21a, and stores the photographed image data 30a in the storage medium 30.

[0014] The deposit removal unit 21b causes the control unit 20 to execute a function of inputting a captured image to the machine learning model 30b and outputting a post-removal image from which deposits have been removed. The machine learning model 30b is a model that has been machine-trained to input an image captured by the camera 40 and output an image from which deposits on the lens of the camera 40 have been removed. In this embodiment, the model is information indicating an equation for deriving a correspondence between the two pieces of data when the gradation value for each pixel of the input image data is set as an input value and the gradation value for each pixel of the image data of the generated image is set as an output value.

[0015] In this embodiment, the machine learning model 30b is created in advance by the administrator terminal 100 before the image generation system 10 is operated, and is stored in the storage medium 30. The creation of the machine learning model 30b will be described later. In this embodiment, the control unit 20 inputs each of the captured images output from the camera 40 at a default frame rate to the machine learning model 30b, and generates a post-removal image in which the attached matter has been removed from each captured image. The generated post-removal image is stored in the storage medium 30 as post-removal image data 30c.

[0016] The display control unit 21c causes the control unit 20 to execute a function of displaying the post-removal image on the display unit. In this embodiment, the display unit is provided in the administrator terminal 100. Then, the control unit 20 controls the communication unit 50 to transmit the post-removal image data 30c associated with the identification information of the image generation system 10 to the administrator terminal 100. When the administrator terminal 100 receives the post-removal image data 30c, the administrator terminal 100 controls the display unit 400 provided in the administrator terminal 100 to display the post-removal image together with the identification information of the image generation system 10.

[0017] As a result, the user of the administrator terminal 100 can visually confirm the image captured by the camera 40 of the image generation system 10. Even if there is an attachment on the lens of the camera 40, the attachment is removed by the machine learning model 30b. Therefore, the image can be provided to the user in a state in which the influence of the attachment on the lens on the captured image is reduced. The user can make various judgments, such as the presence or absence of a traffic jam, based on the image in a state in which the influence of the attachment is reduced. Furthermore, even when an analysis based on the image (for example, counting the number of vehicles, etc.) is performed, the image can be analyzed based on the image in a state in which the influence of the attachment is reduced.

[0018] The warning control unit 21d acquires the amount of attached matter in the photographed image based on a comparison between the photographed image and the post-removal image, and causes the control unit 20 to execute a function of outputting a warning to the warning unit based on the amount of attached matter. Since the post-removal image is an image after the attached matter has been removed, it can be estimated that the greater the change in the post-removal image compared to the photographed image, the greater the amount of attached matter contained in the original photographed image.

[0019] Therefore, the control unit 20 compares the captured image with the post-removal image, and obtains a numerical value as an index that increases as the difference between the two increases. The index may be obtained by various methods, and detailed examples will be described later. The control unit 20 obtains the amount of adhesion based on the size of the index, and when the amount of adhesion is equal to or greater than a predetermined standard, it considers the amount of adhesion on the lens of the camera 40 to be an amount that requires a warning. When it is considered to be an amount that requires a warning, the control unit 20 controls the communication unit 50 to associate the identification information of the image generation system 10 with information indicating that the amount of adhesion on the lens is an amount that requires a warning, and transmits the information to the administrator terminal 100. When the administrator terminal 100 receives these pieces of information, the administrator terminal 100 controls the display unit 400 provided in the administrator terminal 100 to display a warning that the amount of adhesion on the lens of the camera 40 is an amount that requires a warning, together with the identification information of the image generation system 10. Of course, the manner of the warning is not limited to a display, and a warning may be given by sound or the like.

[0020] As a result of the warning, the user of the administrator terminal 100 can recognize that the amount of adhesions on the lens of the camera 40 is the amount that is the subject of the warning. Therefore, the user can recognize that maintenance of the camera 40 is necessary in the image generation system 10 indicated by the identification information. When maintenance of the camera 40 is necessary, the maintenance may be performed in various ways. For example, the user of the administrator terminal 100 may inform a maintenance person of the identification number of the image generation system 10, and the maintenance person may clean or replace the lens of the camera 40. In addition to this, for example, the user of the administrator terminal 100 may notify a maintenance company of the identification number of the image generation system 10, and the maintenance company may clean or replace the lens of the camera 40. Of course, the notification to the maintenance person may be automatically performed from the administrator terminal 100. Furthermore, if maintenance of the camera 40 is not necessary, the maintenance is not performed.

[0021] According to the above configuration, even if an excessive amount of adhesion is attached to the lens of the camera 40, the maintenance target can be easily identified and maintenance can be performed. In addition, when an excessive amount of adhesion is not attached to the lens of the camera 40, for example, when the adhesion can be sufficiently removed by processing by the machine learning model 30b, it is possible to prevent unnecessary maintenance from being performed. Therefore, it is possible to reduce or eliminate waste such as periodically visiting multiple image generating systems 10 for maintenance.

[0022] (2) Administrator terminal configuration: Next, the configuration of the administrator terminal 100 will be described. The administrator terminal 100 includes a control unit 200, a storage medium 300, a display unit 400, and a communication unit 500. The display unit 400 is a display device that displays images. The communication unit 500 is a device that communicates with the image generation system 10.

[0023] The control unit 200 includes a CPU, RAM, ROM, a GPU (Graphics Processing Unit), etc. (not shown), and can execute various programs recorded in a storage medium 300 or the like. In this embodiment, the control unit 200 can execute a machine learning program 210 for generating a machine learning model 30b, and a communication control program 220 for controlling communication with the image generation system 10. When the machine learning program 210 is executed, the control unit 20 functions as a machine learning unit 210a. The machine learning unit 210a causes the control unit 200 to execute a machine learning process that optimizes a training model that forms a neural network. The model may be in various forms, but in this embodiment, it is assumed that a model called pix2pix is ​​machine-learned.

[0024] FIG. 2 is a diagram showing a machine learning model in this embodiment. In this embodiment, a generative model G and a discriminative model D are prepared as training models, and are alternately trained by competing with each other in an adversarial manner. The generative model G is a model that inputs an image and generates another image. Here, an image input to the generative model G is called an input image Ii, and an image output from the generative model G is called a generated image Ig. In machine learning, the input image Ii and the generated image Ig generated from the input image Ii are paired. In addition, a plurality of input images Ii are prepared. Therefore, for each input image Ii, there is a paired generated image Ig. In the upper center of FIG. 2, an arrow indicates that the input image Ii and the generated image Ig are paired.

[0025] Two image pairs are input to the identification model D. The input image pair is a pair of an input image Ii and a generated image Ig, or a pair of two images associated by the teacher data 300a. The teacher data 300a is defined by preparing a plurality of pairs of an input image Ii that may include an adhering matter R and a target image It that does not include the adhering matter R. In this embodiment, the input image Ii included in the teacher data 300a is also an image input to the generation model G during machine learning. The input image Ii is also a photographed image Ip taken by the camera 40 in a state in which an adhering matter may be attached to the lens. On the other hand, the target image It is an image that does not include an adhering matter R, and is an image that is taken by the camera 40 in a state in which an adhering matter R is not attached to the lens in the same environment as the photographed image Ip that is paired with the image. In the teacher data 300a, a plurality of pairs of an input image Ii and a target image It are also prepared. At the bottom center of FIG. 2, the input image Ii and the target image It are shown by arrows in the teacher data 300a. The teacher data 300a may be generated by various methods. For example, a plurality of images taken in a state where an attachment is actually attached to the lens and a state where an attachment is not attached may be prepared. In addition, an image taken in a state where an attachment is attached to the lens may be virtually generated by adding noise or the like to an image taken in a state where an attachment is not attached to the lens. In addition, a machine learning model may be generated in advance to input an image taken in a state where an attachment is not attached to the lens and output an image with an attachment added, and an image may be generated based on the machine learning model. In any case, the target image It is in a state where an attachment that may be included in the input image Ii has been removed.

[0026] As described above, by utilizing the fact that the target image It corresponding to the input image Ii is defined by the teacher data 300a, the discrimination model D is trained to discriminate whether or not the two input image pairs are a combination included in the teacher data 300a. That is, when the input image pair is the input image Ii and the target image It, the correct answer label is defined as real, and when the input image pair is the pair of the input image Ii and the generated image Ig, the correct answer label is defined as fake.

[0027] The discrimination model D is trained using real and fake prepared as correct labels so that when the input image pair is a pair of an input image Ii and a target image It (correct label is true), the value of the discrimination signal output is closer to a value indicating real. Also, when the input image pair is a pair of an input image Ii and a generated image Ig (correct label is false), the discrimination model D is trained so that the value of the discrimination signal output is closer to a value indicating fake. Furthermore, the generation model G is trained so that when a pair of an input image Ii and a generated image Ig is input to the discrimination model D, the value of the discrimination signal output is closer to a value indicating real (the generated image Ig is mistaken for the target image It). That is, training is performed so that the generated image Ig generated when a photographed image Ip as an input image Ii is input to the generation model G is closer to the target image It so that it cannot be distinguished from the target image It. Since the target image It is an image of the captured image Ip with all attached matter removed, if the generated image Ig and the target image It are trained to be indistinguishable from each other, it can be said that the generated image Ig is the post-removal image Ie from which the attached matter has been removed.

[0028] In order to perform the above-described machine learning, the teacher data 300a is prepared in advance before the machine learning is performed. When the teacher data 300a is prepared, the machine learning can be performed using the teacher data 300a.

[0029] FIG. 3 is a flowchart showing the machine learning process. In this embodiment, the machine learning process is executed in advance before the operation of the image generating system 10 is started. Furthermore, before the machine learning process is performed, teacher data 300a is prepared in advance. When the machine learning process is started, the control unit 200 acquires a training model by the function of the machine learning unit 210a (step S100). In this embodiment, the control unit 200 acquires a training model of the generative model G and a training model of the discriminative model D. Here, the training model is information such as a filter, an activation function, and a loss function indicating the model. Next, the control unit 200 acquires the teacher data 300a by the function of the machine learning unit 210a (step S105).

[0030] Next, the control unit 200 acquires test data by using the function of the machine learning unit 210a (step S110). In this embodiment, a part of the teacher data 300a is extracted and used as test data for checking whether or not learning has been generalized. Note that the test data is not used for machine learning.

[0031] Next, the control unit 200 determines initial values ​​by the function of the machine learning unit 210a (step S115). That is, the control unit 200 gives initial values ​​to the variable parameters (such as filter weights and biases) to be learned in the training model acquired in step S100. The initial values ​​may be determined by various methods. Of course, the initial values ​​may be adjusted so that the parameters are optimized during the learning process, or learned parameters may be acquired and used from various databases or the like.

[0032] Next, the control unit 200 performs learning using the function of the machine learning unit 210a (step S120). In this embodiment, the control unit 200 fixes one of the generative model G and the discriminative model D and performs machine learning on the other, and further fixes the other with the learned parameters and performs machine learning on one of them.

[0033] Specifically, in this embodiment, the control unit 200 first fixes the generative model G. That is, the control unit 200 refers to the teacher data 300a, extracts the input image Ii, and inputs it to the generative model G. As a result, a generated image Ig is obtained. When the generated image Ig is obtained, the control unit 200 inputs an image pair to the discriminative model D. As described above, an image pair is a pair of an input image Ii and a generated image Ig generated based on the input image Ii, or a pair of an input image Ii and a target image It associated in the teacher data 300a. The image pair input to the discriminative model D may be determined, for example, statistically.

[0034] When an input is made to the discriminative model D, the discriminative model D outputs a discrimination signal indicating whether one of the input image pair is discriminated as the generated image Ig or the target image It. When machine learning is performed, it is determined in advance whether one of the input image pair is the generated image Ig or the target image It, so the correct answer label of true or false is also determined in advance. Therefore, the control unit 200 optimizes the discriminative model D so as to minimize the error based on the error between the correct answer label (1 for real (true), 0 for fake (false)) and the discrimination signal output from the discriminative model D. That is, the control unit 200 specifies the error based on a loss function that evaluates the magnitude of the error. Once the loss function is obtained, the control unit 200 updates the parameters using a predetermined optimization algorithm, for example, a stochastic gradient descent method. That is, the control unit 200 performs a process of updating the parameters based on the derivative of the loss function by the parameters.

[0035] Next, the control unit 200 fixes the discriminative model D. That is, the control unit 200 refers to the teacher data 300a, extracts the input image Ii, and inputs it to the generative model G. As a result, a generated image Ig is obtained. When the generated image Ig is obtained, the control unit 200 inputs the input image Ii and the generated image Ig to the discriminative model D.

[0036] When an input is made to the discriminative model D, the discriminative model D outputs a discrimination signal indicating the discrimination result of whether the generated image Ig, which is one of the input image pair, is true or false. The machine learning of the generative model G is carried out so that the discrimination result by the discriminative model D of the generated image Ig, which is the output of the generative model G, approaches a value indicating true. For this reason, it can be said that the smaller the error (first error) between the discrimination signal output from the discriminative model D and the numerical value 1 indicating true, the more optimized the generative model G is.

[0037] Furthermore, if the attached matter is completely removed from the generated image Ig output from the generative model G, the image should be equivalent to the target image It. Therefore, it can be said that the smaller the error (second error) between the generated image Ig and the target image It, the more optimized the generative model G is.

[0038] Therefore, the control unit 200 performs machine learning based on a loss function that evaluates the magnitude of these first and second errors. That is, the error required for learning the generative model G is the error passed through the discriminative model D and the error representing the difference between the generated image Ig obtained by inputting the input image Ii to the generative model G and the target image It, and these errors are combined and back-propagated. Once the loss function is obtained, the control unit 200 updates the parameters using a predefined optimization algorithm, for example, a stochastic gradient descent method. That is, the control unit 200 performs a process of updating the parameters based on the derivative of the loss function by the parameters. In this embodiment, the optimization of the discriminative model D and the optimization of the generative model G as described above constitute one cycle of learning, and machine learning is performed by repeating this cycle. Note that the two model structures of the generative model G and the discriminative model D, the setting of the loss function, the setting of the learning parameters, and the like may be performed by various methods, and various known technologies can be used.

[0039] After updating the parameters for a preset number of cycles, the control unit 200 determines whether generalization of the training model is complete (step S125). That is, the control unit 200 inputs the input image Ii of the test data acquired in step S110 into the generation model G of the training model to generate a generated image Ig. The control unit 200 also inputs a pair of the generated generated image Ig and the input image Ii into the discrimination model D of the training model to obtain a numerical value indicating true or false. The control unit 200 then acquires the number of pairs of test data whose discrimination results were equal to or greater than a threshold (a value close to the true), and divides the number by the total number of samples of the test data to obtain the probability that an image identified as true was generated. In this embodiment, the control unit 200 determines that generalization is complete when the probability is equal to or greater than a threshold.

[0040] In addition to evaluating the generalization performance, the validity of the hyperparameters may be verified. That is, in a configuration in which a hyperparameter that is a variable amount other than the variable parameters to be learned, such as the number of nodes, is tuned, the control unit 200 may verify the validity of the hyperparameters based on the validation data. The validation data may be obtained by extracting validation data in advance from the teacher data 300a by the same process as in step S110, and securing the validation data as data not used for training.

[0041] If it is not determined in step S125 that the generalization of the training model is complete, the control unit 200 repeats step S120. That is, a process of updating the variable parameters to be further learned is performed. On the other hand, if it is determined in step S125 that the generalization of the training model is complete, the control unit 200 records the machine-learned generation model G as the machine-learning model 30b (step S130). That is, the control unit 200 records the generation model G, of the learned models, as the machine-learning model 30b in the storage medium 300. In addition, the control unit 200 controls the communication unit 500 to transmit the machine-learning model 30b to the image generation system 10 and store it in the storage medium 30. Of course, the identification model D may be recorded in at least one of the storage medium 30 of the image generation system 10 and the storage medium 300 of the administrator terminal 100, and may be available for operation check, re-learning, and the like.

[0042] (3) Image generation processing: Next, the image generation process executed in the image generation system 10 will be described with reference to the flowchart shown in Fig. 4. The image generation process is executed after the machine learning model 30b is recorded in the storage medium 30. The image generation process is executed in a state where the image generation system 10 is installed so that the subject to be photographed is located within the field of view of the camera 40. In this embodiment, the image generation process is executed repeatedly at the photographing period of the camera 40.

[0043] When the image generation process is started, the control unit 20 acquires a captured image by the function of the captured image acquisition unit 21a (step S200). That is, the control unit 20 stores the captured image data 30a indicating the captured image output from the camera 40 in the storage medium 30. Next, the control unit 20 inputs the captured image to the machine learning model by the function of the attachment removal unit 21b (step S205). That is, the control unit 20 inputs the captured image Ip indicated by the captured image data 30a to the machine learning model 30b. Next, the control unit 20 acquires a post-removal image by the function of the attachment removal unit 21b (step S210). That is, the control unit 20 regards the generated image Ig output from the machine learning model 30b as the post-removal image Ie, and stores the post-removal image data 30c indicating the post-removal image Ie in the storage medium 30.

[0044] Next, the control unit 20 executes display control of the post-removal image by using the function of the display control unit 21c (step S215). That is, the control unit 20 controls the communication unit 50 to associate the post-removal image data 30c with the identification information of the image generation system 10 and transmit it to the administrator terminal 100. The control unit 200 of the administrator terminal 100 controls the communication unit 500 by using the function of the communication control program 220 to receive the post-removal image data 30c and store it in the storage medium 300. Furthermore, the control unit 200 controls the display unit 400 by using the function of the communication control program 220 to display the post-removal image indicated by the post-removal image data 30c in association with the identification information of the image generation system 10.

[0045] When step S215 is executed, the control unit 20 acquires the difference between the photographed image and the post-removal image by the function of the warning control unit 21d (step S220). In this embodiment, the photographed image and the post-removal image are images of the same size and shape. Therefore, the control unit 20 refers to the photographed image data 30a and the post-removal image data 30c, and performs a process for each pixel to acquire the difference in gradation value between pixels at the same coordinates. In this embodiment, the photographed image and the post-removal image are images consisting of three channels, red, blue, and green, so the process for acquiring the difference is performed for each pixel, and the sum of the difference is set as a value indicating the difference between each pixel. This configuration is one example, and the value indicating the difference for each pixel may be acquired in various ways. For example, the value obtained by multiplying the difference between each channel of red, blue, and green by a weighting coefficient and adding them may be set as a value indicating the difference for each pixel.

[0046] When the difference for each pixel is acquired, the control unit 20 acquires the ratio of pixels whose difference is equal to or greater than the threshold value by the function of the warning control unit 21d (step S225). That is, the control unit 20 regards the image of a pixel whose difference value is equal to or greater than the threshold value as an image of an adhering substance, and evaluates the amount of the adhering substance by the ratio of the pixel to the entire image. FIG. 5 shows an image Id in which pixels whose difference between the post-removal image Ie generated from the photographed image Ip by the machine learning model 30b and the photographed image Ip is colored gray, respectively. In the image Id, the part whose difference is smaller than the threshold value (close to 0) is colored white. As shown in FIG. 5, when the post-removal image Ie in which the adhering substance on the lens is removed is generated, the difference between the photographed image Ip and the post-removal image Ie becomes close to 0 in the area where no adhering substance exists, and becomes large in the area where the adhering substance exists.

[0047] Therefore, the control unit 20 counts the number of pixels that are considered to be images of attached matter, and divides it by the total number of pixels to obtain the ratio of the attached matter to the image. Since the ratio of the attached matter to the image corresponds to the amount of the attached matter, in this embodiment, the amount of the attached matter attached to the lens is evaluated based on the difference between the captured image and the image after removal. With the above configuration, it is possible to easily, objectively, and automatically determine the amount of the attached matter attached to the lens of the camera 40.

[0048] Next, the control unit 20 determines whether the ratio acquired in step S225 is equal to or greater than a reference value (step S230) by using the function of the warning control unit 21d. That is, a reference value for which a warning is to be issued is determined in advance, and the control unit 20 considers that the amount of the deposits on the lens of the camera 40 is an amount for which a warning is to be issued if the ratio acquired in step S225 is equal to or greater than the reference value.

[0049] If it is determined in step S230 that the ratio is equal to or greater than the reference level, the control unit 20 controls the communication unit 50 using the function of the warning control unit 21d to associate the identification information of the image generation system 10 with the information indicating that the amount of adhesion is an amount that requires a warning, and transmits the associated information to the manager terminal 100. The control unit 200 of the manager terminal 100 controls the communication unit 500 using the function of the communication control program 220 to receive the information and store it in the storage medium 300. Furthermore, the control unit 200 controls the display unit 400 using the function of the communication control program 220 to display, together with the identification information of the image generation system 10, warning information indicating that the amount of adhesion on the lens in the image generation system 10 of the identification information exceeds the amount that requires a warning.

[0050] (4) Other embodiments: The above embodiment is an example for implementing the present invention, and various other embodiments can be adopted. For example, the image generation system 10 may be realized by a plurality of devices. Furthermore, machine learning may be implemented in the image generation system 10, or may be implemented in other devices, such as a server or a portable terminal. If machine learning can be executed in the image generation system 10, for example, re-learning using images captured at each site where the image generation system 10 is installed is possible.

[0051] If machine learning is possible on a portable terminal, machine learning can be performed at any location on the terminal. Therefore, machine learning can be performed at the site where the image generation system 10 is installed or in the vicinity thereof, and the learned machine learning model 30b can be transferred to the image generation system 10 by any means such as a removable memory, wired communication, or wireless communication, and the machine learning model 30b can be updated. With this configuration, even if the image generation system 10 is not connected to a computer such as the administrator terminal 100 via a network, the machine learning model 30b can be updated and a post-removal image in which the attached matter has been removed can be generated using the updated machine learning model 30b. Of course, in this configuration, the administrator terminal 100 may or may not exist. Note that, even in the above configuration, machine learning is performed on the generative model G and the discriminative model D, but the post-removal image can be generated by using at least the generative model G. Therefore, it is sufficient that at least the generative model G is stored in the image generation system 10, but in this configuration, machine learning of the generative model G and the discriminative model D may be possible in the image generation system 10.

[0052] Furthermore, the image generating system 10 may include a display unit, and the post-removal image may be displayed in the image generating system 10. Also, the image generating system 10 may include a warning unit, and the image generating system 10 may issue a warning. Furthermore, at least some of the photographed image acquisition unit 21a, the deposit removal unit 21b, the display control unit 21c, and the warning control unit 21d may be separated and present in multiple devices. Of course, some of the configurations of the above-mentioned embodiment may be omitted, and the order of processing may be changed or omitted.

[0053] The captured image acquisition unit may acquire a captured image captured by a camera. Therefore, the camera may be provided in the image generation system 10, or an image captured by a camera installed outside the image generation system 10 may be acquired. The captured image may be an image captured by a camera, and the captured image itself may be input to the machine learning model, or an image subjected to various processes may be input to the machine learning model. The various processes are not limited, and may include, for example, contrast and brightness adjustment, trimming, rotation, enlargement, reduction, noise removal, and other processes.

[0054] The object removal unit is only required to input the captured image to the machine learning model and output the image after removal of the object. Here, since the removal of the object is performed by the machine learning model, it can be said that the removal has been performed if an image that is likely to be captured by the camera when there is no object is obtained based on the captured image. In other words, the removal of the object does not necessarily mean that an image without the object is strictly obtained, and it is sufficient that at least a part of the object included in the captured image is close to being removed.

[0055] After the attachment is removed, it is preferable that there is an image of the subject that is likely to be captured if the attachment does not exist. Therefore, it is preferable to perform machine learning so that a subject partially hidden by an attachment can be reproduced. For this reason, it is preferable that the training data for machine learning includes images including objects that can be subjects. For example, if an image including a road is captured by a camera, it is preferable that the training data includes images including moving objects that can be captured within the field of view, such as cars, bicycles, and pedestrians, in addition to images including stationary objects such as roads.

[0056] The adhesions are various objects that may adhere to the lens and block the subject, and the type is not limited. For example, the adhesions may be rain, snow, mud, stones, or residues left after water on the lens evaporates. Objects that may block the subject, such as fog or mist, may be removed by the machine learning model.

[0057] The machine learning model may be a model that has been machine-learned to input an image captured by a camera and output an image from which any adhering matter on the camera lens has been removed. The input and output formats are not limited, and various types of images may be input and output. That is, either the captured image captured by the camera itself or an image processed from the captured image may be input. The format of the input image and the output image may be the same or different.

[0058] The machine learning model may be a model that converts a captured image into a post-removal image, and may have various configurations other than those described above. That is, the machine learning model may be an image-image conversion model obtained by various aspects of DCGAN (Deep Convolutional Generative Adversarial Networks) or their derivatives, conditional GAN, etc.

[0059] The mode of machine learning is not limited, and machine learning may be performed by appropriately selecting various elements such as the number of layers and the number of nodes constituting the neural network, the type of activation function, the type of loss function, the type of gradient descent method, the type of optimization algorithm for gradient descent method, the presence or absence of mini-batch learning and the number of batches, the learning rate, the initial value, the type or presence or absence of an overlearning suppression method, the presence or absence of a convolutional layer, the size of the filter in the convolution operation, the type of filter, the type of padding or stride, the type or presence or absence of a pooling layer, the presence or absence of a fully connected layer, and the presence or absence of a recursive structure. Of course, learning may be performed by other machine learning, such as a support vector machine, clustering, or reinforcement learning. Furthermore, machine learning may be performed in which the structure of the model (for example, the number of layers, the number of nodes per layer, etc.) is automatically optimized. Various modes may also be adopted as the mode of various parameters. For example, the range of the identification signal output from the identification model D is not limited to 0 to 1, and may be a range of 0 to 100, etc.

[0060] In addition, in the above embodiment, the output of the discriminative model D is one output, but the aspect of the discriminative model D is not limited to this aspect. For example, a model may be defined so that two outputs are obtained from the discriminative model D, and a value representing a false accuracy is output from one, and a value representing a true accuracy is output from the other. In this case, when the discriminative model D and the generative model G are trained, the difference between the vector consisting of two outputs and the corresponding target vector is back-propagated, and training is performed in the same manner as in the above embodiment.

[0061] The display control unit may display various information other than the post-removal image on the display unit as long as it can display the post-removal image on the display unit. For example, the display control unit may display the post-removal image and the installation position of the image generation system 10 on the display unit in association with each other. The display control unit may also display the results of various processes on the post-removal image, for example, analysis results of the post-removal image (such as the degree of congestion on a road) in association with the post-removal image on the display unit.

[0062] The warning control unit may obtain the amount of the attached matter in the photographed image based on a comparison between the photographed image and the post-removal image, and may output a warning to the warning unit based on the amount of the attached matter. That is, the warning control unit may warn the user that the amount of attached matter that is the subject of the warning is attached to the camera lens. The comparison between the photographed image and the post-removal image is not limited to a configuration in which the difference in the gradation value for each pixel is obtained as in the above-mentioned embodiment. That is, various comparisons may be made instead of or in addition to the difference in the gradation value. For example, comparisons of various feature amounts of the images, comparisons of histograms, comparisons of contrast, brightness, etc. may be made. In addition, a configuration in which a part of each image is compared and the remaining part is not compared may be adopted. For example, if the image includes a road, the photographed image and the post-removal image may be compared in the road and the part including the road, and the remaining part such as the sky may not be compared.

[0063] The amount of adhesion may be obtained based on a comparison between the photographed image and the post-removal image. The amount of adhesion may be evaluated by various indices. Therefore, in addition to the configuration in which the amount of adhesion is evaluated based on the ratio of pixels whose difference is equal to or greater than a threshold to all pixels as in the above-mentioned embodiment, various configurations may be adopted. For example, the amount of adhesion may be evaluated based on the cumulative value of the magnitude of the difference, or a portion where the photographed image and the post-removal image differ by the difference or the like may be specified, and a portion of the portion with a small area may be removed as noise. In addition, the shape of the continuous adhesion may be reproduced based on the shape of the portion where the photographed image and the post-removal image differ by the difference or the like, and the amount of adhesion may be evaluated.

[0064] Whether or not to output a warning may be determined based on the amount of attached matter, and a warning may be issued according to the amount of attached matter. For example, the strength of the warning may increase stepwise or continuously as the amount of attached matter increases. Furthermore, the warning unit may be provided in the image generating system 10, or may be provided in a device external to the image generating system 10 as in the above-mentioned embodiment. In any case, it is sufficient for the warning control unit to be able to cause the warning unit to display the post-removal image.

[0065] Furthermore, the method of removing the image of the adhering matter from the image by the machine learning model as in the present invention can also be applied as a program or a method. In addition, the above-mentioned system, program, and method can be realized as a single device or a plurality of devices, and include various aspects. In addition, it can be modified as appropriate, such as being partly software and partly hardware. Furthermore, the invention can also be established as a recording medium of a program that controls the system. Of course, the recording medium of the software may be a magnetic recording medium or a semiconductor memory, and can be considered in exactly the same way in any recording medium developed in the future. [Explanation of symbols]

[0066] 10...image generation system, 20...control unit, 21...image generation program, 21a...captured image acquisition unit, 21b...adhesive removal unit, 21c...display control unit, 21d...warning control unit, 30...storage medium, 30a...captured image data, 30b...machine learning model, 30c...image data after removal, 40...camera, 50...communication unit, 100...administrator terminal, 200...control unit, 210...machine learning program, 210a...machine learning unit, 220...communication control program, 300...storage medium, 300a...teacher data, 400...display unit, 500...communication unit, D...recognition model, G...generative model

Claims

1. a captured image acquisition unit that acquires a captured image captured by a camera; an object removal unit that inputs the captured image to a machine learning model that has been trained to input an image captured by the camera and output an image from which the object has been removed from the lens of the camera, and outputs a post-removal image from which the object has been removed; a warning control unit that acquires an amount of the attachment in the captured image based on a difference between the captured image and the post-removal image, and causes a warning unit to output a warning based on the amount of the attachment; An image generating system comprising:

2. Further comprising a display control unit that causes the post-removal image to be displayed on a display unit. The image generating system of claim 1 .

3. A photographed image acquisition step for acquiring a photographed image taken by a camera; an object removal step of inputting the captured image to a machine learning model that has been trained to input the image captured by the camera and output an image from which the object has been removed from the lens of the camera, and outputting a post-removal image from which the object has been removed; a warning control step of acquiring an amount of the adhesion in the captured image based on a difference between the captured image and the post-removal image, and causing a warning unit to output a warning based on the amount of the adhesion; An image generating method comprising:

4. A computer comprising: a captured image acquisition unit that acquires a captured image taken by a camera; an object removal unit that inputs the captured image to a machine learning model that has been trained to input the image captured by the camera and output an image from which the object attached to the lens of the camera has been removed, and outputs a post-removal image from which the object attached is removed; a warning control unit that obtains an amount of the attachment in the captured image based on a magnitude of a difference between the captured image and the post-removal image, and causes a warning unit to output a warning based on the amount of the attachment; An image generation program that acts as a

Citation Information

Patent Citations

  • Camera device for mobile object and method of detecting attachment

    JP2010273014A

  • On-vehicle camera system

    JP2018098745A

  • Abnormality detection system of lens or lens cover of visual sensor

    JP2019211571A

  • Information processing method, information processing device, and program

    JP2020042760A

  • Video restoration system, video restoration method, and program

    JP2020174320A