Underwater video enhancement method based on CycleGAN
Through the CycleGAN model, inter-frame information interaction is achieved in underwater video enhancement, which solves the problems of color distortion and texture blur in underwater video enhancement, improves video quality, and avoids pattern crashes. It is suitable for complex underwater environments.
Patent Information
- Application Number
- CN202411668015.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-11-21
AI Technical Summary
The existing underwater video enhancement technology has problems such as color distortion, blurred texture, low contrast, and uneven light when dealing with complex underwater environments. The traditional method requires a one-to-one correspondence between the source video and the target video, which limits the video enhancement effect. .
Using CycleGAN-based underwater video enhancement method, unsupervised training is used to achieve video enhancement through information interaction between video frames, and no one-to-one correspondence between source video and target video is required. Improved the enhancement effect of underwater video.
This method reduces the model's requirements for the dataset, avoids the problem of pattern crash, improves the video enhancement effect and model accuracy, is suitable for different underwater situations, and can achieve better video enhancement under high resolution input.
Smart Images

Figure CN119152359A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of video enhancement, and in particular relates to an underwater video enhancement method based on CycleGAN. Background Art
[0002] Video enhancement refers to the processing and improvement of original videos through a series of technical means and algorithms to improve image quality, enhance details, reduce noise, and improve visual effects. For example, a series of technical selections are used to highlight certain valuable information while suppressing some unnecessary information. This makes the enhanced video more suitable for analysis and processing by humans or machines. Video enhancement technology includes a variety of methods, such as adjusting resolution, increasing bit rate, noise reduction, adjusting brightness, contrast, color and other parameters to make the picture clearer, the colors more vivid, and the details richer.
[0003] When performing underwater detection and other tasks, due to the complex underwater environment, light propagation is affected by water medium absorption, scattering and impurities in the water, resulting in underwater video with color distortion, blurred texture, low contrast, uneven lighting and other problems. With the rapid development of computer technology and image processing technology, underwater video enhancement technology has also made significant progress.
[0004] In terms of specific technical implementation, early research mainly focused on hardware equipment, such as the polarizer method, which achieves the purpose of removing the scattering effect based on the principle of polarizer. Later, with the development of computer technology, researchers began to use computer algorithms for underwater video enhancement. Among them, a typical method is the fast shutter threshold imaging method, which uses an imaging device with an ultra-high shutter speed to quickly open and close the shutter to remove scattered light. With the development of technology, a variety of enhancement techniques and methods have been proposed and applied. In traditional enhancement methods, the enhancement domain can be divided into two types: spatial domain enhancement and frequency domain enhancement. Spatial domain enhancement is to directly process each pixel of the image; for example, histogram equalization, grayscale transformation, contrast stretching and other methods. Frequency domain enhancement is to process the spectral components of the image after Fourier transform, and then inverse Fourier transform to obtain the desired image. By selecting a suitable filter, image noise can be eliminated, edges can be highlighted, and the visual effect of the image can be improved.
[0005] For underwater data, researchers have also proposed a variety of algorithms to address these challenges. There are many underwater image enhancement and restoration methods, which can be roughly divided into non-physical model methods and physical model-based methods. Non-physical model methods do not rely on underwater optical imaging mathematical models, and improve the visual quality of images by adjusting the pixel values of the image, which belongs to the category of image enhancement. Physical model-based methods refer to mathematical modeling of the degradation process of underwater images, estimating model parameters, and inverting the degradation process to obtain clear underwater images, which belongs to the category of image restoration.
[0006] The introduction of deep learning methods in recent years has brought new possibilities for underwater video enhancement. For example, deep learning models such as convolutional neural networks (CNNs), transformers, and generative adversarial networks (GANs) can automatically learn the features of underwater videos and optimize model parameters through a large amount of training data, thereby achieving better video enhancement effects. The basic structure of CNN includes input layer, convolution layer, pooling layer, activation function layer, and fully connected layer. In CNNs that process images, the input layer usually represents the pixel matrix of an image. The convolution layer is the core of CNN, which extracts the features of the image through convolution operations. The pooling layer further reduces the spatial size of the data, reduces the number of parameters, and prevents overfitting. The activation function layer is used to introduce nonlinearity, allowing the neural network to learn complex image features. The overall structure of the transformer consists of two parts: the encoder and the decoder. In 2020, the Vision Transformer (ViT) for image processing was proposed to divide the image into 16*16 blocks, making the Transformer more suitable for image processing tasks. Generative adversarial networks (GANs) were proposed by Goodfellow et al. in 2014. It consists of two core parts: the generator and the discriminator, which learn the data distribution by competing with each other. The task of the generator is to learn from random noise and generate data similar to real data, while the task of the discriminator is to distinguish the generated data from the real data. This competitive relationship promotes the continuous evolution of the model, making the generated data gradually close to the real data distribution.
[0007] Based on the development of deep learning technology, in order to enhance the resolution of images and videos, Christian Ledig et al. proposed a GAN model that uses SRResNet as a generative network for super-resolution in 2016, namely the SRGAN model. It can produce images with high perceptual quality. At the same time, a new image quality evaluation index, mean-opinion-score (MOS), was proposed to reflect the similarity between the test object and the real high-resolution image.
[0008] In 2019, Chongyi Li et al. from Tianjin University constructed the Underwater Image Enhancement Benchmark Dataset (UIEBDataset), which includes 950 real-world underwater images, 890 of which have corresponding reference images, and the remaining 60 underwater images are used as challenge data. At the same time, Water-Net was proposed to perform underwater image enhancement on the UIEB dataset. The Water-Net model enhances the input image through white balance (WB), gamma correction (GC), and histogram equalization (HE). It fuses the input with the predicted confidence map to achieve the enhanced result. The input is first transferred to the refined input through the feature transformation unit (FTU), and then the confidence map is predicted. Finally, the enhanced result is obtained by fusing the improved input and the corresponding confidence map.
[0009] With the derivation and development of GAN, researchers proposed the Cycle Generative Adversarial Network (CycleGAN). In 2023, Qiu Wan and others from Dalian Ocean University proposed an underwater image enhancement algorithm based on CycleGAN super-resolution reconstruction. Super-resolution reconstruction of underwater images is achieved to form high-resolution underwater images. Color learning of underwater images can also be performed from land images, effectively eliminating the color deviation problem of underwater images, and achieving the dual goals of underwater image color correction and clarity enhancement.
[0010] In view of the difference between underwater pictures and videos, in 2024, Dazhao Du et al. built the first large-scale high-resolution underwater video enhancement benchmark (UVEB) to promote the development of underwater video enhancement. At the same time, the proposed UVE-Net converts the current frame information into a convolution kernel and passes it to adjacent frames to achieve efficient inter-frame information exchange. It makes full use of the redundant degradation information of underwater videos to better complete video task enhancement. Summary of the invention
[0011] To solve the above technical problems, the present invention proposes an underwater video enhancement method based on CycleGAN, which utilizes the information interaction between video frames and does not require a one-to-one correspondence between the source video and the target video, thereby improving the underwater video enhancement effect.
[0012] To achieve the above object, the present invention provides an underwater video enhancement method based on CycleGAN, comprising: obtaining an underwater video dataset, preprocessing underwater video data in the underwater video dataset, and obtaining preprocessed underwater video data; The preprocessed underwater video dataset is input into the initial video enhancement model built based on CycleGAN for training to obtain the optimized video enhancement model; The target underwater video data is obtained, and the optimized video enhancement model is input to obtain the target underwater video enhancement data.
[0013] Optionally, the initial video enhancement model constructed based on CycleGAN includes a generator network and a discriminator network, and the generator network includes a first generator and a second generator; After the original video frame sequence is input, the intermediate frame is first extracted and input into the first generator. The preliminary feature extraction is completed after four-fold downsampling and convolution. The intermediate extracted features are generated through 30 residual blocks. The first convolution kernel is generated through downsampling. At the same time, the first residual result is downsampled through 30 residual blocks to generate the second convolution kernel. In the second generator, the input frame sequence is first downsampled four times, and then subjected to three-dimensional convolution to extract features. After that, convolution is performed separately for each individual frame, and the convolution kernel is the first convolution kernel generated by the intermediate frame in the first generator; the first convolution result is upsampled twice and then passed through 15 three-dimensional residual blocks, and the second output generated in the first generator is used as the convolution kernel of each individual frame for convolution again to complete the information exchange between frames; In the discriminator network, the input frame sequence is divided into single frames for separate judgment by the discriminator, and the results of all frames are averaged as the final judgment result of the frame sequence. After the image sequence is input, the image sequence is divided into pictures by frame, and firstly undergoes an initial convolution and activation layer for preliminary feature extraction, and then inputs the convolution block. The structure of the convolution block is to convolve the input once and then downsample it by one time, and then input the activation layer after instance normalization. The convolution block is performed three times, and the total downsampling is three times; the output result is convolved and activated using the sigmoid function. After all frames are processed, they are averaged, and the results are divided into two to complete the judgment.
[0014] Optionally, the preprocessed underwater video dataset is input into the initial video enhancement model built based on CycleGAN for training, and the optimized video enhancement model is obtained including: S1, mapping the pre-processed underwater video data to generate underwater video enhancement data through the first generator; S2, discriminating the underwater video enhancement data through the discriminator, if the underwater video enhancement data is consistent with the pre-processed underwater video data, proceed to S3; if they are inconsistent, modifying the discriminator parameters and returning to S1; S3. Mapping the underwater video enhancement data to generate unenhanced underwater video data through the second generator.
[0015] Optionally, the loss function between the first generator and the discriminator is:
[0016] Among them, X and Y represent the source domain and target domain respectively. p data ( x ) is the source domain X The data distribution, p data ( y ) is the data distribution of the target domain Y, E y ~ p data ( y )represent y obey p data (y), find the expectation, Ex~ p data (x )represent x obey p data (x ), G represents the generator, D Y represents the discriminator, x is an element of the source domain X, y is an element of the target domain Y, and D Y (y) indicates whether the discriminator identifies whether y belongs to the Y domain, G(x) indicates the input x element of the generator G, and D Y (G(x)) represents the discriminator D Y Don't input x into the G generator to see if the result of the input belongs to the Y domain.
[0017] Optionally, the cycle consistency loss between the first generator and the second generator is:
[0018] Among them, E y ~ p data ( y )represent y obey p data (y), Ex~ p data (x )represent x obey p data (x), G is a generator that converts elements in the X domain to the Y domain, F is a generator that converts elements in the Y domain to the X domain, x is an element in the X domain, y is an element in the Y domain, G(x) means using generator G to convert x to an image in the Y domain, F(G(x)) means first using generator G to convert x to an image in the Y domain, and then using generator F to convert the result of generator G back to the X domain, F(y) means using generator F to convert y to an image in the X domain, G(F(y)) means first using generator F to convert y to an image in the X domain, and then using generator G to convert the result of generator F back to the y domain.
[0019] Optionally, the identity loss between the first generator and the second generator is:
[0020] Among them, E y ~ p data ( y )represent y obey p data (y), Ex~ p data (x )represent x obey p data (x ), G is a generator that converts elements in the X domain to the Y domain, F is a generator that converts elements in the Y domain to the X domain, x is an element in the X domain, y is an element in the Y domain, G(y) represents the image converted from y to the Y domain using the generator G, and F(x) represents the image converted from x to the X domain using the generator F.
[0021] An electronic device comprises: a memory and a processor; the memory is used to store a program; the processor is used to execute the program to implement the underwater video enhancement method based on CycleGAN.
[0022] A readable storage medium stores a computer program, and when the computer program is executed by a processor, the underwater video enhancement method based on CycleGAN is implemented.
[0023] Technical effect of the present invention: The present invention discloses an underwater video enhancement method based on CycleGAN, which uses CycleGAN as a model for unsupervised training without paired data, thereby reducing the model's requirements for the data set while avoiding the mode collapse problem that CycleGAN is prone to. The present invention uses the UEVB large-scale high-resolution data set, has better video enhancement capabilities, and can meet high-resolution input. The network structure in the present invention uses information interaction between frames, uses intermediate frame features as convolution kernels, and passes the information of the auxiliary network to the main network information, which speeds up the training speed while improving the accuracy of the model. The present invention has strong universality. Thanks to the powerful fitting ability of the network, even in the face of underwater conditions under different circumstances, good results can be achieved after perfect training. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1 A schematic diagram of a process of an underwater video enhancement method based on CycleGAN according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the network structure of a generator according to an embodiment of the present invention; Figure 3 Schematic diagram of the discriminator network structure of an embodiment of the present invention; Figure 4 This is a schematic diagram of cycle consistency loss in an embodiment of the present invention; Figure 5 Schematic diagram of the enhancement effect of different methods on real underwater videos in the embodiments of the present invention, where a is RAW, b is CycleGAN (old), c is FA+Net, d is UVE_Net, e is the present invention, and f is GT. DETAILED DESCRIPTION
[0025] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0026] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0027] like Figure 1As shown, in this embodiment, a method for underwater video enhancement based on CycleGAN is provided, including: obtaining an underwater video data set, preprocessing underwater video data in the underwater video data set, and obtaining preprocessed underwater video data; The preprocessed underwater video dataset is input into the initial video enhancement model built based on CycleGAN for training to obtain the optimized video enhancement model; Obtain target underwater video data, input the optimized video enhancement model, and obtain target underwater video enhancement data.
[0028] Further, such as Figure 2 The generator network used in the figure follows the multi-frame input of the UVE-Net model, and the middle frame is used as the convolution kernel convolution mode, where the raw picture represents the real underwater video collected as the input, which is the extracted short image sequence, and the result represents the enhanced underwater video generated by the generator through the input. Mid is the middle frame of the video, R is the residual block, and kernel is the middle frame as the convolution kernel input into the convolution. The specific implementation process is: the initial video enhancement model built based on CycleGAN includes a generator network and a discriminator network, and the generator network includes the first generator (AE-NET) and the second generator (VE-NET); After the original video frame sequence is input, the intermediate frame is first extracted and input into the first generator. After four times downsampling and convolution, the preliminary feature extraction is completed. The intermediate extracted features are generated through 30 residual blocks. The first convolution kernel is generated through downsampling. At the same time, the first residual result is downsampled through 30 residual blocks to generate the second convolution kernel; in the second generator, the input frame sequence is firstly downsampled four times, and then the features are extracted through three-dimensional convolution. After that, convolution is performed separately for each individual frame, and the convolution kernel is the first convolution kernel generated by the intermediate frame in the first generator; after the first convolution result is upsampled twice and then passed through 15 three-dimensional residual blocks, the second output generated in the first generator is used as the convolution kernel of each individual frame for convolution again to complete the information exchange between frames; In most cases, the water content and degradation levels between adjacent frames are very similar. Adjacent frames can be made to follow similar feature extraction and enhancement processes to speed up inference. The downsampled frames have similar content and degradation processes as the original frames, which makes them follow similar enhancement processes. Therefore, the enhancement process of the low-resolution downsampled frames can be used to guide the original frames to complete directional enhancement more effectively.
[0029] like Figure 3In the discriminator network shown, the input frame sequence is divided into single frames for separate judgment by the discriminator, and the results of all frames are averaged as the final judgment result of the frame sequence. After the image sequence is input, the image sequence is divided into pictures by frame. First, it undergoes an initial convolution and activation layer for preliminary feature extraction and inputs the convolution block. The structure of the convolution block is to convolve the input once and then downsample it by one. After instance normalization, it is input into the activation layer. The convolution block is performed three times, and downsampled three times in total. The output result is convolved and activated with a sigmoid function. After all frames are processed, they are averaged and the results are divided into two to complete the judgment. Figure 3 f is the number of frames, that is, the number of images in the input sequence, and IN is the instance normalization (InstanceNorm). After the image sequence is input, it is divided into pictures by frame. After the initial convolution processing is performed on the divided pictures, they are sent to the convolution block. The function of this block is to downsample and extract features, downsampling by one time, and downsampling three times in total. The discriminator in the present invention uses PatchGAN in the original network, and finally maps the input to a 30×30 patch. It can simultaneously judge the authenticity of 30×30 image blocks in the image, and take the average of the judgment results of all image blocks as the result of image authenticity judgment.
[0030] Furthermore, the preprocessed underwater video dataset is input into the initial video enhancement model built based on CycleGAN for training, and the optimized video enhancement model is obtained including: S1, mapping the pre-processed underwater video data to generate underwater video enhancement data through a first generator; S2, discriminate the underwater video enhancement data through the discriminator, if the underwater video enhancement data is consistent with the pre-processed underwater video data, proceed to S3; if not, modify the discriminator parameters and return to S1; S3. Mapping the underwater video enhancement data to generate unenhanced underwater video data through a second generator.
[0031] Furthermore, the loss function between the first generator and the discriminator is:
[0032] Among them, X and Y represent the source domain and target domain respectively. p data ( x ) is the source domain X The data distribution, p data ( y ) is the data distribution of the target domain Y, E y ~ p data ( y )represent y obeyp data (y), Ex~ p data (x )represent x obey p data (x ) is expected, G represents the generator D Y Denotes the discriminator x as an element of the source domain X, y as an element of the target domain Y, D Y (y) indicates whether the discriminator identifies whether y belongs to the Y domain, G(x) indicates the input x element of the generator G, and D Y (G(x)) uses the discriminator to identify Y Don't input x into the G generator to see if the result of the input belongs to the Y domain.
[0033] Further, such as Figure 4 The cycle consistency loss between the first and second generators is shown as:
[0034] Among them, E y ~ p data ( y )represent y obey p data (y), Ex~ p data (x )represent x obey p data (x ), G is a generator that converts elements in the X domain to the Y domain, F is a generator that converts elements in the Y domain to the X domain, x is an element in the X domain, y is an element in the Y domain, G(x) means using generator G to convert x to an image in the Y domain, F(G(x)) means first using generator G to convert x to an image in the Y domain, and then using generator F to convert the result of generator G back to the X domain, F(y) means using generator F to convert y to an image in the X domain, G(F(y)) means first using generator F to convert y to an image in the X domain, and then using generator G to convert the result of generator F back to the y domain.
[0035] Furthermore, the identity loss between the first generator and the second generator is:
[0036] Among them, E y ~ p data ( y)represent y obey p data (y), Ex~ p data (x )represent x obey p data (x ), G is a generator that converts elements in the X domain to the Y domain, F is a generator that converts elements in the Y domain to the X domain, x is an element in the X domain, y is an element in the Y domain, G(y) represents the image converted from y to the Y domain using the generator G, and F(x) represents the image converted from x to the X domain using the generator F.
[0037] An electronic device includes: a memory and a processor; the memory is used to store a program; the processor is used to execute the program to implement an underwater video enhancement method based on CycleGAN.
[0038] A readable storage medium stores a computer program, which, when executed by a processor, implements an underwater video enhancement method based on CycleGAN.
[0039] The data used in the experimental process of the present invention is the large-scale high-resolution Underwater Video Enhancement Benchmark (UVEB) released on July 7, 2024, which contains 1,308 pairs of video sequences. UVEB comes from multiple countries and contains various scenes and video degradation types to adapt to diverse and complex underwater environments.
[0040] Due to the large scale of the UVEB dataset, the video duration varies from 1 to 20 seconds, the number of frames is 30 and 60, and the resolution is 38% of ultra-high definition (UHD) and 62% of 4K. In the present invention, only the first 150 pairs of video sequences are used, including 150 source videos and 150 target videos. By intercepting a picture every 6 frames, a total of 16,836 pictures are intercepted, including 8,418 source image sequences and 8,418 target image sequences. The ratio of the training set to the test set is 9:1, with 7,563 images in the training set and 855 images in the test set.
[0041] In this experiment, the intercepted data is randomly cropped to 512×512 as the initial input of the model to increase the training speed of the model. The data is randomly shuffled and input in order, and randomly reversed. This improves the randomness and diversity of the learning data and increases the generalization ability of the model.
[0042] like Figure 5As shown in the figure, the experiment of the present invention shows the schematic diagram of the enhancement effect of different methods on real underwater videos, where a is RAW, b is CycleGAN (old), c is FA+Net, d is UVE_Net, e is the present invention, and f is GT. Three consecutive frames are extracted from the test video and displayed from left to right. The models involved in the test include the original CycleGAN model. Since the model is relatively simple, the generator falls into a local optimal solution in order to deceive the discriminator, and there is a more serious color deviation.
[0043] The indicators used in this experiment are: peak signal-to-noise ratio PSNR, the average value of the square of the difference between the predicted value and the true value MSE, and the structural similarity index SSIM. The calculation methods are as follows: , , , Among them, MAXI represents the maximum value of the image color; MSE represents the mean square error; m represents the height of two images with the same height and width; n represents the width of two images with the same height and width; I and K Refers to two images with the same height and width; j represents the horizontal and vertical coordinates of the pixel in the image; I (i, j) - K (i, j) represents the difference in the pixel values at the same position of the two images; SSIM mainly considers three key features of the image: luminance, contrast, and structure; x and y are the two images to be compared respectively; l (x, y) means calculating the similarity of brightness; c(x, y) means calculating the similarity of contrast; s(x, y) means calculating the similarity of structure; Indicates the proportion of different features in the SSIM measurement.
[0044] Table 1 shows the effects of each model in model evaluation: Table 1
[0045] Experiments show that the underwater video enhancement method based on CycleGAN proposed in this invention has a significant effect on improving the image generation quality.
[0046] The present invention discloses an underwater video enhancement method based on CycleGAN. CycleGAN is used as a model for unsupervised training without paired data, which reduces the model's requirements for data sets and avoids the problem of mode collapse that CycleGAN is prone to. The present invention uses a large-scale high-resolution data set of UEVB, has better video enhancement capabilities, and can meet high-resolution input. The network structure in the present invention uses information interaction between frames, uses intermediate frame features as convolution kernels, and transmits the information of the auxiliary network to the main network information, which speeds up the training speed while improving the accuracy of the model. The present invention has strong universality. Thanks to the powerful fitting ability of the network, even in the face of underwater situations under different conditions, good results can be achieved after perfect training. The present invention implements the UVE_Net network as a generator of the CycleGAN model, changes the single loss function of the UVE_Net network, reduces the requirements for data sets, improves the training speed while improving the accuracy of the model, and avoids the mode collapse that the CycleGAN model is prone to.
[0047] The above are only preferred specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for underwater video enhancement based on CycleGAN, characterized in that: include: Acquire an underwater video data set, and preprocess the underwater video data in the underwater video data set to obtain preprocessed underwater video data; The preprocessed underwater video dataset is input into the initial video enhancement model built based on CycleGAN for training to obtain the optimized video enhancement model; The target underwater video data is obtained, and the optimized video enhancement model is input to obtain the target underwater video enhancement data.
2. The underwater video enhancement method based on CycleGAN according to claim 1, characterized in that: The initial video enhancement model constructed based on CycleGAN includes a generator network and a discriminator network, wherein the generator network includes a first generator and a second generator; After the original video frame sequence is input, the intermediate frame is first extracted and input into the first generator. The preliminary feature extraction is completed after four-fold downsampling and convolution. The intermediate extracted features are generated through 30 residual blocks. The first convolution kernel is generated through downsampling. At the same time, the first residual result is downsampled through 30 residual blocks to generate the second convolution kernel. In the second generator, the input frame sequence is first downsampled four times, and then subjected to three-dimensional convolution to extract features. After that, convolution is performed separately for each individual frame, and the convolution kernel is the first convolution kernel generated by the intermediate frame in the first generator; the first convolution result is upsampled twice and then passed through 15 three-dimensional residual blocks, and the second output generated in the first generator is used as the convolution kernel of each individual frame for convolution again to complete the information exchange between frames; In the discriminator network, the input frame sequence is divided into single frames for separate judgment by the discriminator, and the results of all frames are averaged as the final judgment result of the frame sequence. After the image sequence is input, the image sequence is divided into pictures by frame, and firstly undergoes an initial convolution and activation layer for preliminary feature extraction, and then inputs the convolution block. The structure of the convolution block is to perform a convolution on the input and then perform a one-fold downsampling, and then input the activation layer after instance normalization. The convolution block is performed three times, and the downsampling is three times in total; The output result is convolved and activated using the sigmoid function. After all frames are processed, they are averaged and the results are divided into two to complete the discrimination.
3. The underwater video enhancement method based on CycleGAN according to claim 2, characterized in that: The preprocessed underwater video dataset is input into the initial video enhancement model built based on CycleGAN for training. The optimized video enhancement model includes: S1, mapping the pre-processed underwater video data to generate underwater video enhancement data through the first generator; S2, discriminating the underwater video enhancement data through the discriminator, if the underwater video enhancement data is consistent with the pre-processed underwater video data, proceed to S3; if they are inconsistent, modifying the discriminator parameters and returning to S1; S3. Mapping the underwater video enhancement data to generate unenhanced underwater video data through the second generator.
4. The underwater video enhancement method based on CycleGAN according to claim 2, characterized in that: The loss function between the first generator and the discriminator is: Among them, X and Y represent the source domain and target domain respectively. p data ( x ) is the source domain X The data distribution, p data ( y ) is the data distribution of the target domain Y, E y ~ p data ( y )represent y obey p data (y), Ex~ p data (x )represent x obey p data (x ), G represents the generator, D Y represents the discriminator, x is an element of the source domain X, y is an element of the target domain Y, and D Y (y) indicates whether the discriminator identifies whether y belongs to the Y domain, G(x) indicates the input x element of the generator G, and D Y (G(x)) represents the discriminator D Y Don't input x into the G generator to see if the result of the input belongs to the Y domain.
5. The underwater video enhancement method based on CycleGAN according to claim 2, characterized in that: The cycle consistency loss between the first generator and the second generator is: Among them, E y ~ p data ( y )represent y obey p data (y), Ex~ p data (x )represent x obey p data (x ), G is a generator that converts elements in the X domain to the Y domain, F is a generator that converts elements in the Y domain to the X domain, x is an element in the X domain, y is an element in the Y domain, G(x) means using generator G to convert x to an image in the Y domain, F(G(x)) means first using generator G to convert x to an image in the Y domain, and then using generator F to convert the result of generator G back to the X domain, F(y) means using generator F to convert y to an image in the X domain, G(F(y)) means first using generator F to convert y to an image in the X domain, and then using generator G to convert the result of generator F back to the y domain.
6. The underwater video enhancement method based on CycleGAN according to claim 2, characterized in that: The identity loss between the first generator and the second generator is: Among them, E y ~ p data ( y )represent y obey p data (y), Ex~ p data (x )represent x obey p data (x ), G is a generator that converts elements in the X domain to the Y domain, F is a generator that converts elements in the Y domain to the X domain, x is an element in the X domain, y is an element in the Y domain, G(y) represents the image converted from y to the Y domain using the generator G, and F(x) represents the image converted from x to the X domain using the generator F.
7. An electronic device, characterized in that: include: Memory and processor; The memory is used to store programs; The processor is used to execute the program to implement the underwater video enhancement method based on CycleGAN as described in any one of claims 1-6.
8. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the underwater video enhancement method based on CycleGAN as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Underwater video image real-time enhancement method
CN112102186A
Human body abnormal behavior recognition method and device
CN113449679A
Video super-resolution method and system based on data simulation, equipment and storage medium
CN113469884A
Underwater image enhancement method and system, and equipment
CN114004766A
Medical image segmentation method based on u-net
US20220309674A1
