An underwater image enhancement method based on fractional-order convolutional neural network
Through the ambient light and transmittance estimation network based on fractional-order convolutional neural network, combined with the fractional-order momentum gradient descent algorithm, the problems of dependence on real images and slow training speed in underwater image enhancement are solved, and high-quality image enhancement and Quick training.
Patent Information
- Application Number
- CN202210088955.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-25
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2042-01-25
AI Technical Summary
Existing underwater image enhancement technology requires a large number of high-quality real images for parameter training, and the learning convergence speed of neural networks is slow and the training time is long.
A method based on fractional-order convolutional neural networks is used to enhance underwater images through the ambient light estimation network and transmittance estimation network. The fractional-order gradient descent algorithm with fractional-order momentum is used to optimize network parameters and the network is trained independently to reduce the impact on the real world. dependence on the image and evaluate the image quality through the IQM loss function.
It significantly improves the visual quality of underwater images without relying on a large number of real images, improves the learning rate and image enhancement effect of network parameter training, and simplifies the network design and training process.
Smart Images

Figure CN114511480B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of computer vision, and in particular relates to an underwater image enhancement method based on a fractional-order convolutional neural network. Background Art
[0002] The ocean is rich in resources. As an important carrier of ocean information, underwater images play an irreplaceable role in the exploration and development of the ocean. Due to the influence of the complex underwater environment, underwater images often have quality degradation. In order to improve the low contrast, color distortion, and blurred details of the original underwater images, it is necessary to enhance the underwater images to obtain clear underwater images.
[0003] Existing underwater image enhancement technology has made great progress, and the underwater image enhancement effect is quite obvious. However, restoring the visual quality of underwater images still faces great challenges.
[0004] There are two main categories of existing underwater image enhancement methods. One is the traditional underwater image enhancement method, including histogram-based enhancement method, Retinex-based enhancement method, filtering and signal processing-based enhancement method, and image fusion-based enhancement method. The other is the neural network-based enhancement method. These methods can enhance underwater images to varying degrees and improve the low contrast, color distortion, and blurred details of the original underwater images. However, these methods require real images corresponding to the original underwater images during parameter training. Although the current underwater image dataset can be obtained in a variety of ways, it is still difficult to obtain a large number of high-quality real underwater images. Whether it is possible to restore the visual quality of underwater images and obtain high-quality clear images by using simulated data guidance without the need for real images is a topic worth studying. In addition, the existing schemes, such as the stochastic gradient descent method and the momentum gradient descent method, have a slow learning convergence speed and a long training time during the parameter training of the neural network. Since the fractional order has the characteristics of memory and heritability, the introduction of the fractional order in the parameter training algorithm can make the update of the network weights more stable, further improving the training speed and accuracy. In addition, since the fractional-order model contains the integer-order model, the adjustment of parameters in the fractional-order model is more flexible, which can provide more possibilities for the neural network parameter training optimization algorithm. Summary of the invention
[0005] The purpose of the present invention is to provide an underwater image enhancement method based on a fractional-order convolutional neural network in order to enhance the visual quality of the original underwater images and improve the learning rate in the network parameter training process in order to address the difficulties and problems of the lack of a large number of real underwater images in reality.
[0006] To achieve the above object, the present invention is implemented through the following technical solutions:
[0007] An underwater image enhancement method based on fractional-order convolutional neural network, the specific steps are as follows:
[0008] Step A1: Input the original underwater image.
[0009] Step A2: Preliminary preprocessing of underwater images, namely, correcting the color deviation of the image through white balance and histogram equalization, and enhancing the brightness and contrast of the image.
[0010] Step A3: Design an ambient light estimation network and a transmittance estimation network for underwater images.
[0011] The structure of the ambient light estimation network is as follows: the input image size is 49*49, the convolution kernel size of the first layer is 7*7, the step size is 1, and the output is a 43*43 image. The convolution kernel size of the second layer is 5*5, the step size is 1, and the output is a 39*39 image. The third layer is a pooling layer, the size is 3*3, the step size is 3, and the output is a 13*13 image. The convolution kernel size of the fourth layer is 5*5, the step size is 1, and the output is a 9*9 image. The fifth layer is a pooling layer, the size is 3*3, the step size is 3, and the output is a 3*3 image. The last layer uses a convolution layer as a nonlinear regression layer. A ReLU activation function is added after each convolution layer to speed up the convergence of training and avoid falling into a local minimum.
[0012] The design of the transmittance estimation network includes the following three steps: (1) building a preprocessing module to extract shallow features of the image; (2) using a multi-scale convolutional layer to realize feature extraction and fusion; (3) applying a deconvolution module to restore the original size of the image and output a transmittance map.
[0013] Step A4: Perform parameter training on the ambient light estimation network and the transmittance estimation network.
[0014] The parameter training of the ambient light estimation network is to calculate the error between the target value and the actual output through network forward propagation. When the error is within the allowable range, the training is terminated; when the error exceeds the allowable range, the error is calculated, the error gradient is obtained through network back propagation, and the parameters are updated using the fractional gradient descent algorithm with fractional momentum, so that the weights are gradually updated from the initial state to the final learned state.
[0015] The parameter training of the transmittance estimation network is to send the preliminarily preprocessed underwater image I into the transmittance estimation network, and output the transmittance parameter t. According to the underwater physical model, the ambient light value B and the transmittance parameter t, a clear image J is obtained. The underwater image I and the clear image J are compared, and the IQM is used as the loss function. The error between the target value and the actual output is calculated through network forward propagation. When the error is within the allowable range, the training is terminated; when the error exceeds the allowable range, the error is calculated, and the error gradient is obtained through network back propagation. The fractional gradient descent algorithm with fractional momentum is used to update the parameters, so that the weights are gradually updated from the initial state to the final learned state.
[0016] Furthermore, the parameter training of the ambient light estimation network uses the Euclidean distance between the estimated value of the ambient light and its corresponding ideal value as the loss function, and the loss function is denoted as L h ,for:
[0017]
[0018] Among them, ||·|| is the operation of finding the bi-norm of the matrix, B i (I) is the estimated value of ambient light, B i (J) is its corresponding ideal value, i represents the color channel, I is the underwater image after preliminary preprocessing, and J is the clear image.
[0019] Furthermore, the loss function in the transmission estimation network parameter training is denoted as L IQM ,for:
[0020] L IQM =1-IQM(I,J)
[0021] Among them, IQM(I,J) is the IQM set of multi-objective functions, and five indicators closely related to human visual perception are selected to constitute the IQM set: contrast, acuity, boundary integrity, prior gray world and clarity.
[0022] Step A5: Send the preprocessed underwater image I to the trained network. For the ambient light estimation network, the output is the ambient light value B; for the transmittance estimation network, the output is the transmittance parameter t.
[0023] Step A6: According to the underwater physical model, the ambient light value B obtained by the ambient light estimation network output in step A5 and the transmittance parameter t obtained by the transmittance estimation network output are combined to obtain a restored clear image.
[0024] Specifically, the underwater physical model is:
[0025]
[0026] Among them, J represents the clear image, I represents the underwater image after preliminary preprocessing, B represents the ambient light value, and t represents the transmittance parameter.
[0027] Advantages and beneficial effects of the present invention:
[0028] 1. Most of the existing ambient light estimation methods select the pixel values at infinite depth in the image as the ambient light estimation results. However, when there is interference from special objects or the image itself does not have a large depth area, the estimation results will have large errors. The deep learning method of ambient light estimation network learns the mapping relationship between underwater images and their corresponding ambient light values, which can adapt to a variety of different underwater environments and the estimated ambient light value B is more accurate.
[0029] 2. The two convolutional neural networks used in the present invention, including the ambient light estimation network and the transmittance estimation network, can be trained independently one after another, with flexible design and convenient training.
[0030] 3. The present invention does not require a large number of high-quality, real and clear underwater images. Instead, it evaluates the results by calculating a set of IQMs, and minimizes the IQM-based loss function, so that the visual quality of the enhanced image is significantly improved, the image enhancement effect is significant, and the visual perception is good.
[0031] 4. The present invention uses the fractional gradient descent algorithm with fractional momentum to optimize the parameters of the convolutional neural network, which can greatly accelerate the learning convergence speed and significantly improve the work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 is a flow chart of the underwater image enhancement method of the present invention,
[0033] Figure 2 is a flow chart of the ambient light estimation network parameter training of the present invention,
[0034] Figure 3 This is a flow chart of the transmittance estimation network parameter training of the present invention. DETAILED DESCRIPTION
[0035] The technical solution of the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. The embodiments are only used to explain the present invention and do not limit the protection scope of the present invention.
[0036] Figure 1 As shown in FIG. 1 , an underwater image enhancement method based on a fractional-order convolutional neural network of the present invention is shown, and the specific steps are as follows:
[0037] Step A1: Input the original underwater image.
[0038] Step A2: Preliminary preprocessing of underwater images, namely, correcting the color deviation of the image through white balance and histogram equalization, and enhancing the brightness and contrast of the image.
[0039] Step A3: Design an ambient light estimation network and a transmittance estimation network for underwater images.
[0040] The output of the ambient light estimation network is only the pixel value of three channels, so the design of the network is relatively simple. Using an image of size 49*49, the specific network structure is: the convolution kernel size of the first layer is 7*7, the step size is 1, and the output is a 43*43 image. The convolution kernel size of the second layer is 5*5, the step size is 1, and the output is a 39*39 image. The third layer is a pooling layer, the size is 3*3, the step size is 3, and the output is a 13*13 image. The convolution kernel size of the fourth layer is 5*5, the step size is 1, and the output is a 9*9 image. The fifth layer is a pooling layer, the size is 3*3, the step size is 3, and the output is a 3*3 image. The last layer uses a convolution layer as a nonlinear regression layer. A ReLU activation function is added after each convolution layer to speed up the convergence of training and avoid falling into a local minimum.
[0041] The design of the transmittance estimation network includes the following three steps: (1) building a preprocessing module to extract shallow features of the image; (2) using a multi-scale convolutional layer to realize feature extraction and fusion; and (3) applying a deconvolution module to restore the original size of the image and output a transmittance map.
[0042] For step (1), three convolutional layers are used continuously to extract shallow features of underwater images. The size and number of the three convolutional layers are 3*3*16, the activation function uses parameterized rectified linear unit (PRelu), and BN normalization is used.
[0043] For step (2), multi-scale convolution operations are performed on the image extracted from the shallow features. The size and number of convolution kernels are 3*3*16, 5*5*16, and 7*7*16 respectively. Maximum pooling sampling is used, and the activation function is the parameterized rectified linear unit (PRelu). It is normalized using BN and then feature fusion (Concat). In order to obtain deep image information, multi-scale 3*3*16, 5*5*16, and 7*7*16 convolution kernels are used for convolution operations again. The activation function is PRelu, and BN is normalized. Then feature fusion (Concat) is performed.
[0044] For step (3), the deconvolution module is used to increase the spatial dimension of the image. The size of the deconvolution kernel is set to 2*2, and the step size is 1. The feature map after the pooling operation is restored to the input image size. The last layer of the network model uses 3 channels, the convolution kernel size is 1*1, and the transmittance map is output.
[0045] Step A4: Perform parameter training on the ambient light estimation network and the transmittance estimation network.
[0046] The parameter training of the ambient light estimation network is to calculate the error between the target value and the actual output through network forward propagation. If the error is within the allowable range, the training is terminated; if the error exceeds the allowable range, the error is calculated, the error gradient is obtained through network back propagation, and the parameters are updated using the fractional gradient descent algorithm with fractional momentum, so that the weights are gradually updated from the initial state to the final learned state.
[0047] The parameter training of the transmittance estimation network is to send the preliminarily preprocessed underwater image I into the transmittance estimation network, and output the transmittance parameter t. According to the underwater physical model, the ambient light value B and the transmittance parameter t, a clear image J is obtained. The two images I and J are compared, and the IQM is used as the loss function. The error between the target value and the actual output is calculated through network forward propagation. If the error is within the allowable range, the training is terminated; if the error exceeds the allowable range, the error is calculated, and the error gradient is obtained through network back propagation. The fractional gradient descent algorithm with fractional momentum is used to update the parameters, so that the weights are gradually updated from the initial state to the final learned state.
[0048] The parameter training of the ambient light estimation network uses the Euclidean distance between the estimated value of the ambient light and its corresponding ideal value as the loss function, and the loss function is denoted by L h ,for:
[0049]
[0050] Among them, ||·|| is the operation of finding the bi-norm of the matrix, B i (I) is the estimated value of ambient light, B i (J) is its corresponding ideal value, i represents the color channel, I is the underwater image after preliminary preprocessing, and J is the clear image.
[0051] The loss function in the transmission estimation network parameter training is denoted as L IQM ,for:
[0052] L IQM =1-IQM(I,J)
[0053] Among them, IQM(I,J) is the IQM set of multi-objective functions, and five indicators closely related to human visual perception are selected to constitute the IQM set: contrast, acuity, boundary integrity, prior gray world and clarity.
[0054] Step A5: Send the preliminarily preprocessed underwater image to the trained network. For the ambient light estimation network, the output is the ambient light value B; for the transmittance estimation network, the output is the transmittance parameter t.
[0055] Step A6: According to the underwater physical model, the ambient light value B obtained by the ambient light estimation network output in step A5 and the transmittance parameter t obtained by the transmittance estimation network output are combined to obtain a restored clear image.
[0056] The underwater physical model is:
[0057]
[0058] Among them, J represents the clear image, I represents the underwater image after preliminary preprocessing, B represents the ambient light value, and t represents the transmittance parameter.
[0059] Figure 2 The figure shows the training flow chart of the ambient light estimation network parameters. The specific steps are as follows:
[0060] Step B1: Input the original underwater image.
[0061] Step B2: Perform preliminary preprocessing on the underwater image by white balance and histogram equalization methods.
[0062] Step B3: The pre-processed underwater image I is sent to the ambient light estimation network designed in step A3 for parameter training. The Euclidean distance between the estimated value of the ambient light and its corresponding ideal value is used as the loss function, and the loss function is denoted as L h ,for:
[0063]
[0064] Among them, ||·|| is the operation of finding the bi-norm of the matrix, B i (I) is the estimated value of ambient light, B i (J) is its corresponding ideal value, i represents the color channel, I is the underwater image after preliminary preprocessing, and J is the clear image.
[0065] Step B4: Calculate the error between the target value and the actual output through network forward propagation. If the error is within the allowable range, then end the training; if the error exceeds the allowable range, then calculate the error, find the error gradient through network back propagation, and use the fractional gradient descent algorithm with fractional momentum to update the parameters so that the weights are gradually updated from the initial state to the final learned state.
[0066] The derivation process of the fractional gradient descent algorithm of the fractional momentum is as follows: The weight update formula corresponding to the momentum stochastic gradient descent method is:
[0067] w [l+1] (c+1) =w [l+1] (c) +v [l+1] (c+1)
[0068]
[0069] The bias update formula corresponding to the momentum stochastic gradient descent method is:
[0070] b [l+1] (c+1) =b [l+1] (c) +a [l+1] (c+1)
[0071]
[0072] in is the learning rate, λ is the momentum term coefficient and 0<λ<1, L is the optimization objective function, V and a are the weight momentum term and bias momentum term respectively, w [l+1] (c+1) , b [l+1] (c+1) are the weight and bias of c+1 iterations, w [l+1] (c) , b [l+1] (c) are the weights and biases for c iterations respectively.
[0073] For a given function y(c), GL is defined as:
[0074]
[0075] Where α is the fractional order and 0<α<1, T is the period, is the generalized binomial coefficient.
[0076] In order to combine the fractional order with momentum, let the momentum term coefficient λ = 1, and consider the long memory characteristics of the fractional derivative, it is necessary to truncate the historical information and set the truncation to γ, and obtain the following weight and bias update formula for the fractional momentum stochastic gradient descent method:
[0077]
[0078]
[0079] For a given function f(x), Caputo's definition is:
[0080]
[0081] Where c is the number of iterations, x0 is the initial point, β is the fractional order and 0<β<1.
[0082] Since fractional derivatives have a long memory characteristic of accumulating historical information, the accuracy of algorithm convergence is guaranteed by the method of fixed memory length. In order to simplify the calculation process, the algorithm can be truncated to a high order and only the first term is retained. In order to make the algorithm selectable in the (1,2) order, the absolute value needs to be introduced. When 1<β<2, x appears c =x c-1 , the algorithm does not converge, and a very small positive constant δ needs to be added to obtain the following fractional gradient descent algorithm formula:
[0083]
[0084] For the back propagation of convolutional neural networks, in order to maintain the normal use of the chain rule, integer-order gradients are still used for propagation between layers, while fractional-order gradients are used instead of integer-order gradients for parameter gradient updates within layers. After derivation, the gradient parameter change rate within the fractional-order layer is
[0085]
[0086]
[0087] Where p represents the input value of the neuron, q is the output value of the neuron, l and l+1 represent the lth and l+1th layers, Respectively represent w [l+1] , b [l+1] Fractional gradient, and They are p [l+1] and At the (c-1)th iteration, Yes [l] The output at the (c-1)th iteration is, and is the parameter w [l+1] and b [l+1] The cth iteration of .
[0088] Combined with the fractional momentum stochastic gradient descent algorithm, we get the fractional gradient descent algorithm with fractional momentum:
[0089]
[0090]
[0091] Figure 3 The figure shows the flow chart of the transmittance estimation network parameter training. The specific steps are as follows:
[0092] Step C1: Input the original underwater image.
[0093] Step C2: Preliminary preprocessing of the underwater image is performed by white balance and histogram equalization methods.
[0094] Step C3: Send the preliminarily preprocessed underwater image I to the trained ambient light estimation network, and output the ambient light value B.
[0095] Step C4: Send the preliminarily preprocessed underwater image I to the transmittance estimation network, and output the transmittance parameter t.
[0096] Step C5: Obtain a clear image J according to the underwater physical model, the ambient light value B and the transmittance parameter t.
[0097] Step C6: Compare the two images I and J, use IQM as the loss function, calculate the error between the target value and the actual output through network forward propagation, if the error is within the allowable range, then end the training; if the error exceeds the allowable range, then calculate the error, find the error gradient through network back propagation, and use the fractional gradient descent algorithm with fractional momentum to update the parameters, so that the weights are gradually updated from the initial state to the final learned state.
[0098] The loss function is denoted as L IQM ,for:
[0099] L IQM =1-IQM(I,J)
[0100] Among them, IQM(I,J) is the IQM set of multi-objective function, expressed as:
[0101] IQM(I,J)=∑φ X g X (I,J)
[0102] Among them, I is the underwater image after preliminary preprocessing, J is the clear image, φ X is the characteristic gain g X The weight, g X Including contrast g C (I,J), acuity g A (I,J), boundary integrity g E (I,J), a priori gray world g G (J) and clarity g S (I, J) Five indicators. The restored clear image is normalized to a value between [0,1], limiting ∑φ X =1, so that IQM is between [0,1], where 1 represents the best recovery and 0 represents the worst recovery. Initialize the weight: φ C =0.25,φA =0.4,φ E =0.05,φ G =0.25,φ S =0.05.
[0103] The contrast is denoted as g C (I,J), is:
[0104]
[0105] Among them, C(I,x), C(J,x) is the contrast of pixel x in the underwater image I and the clear image J after preliminary preprocessing.
[0106] The acuity is denoted as g A (I,J), is:
[0107] g A (I,J)=A(J)-A(I)
[0108] Among them, A(I) and A(J) are the acuities of the underwater image I and the clear image J after preliminary preprocessing.
[0109] The boundary integrity is denoted as g E (I,J), is:
[0110]
[0111] Where E is the edge detector, E d The border image is enlarged by 5 pixels.
[0112] The a priori grey world is denoted as g G (J) is:
[0113]
[0114] Among them, I max and I min are the maximum and minimum intensity a pixel can have, and g G The first term of makes the metric higher as the distance from the gray world decreases.
[0115] The clarity is denoted as g S (I,J), is:
[0116]
[0117] The fraction in log is the ratio of the maximum to minimum brightness of the pixels in the two images. S(I,x) and S(J,x) are the clarity of the pixel x in the underwater image I and the clear image J after preliminary preprocessing.
Claims
1. An underwater image enhancement method based on fractional-order convolutional neural network, characterized in that: The following steps are involved: A1: input the original underwater image; A2: Preliminary preprocessing of underwater images, namely, correcting the color deviation of the image through white balance and histogram equalization, and enhancing the brightness and contrast of the image; A3: Design an ambient light estimation network and a transmittance estimation network for underwater images; A4: Perform parameter training on the ambient light estimation network and the transmittance estimation network; The parameter training method of the ambient light estimation network is to calculate the error between the target value and the actual output through network forward propagation, and when the error is within the allowable range, the training is terminated; when the error exceeds the allowable range, the error is calculated, the error gradient is obtained through network back propagation, and the parameters are updated using the fractional gradient descent algorithm with fractional momentum, so that the weight is gradually updated from the initial state to the final learned state; The Euclidean distance between the estimated value of ambient light and its corresponding ideal value is used as the loss function, which is denoted by L h ,for: Among them, ||·|| is the operation of finding the bi-norm of the matrix, B i (I) is the estimated value of ambient light, B i (J) is its corresponding ideal value, i represents the color channel, I is the underwater image after preliminary preprocessing, and J is the clear image; The parameter training method of the transmittance estimation network is as follows: the underwater image I after preliminary preprocessing is sent to the transmittance estimation network, and the transmittance parameter t is output; a clear image J is obtained according to the underwater physical model, the ambient light value B and the transmittance parameter t; the underwater image I and the clear image J are compared, and the IQM is used as the loss function, and the error between the target value and the actual output is calculated through network forward propagation, and when the error is within the allowable range, the training is terminated; when the error exceeds the allowable range, the error is calculated, and the error gradient is obtained through network back propagation, and the parameters are updated using the fractional gradient descent algorithm of fractional momentum, so that the weight is gradually updated from the initial state to the final learned state; The loss function in the parameter training of the transmittance estimation network is denoted as L IQM , is: L IQM =1-IQM(I,J), where IQM(I,J) is the IQM set of multi-objective functions, and five indicators closely related to human visual perception are selected to form the IQM set: contrast, acuity, boundary integrity, prior gray world and clarity; A5: Send the preprocessed underwater image to the trained ambient light estimation network and transmittance estimation network, wherein the ambient light estimation network outputs the ambient light value B; and the transmittance estimation network outputs the transmittance parameter t; A6: Based on the underwater physical model, the ambient light value B obtained by the ambient light estimation network output in A5 and the transmittance parameter t obtained by the transmittance estimation network output are combined to obtain a clear restored image.
2. The underwater image enhancement method according to claim 1, characterized in that: The ambient light estimation network and the transmittance estimation network both adopt fractional-order convolutional neural networks.
3. The underwater image enhancement method according to claim 1, characterized in that: The structure of the ambient light estimation network in step A3 is as follows: the input image size is 49*49, the convolution kernel size of the first layer is 7*7, the step size is 1, and the output is a 43*43 image; the convolution kernel size of the second layer is 5*5, the step size is 1, and the output is a 39*39 image; the third layer is a pooling layer, the size is 3*3, the step size is 3, and the output is a 13*13 image; the convolution kernel size of the fourth layer is 5*5, the step size is 1, and the output is a 9*9 image; the fifth layer is a pooling layer, the size is 3*3, the step size is 3, and the output is a 3*3 image; the last layer uses a convolution layer as a nonlinear regression layer; a ReLU activation function is added after each convolution layer to speed up the convergence of training and avoid falling into a local minimum.
4. The underwater image enhancement method according to claim 1, characterized in that: The design method of the transmittance estimation network described in step A3 includes three steps: (1) building a preprocessing module to extract shallow features of the image; (2) Use multi-scale convolutional layers to achieve feature extraction and fusion; (3) Apply the deconvolution module to restore the original image size and output the transmittance map.
5. The underwater image enhancement method according to claim 1, characterized in that: The underwater physical model in step A6 is: Among them, J represents the clear image, I represents the underwater image after preliminary preprocessing, B represents the ambient light value, and t represents the transmittance parameter.
