Image compression reconstruction method and system based on stochastic resonance principle
By introducing noise optimization activation function and Bayesian optimization method with the principle of superthreshold random resonance in neural networks, the problem of insufficient generalization ability of activation function is solved, and the quality and stability of image compression and reconstruction are significantly improved.
Patent Information
- Application Number
- CN202411887235.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-18
AI Technical Summary
In the prior art, the generalization ability of the activation function is insufficient, resulting in poor image reconstruction quality and training is prone to overfitting.
Using a noise optimization activation function based on the principle of super-threshold random resonance, a noise optimization neural network is constructed by connecting the quantizers in parallel and adding noise to each quantizer, and the hyperparameters are automatically optimized using Bayesian optimization method.
It improves the expression and generalization capabilities of neural networks, significantly improves the quality of image reconstruction, and improves the stability of training.
Smart Images

Figure CN119850756A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of deep learning and image processing, and in particular to an image compression and reconstruction method and system based on the principle of stochastic resonance. Background Art
[0002] Image compression reconstruction refers to the process of compressing image data and then restoring it to the original image through certain algorithms and technologies. The purpose of image compression is to reduce the amount of data required to represent the image, which is mainly achieved by removing redundant information in the image data.
[0003] Autoencoders can achieve efficient data dimension reduction and feature extraction, and play an important role in the field of image compression and reconstruction research. In the design of classic autoencoder models, activation functions with simple structures such as ReLU have been widely used. However, in current engineering practice, when there are few sample images or the image data has high complexity, the generalization ability of activation functions such as ReLU is insufficient, resulting in image reconstruction quality that cannot meet the standards, and training is prone to overfitting.
[0004] Therefore, how to provide an image compression reconstruction method and system based on the principle of stochastic resonance is a problem that needs to be solved urgently. Summary of the invention
[0005] The embodiment of the present invention provides an image compression reconstruction method and system based on the principle of stochastic resonance to solve the problem of insufficient generalization ability of activation functions in the prior art.
[0006] In order to have a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. This summary is not intended to be a general review, nor is it intended to identify key / important components or to delineate the scope of protection of these embodiments. Its only purpose is to present some concepts in a simple form as a preface to the detailed description that follows.
[0007] According to a first aspect of an embodiment of the present invention, a method for image compression and reconstruction based on the principle of stochastic resonance is provided.
[0008] In one embodiment, the image compression reconstruction method based on the stochastic resonance principle includes:
[0009] Based on the super-threshold stochastic resonance technology, several quantizers are connected in parallel, and noise is added to each quantizer to form an array structure of super-threshold stochastic resonance.
[0010] The activation function of the hidden layer nodes of the neural network is replaced by an array structure of superthreshold stochastic resonance to obtain a noise-optimized activation function; based on the noise-optimized activation function, a noise-optimized neural network is constructed;
[0011] Initialize the hyperparameters of the noise optimization neural network, and use the optimization algorithm to perform gradient training and hyperparameter tuning on the noise optimization neural network; compress and reconstruct the image based on the trained noise optimization neural network.
[0012] In one embodiment, based on the super-threshold stochastic resonance technology, a plurality of quantizers are connected in parallel, and noise is added to each quantizer, so that an array structure of super-threshold stochastic resonance is formed, including:
[0013] In the framework of the superthreshold stochastic resonance model, several quantizers are connected in parallel to form a signal processing array. Noise of the same intensity and independent and identical distribution is added to each quantizer to obtain an array structure of superthreshold stochastic resonance.
[0014] In one embodiment, the activation function of the hidden layer node of the neural network is replaced with an array structure of superthreshold stochastic resonance to obtain a noise-optimized activation function including:
[0015] The average of the outputs of several quantizers is used as the transfer function of the super-threshold stochastic resonance model, and the transfer function is used as the gating operator of the hidden layer input;
[0016] The output of the transfer function is multiplied by the hidden layer input and combined with learnable scale and exponent parameters to obtain a noise-optimized activation function.
[0017] In one embodiment, the noise optimized activation function is:
[0018] g(x,σ,α)=x[1-F η (-x,σ,α)]
[0019] Where x is the input, σ is the scale parameter in the activation function, and α is the exponential parameter of generalized Gaussian noise;
[0020] F η (x) is the probability density function f η (x) corresponds to the cumulative distribution function.
[0021] In one embodiment, constructing a noise optimized neural network based on a noise optimized activation function includes:
[0022] A noise optimization neural network including a noise optimization activation function, an encoder and a decoder is established, and the specifications of the noise optimization neural network are determined according to the number of channels of the task image.
[0023] In one embodiment, initializing the hyperparameters of the noise optimized neural network and performing gradient training and hyperparameter tuning on the noise optimized neural network using an optimization algorithm includes:
[0024] Construct a dataset for image compression and reconstruction tasks and initialize the hyperparameters of the noise optimization neural network;
[0025] In the deep learning framework, the data set is used to train the noise optimization neural network, and in the hyperparameter optimization framework, the Bayesian optimization of each hyperparameter in the noise optimization neural network is completed.
[0026] In one embodiment, the trainable parameters of the noise optimized neural network include a scale parameter in the activation function and an exponential parameter of the generalized Gaussian noise.
[0027] In one embodiment, in a deep learning framework, training a noise optimized neural network using a data set includes:
[0028] The trainable parameters of the noise optimization neural network are gradient trained using the gradient descent algorithm and the dataset.
[0029] In one embodiment, constructing a dataset for an image compression and reconstruction task includes:
[0030] A data set is constructed according to the image compression and reconstruction tasks. The data set includes a training set, a validation set, and a test set. Data enhancement preprocessing is performed on the images in the data set.
[0031] According to a second aspect of an embodiment of the present invention, an image compression and reconstruction system based on the principle of stochastic resonance is provided.
[0032] In one embodiment, the image compression and reconstruction system based on the stochastic resonance principle includes:
[0033] An array structure building module is used to connect a number of quantizers in parallel based on superthreshold stochastic resonance technology, and add noise to each quantizer to form an array structure of superthreshold stochastic resonance;
[0034] A neural network building module is used to replace the activation function of the hidden layer nodes of the neural network with an array structure of superthreshold stochastic resonance to obtain a noise-optimized activation function; based on the noise-optimized activation function, a noise-optimized neural network is constructed;
[0035] The image compression and reconstruction module is used to initialize the hyperparameters of the noise optimization neural network and use the optimization algorithm to perform gradient training and hyperparameter tuning on the noise optimization neural network; the image is compressed and reconstructed according to the trained noise optimization neural network.
[0036] According to a third aspect of an embodiment of the present invention, a computer device is provided.
[0037] In some embodiments, the computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0038] According to a fourth aspect of embodiments of the present invention, a computer-readable storage medium is provided.
[0039] In one embodiment, the computer-readable storage medium stores a computer program, and the computer program implements the steps of the above method when executed by a processor.
[0040] The technical solution provided by the embodiment of the present invention may have the following beneficial effects:
[0041] (1) The present invention proposes a unified noise-optimized activation function model framework with learnable parameters, which includes existing activation functions including classic activation functions such as ReLU, ELU, GELU, SiLU, etc., and can generate new activation functions according to rules. The noise-optimized activation function is conducive to improving the expressive power of neural networks and has better generalization ability. In the image compression and reconstruction tasks based on autoencoders, the use of noise-optimized activation functions can significantly improve the reconstruction quality of images.
[0042] (2) In order to address the defects of hyperparameter selection in the neural network training process that relies on experience and has unstable performance, the Bayesian optimization method is introduced, and the Optuna hyperparameter optimization framework is used to automatically optimize the neural network hyperparameters, record the optimal hyperparameter combination and neural network weights and other parameters, and improve the generalization ability and training stability of the neural network.
[0043] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0045] Figure 1 is a flow chart of an image compression reconstruction method based on the stochastic resonance principle according to an exemplary embodiment;
[0046] Figure 2 is a principle block diagram of an image compression and reconstruction system based on the stochastic resonance principle according to an exemplary embodiment;
[0047] Figure 3 is a schematic diagram of the structure of a computer device according to an exemplary embodiment;
[0048] Figure 4is a schematic diagram of a noise optimization activation function structure according to an exemplary embodiment;
[0049] Figure 5 is a schematic diagram of a noise optimized autoencoder model according to an exemplary embodiment;
[0050] Figure 6 is a diagram showing a noise optimized autoencoder neural network structure according to an exemplary embodiment;
[0051] Figure 7 is a curve diagram showing the change of loss function value with the number of training Epochs according to an exemplary embodiment;
[0052] Figure 8 is a curve diagram showing a change in a learnable parameter σ with the number of training Epochs according to an exemplary embodiment;
[0053] Fig. 9 is a contour map of a reconstruction error convergence path according to an exemplary embodiment;
[0054] Fig.10 is a comparison diagram of fingerprint image reconstruction effects according to an exemplary embodiment. DETAILED DESCRIPTION
[0055] The following description and accompanying drawings fully illustrate the specific embodiments of this article so that those skilled in the art can practice them. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. The scope of the embodiments of this article includes the entire scope of the claims, as well as all available equivalents of the claims. Herein, the terms "first", "second", etc. are only used to distinguish one element from another, without requiring or implying any actual relationship or order between these elements. In fact, the first element can also be called the second element, and vice versa. Moreover, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that the structure, device or equipment including a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also include elements inherent to such structure, device or equipment. In the absence of more restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the structure, device or equipment including the elements. Each embodiment is described in a progressive manner herein, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the embodiments can be referred to each other.
[0056] The terms "longitudinal", "lateral", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc. in this document indicate the orientation or position relationship based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing this document and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In the description of this document, unless otherwise specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a mechanical connection or an electrical connection, it can also be the internal communication of two elements, it can be a direct connection, or it can be an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.
[0057] As used herein, the term "plurality" means two or more than two, unless otherwise specified.
[0058] In this document, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B means: A or B.
[0059] In this article, the term "and / or" is a description of the association relationship between objects, indicating that three relationships may exist. For example, A and / or B means: A or B, or, A and B.
[0060] It should be understood that, although the various steps in the flow chart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the figure may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0061] Each module in the device or system of the present application can be implemented in whole or in part by software, hardware, or a combination thereof. The above modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to the above modules.
[0062] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0063] Figure 1An embodiment of an image compression reconstruction method based on the stochastic resonance principle of the present invention is shown.
[0064] In this optional embodiment, the image compression reconstruction method based on the stochastic resonance principle includes:
[0065] S101, based on the super-threshold stochastic resonance technology, a plurality of quantizers are connected in parallel, and noise is added to each quantizer to form an array structure of super-threshold stochastic resonance;
[0066] S103, replacing the activation function of the hidden layer nodes of the neural network with an array structure of superthreshold stochastic resonance to obtain a noise-optimized activation function; and constructing a noise-optimized neural network based on the noise-optimized activation function;
[0067] S105, initializing the hyperparameters of the noise optimization neural network, and performing gradient training and hyperparameter tuning on the noise optimization neural network using an optimization algorithm; and compressing and reconstructing the image according to the trained noise optimization neural network.
[0068] In this optional embodiment, based on the super-threshold stochastic resonance technology, a plurality of quantizers are connected in parallel, and noise is added to each quantizer, so that the array structure of super-threshold stochastic resonance includes:
[0069] In the framework of the superthreshold stochastic resonance model, several quantizers are connected in parallel to form a signal processing array. Noise of the same intensity and independent and identical distribution is added to each quantizer to obtain an array structure of superthreshold stochastic resonance.
[0070] In this optional embodiment, the activation function of the hidden layer node of the neural network is replaced with an array structure of superthreshold stochastic resonance to obtain a noise-optimized activation function including:
[0071] The average of the outputs of several quantizers is used as the transfer function of the super-threshold stochastic resonance model, and the transfer function is used as the gating operator of the hidden layer input;
[0072] The output of the transfer function is multiplied by the hidden layer input and combined with learnable scale and exponent parameters to obtain a noise-optimized activation function.
[0073] In this optional embodiment, the noise optimization activation function is:
[0074] g(x,σ,α)=x[1-F η (-x,σ,α)]
[0075] Where x is the input, σ is the scale parameter in the activation function, and α is the exponential parameter of generalized Gaussian noise;
[0076] F η (x) is the probability density function fη (x) corresponds to the cumulative distribution function.
[0077] In this optional embodiment, constructing a noise optimized neural network based on the noise optimized activation function includes:
[0078] A noise optimization neural network including a noise optimization activation function, an encoder and a decoder is established, and the specifications of the noise optimization neural network are determined according to the number of channels of the task image.
[0079] In this optional embodiment, initializing the hyperparameters of the noise optimized neural network and performing gradient training and hyperparameter tuning on the noise optimized neural network using an optimization algorithm includes:
[0080] Construct a dataset for image compression and reconstruction tasks and initialize the hyperparameters of the noise optimization neural network;
[0081] In the deep learning framework, the data set is used to train the noise optimization neural network, and in the hyperparameter optimization framework, the Bayesian optimization of each hyperparameter in the noise optimization neural network is completed.
[0082] In this optional embodiment, the trainable parameters of the noise optimized neural network include a scale parameter in the activation function and an exponential parameter of the generalized Gaussian noise.
[0083] In this optional embodiment, in a deep learning framework, using a data set to train a noise optimized neural network includes:
[0084] The trainable parameters of the noise optimization neural network are gradient trained using the gradient descent algorithm and the dataset.
[0085] In this optional embodiment, constructing a data set for an image compression and reconstruction task includes:
[0086] A data set is constructed according to the image compression and reconstruction tasks. The data set includes a training set, a validation set, and a test set. Data enhancement preprocessing is performed on the images in the data set.
[0087] Figure 2 An embodiment of an image compression and reconstruction system based on the stochastic resonance principle of the present invention is shown.
[0088] In this optional embodiment, the image compression and reconstruction system based on the stochastic resonance principle includes:
[0089] An array structure building module 201 is used to connect a plurality of quantizers in parallel based on the super-threshold stochastic resonance technology, and add noise to each quantizer to form an array structure of super-threshold stochastic resonance;
[0090] The neural network construction module 203 is used to replace the activation function of the hidden layer nodes of the neural network with an array structure of superthreshold stochastic resonance to obtain a noise-optimized activation function; and to construct a noise-optimized neural network based on the noise-optimized activation function;
[0091] The image compression and reconstruction module 205 is used to initialize the hyperparameters of the noise optimization neural network, and use the optimization algorithm to perform gradient training and hyperparameter tuning on the noise optimization neural network; and compress and reconstruct the image according to the trained noise optimization neural network.
[0092] In order to facilitate understanding of the above technical solutions of the present invention, the above technical solutions of the present invention are further described below from the perspective of architecture and principle, as follows:
[0093] The present invention proposes a unified noise-optimized activation function model framework with learnable parameters. Combined with the self-gating mechanism, the model can uniformly interpret existing activation functions such as ReLU, ELU, GELU, SiLU, and can generate new activation functions according to rules. Such noise-optimized activation functions can improve the processing performance and generalization ability of neural networks. In addition, during the training process, in view of the defects that the selection of hyperparameters such as learnable parameters, optimizer types, and learning rates depends on experience and has unstable performance, the present invention introduces a Bayesian optimization method to automatically optimize the hyperparameters in the neural network.
[0094] In neural network model structures such as autoencoders, stochastic resonance (noise optimization) is a key performance improvement technology. The classic dropout method can be seen as adding multiplicative noise to neurons with a certain probability. Adding an appropriate amount of noise to the data set, hidden layer, output layer, loss function, etc. can all have a beneficial effect.
[0095] Suprathreshold Stochastic Resonance (SSR) is a signal processing technology that artificially adds an appropriate amount of noise to an array composed of T McCulloch-Pitts neurons (quantizers) in parallel. For superthreshold input signals, under the framework of the stochastic resonance model, a single quantizer cannot improve the signal-to-noise ratio gain. At this time, several quantizers are connected in parallel to form a signal processing array, and noise with the same intensity and independent and identical distribution is added to each quantizer, which can improve the signal-to-noise ratio gain of the processor. Considering that the structure of the input of the signal processor → nonlinear transfer function → output has structural similarities with the hidden layer input → nonlinear activation function → hidden layer output at the hidden layer node of the neural network, and the hidden layer input is often superthreshold, it meets the implementation conditions of superthreshold stochastic resonance. The hidden layer node is regarded as a signal processor. Inspired by the superthreshold stochastic resonance, the present invention replaces the activation function of the hidden layer node with the array structure of SSR at the hidden layer activation function of the autoencoder, and a class of noise optimization activation functions can be constructed.
[0096] In the array structure, the input and output characteristics of each quantizer are:
[0097]
[0098] Assume that there are T quantizer subsystems in parallel, and the pure input of the system is x. At this time, an independent and identically distributed noise η with the same intensity is artificially added to each subsystem. t (t=1,2,…,T), then the output of the t-th subsystem can be expressed as:
[0099]
[0100] Assume that the probability density function of noise η is f η (η), the probability that the output of the above formula is 1 is P{η t ≥-x} is:
[0101]
[0102] In the formula, is the noise η t The cumulative distribution function (CDF) of .
[0103] The SSR model transfer function p(x) is defined as the average output of each of the T subsystems:
[0104]
[0105] When T→∞, p(x) will approach P{x+η t ≥0}, that is:
[0106] p(x)≈1-F η (-x)
[0107] In particular, when the mean of the noise η is zero and the probability density function is an even function, p(x)≈F η (x). For example, when the added noise is Gaussian noise with a mean of zero (generalized Gaussian noise with an exponential parameter α=2), we have:
[0108]
[0109] in,
[0110]
[0111] Where Φ(·) is the cumulative distribution function of the standard normal distribution.
[0112] Gating plays an important role in time series signal processing models such as LSTM. The output value range of the transfer function p(x) of the above SSR model is [0,1], which can be used as a gating structure to control the flow of information in the neural network. The transfer function p(x) of the above SSR model is used as the gating operator of the hidden layer input x, such as Figure 4 As shown, the output of p(x) is multiplied by the hidden layer input x. Considering the existence of learnable scale parameter σ and exponential parameter α in the activation function, the expression of the noise optimized activation function g(x) can be obtained:
[0113] g(x,σ,α)=xp(x,σ,α)=x[1-F η (-x,σ,α)]
[0114] There are independent learnable parameters σ and α in this type of activation function, which only increase a limited number of model hyperparameters while improving the generalization ability of the neural network. In view of the defect that the selection of autoencoder hyperparameters depends on experience, a Bayesian optimization algorithm is introduced to realize automatic optimization of model hyperparameters. The main technical idea of the present invention is to improve the image compression and reconstruction performance of the autoencoder by using noise optimization activation function and Bayesian hyperparameter optimization.
[0115] like Figure 4 As shown in FIG. 1 , it is a schematic diagram of the structure of a noise optimization activation function. The following are the specific steps of the image compression and reconstruction method designed based on this activation function:
[0116] (1) Construct a data set according to the specific image compression and reconstruction task, including a training set, a validation set, and a test set. Divide the training set and the validation set in a ratio of 80%-90% and 20%-10%. Perform data enhancement preprocessing such as random cropping, random rotation, and normalization on the images in the data set.
[0117] (2) In the hidden layer, let the previous layer input be x, and according to the cumulative distribution function F of artificially added generalized Gaussian noise η (x) Design the noise optimization activation function g(x,σ,α), whose input-output relationship is:
[0118] g(x,σ,α)=x[1-F η (-x,σ,α)]
[0119] Where σ and α are learnable parameters, which can be automatically optimized during the neural network training process using the gradient descent algorithm and the Bayesian optimization algorithm.
[0120] σ is the scale parameter in the activation function. The present invention uses a generalized Gaussian noise model to design a noise-optimized activation function. This type of noise has a probability density function in Where Γ(·) is the gamma function, α is the exponential parameter of generalized Gaussian noise, and f η The corresponding cumulative distribution function of (x) is F η (x).
[0121] (3) Use the noise optimized activation function g(x,σ,α) to construct a noise optimized autoencoder neural network. Depending on the specific task, the autoencoder can use a stack of simple convolutional layers and fully connected layers, or a large network structure such as ResNet. The structural diagram of the autoencoder is shown in Figure 5 and Figure 6 As shown. It consists of an encoder and a decoder. The encoder contains 3 convolutional layers and 3 noise-optimized activation function layers, and the convolution kernel size is set to 3×3. A maximum pooling layer is set after each of the first two convolutional layers. The decoder contains 3 deconvolutional layers and 2 noise-optimized activation function layers, and the convolution kernel size is set to 3×3. An upsampling layer is set after each of the first two deconvolutional layers, and a Sigmoid activation function layer is set in the output layer. When the original image is a single-channel grayscale image of 224×224, the shape of the latent variable passing through the encoder is 56×56, and the latent variable is restored to a single-channel grayscale image of 224×224 through the decoder.
[0122] (4) Initialize the hyperparameters of the noise-optimized autoencoder, use the PyTorch framework (an open source deep learning framework) to train the parameters of the neural network, and use the Optuna hyperparameter optimization library (a software framework for automated hyperparameter optimization) to implement Bayesian optimization of the neural network hyperparameters and automatically tune the learnable parameters in the noise-optimized activation function. The loss function changes with the number of training times during the training process, as shown in Figure 7 As shown in , it can be seen that the loss function value drops rapidly in the early stage of training and then tends to stabilize. Figure 8In the figure, we show the variation curve of the learnable scale parameter σ in the noise optimized autoencoder with the number of training times, which is Figure 8 It can be seen that each σ tends to be stable in the later stage of training. Fig. 9 In Figure 2, we show how the learnable scale parameter σ in the first two hidden layers changes when using the Bayesian optimization method. Fig. 9 The dotted line and square marks in show the changing path of the learnable scale parameter σ during the iterative experiment, and the learnable scale parameter σ finally converges at the star mark.
[0123] For the scale parameter σ, it can be uniformly set to a constant 3, such as Figure 8 As shown in the figure, the number of training times is zero; the generalized Gaussian noise exponent parameter α can be uniformly set to a constant of 2; the Adam optimizer is set to use a learning rate of 0.001. According to the gradient descent algorithm and Bayesian optimization method, gradient training and hyperparameter tuning are performed simultaneously. The Optuna hyperparameter optimization framework is called, the sampler is set to the tree Parzen estimator (TPE), and the number of trials is set to 100. The above hyperparameters can be automatically optimized at the same time, and the optimal hyperparameter combination and neural network weights and other parameters are recorded to achieve compression and reconstruction of the target image.
[0124] (5) After the training is completed, the parameter information of the noise optimized autoencoder is saved to achieve compression and reconstruction of new images of the same category.
[0125] Experimental Results
[0126] The FVC2002 fingerprint verification competition dataset is used. The dataset includes 880 fingerprint images, with a total of 110 fingerprints and 8 samples for each finger. The fingerprint direction is within ±15° of the vertical direction, and the file format is an uncompressed tif grayscale image. 80% are randomly selected as the training set and 20% as the validation set. Figure 6 As shown in the figure, a convolutional autoencoder is designed. The encoder contains 3 convolutional layers and 2 pooling layers, and the decoder contains 3 deconvolutional layers and 2 upsampling layers. The encoder compresses the 224x224 fingerprint image to a 56x56 latent variable, and the decoder restores the latent variable to a 224x224 fingerprint image. Let the generalized Gaussian noise exponent parameter α = 2, and construct the GELU noise optimization activation function:
[0127] g(x,σ)=xΦ(x / σ)
[0128] As the activation function of the hidden layer of the autoencoder, σ is the scale parameter and Φ(·) is the cumulative distribution function of the standard normal distribution. Combined with the Bayesian optimization method, the autoencoder is trained for 300 epochs (a cycle in the model training process), and the validation set reconstruction loss is 0.00468, which is significantly better than the validation set reconstruction loss of 0.00673 when the ReLU function is used. The reconstructed image comparison is given, as shown in Fig.10 As shown by Fig.10 It can be seen that using the GELU activation function can obtain a more refined reconstructed image.
[0129] In summary, the present invention includes a neural network model based on a noise optimized autoencoder for image compression and reconstruction processing. Based on the parallel structure of superthreshold stochastic resonance, the present invention uses a generalized Gaussian noise model to construct a class of noise optimized activation functions with learnable parameters. The noise optimized autoencoder is designed using the noise optimized activation function, and the learnable parameters, optimizer type, learning rate, batch size and other neural network hyperparameters are adaptively optimized by the Bayesian optimization method. Without significantly increasing the number of neural network parameters, the present invention significantly improves the image compression and reconstruction quality of the autoencoder model.
[0130] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 3 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store static information and dynamic information data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the steps in the above method embodiment are implemented.
[0131] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0132] In addition, the present invention also provides a computer device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiment when executing the computer program.
[0133] In addition, the present invention further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiment are implemented.
[0134] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0135] The present invention is not limited to the structures which have been described above and shown in the drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. An image compression reconstruction method based on the principle of stochastic resonance, characterized in that: The method includes: Based on the super-threshold stochastic resonance technology, several quantizers are connected in parallel, and noise is added to each quantizer to form an array structure of super-threshold stochastic resonance. The activation function of the hidden layer nodes of the neural network is replaced by an array structure of superthreshold stochastic resonance to obtain a noise-optimized activation function; based on the noise-optimized activation function, a noise-optimized neural network is constructed; Initialize the hyperparameters of the noise optimization neural network, and use the optimization algorithm to perform gradient training and hyperparameter tuning on the noise optimization neural network; compress and reconstruct the image based on the trained noise optimization neural network.
2. The image compression reconstruction method based on the stochastic resonance principle according to claim 1 is characterized in that: The array structure of super-threshold stochastic resonance, which is based on the super-threshold stochastic resonance technology, connects several quantizers in parallel, and adds noise to each quantizer to form the super-threshold stochastic resonance, includes: In the framework of the superthreshold stochastic resonance model, several quantizers are connected in parallel to form a signal processing array. Noise of the same intensity and independent and identical distribution is added to each quantizer to obtain an array structure of superthreshold stochastic resonance.
3. The image compression reconstruction method based on the stochastic resonance principle according to claim 1 is characterized in that: The activation function of the hidden layer node of the neural network is replaced by an array structure of superthreshold stochastic resonance to obtain a noise optimized activation function, which includes: The average of the outputs of several quantizers is used as the transfer function of the super-threshold stochastic resonance model, and the transfer function is used as the gating operator of the hidden layer input; The output of the transfer function is multiplied by the hidden layer input and combined with learnable scale and exponent parameters to obtain a noise-optimized activation function.
4. The image compression reconstruction method based on the stochastic resonance principle according to claim 3 is characterized in that: The noise optimization activation function is: g(x,σ,α)=x[1-F η (-x,s,a)] Where x is the input, σ is the scale parameter in the activation function, and α is the exponential parameter of generalized Gaussian noise; F η (x) is the probability density function f η (x) corresponds to the cumulative distribution function.
5. The image compression reconstruction method based on the stochastic resonance principle according to claim 1 is characterized in that: The noise-optimized activation function-based construction of a noise-optimized neural network includes: A noise optimization neural network including a noise optimization activation function, an encoder and a decoder is established, and the specifications of the noise optimization neural network are determined according to the number of channels of the task image.
6. The image compression reconstruction method based on the stochastic resonance principle according to claim 1 is characterized in that: Initializing the hyperparameters of the noise optimization neural network and performing gradient training and hyperparameter tuning on the noise optimization neural network using an optimization algorithm include: Construct a dataset for image compression and reconstruction tasks and initialize the hyperparameters of the noise optimization neural network; In the deep learning framework, the data set is used to train the noise optimization neural network, and in the hyperparameter optimization framework, the Bayesian optimization of each hyperparameter in the noise optimization neural network is completed.
7. The image compression reconstruction method based on the stochastic resonance principle according to claim 6 is characterized in that: The trainable parameters of the noise optimized neural network include a scale parameter in an activation function and an exponential parameter of generalized Gaussian noise.
8. The image compression reconstruction method based on the stochastic resonance principle according to claim 7 is characterized in that: In the deep learning framework, using the data set to train the noise optimized neural network includes: The trainable parameters of the noise optimization neural network are gradient trained using the gradient descent algorithm and the dataset.
9. The image compression reconstruction method based on the stochastic resonance principle according to claim 6, characterized in that: The dataset for constructing the image compression and reconstruction task includes: A data set is constructed according to the image compression and reconstruction tasks. The data set includes a training set, a validation set, and a test set. Data enhancement preprocessing is performed on the images in the data set.
10. An image compression and reconstruction system based on the principle of stochastic resonance, characterized in that: The system includes: An array structure building module is used to connect a number of quantizers in parallel based on superthreshold stochastic resonance technology, and add noise to each quantizer to form an array structure of superthreshold stochastic resonance; A neural network building module is used to replace the activation function of the hidden layer nodes of the neural network with an array structure of superthreshold stochastic resonance to obtain a noise-optimized activation function; based on the noise-optimized activation function, a noise-optimized neural network is constructed; The image compression and reconstruction module is used to initialize the hyperparameters of the noise optimization neural network and use the optimization algorithm to perform gradient training and hyperparameter tuning on the noise optimization neural network; the image is compressed and reconstructed according to the trained noise optimization neural network.