Low-light small-pixel CFA sampling and de-mosaicing methods for edge computing devices
By optimizing the topology structure and loss function in the UNet++ network, and combining it with Gaussian smoothing to replace the convolution structure, the problem of large parameters and long training time of the demosaicing algorithm in the existing technology is solved, and a small pixel color filter array suitable for low light is realized. Efficient denoising and demosaicing for edge computing devices.
Patent Information
- Application Number
- CN202210763316.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-30
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2042-06-30
AI Technical Summary
The existing technology only focuses on the algorithm effect in terms of demosaicing, resulting in a huge number of parameters, high computational cost, long training time, and difficulty in deploying on portable or mobile real-time systems. It is especially unsuitable for low-light images of small pixel color filter arrays. deal with.
A demosaicing method based on low-light small pixel CFA sampling and suitable for edge computing devices is designed. By optimizing the network topology in the UNet++ network model, using Gaussian smoothing instead of the convolution structure, and using different loss functions during the training process, the reduction Parameter quantity and accelerated training time, suitable for edge computing devices.
It achieves efficient denoising and demosaicing of small-pixel color filter array images under low-light conditions, reduces the number of parameters of the neural network, makes it suitable for edge computing devices, shortens the training time, and ensures the quality of image restoration.
Smart Images

Figure CN115082315B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of digital image processing, and more specifically, to the collaborative design of software and hardware of a visual processing neural network. Background Art
[0002] In computer vision, many deep learning methods have been used to complete the de-mosaicing task. However, these methods only focus on the optimal effect at the algorithm level, so the number of parameters is huge, and they rely on high-cost, low-energy-efficiency graphics processing units or remote computing centers. Under tight energy and cost budgets, the training time is long, and these algorithms are difficult to be deployed on portable or mobile real-time systems. On the other hand, most of these algorithms are based on the mosaic image restoration after the classic Bayer pattern is sampled in a color filter array of regular pixel size, and are not suitable for de-mosaicing of mosaic images obtained through a low-light small-pixel color filter array.
[0003] Therefore, existing technical solutions mainly focus on the de-mosaicing effect at the algorithm level, without considering the calculation time of the algorithm and whether it is suitable for deployment on edge computing devices. In addition, these solutions are suitable for color filter arrays with regular-sized pixels in a conventional Bayer pattern, and are not suitable for small pixels in low light conditions. Summary of the invention
[0004] In view of the shortcomings of the prior art, the present invention proposes a de-mosaicing method based on low-light small-pixel CFA (color filter array) sampling and applicable to edge computing devices. This method optimizes the network topology, minimizes the number of parameters, and accelerates the training time on the basis of ensuring the applicability of small-pixel color filtering entire-row mosaic image restoration effect. At the same time, it can be applicable to network deployment on edge computing devices.
[0005] The technical solution of the present invention is as follows:
[0006] A demosaicing method for low-light small-pixel CFA sampling and edge computing devices, comprising the following steps:
[0007] Step 1: First, add Gaussian noise to the original data set and reduce the brightness. Then, process the RGB image into a mosaic image through CFA with 75% transparent elements. Then, perform data preprocessing (such as cropping each image to 256*256 and then cropping it again into 4 128*128 images) to form a training set and set the parameters of the training target neural network.
[0008] Step 2: Build a neural network model with UNet++ network as the main framework.
[0009] Step 3: According to the neural network model, the corresponding network model is trained in two stages with the goal of minimizing the respective loss functions.
[0010] Step 4: Using the trained neural network model, the image to be processed that has been added with Gaussian noise, has its brightness reduced, and has been sampled in a color filter array manner with 75% transparent elements is demosaiced to obtain a demosaiced image.
[0011] Furthermore, in step 1, the method of adding Gaussian noise to the image and reducing the brightness is:
[0012] By calculating the variance v of a single black photo image and using this value as a benchmark, the Gaussian noise with a mean of 0 and a variance of v is multiplexed onto the three channels of the dataset to be processed according to the following formula (1):
[0013] Y=C(A·X+N(0,B·v)) (1)
[0014] Where, Y: processed low-light noise image, C: image pixel truncation function, A: light reduction factor, X: original image to be processed, N(a,b): Gaussian normal distribution noise generation function with mean a and variance b, B: Gaussian noise variance fine-tuning factor.
[0015] In the above, using Gaussian smoothing instead of convolutional structure can ensure that semantics at different levels can be connected across layers.
[0016] Furthermore, in step 1, forming a training set after data preprocessing means sampling and preprocessing the data set used for training according to the mode of the color filter array to obtain the data set used for neural network training, including:
[0017] For the image to which Gaussian noise has been added and the brightness has been reduced, sampling is performed according to the data sampling method of the color filter array with 75% transparent elements. The image containing only B channel sampling pixels, the image containing only R channel sampling pixels, the image G1 containing only G channel sampling pixels, the image G2 containing only G channel sampling pixels, and the image containing only transparent channel sampling pixels are respectively divided into multiple mosaic image blocks, among which the size of the image containing only transparent channel sampling is 3 times that of other images. After two downsamplings, a transparent channel image block with the same size as other image blocks is obtained.
[0018] Furthermore, the neural network model in step 2 includes a feature extraction module and an image reconstruction module.
[0019] The feature extraction module includes three Gaussian smoothing and feature extraction, six cross-layer connections and one upsampling structure. In the feature extraction module, there are three Gaussian smoothings in total, and the relationship between the three Gaussian smoothings is as follows: the input image is firstly smoothed once to obtain a picture that has been smoothed once, and then the picture that has been smoothed once is horizontally sent to the feature extraction module; at the same time, the picture that has been smoothed once is also smoothed downward once again to extract a higher level of semantics, and a picture that has been smoothed twice is obtained, and then the picture that has been smoothed twice is also horizontally sent to the feature extraction module; at the same time, the picture that has been smoothed twice is also smoothed downward once again to extract a higher level of semantics, and a picture that has been smoothed three times is obtained, and then the picture that has been smoothed three times is also horizontally sent to the feature extraction module.
[0020] In the feature extraction module, the images that have been Gaussian smoothed 0, 1, 2, and 3 times are first sent to the feature extraction modules of each layer, and the convolution kernel size in different feature extraction modules varies according to the number of smoothing times. There are different convolution kernel sizes in the feature extraction modules of each layer, among which the convolution kernel size after 0 Gaussian smoothing is 3*3, the convolution kernel size after 1 Gaussian smoothing is 3*3, the convolution kernel size after 2 Gaussian smoothing is 5*5, and the convolution kernel size after 3 Gaussian smoothing is 7*7. The role of these convolution structures is to further expand the receptive field, so that the network can obtain a wider range of image information in the upper layer of the involved triangular structure. After the convolution structure of each layer are three densely connected units, each of which consists of three depth-separable convolutions and one PReLU. In each densely connected unit, each depth-separable convolution structure uses a dense connection structure, that is, the input and output of the first layer of depth-separable convolution will be sent together to the input of the second layer of depth-separable convolution, and similarly, the input and output of the second layer of depth-separable convolution will be sent together to the input layer of the third layer of depth-separable convolution. At the same time, in the feature reconstruction module, the number of input and output channels of each densely connected unit.
[0021] The image reconstruction module consists of a 3×3 convolution, a 1×1 convolution structure and a PReLU, and is used to reconstruct the feature map after feature extraction into a mosaic-free and noise-free image.
[0022] Furthermore, the feature extraction module embeds a densely connected unit with a residual connection structure in a feature extraction module connected with a residual connection structure. The residual structure consists of a convolution structure and three densely connected units. The convolution structure is used to preliminarily extract corresponding horizontal features of different layers while further expanding the receptive field. Each densely connected unit contains three depth-separable convolutions and six PReLU activation layers.
[0023] Further, the step 3 comprises:
[0024] 3.1 Data selection,ImageNet is selected as the data set for training the network. Before being used for training, the image is first cropped into a 256*256 resolution image based on the center, and then the network is cropped into a 128*128 resolution image for network training.
[0025] 3.2 Optimizer selection: Adam optimization is used, the initial learning rate is set to 0.001, the learning rate is reduced to half of the original value every 10 cycles, the mini-batch size is 16, and other hyperparameters are set by default.
[0026] 3.3 Loss function design. Within 10 cycles of training (e≤10), the SSIM indicator for measuring local similarity is used as the basis for loss function design. After 10 cycles (e>10), the MSE for measuring global features is used as the basis for loss function design. The total number of experimental cycles is set to 150 cycles.
[0027] It can be seen from the above technical solutions that the solution of the present invention is a neural network demosaicing method suitable for edge computing devices that is matched with a color filter array dedicated to low-light small-pixel cameras, and its advantages are:
[0028] 1. De-noising and demosaicing of images sampled with a color filter array with 75% transparent elements suitable for low light conditions.
[0029] 2. Based on the original UNet++ network structure, the original convolution structure is replaced with a Gaussian smoothing structure in the downsampling stage of the UNet++ network, ensuring that semantics at different levels can be connected across layers and feature maps with different semantics can be used for image restoration at the same time.
[0030] 3. Different loss functions are used in different training cycles for neural network training, which makes full use of prior knowledge, ensuring both the local effect of image restoration and the training convergence speed of the network.
[0031] 4. On the basis of ensuring the image restoration effect, the network topology is modified and the traditional convolution in the upsampling stage is replaced by the depthwise separable convolution to reduce the number of network parameters. After the network training is completed, the appropriate network scale can be selected by pruning according to the actual situation, which is convenient for porting to edge computing devices.
[0032] 5. This method is more efficient and takes less training time.
[0033] The neural network algorithm designed in the present invention is specifically used for denoising and demosaicing of RAW images obtained by sampling the color filter array under low-light and small-pixel conditions. On the basis of ensuring good image restoration quality, the parameters of the neural network are reduced by modifying the topological structure and other methods, making the neural network suitable for edge computing devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 This is the processing effect of adding Gaussian noise and reducing brightness;
[0035] Figure 2 is the color filter array;
[0036] Figure 3 Dataset preprocessing process;
[0037] Figure 4 is the network topology;
[0038] Figure 5 It is the feature extraction module. DETAILED DESCRIPTION
[0039] The technical implementation of the present invention is further described in detail below with reference to the accompanying drawings:
[0040] The solution proposed by the present invention is a demosaicing method for a color filter array with 75% transparent elements. This method mainly solves the problem of different sizes of feature maps, and realizes the demosaicing effect based on the high sensitivity of the color filter array and the characteristics of being suitable for small cameras. The method mainly includes the following steps:
[0041] Step 1: First, after adding Gaussian noise to the original data set and reducing the brightness, the RGB image is processed into a mosaic image through CFA with 75% transparent elements. After data preprocessing, the training set is constructed, and the parameters of the training target neural network are set.
[0042] Step 2: Build a neural network model with UNet++ network as the main framework.
[0043] Step 3: According to the neural network model, the corresponding network model is trained in two stages with the goal of minimizing the respective loss functions.
[0044] Step 4: Using the trained neural network model, the image to be processed, which has been added with Gaussian noise and has reduced brightness, and has been sampled according to a color filter array with 75% transparent elements, is processed to obtain a demosaiced image.
[0045] The following examples describe in detail the specific implementation of each step:
[0046] Step 1: First, add Gaussian noise to the original image, reduce the brightness, and then process the RGB image into a mosaic image through a CFA with 75% transparent elements. After data preprocessing, form a training set and set the parameters of the training target neural network. Specifically, it includes:
[0047] Step 1.1, add Gaussian noise of appropriate intensity to the original image to reduce the brightness:
[0048] By calculating the variance v of a single black photo image and using this value as a benchmark, the Gaussian noise with a mean of 0 and a variance of v is multiplexed onto the three channels of the data set to be processed according to the following formula (1).
[0049] Y=C(A·X+N(0,B·v)) (1)
[0050] in,
[0051] Y: processed low-light noise image;
[0052] C: image pixel truncation function;
[0053] A: The light reduction multiple;
[0054] X: original image to be processed;
[0055] N(a,b): noise generating function that obeys the Gaussian normal distribution with mean a and variance b;
[0056] B: Gaussian noise variance fine-tuning multiple.
[0057] This process is designed to simulate the noise intensity such as photon readout noise generated by electronic devices during the image transmission process. By comparing the processing effect of adding noise to reduce brightness after fine-tuning the intensity, a low-light image with Gaussian noise with mean 0 and variance B·V is obtained, such as Figure 1 shown.
[0058] According to the above results, the parameters of A=0.2, B=2 and 3 are selected to process the image.
[0059] Step 1.2, process the RGB image into a mosaic image through CFA with 75% transparent elements, and form a training set after data preprocessing:
[0060] Taking the minimum repeating 4*4 unit as an example, there are 16 elements in the 4*4 unit. The upper left corner is sampled according to the Bayer mode, that is, the main diagonal samples the green value, the upper right corner samples the red value, and the lower left corner samples the blue value. The rest are transparent samples, that is, these parts only sample the brightness value of the original image (here calculated according to Gray = R*0.299+G*0.587+B*0.114). The specific sampling method can be referred to the following paper: G ANG L UO ,"A NOVEL COLOR FILTER ARRAY WITH 75% TRANSPARENT ELEMENTS, "PROC.SPIE 6502, DIGITALPHOTOGRAPHY III, 65020T (20FEBRUARY 2007); DOI: 10.1117 / 12.702950.
[0061] Analyze the data sampling method of the color filter array involved in the present invention (such as Figure 2 As shown), the original image is Figure 2 Sampling as shown.
[0062] First, the R and G channels of the pixels whose horizontal coordinates modulo 4 are 0 and whose vertical coordinates modulo 4 are 1 in the original image are set to 0, so as to obtain an image containing only B channel sampling pixels; the B and G channels of the pixels whose horizontal coordinates modulo 4 are 1 and whose vertical coordinates modulo 4 are 0 in the original image are set to 0, so as to obtain an image containing only R channel sampling pixels; the R and G channels of the pixels whose horizontal coordinates modulo 4 are 0 and whose vertical coordinates modulo 4 are 0 in the original image are set to 0, so as to obtain an image G1 containing only G channel sampling pixels; the R and G channels of the pixels whose horizontal coordinates modulo 4 are 1 and whose vertical coordinates modulo 4 are 1 in the original image are set to 0, so as to obtain an image G2 containing only G channel sampling pixels; the pixel values in the original image except the pixels at the above coordinates are calculated according to the formula Gray=R*0.299+G*0.587+B*0.114, and then sampled to obtain an image containing only transparent channel sampling pixels.
[0063] Then, the image containing only B channel sampling pixels, the image containing only R channel sampling pixels, the image G1 containing only G channel sampling pixels, the image G2 containing only G channel sampling pixels, and the image containing only transparent channel sampling pixels are respectively divided into multiple mosaic image blocks. The size of the image containing only transparent channel sampling pixels is three times that of other images. After two downsamplings, a transparent channel image block with the same size as other image blocks is obtained. The process is as follows Figure 3 shown.
[0064] In the above manner, the data set used for training is sampled and preprocessed according to the mode of color filtering array with 75% transparent elements to obtain the data set used for neural network training in this design.
[0065] Step 1.3, set the parameters for training the target neural network.
[0066] Specifically, the optimizer during training is set to Adam, the initial learning rate is set to 0.001, and the learning rate is reduced by half every 10 epochs during training. The mini-batch size during training is set to 16. The rest of the hyperparameters are set by default.
[0067] Step 2: Build a neural network model with UNet++ as the main framework
[0068] The main framework of the model is the UNet++ structure, and the network features are as follows:
[0069] The overall model of this method is as follows Figure 4 As shown, the neural network model includes a feature extraction part and an image reconstruction module.
[0070] 2.1 Feature extraction part:
[0071] The feature extraction part includes three Gaussian smoothing and feature extraction, six cross-layer connections, and one upsampling structure. The processing process is as follows:
[0072] In the feature extraction module, there are three Gaussian smoothings in total. The relationship between these three Gaussian smoothings is as follows: the input image is first Gaussian smoothed once to obtain a picture that has been smoothed once, and then the picture that has been smoothed once is horizontally sent to the feature extraction module; at the same time, the picture that has been smoothed once is downwardly smoothed once again to extract higher-level semantics, and obtain a picture that has been smoothed twice, and then, the picture that has been smoothed twice is also horizontally sent to the feature extraction module; at the same time, the picture that has been smoothed twice is downwardly smoothed once again to extract higher-level semantics, and obtain a picture that has been smoothed thrice, and then, the picture that has been smoothed thrice is also horizontally sent to the feature extraction module.
[0073] In the feature extraction module, the images that have been Gaussian smoothed 0, 1, 2, and 3 times are first sent to the feature extraction modules of each layer, and the convolution kernel size in different feature extraction modules varies according to the number of smoothing times. There are different convolution kernel sizes in the feature extraction modules of each layer, among which the convolution kernel size after 0 Gaussian smoothing is 3*3, the convolution kernel size after 1 Gaussian smoothing is 3*3, the convolution kernel size after 2 Gaussian smoothing is 5*5, and the convolution kernel size after 3 Gaussian smoothing is 7*7. The purpose of these convolution structures is to further expand the receptive field, so that the network can obtain a wider range of image information in the upper layer of the involved triangular structure. After the convolution structure of each layer are three densely connected units, each of which consists of three depth-separable convolutions and one PReLU. In each densely connected unit, each depth-separable convolution structure uses a dense connection structure, that is, the input and output of the first layer of depth-separable convolution will be sent together to the input of the second layer of depth-separable convolution, and the input and output of the second layer of depth-separable convolution will be sent together to the input layer of the third layer of depth-separable convolution. At the same time, in the feature reconstruction module, the number of input and output channels of each densely connected unit is the same.
[0074] In the above feature extraction module, after the input image is Gaussian smoothed three times, the network obtains three different levels of image blur levels. The advantage of this action is that it can obtain feature maps of different semantic levels without changing the size of the intermediate feature map, which is convenient for subsequent cross-layer connection. After Gaussian smoothing, the image is sent to Figure 5 The feature extraction modules of each layer are shown.
[0075] like Figure 5 As shown, the feature extraction module of the neural network model described in the method embeds a dense connection unit with a residual connection structure in the feature extraction module connected with a residual connection structure. The residual structure consists of a convolution structure and three dense connection units, wherein the convolution structure is used to preliminarily extract the corresponding horizontal features of different layers while further expanding the receptive field. Each dense connection unit contains three depth-separable convolutions and six PReLU activation layers. The residual structure consists of a convolution structure and three dense connection units, wherein the convolution structure is used to preliminarily extract the corresponding horizontal features of different layers while further expanding the receptive field. In this neural network model, the sizes of the convolution kernels of layers 0, 1, 2, and 3 are 3×3, 3×3, 5×5, and 7×7, respectively. The feature extraction module also contains three dense connection units, each of which contains three depth-separable convolutions and six PReLU activation layers.
[0076] The input and output channel numbers of the feature extraction module of the network model included in this method are consistent. The channel number parameters of the middle layer are shown in Table 1.
[0077]
[0078]
[0079] Table 1
[0080] 2.2 Image reconstruction part:
[0081] After the input image passes through the above feature extraction part, the feature map will be Figure 4 The purple part in the figure is reconstructed to the right and upward into a mosaic-free and noise-free image. This right-upward process is the image reconstruction part. In this part, the features of each layer will be connected with the features of each layer at the previous and lower levels by 1×1 convolution (as shown by the white circle in the figure); each image reconstruction operation in this part consists of a 3×3 convolution, a 1×1 convolution structure and a PReLU; the dotted part in the figure represents the connection between layers at different semantic levels, which is realized by 1×1 convolution; the orange arrow at the top of the structure represents the upsampling realized by the 3×3 transposed convolution structure. The final output image between layers will be obtained at the top layer of the structure, which is the output of L=1, L=2, L=3 in the figure. In the image reconstruction part, in the process before the transposed convolution operation, the image size remains unchanged. After the transposed convolution, the length and width of the image are each twice the original. The input image size, convolution kernel size, and output image size of the intermediate process are shown in Table 2.
[0082]
[0083]
[0084] Table 2
[0085] Step 3: According to the neural network model, the corresponding network model is trained in two stages with the goal of minimizing the respective loss functions.
[0086] 3.1 Data Selection,This method selects ImageNet as the dataset for training the network. Before using it for training, the image is firstly cropped into 256*256 resolution images based on the center, and then the network is cropped into 128*128 resolution images for network training.
[0087] 3.2 Optimizer selection. This method uses Adam optimization. The initial learning rate is set to 0.001. The learning rate is reduced to half of the original value every 10 cycles. The mini-batch size is 16, and other hyperparameters are set by default.
[0088] 3.3 Loss function design. Within 10 cycles of training (e≤10), the SSIM indicator for measuring local similarity is used as the basis for loss function design. After 10 cycles (e>10), the MSE for measuring global features is used as the basis for loss function design. The total number of experimental cycles is set to 150 cycles.
[0089] The SSIM loss function L SSIM as follows:
[0090]
[0091] MSE loss function L MSE as follows:
[0092]
[0093] The overall loss function is as follows:
[0094]
[0095] Step 4: Using the trained neural network model, the image to be processed, which has been sampled using a color filter array with 75% transparent elements and to which Gaussian noise has been added and brightness has been reduced, is processed to obtain a de-mosaiced image.
[0096] It can be seen from the above embodiments that this method, as a de-mosaicing algorithm for a color filter array with 75% transparent elements, is suitable for small-pixel color filter arrays under low-light conditions. This algorithm mainly solves the problem of different sizes of feature maps, and achieves a de-mosaicing effect based on the higher photosensitivity of the color filter array and its suitability for small cameras.
[0097] In addition, this method realizes the idea of collaborative design of software and hardware. On the basis of ensuring good image restoration quality, it reduces the number of parameters from the perspective of topological structure by modifying the topological structure and other methods while ensuring an acceptable de-mosaicing effect. This reduces the number of parameters of the neural network and makes the neural network suitable for edge computing devices.
Claims
1. A demosaicing method for low-light small-pixel CFA sampling and edge computing devices, characterized in that: The following steps are involved: Step 1: First, add Gaussian noise to the original data set and reduce the brightness. Then, process the RGB image into a mosaic image through a color filter array (CFA) with 75% transparent elements. After data preprocessing, form a training set and set the parameters of the training target neural network. Step 2: Build a neural network model with UNet++ network as the main framework. The neural network model includes feature extraction part and image reconstruction module: The feature extraction part includes a cubic Gaussian smoothing and feature extraction module, a cross-layer connection structure, and a one-time upsampling structure; the feature extraction module embeds a dense connection unit with a residual connection structure in a feature extraction module connected with a residual connection structure, and the residual connection structure consists of a convolution structure and three dense connection units, wherein the convolution structure is used to preliminarily extract the corresponding horizontal features of different layers while further expanding the receptive field, and each dense connection unit contains three depth-separable convolutions and six PReLU activation layers; The image reconstruction module consists of a 3×3 convolution, a 1×1 convolution structure and a PReLU, which is used to reconstruct the feature map after feature extraction into a mosaic-free and noise-free image; Step 3: According to the neural network model, the corresponding network model is trained in two stages with the goal of minimizing the respective loss functions, including: 3.1 Data selection, ImageNet is selected as the data set for training the network. Before using it for training, the image is first cropped into 256*256 resolution images based on the center, and then the network is cropped into 128*128 resolution images for network training; 3.2 Optimizer selection: Adam optimization is used, the initial learning rate is set to 0.001, the learning rate is reduced to half of the original every 10 cycles, the mini-batch size is 16, and other hyperparameters are set by default; 3.3 Loss function design. Within 10 cycles of training, that is, e≤10, the SSIM index measuring local similarity is used as the basis for loss function design. After 10 cycles, that is, e>10, the MSE index measuring global features is used as the basis for loss function design. The total number of experimental cycles is set to 150 cycles. Step 4: Using the trained neural network model, the image to be processed, which has been added with Gaussian noise and has reduced brightness, and has been sampled according to a color filter array with 75% transparent elements, is processed to obtain a demosaiced image.
2. The de-mosaicing method applicable to low-light small-pixel CFA sampling and edge computing devices according to claim 1, characterized in that: In step 1, the method for adding Gaussian noise to the original data set and reducing the brightness is: By calculating the variance v of a single black photo image and using this value as a benchmark, the Gaussian noise with a mean of 0 and a variance of v is multiplexed onto the three channels of the original data set according to the following formula (1): Y=C((A·X+N(0,B·v)) (1) Where, Y: processed low-light noise image, C: image pixel truncation function, A: light reduction factor, X: original image to be processed, N(a,b): Gaussian normal distribution noise generation function with mean a and variance b, B: Gaussian noise variance fine-tuning factor.
3. The demosaicing method applicable to low-light small-pixel CFA sampling and edge computing devices according to claim 1, characterized in that: In step 1, processing the RGB image into a mosaic image by a CFA with 75% transparent elements means: The original image is sampled in the manner of a color filter array with 75% transparent elements, and an image containing only B channel sampling pixels, an image containing only R channel sampling pixels, an image G1 containing only G channel sampling pixels, an image G2 containing only G channel sampling pixels, and an image containing only transparent channel sampling pixels are respectively divided into multiple mosaic image blocks, wherein the size of the image containing only transparent channel sampling is three times that of other images, and after two downsamplings, a transparent channel image block with the same size as other image blocks is obtained.
4. The demosaicing method applicable to low-light small-pixel CFA sampling and edge computing devices according to claim 1, characterized in that: In the neural network model, the sizes of the convolution kernels of layers 0, 1, 2, and 3 are 3×3, 3×3, 5×5, and 7×7, respectively.
5. The de-mosaicing method for low-light small-pixel CFA sampling and edge computing devices according to claim 1, characterized in that In step 3.3: SSIM loss function L SSIM as follows: in, represents the structural similarity of two images, where x and y represent the two images used to calculate the structural similarity, and μ x is the mean value of x, μ y is the mean value of y, is the variance of x, is the variance of y, σ xy is the covariance of x and y, C1=(k1L) 2 ,C2=(k2L) 2 is a constant used to maintain stability; L is the dynamic range of pixel values, k1 = 0.01, k2 = 0.03; in this design, the size of the sliding window in the SSIM calculation process is set to 11; Loss function L SSIM Here, M means that the matrix abstracted from the two images has a total of M rows, and N means that the matrix abstracted from the two images has a total of N columns; After the number of training epochs exceeds 10, the loss function uses the MSE loss function L MSE , its specific form is as follows: Therefore, the overall loss function is as follows: The superscript 1 in the loss function in the above formula indicates that the loss functions L1, L2, and L3 of each layer of the network with deep supervision need to be considered together during the training process. Represents the SSIM loss function of the 1st, 2nd, and 3rd layers, the same Represents the MSE loss function of the 1st, 2nd, and 3rd layers.
