Image defogging method, device and equipment based on neural network model

By merging the two-parameter atmospheric scattering model into a single-parameter model and using a neural network to calculate the value of this single parameter, the problem of low quality dehazing images in the existing technology is solved and a higher-quality dehazing effect is achieved.

CN114862691BActive Publication Date: 2024-10-15JILIN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210289357.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-23
Publication Date
2024-10-15
Estimated Expiration
2042-03-23

AI Technical Summary

Technical Problem

Existing image dehazing methods reduce the quality of dehazed images due to the accumulation of errors in separately calculating the atmospheric coefficient and transmittance.

Method used

A single-parameter atmospheric scattering model is used to combine the transmittance and atmospheric layer coefficient into a single parameter, and the value of the single parameter is calculated through the neural network model to obtain the dehazed image.

Benefits of technology

The cumulative error caused by calculating multiple parameter values ​​is reduced and the quality of the dehazed image is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114862691B_ABST
    Figure CN114862691B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image defogging technology, and in particular to an image defogging method, device and apparatus based on a neural network model. The present invention first deforms an atmospheric scattering model so that an atmospheric scattering model with two unknown parameters becomes an atmospheric scattering model with only one unknown parameter. Then, the value of the only unknown parameter is calculated through a neural network, and finally, the value of the unknown parameter is substituted into the atmospheric scattering model to obtain a defogging image. Since the present invention only needs to calculate the value of one parameter through a neural network model, it can reduce the cumulative error caused by calculating multiple parameter values, thereby improving the quality of the defogging image finally calculated using the parameter value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image defogging, and in particular to an image defogging method, device and equipment based on a neural network model. Background Art

[0002] In foggy or hazy scenes, images captured by optical sensors will be scattered by atmospheric particles, resulting in loss of image details, dim colors, reduced brightness, reduced image contrast and color fidelity, which directly affects people's visual perception of images, affects the later processing of images, and affects the work of various systems that rely on optical imaging instruments, such as satellite remote sensing systems, aerial photography systems, outdoor monitoring and target recognition systems. Due to the scattering effect of atmospheric particles in hazy weather, images obtained through video and image acquisition systems usually have low visibility, which will seriously affect the subsequent target recognition and target tracking functions of computer vision systems. Therefore, in order to meet the needs of computer vision processing systems, transportation, aerospace, and military security, foggy images are defogged and restored to improve the clarity and contrast of foggy images.

[0003] Dr. He Kaiming's dark channel theory (two-parameter atmospheric scattering model) first estimates the atmospheric coefficient and transmittance based on the dark channel map of the foggy image, and then substitutes the atmospheric coefficient and transmittance into the two-parameter atmospheric scattering model to obtain the defogging image according to the model. With the rapid development of deep learning, deep learning is also applied to image defogging. Deep learning is mainly divided into supervised learning and unsupervised learning. Image defogging also produces two neural network training methods, one is the convolutional neural network (CNN) for model estimation, and the other is the neural adversarial network to generate defogging images. Both the convolutional neural network and the neural adversarial network calculate the two parameters of the atmospheric coefficient and transmittance in the two-parameter atmospheric scattering model separately. Since the values ​​of the two parameters are calculated separately, errors will inevitably occur in the two calculations. Then the accumulation of the two errors will increase the final calculation error, thereby reducing the quality of the defogging image.

[0004] In summary, existing dehazing methods reduce the quality of dehazed images.

[0005] Therefore, the prior art still needs to be improved and enhanced. Summary of the invention

[0006] In order to solve the above technical problems, the present invention provides an image defogging method, device and equipment based on a neural network model, which solves the problem that the existing defogging methods reduce the quality of the defogged image.

[0007] To achieve the above object, the present invention adopts the following technical solutions:

[0008] In a first aspect, the present invention provides an image defogging method based on a neural network model, comprising:

[0009] Calculate the single-parameter atmospheric scattering model consisting of a single parameter;

[0010] Inputting the foggy image into a trained neural network model to obtain a parameter value corresponding to the single parameter output by the trained neural network model;

[0011] The single-parameter atmospheric scattering model is applied to the foggy image and the parameter value to obtain a defogged image.

[0012] In one implementation, the calculating a single-parameter atmospheric scattering model consisting of a single parameter includes:

[0013] Obtain a two-parameter atmospheric scattering model consisting of transmittance and atmospheric layer coefficient;

[0014] The dual-parameter atmospheric scattering model is deformed, and the transmittance and the atmospheric layer coefficient are combined into a single parameter to obtain a single-parameter atmospheric scattering model.

[0015] In one implementation, the training method of the trained neural network model includes:

[0016] According to the neural network model, a dual convolution module network model consisting of a first convolution module and a second convolution module in the neural network model is obtained;

[0017] Obtain a foggy sample image and a single parameter sample value corresponding to the foggy sample image;

[0018] Inputting the foggy sample image into the first convolution module to obtain a feature map output by the first convolution module;

[0019] Inputting the feature map into the second convolution module to obtain a parameter training value corresponding to the single parameter output by the second convolution module;

[0020] The dual convolution module network model is trained according to the parameter training value and the single parameter sample value to obtain the trained dual convolution module network model.

[0021] In one implementation, inputting the foggy sample image into the first convolution module to obtain a feature map output by the first convolution module includes:

[0022] According to the first convolution module, each convolution layer constituting the first convolution module, and a pooling layer and an upsampling layer located between each of the convolution layers are obtained;

[0023] The foggy sample image is input into a convolutional layer as an input layer, and a feature map output by an upsampling layer as an output layer is obtained.

[0024] In one implementation, from the input layer close to the first convolution module to the upsampling layer close to the output layer of the first convolution module, the sizes of each convolution layer are 11*11, 9*9, 7*7, 5*5, 3*3, and 1*1, respectively.

[0025] In one implementation, inputting the feature map into the second convolution module to obtain the parameter training value corresponding to the single parameter output by the second convolution module includes:

[0026] According to the second convolution module, a second convolution unit in the second convolution module is obtained, wherein the second convolution unit includes a first convolution layer, a second convolution layer, a third convolution layer, a fourth convolution layer, a fifth convolution layer, a first connection layer, a second connection layer, and a third connection layer;

[0027] Inputting the feature map into the first convolutional layer to obtain a first result output by the first convolutional layer;

[0028] Inputting the first result into the second convolutional layer to obtain a second result output by the second convolutional layer;

[0029] Inputting the first result and the second result into the first connection layer to obtain a first intermediate result output by the first connection layer;

[0030] Inputting the first intermediate result into the third convolutional layer to obtain a third result output by the third convolutional layer;

[0031] Inputting the second result and the third result into the second connection layer to obtain a second intermediate result output by the second connection layer;

[0032] Inputting the second intermediate result to the fourth convolutional layer to obtain a fourth result output by the fourth convolutional layer;

[0033] Inputting the fourth result and the third result into the third connection layer to obtain a third intermediate result output by the third connection layer;

[0034] The third intermediate result is input into the fifth convolutional layer to obtain a parameter training value corresponding to the single parameter output by the fifth convolutional layer.

[0035] In one implementation, applying the single-parameter atmospheric scattering model to the foggy image and the parameter value to obtain a defogged image includes:

[0036] Applying a nonlinear mapping model to the foggy image and the parameter value to obtain the parameter value after mapping, wherein the parameter value after mapping corresponds to a pixel point position of the foggy image;

[0037] The single-parameter atmospheric scattering model is applied to the foggy image and the mapped parameter value to obtain a defogged image.

[0038] In a second aspect, an embodiment of the present invention further provides an image defogging device based on a neural network model, wherein the device comprises the following components:

[0039] A model calculation module is used to calculate a single-parameter atmospheric scattering model consisting of a single parameter;

[0040] A parameter value calculation module, used for inputting the foggy image into the trained neural network model to obtain the parameter value corresponding to the single parameter output by the trained neural network model;

[0041] The defogging module is used to apply the single-parameter atmospheric scattering model to the foggy image and the parameter value to obtain a defogging image.

[0042] In a third aspect, an embodiment of the present invention further provides a terminal device, wherein the terminal device includes a memory, a processor, and an image defogging program based on a neural network model stored in the memory and executable on the processor, and when the processor executes the image defogging program based on the neural network model, the steps of the image defogging method based on the neural network model described above are implemented.

[0043] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which is stored an image defogging program based on a neural network model. When the image defogging program based on a neural network model is executed by a processor, the steps of the above-mentioned image defogging method based on a neural network model are implemented.

[0044] Beneficial effect: The present invention first deforms the atmospheric scattering model so that the atmospheric scattering model with two unknown parameters becomes an atmospheric scattering model with only one unknown parameter. Then the value of the only unknown parameter is calculated by a neural network, and finally the value of the unknown parameter is substituted into the atmospheric scattering model to obtain the defogging image. Since the present invention only needs to calculate the value of one parameter through the neural network model, it can reduce the cumulative error caused by calculating multiple parameter values, thereby improving the quality of the defogging image finally calculated using the parameter value. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 It is the overall flow chart of the present invention;

[0046] Figure 2 is a structural diagram of the first convolution module in the embodiment;

[0047] Figure 3 is a structural diagram of the second convolution module in the embodiment;

[0048] Figure 4 It is a mapping schematic diagram in the embodiment;

[0049] Figure 5 is a foggy image in the embodiment;

[0050] Figure 6 is a fog-free image in the embodiment;

[0051] Figure 7 This is a block diagram of the internal structure principle of the terminal device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0052] The following is a clear and complete description of the technical solution of the present invention in combination with the embodiments and the accompanying drawings. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0053] Research has found that in foggy or hazy scenes, the images captured by optical sensors will be scattered by atmospheric particles, resulting in loss of image details, dim colors, reduced brightness, image contrast and color fidelity. This directly affects people's visual perception of images, affects the later processing of images, and affects the work of various systems that rely on optical imaging instruments, such as satellite remote sensing systems, aerial photography systems, outdoor monitoring and target recognition systems. Due to the scattering effect of atmospheric particles in hazy weather, images obtained by video and image acquisition systems usually have low visibility, which will seriously affect the subsequent target recognition and target tracking functions of computer vision systems. Therefore, in order to meet the needs of computer vision processing systems, transportation, aerospace, and military security, foggy images are defogged and restored to improve the clarity and contrast of foggy images. Dr. He Kaiming's dark channel theory (two-parameter atmospheric scattering model) first estimates the atmospheric coefficient and transmittance based on the dark channel map of the foggy image, and then substitutes the atmospheric coefficient and transmittance into the two-parameter atmospheric scattering model to obtain the defogged image according to the model. With the rapid development of deep learning, deep learning is also applied to image dehazing. Deep learning is mainly divided into supervised learning and unsupervised learning. Image dehazing also produces two neural network training methods, one is the convolutional neural network (CNN) for model estimation, and the other is the neural adversarial network to generate dehazed images. Both the convolutional neural network and the neural adversarial network calculate the two parameters of the atmospheric coefficient and transmittance in the two-parameter atmospheric scattering model separately. Since the values ​​of the two parameters are calculated separately, errors will inevitably occur in the two calculations. Then the accumulation of the two errors will increase the final calculation error, thereby reducing the quality of the dehazed image.

[0054] In order to solve the above technical problems, the present invention provides an image defogging method, device and equipment based on a neural network model, which solves the problem that the existing defogging methods reduce the quality of the defogged image. In specific implementation, a single-parameter atmospheric scattering model composed of a single parameter is calculated; the foggy image is input into the trained neural network model to obtain the parameter value corresponding to the single parameter output by the trained neural network model; the single-parameter atmospheric scattering model is applied to the foggy image and the parameter value to obtain the defogged image. The defogging method of this embodiment can improve the quality of the defogged image.

[0055] Exemplary Methods

[0056] The image defogging method based on the neural network model of this embodiment can be applied to a terminal device, which can be a terminal product with an image acquisition function, such as a camera, a mobile phone, etc. Figure 1 As shown in , the image defogging method based on the neural network model specifically includes the following steps:

[0057] S100, calculating a single-parameter atmospheric scattering model composed of a single parameter.

[0058] The atmospheric scattering model is composed of a foggy image and a defogged image, and the defogged image can be obtained through the atmospheric scattering model. Step S100 includes the following steps S101 and S102:

[0059] S101, obtaining a dual-parameter atmospheric scattering model consisting of transmittance and atmospheric layer coefficient.

[0060] I(x)=J(x)*t(x)+A*(1-t(x)) (1)

[0061] The modified formula of formula (1) is:

[0062]

[0063] I(x) is the foggy image, x represents the pixel position of the foggy image, J(x) is the defogging image, t(x) is the transmittance, A is the atmospheric coefficient, t0 is a very small value to prevent the denominator from being 0, where t(x) is expressed as follows:

[0064] t(x)=e -βd(x) (2)

[0065] β is the atmospheric scattering coefficient, and d(x) is the distance between the scene corresponding to the foggy image and the shooting device.

[0066] After substituting formula (2) into formula (1), there will be two unknown parameters β and A in formula (1). β and A need to be calculated in order to calculate the defogging image J(x) through formula (1). Calculating β will produce a calculation error, and calculating A will also produce a calculation error. The accumulation of the two calculation errors will produce a larger calculation error. The quality of the defogging image calculated with a larger error will be very poor. Therefore, this embodiment converts the two unknown parameters into one unknown parameter through the following step S102, thereby reducing the calculation error.

[0067] S102, performing model deformation on the dual-parameter atmospheric scattering model, combining the transmittance and the atmospheric layer coefficient into a single parameter, and obtaining a single-parameter atmospheric scattering model.

[0068] J(x)=K(x)*I(x)-K(x)+b (3)

[0069] Where b is the default fixed deviation value, usually b is 1. The expression of K(x) is as follows:

[0070]

[0071] As long as the value of the single parameter K(x) is calculated, the defogging image J(x) can be obtained using formula (3).

[0072] S200, inputting the foggy image into a trained neural network model to obtain a parameter value corresponding to the single parameter output by the trained neural network model.

[0073] This embodiment includes two parts. The first part is to train the neural network model, and the second part is to calculate the value of K(x) in the foggy image using the trained neural network model.

[0074] The first part includes the following steps S201, S202, S203, S204, S205, S206:

[0075] S201, according to the neural network model, obtain a dual convolution module network model consisting of a first convolution module and a second convolution module in the neural network model.

[0076] S202: Obtain a foggy sample image and a single parameter sample value corresponding to the foggy sample image.

[0077] S203: According to the first convolution module, obtain each convolution layer constituting the first convolution module, and a pooling layer and an upsampling layer located between each of the convolution layers.

[0078] The first convolution module in this embodiment is as follows Figure 2 As shown, from left to right are the input layer, the first convolution layer, the first group of sampling pooling groups, the second convolution layer, the second group of convolution sampling pooling groups, the third convolution layer, the third group of convolution sampling pooling groups, the fourth convolution layer, the fourth convolution sampling pooling group, the fifth convolution layer, the fifth convolution sampling pooling group, the sixth convolution layer, the sixth convolution sampling pooling group, and the output layer. The sizes of the first convolution layer, the second convolution layer, the third convolution layer, the fourth convolution layer, the fifth convolution layer, and the sixth convolution layer are 11*11, 9*9, 7*7, 5*5, 3*3, and 1*1 respectively. Each group of sampling pooling groups is, from left to right, a pooling layer (2*2), an upsampling layer (12*12), and a convolution layer (1*1*3)

[0079] S204, inputting the foggy sample image into a convolution layer serving as an input layer, and obtaining a feature map output by an upsampling layer serving as an output layer.

[0080] Input the foggy image into Figure 2 The input layer in the output layer passes through the convolution layer, pooling layer, and upsampling layer from left to right to output the feature map of the foggy image.

[0081] In this embodiment, 11*11, 9*9, 7*7, 5*5, 3*3, and 1*1 constitute the design of a multi-scale module, and the multi-scale module has obvious advantages in feature extraction, and the unified parameter K(x) requires more detailed and accurate estimation, so as to have a better effect. After adding convolutional layers of these sizes, after a series of operations such as pooling and sampling, the size of the image can be guaranteed to remain unchanged, which can prepare for subsequent processing, so as to obtain a defogging image.

[0082] This embodiment uses convolution layers of various sizes, such as 11*11, 9*9, 7*7, 5*5, 3*3, and 1*1, to form a multi-scale module for feature extraction, and adds a pooling layer and an upsampling layer after each convolution layer, so that the image size remains unchanged after each convolution.

[0083] S205: Input the feature map into the second convolution module to obtain a parameter training value corresponding to the single parameter output by the second convolution module.

[0084] In this embodiment, the calculation parameter training value is divided into two parts. The feature map of the foggy image is obtained through steps S201 to S204, and then the feature map is input into the second convolution module to obtain the training value of the single parameter K(x). Step S205 includes the following steps S2051, S2052, S2053, S2054, S2055, S2056, S2057, S2058, S2059:

[0085] S2051. According to the second convolution module, a second convolution unit in the second convolution module is obtained, where the second convolution unit includes a first convolution layer, a second convolution layer, a third convolution layer, a fourth convolution layer, a fifth convolution layer, a first connection layer, a second connection layer, and a third connection layer.

[0086] like Figure 3 As shown, from left to right are the first convolutional layer, the second convolutional layer, the third convolutional layer, the fourth convolutional layer, the fifth convolutional layer, the first connection layer, the second connection layer, and the third connection layer. The size of each layer is as follows Figure 3 shown.

[0087] S2052: Input the feature map into the first convolutional layer to obtain a first result output by the first convolutional layer.

[0088] S2053: Input the first result to the second convolutional layer to obtain a second result output by the second convolutional layer.

[0089] S2054: Input the first result and the second result into the first connection layer to obtain a first intermediate result output by the first connection layer.

[0090] S2055: input the first intermediate result to the third convolutional layer to obtain a third result output by the third convolutional layer.

[0091] S2056: Input the second result and the third result into the second connection layer to obtain a second intermediate result output by the second connection layer.

[0092] S2057: Input the second intermediate result to the fourth convolutional layer to obtain a fourth result output by the fourth convolutional layer.

[0093] S2058, input the fourth result and the third result into the third connection layer to obtain a third intermediate result output by the third connection layer.

[0094] S2059: Input the third intermediate result to the fifth convolutional layer to obtain a parameter training value corresponding to the single parameter output by the fifth convolutional layer.

[0095] S206: Train the dual convolution module network model according to the parameter training value and the single parameter sample value to obtain the trained dual convolution module network model.

[0096] In this embodiment, the dual convolution module network model is trained by comparing the parameter training value output by the dual convolution module network model with the single parameter sample value, and continuously adjusting the parameter settings of each layer in the dual convolution module network model until the difference between the output parameter training value and the single parameter sample value is less than the set threshold value, thereby completing the training of the dual convolution module network model.

[0097] S300, applying the single-parameter atmospheric scattering model to the foggy image and the parameter value to obtain a defogged image.

[0098] In this embodiment, the foggy image is input into the dual convolution module network model (single-parameter atmospheric scattering model) in step S200 to obtain the value of parameter K(x), and then the foggy image and the value of K(x) are substituted into the single-parameter atmospheric scattering model (Formula (3)) to obtain the defogged image.

[0099] In this embodiment, before substituting the parameter K(x) into the single-parameter atmospheric scattering model, a mapping operation needs to be completed first. The reason for the mapping operation is that in the convolution process of the neural network, the various values ​​of K(x) no longer correspond to the various points on the image, so a mapping operation is required to make the various values ​​of K(x) correspond one-to-one to the various points on the image.

[0100] Step S300 includes the following steps S301 and S302:

[0101] S301, applying a nonlinear mapping model to the foggy image and the parameter value to obtain the parameter value after mapping, wherein the parameter value after mapping corresponds to a pixel position of the foggy image.

[0102] The nonlinear mapping model of this embodiment is as follows Figure 4 As shown, through Figure 4 The model shown refines K(x) calculated by the second convolution module in step S200 to generate a more accurate K(x). This model is suitable for images in various environments and has a more perfect defogging effect.

[0103] like Figure 4 As shown in the figure, K(x) passes through the convolution layer, the pooling layer, and finally the upsampling layer to map the generated image to a size of 560*560. Then the input original image and the generated mapping image are concat connected to minimize the information lost by convolution and pooling. Finally, the convolution layer is passed to obtain the final parameter estimate of K(X).

[0104] S302: Apply the single-parameter atmospheric scattering model to the foggy image and the mapped parameter value to obtain a defogged image.

[0105] like Figure 5 After the foggy image shown in FIG. 1 is subjected to the defogging algorithm of step S100, step S200, and step S300 of this embodiment, the following is obtained: Figure 6 The haze-free image shown.

[0106] In summary, the present invention first deforms the atmospheric scattering model so that the atmospheric scattering model with two unknown parameters becomes an atmospheric scattering model with only one unknown parameter. Then the value of the only unknown parameter is calculated by a neural network, and finally the value of the unknown parameter is substituted into the atmospheric scattering model to obtain the defogging image. Since the present invention only needs to calculate the value of one parameter through a neural network model, it can reduce the cumulative error caused by calculating multiple parameter values, thereby improving the quality of the defogging image finally calculated using the parameter value.

[0107] Exemplary Devices

[0108] This embodiment also provides an image defogging device based on a neural network model, the device comprising the following components:

[0109] A model calculation module is used to calculate a single-parameter atmospheric scattering model consisting of a single parameter;

[0110] A parameter value calculation module, used for inputting the foggy image into the trained neural network model to obtain the parameter value corresponding to the single parameter output by the trained neural network model;

[0111] The defogging module is used to apply the single-parameter atmospheric scattering model to the foggy image and the parameter value to obtain a defogging image.

[0112] Based on the above embodiments, the present invention further provides a terminal device, whose principle block diagram can be shown as follows: Figure 7 As shown. The terminal device includes a processor, a memory, a network interface, a display screen, and a temperature sensor connected through a system bus. Among them, the processor of the terminal device is used to provide computing and control capabilities. The memory of the terminal device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the terminal device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an image defogging method based on a neural network model is implemented. The display screen of the terminal device can be a liquid crystal display screen or an electronic ink display screen, and the temperature sensor of the terminal device is pre-set inside the terminal device to detect the operating temperature of the internal device.

[0113] Those skilled in the art will understand that Figure 7 The principle block diagram shown in the figure is only a block diagram of a partial structure related to the scheme of the present invention, and does not constitute a limitation on the terminal device to which the scheme of the present invention is applied. The specific terminal device may include more or less components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0114] In one embodiment, a terminal device is provided, the terminal device comprising a memory, a processor, and an image defogging program based on a neural network model stored in the memory and executable on the processor, and when the processor executes the image defogging program based on the neural network model, the following operation instructions are implemented:

[0115] Calculate the single-parameter atmospheric scattering model consisting of a single parameter;

[0116] Inputting the foggy image into a trained neural network model to obtain a parameter value corresponding to the single parameter output by the trained neural network model;

[0117] The single-parameter atmospheric scattering model is applied to the foggy image and the parameter value to obtain a defogged image.

[0118] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0119] In summary, the present invention discloses an image defogging method, device and equipment based on a neural network model, the method comprising: calculating a single-parameter atmospheric scattering model composed of a single parameter; inputting a foggy image into a trained neural network model to obtain a parameter value corresponding to the single parameter output by the trained neural network model; applying the single-parameter atmospheric scattering model to the foggy image and the parameter value to obtain a defogged image. The quality of the defogged image can be improved.

[0120] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An image defogging method based on a neural network model, characterized in that: include: Calculate the single-parameter atmospheric scattering model consisting of a single parameter; Inputting the foggy image into a trained neural network model to obtain a parameter value corresponding to the single parameter output by the trained neural network model; Applying the single-parameter atmospheric scattering model to the foggy image and the parameter value to obtain a defogged image; The training method of the trained neural network model includes: According to the neural network model, a dual convolution module network model consisting of a first convolution module and a second convolution module in the neural network model is obtained, wherein, from the input layer close to the first convolution module to the upsampling layer close to the output layer of the first convolution module, the sizes of each convolution layer are 11*11, 9*9, 7*7, 5*5, 3*3, and 1*1, respectively, and the second convolution module includes a first convolution layer, a second convolution layer, a third convolution layer, a fourth convolution layer, a fifth convolution layer, a first connection layer, a second connection layer, and a third connection layer; Obtain a foggy sample image and a single parameter sample value corresponding to the foggy sample image; Inputting the foggy sample image into the first convolution module to obtain a feature map output by the first convolution module; Inputting the feature map into the first convolution layer of the second convolution module to obtain a parameter training value corresponding to the single parameter output by the second convolution module; According to the parameter training value and the single parameter sample value, the dual convolution module network model is trained to obtain the trained dual convolution module network model; The step of inputting the foggy sample image into the first convolution module to obtain a feature map output by the first convolution module includes: According to the first convolution module, each convolution layer constituting the first convolution module, and a pooling layer and an upsampling layer located between each of the convolution layers are obtained; Inputting the foggy sample image into a convolutional layer as an input layer to obtain a feature map output by an upsampling layer as an output layer; The step of applying the single-parameter atmospheric scattering model to the foggy image and the parameter value to obtain a defogged image includes: Applying a nonlinear mapping model to the foggy image and the parameter value to obtain the parameter value after mapping, wherein the parameter value after mapping corresponds to the pixel position of the foggy image, mapping the parameter value K(x) into a mapping map of size 560*560 through a convolution layer, a pooling layer, and an upsampling layer, concat-connecting the foggy image and the mapping map, and finally obtaining the parameter value after mapping through a convolution layer; The single-parameter atmospheric scattering model is applied to the foggy image and the mapped parameter value to obtain a defogged image.

2. The image defogging method based on a neural network model as claimed in claim 1, characterized in that: The calculation is a single parameter atmospheric scattering model consisting of a single parameter, including: Obtain a two-parameter atmospheric scattering model consisting of transmittance and atmospheric layer coefficient; The dual-parameter atmospheric scattering model is deformed, and the transmittance and the atmospheric layer coefficient are combined into a single parameter to obtain a single-parameter atmospheric scattering model.

3. The image defogging method based on a neural network model as claimed in claim 1, characterized in that: The step of inputting the feature map into the first convolution layer of the second convolution module to obtain a parameter training value corresponding to the single parameter output by the second convolution module includes: Inputting the feature map into the first convolutional layer to obtain a first result output by the first convolutional layer; Inputting the first result into the second convolutional layer to obtain a second result output by the second convolutional layer; Inputting the first result and the second result into the first connection layer to obtain a first intermediate result output by the first connection layer; Inputting the first intermediate result into the third convolutional layer to obtain a third result output by the third convolutional layer; Inputting the second result and the third result into the second connection layer to obtain a second intermediate result output by the second connection layer; Inputting the second intermediate result to the fourth convolutional layer to obtain a fourth result output by the fourth convolutional layer; Inputting the fourth result and the third result into the third connection layer to obtain a third intermediate result output by the third connection layer; The third intermediate result is input into the fifth convolutional layer to obtain a parameter training value corresponding to the single parameter output by the fifth convolutional layer.

4. An image defogging device based on a neural network model, characterized in that: The device comprises the following components: A model calculation module is used to calculate a single-parameter atmospheric scattering model consisting of a single parameter; A parameter value calculation module, used for inputting the foggy image into the trained neural network model to obtain the parameter value corresponding to the single parameter output by the trained neural network model; a defogging module, configured to apply the single-parameter atmospheric scattering model to the foggy image and the parameter value to obtain a defogged image; The training method of the trained neural network model includes: According to the neural network model, a dual convolution module network model consisting of a first convolution module and a second convolution module in the neural network model is obtained, wherein, from the input layer close to the first convolution module to the upsampling layer close to the output layer of the first convolution module, the sizes of each convolution layer are 11*11, 9*9, 7*7, 5*5, 3*3, and 1*1, respectively, and the second convolution module includes a first convolution layer, a second convolution layer, a third convolution layer, a fourth convolution layer, a fifth convolution layer, a first connection layer, a second connection layer, and a third connection layer; Obtain a foggy sample image and a single parameter sample value corresponding to the foggy sample image; Inputting the foggy sample image into the first convolution module to obtain a feature map output by the first convolution module; Inputting the feature map into the first convolution layer of the second convolution module to obtain a parameter training value corresponding to the single parameter output by the second convolution module; According to the parameter training value and the single parameter sample value, the dual convolution module network model is trained to obtain the trained dual convolution module network model; The step of inputting the foggy sample image into the first convolution module to obtain a feature map output by the first convolution module includes: According to the first convolution module, each convolution layer constituting the first convolution module, and a pooling layer and an upsampling layer located between each of the convolution layers are obtained; Inputting the foggy sample image into a convolutional layer as an input layer to obtain a feature map output by an upsampling layer as an output layer; The step of applying the single-parameter atmospheric scattering model to the foggy image and the parameter value to obtain a defogged image includes: Applying a nonlinear mapping model to the foggy image and the parameter value to obtain the parameter value after mapping, wherein the parameter value after mapping corresponds to the pixel position of the foggy image, mapping the parameter value K(x) into a mapping map of size 560*560 through a convolution layer, a pooling layer, and an upsampling layer, concat-connecting the foggy image and the mapping map, and finally obtaining the parameter value after mapping through a convolution layer; The single-parameter atmospheric scattering model is applied to the foggy image and the mapped parameter value to obtain a defogged image.

5. A terminal device, characterized in that: The terminal device includes a memory, a processor, and an image defogging program based on a neural network model stored in the memory and executable on the processor. When the processor executes the image defogging program based on the neural network model, the steps of the image defogging method based on the neural network model as described in any one of claims 1 to 3 are implemented.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an image defogging program based on a neural network model. When the image defogging program based on a neural network model is executed by a processor, the steps of the image defogging method based on a neural network model as described in any one of claims 1 to 3 are implemented.