Optical image encryption and decryption method based on deep learning and random mask coding

By using deep learning and random mask coding in optical image encryption, and combining sparse matrix and neural network models as keys, the problems of insufficient security and high experimental conditions of double random phase coding technology are solved, and high-quality image restoration and enhanced security are achieved.

CN115603830BActive Publication Date: 2026-01-20ZHEJIANG UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211173952.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-26
Publication Date
2026-01-20
Estimated Expiration
2042-09-26

AI Technical Summary

Technical Problem

Existing dual-random phase coding techniques are not secure enough against phase recovery algorithm attacks, and require high experimental conditions, making them difficult to implement using multiple spatial light modulators.

Method used

An optical image encryption method based on deep learning and random mask coding is adopted. The image is encrypted by using random masks and sparse matrix coding in the optical device, and decrypted by a neural network model. The sparse matrix and neural network model are used as keys.

Benefits of technology

It improves the robustness and security of optical image encryption, expands the key space, enables the recovery of high-quality images under multiple random mask encodings, and is applicable to other cryptographic systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115603830B_ABST
    Figure CN115603830B_ABST
Patent Text Reader

Abstract

The application discloses an optical image encryption and decryption method based on deep learning and random mask coding. In the encryption process, the encrypted image is passed through an optical device with two parallel optoelectronic couplers, and the encoding of the encrypted image is realized through random masks at different positions, so that two speckles as ciphertexts are obtained at the receiving end of the optical device. Before decryption, the two collected speckles are respectively sparsified by using two different sparse matrices, and then combined together, and the two sparse matrices are used as part of the decryption key. In the decryption process, the trained neural network model is used as another part of the key, and then the combined speckles and the pure phase image are respectively used as the input and label of the trained neural network model, and the decrypted image is output by the trained neural network model. The application can effectively encrypt images and has good robustness and security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information security technology, specifically to an optical image encryption and decryption method based on deep learning and random mask coding. Background Technology

[0002] In recent years, with the advancement of science and technology, information security has received increasing attention. Optical encryption technology has garnered attention due to its outstanding performance. The introduction of Double Random Phase Coding (DRPE) technology has greatly accelerated the development of optical encryption technology. DRPE technology has the advantages of fast and parallel processing of complex information, holding an important position in the field of information processing. Some researchers have also encoded pure phase objects, and through numerical analysis, found that this method further improves system security under noisy conditions. However, as a linear system, DRPE technology is vulnerable to attacks from phase retrieval algorithms. To improve the linearity of the system, phase truncation technology has been incorporated into DRPE, further enhancing system security. Simultaneously, many researchers have combined digital holography and interferometry with DRPE, also significantly improving system security. However, many DRPE-based technologies require multiple spatial light modulators (SLMs), which places excessively high demands on experimental conditions, making them difficult to implement experimentally. Summary of the Invention

[0003] The purpose of this invention is to provide an optical image encryption and decryption method based on deep learning and random mask coding. This invention can effectively encrypt images and has good robustness and security.

[0004] To solve the above-mentioned technical problems, the present invention provides the following technical solution: an optical image encryption and decryption method based on deep learning and random mask coding. During encryption, the encrypted image is passed through an optical device with two parallel optocouplers, and the encrypted image is encoded using random masks at different positions, resulting in two speckle patterns as ciphertext at the receiving end of the optical device. Before decryption, the two acquired speckle patterns are sparsely processed using two different sparse matrices and then combined, with the two sparse matrices serving as part of the key for decryption. During decryption, a trained neural network model is used as another part of the key, and the combined speckle pattern and the pure phase image are used as the input and label of the trained neural network model, respectively. The trained neural network model then outputs the decrypted image.

[0005] The aforementioned optical image encryption and decryption method based on deep learning and random mask coding is characterized in that: the optical device includes a laser, the laser emitted by the laser is collimated by a beam expander and the size of the laser beam is adjusted by an aperture, the adjusted laser is split into two beams by a first beam splitter, one of the laser beams is modulated and reflected by a spatial light modulator, the reflected light is encoded by a second random mask, and the other laser beam is encoded by a first random mask. The two encoded beams interfere through the second beam splitter and continue to propagate to a third beam splitter, where the interference light is split into two beams by the third beam splitter. One beam is modulated by an attenuator and received by a second CCD camera, and the other beam is encoded by a third random mask and received by a first CCD camera. The images received by the first CCD camera and the second CCD camera are the speckle pattern used as the ciphertext.

[0006] The aforementioned optical image encryption and decryption method based on deep learning and random mask coding adjusts the pixel size of both speckle patterns to 128×128, and then sparsifies the adjusted speckle patterns using two different sparse matrices. Finally, the two sparse speckle patterns are combined to obtain a hybrid speckle pattern.

[0007] MS = C1 × S1 + C2 × S2;

[0008] Where MS represents mixed speckle, × represents the matrix multiplication of corresponding pixels, C1 and C2 represent the speckle images obtained after adjusting the two acquired speckle pixels to 128×128, and S1 and S2 represent the sparse matrices of C1 and C2 sparsely encoded.

[0009] The aforementioned optical image encryption and decryption method based on deep learning and random mask coding uses a CGAN model based on a pix2pix architecture, which consists of a generator G and a discriminator D.

[0010] The aforementioned optical image encryption and decryption method based on deep learning and random mask coding uses a Unet structure with 7 downsampling layers as the generator. After 7 downsampling operations, the feature map size is adjusted to 1×1, and the number of channels is expanded to 512. Each downsampling layer consists of a convolutional layer with a kernel size of 4×4, a stride of 2, and padding of 1, a batch normalization layer, and a non-linear activation function Leaky ReLU. Afterwards, the output image size is readjusted to 128×128 through 7 upsampling operations. The first 6 upsampling layers consist of a deconvolutional layer with a kernel size of 4×4, a stride of 2, and padding of 1, a batch normalization (BN) layer, and a non-linear activation function ReLU layer. The output layer consists of a deconvolutional layer with a kernel size of 4×4, a stride of 2, and padding of 1, and a non-linear activation function Tanh.

[0011] In the aforementioned optical image encryption and decryption method based on deep learning and random mask coding, the discriminator D is a classifier. The estimated value and the true value are concatenated in the channel dimension and then fed into the discriminator D. The discrimination result is obtained through three convolutional layers with a kernel size of 1×1, a stride of 1, and padding of 0. Leaky ReLU is applied to each layer except the output layer, and a BN layer is performed on the second layer. The number of channels in the three convolutional layers are 128, 256, and 1, respectively.

[0012] The aforementioned optical image encryption and decryption method based on deep learning and random mask coding uses a CGAN model to learn the mapping relationship between mixed speckle patterns (MS) and corresponding encrypted images. The training optimization problem of the CGAN model can be formulated as a max-min game.

[0013]

[0014] Where t represents the input to the CGAN model, x represents the estimated output of the generator model, and y represents the true value; E x,y E represents the gradient in the x and y directions. x,t Represents the gradient in the x and t directions;

[0015] The error between the estimated value generated by the model generator and the true value is calculated using the L1 loss function, and the L1 loss is used as another part of the loss function for network weight updates, as shown in the following expression:

[0016] L L1 (G)=E x,y,z [||yG(x,t)||];

[0017] Where ||·|| represents the modulo operation, E x,y,z Represents the gradient in the x, y, and z directions;

[0018] Based on the above formula, we get:

[0019]

[0020] Where γ is the L1 loss The weights represent the parameters obtained when the adversarial game between the generator and the discriminator tends to stabilize.

[0021] In the aforementioned optical image encryption and decryption method based on deep learning and random mask coding, the neural network model is trained using an adaptive matrix estimation algorithm with an initial learning rate of 0.002. The training lasts for 150 cycles, with no learning rate decay in the first 10 cycles and a linear decay to 0 in the following 140 cycles.

[0022] The aforementioned optical image encryption and decryption method based on deep learning and random mask coding uses 3000 images each extracted from the digital images in the MINIST dataset and the letter images in the MINIST-Letter dataset for training the neural network model. 2900 images are used as the training set and 100 images are used as the test set. The images in the original dataset are all 28×28 pixels in size, and are adjusted to 128×128 pixels during training.

[0023] The aforementioned optical image encryption and decryption method based on deep learning and random mask coding involves decrypting two ciphertexts and two sparse matrices used as keys according to a mixed speckle calculation formula. The resulting mixed speckle MS is then input into a trained neural network model to obtain the decrypted image.

[0024] Compared to existing technologies, this invention encodes encrypted images by placing random masks in interferometric optical paths at different locations, resulting in two speckle patterns as ciphertext at the receiving end of the optical device. Instead of using parameters from the encryption device as the key, this invention uses a neural network model, its parameters, and two sparse matrices as the key. Compared to methods that directly use the neural network model for decryption, this invention further expands the key space. The neural network model is not trained using plaintext-ciphertext pairs directly, but rather by using a mixed speckle pattern obtained by sparsely combining the two ciphertexts as input to the neural network model, further enhancing system security. This invention demonstrates good performance under multiple random mask encoding, capable of recovering high-quality images, and is applicable to other cryptographic systems. Attached Figure Description

[0025] Figure 1 This is a diagram of the experimental setup for the pure phase image encryption method.

[0026] Figure 2 This is a flowchart of the network training and decryption process.

[0027] Figure 3 This is a schematic diagram of the network structure. Figure 3 (a) is the schematic diagram of CGAN, (b) is the structure of the generator, and (c) is the structure of the discriminator.

[0028] Figure 4 The results are obtained by applying the encryption scheme proposed by the applicant to nine pure phase images randomly selected from the test set consisting of MINIST and MINIST-Letter datasets. Figure 4In the image, (a) is ciphertext 1, (b) is ciphertext 2, (c) is speckle after sparse combination, (d) is the decrypted image obtained when the key and ciphertext are correct, (e) is the original image, and (f) is the decrypted image obtained using the correct sparse matrix and the wrong network model weights.

[0029] Figure 5 The values ​​of the decrypted image obtained under S1 and S2 at different eavesdropping rates are: (a) is the average PSNR, (b) is the average CC value, and (c) is the average SSIM value.

[0030] Figure 6 The decrypted images of S1 and S2 were obtained under different eavesdropping rates, where (a) S1 and S2 were eavesdropped at 99.9%, (b) S1 and S2 were eavesdropped at 99.7%, (c) S1 and S2 were eavesdropped at 99.5%, and (d) S1 and S2 were eavesdropped at 99.0%.

[0031] Figure 7 These are the decryption results obtained when the ciphertext is subjected to different noise attacks. (a) is the decryption result obtained when the ciphertext is subjected to Gaussian noise with a mean of 0 and a variance of 0.01. (b) is the decryption result obtained when the ciphertext is subjected to Gaussian noise with a mean of 0 and a variance of 0.02. (c) is the decryption result obtained when the ciphertext is subjected to Gaussian noise with a mean of 0 and a variance of 0.03. (d) is the decryption result obtained when the ciphertext is subjected to Gaussian noise with a mean of 0 and a variance of 0.04. Detailed Implementation

[0032] The present invention will be further described below with reference to the embodiments and accompanying drawings, but this should not be construed as limiting the present invention.

[0033] Example: An optical image encryption and decryption method based on deep learning and random mask coding. During encryption, the encrypted image is passed through an optical device with two parallel optocouplers, and the encrypted image is encoded using random masks at different positions, resulting in two speckle patterns as ciphertext at the receiving end of the optical device. Before decryption, the two acquired speckle patterns are sparsed using two different sparse matrices and then combined, with the two sparse matrices serving as part of the key for decryption. During decryption, a trained neural network model is used as another part of the key, and the combined speckle pattern and the pure phase image are used as the input and label of the trained neural network model, respectively. The trained neural network model then outputs the decrypted image.

[0034] The specific implementation is as follows:

[0035] (1) Optical experimental encryption device (such as...) Figure 1 The setup shown is as follows:

[0036] (i) Light emitted from a 532nm semiconductor laser (DH-SL532-50A) is collimated by a beam expander and adjusted to a suitable size by an aperture. The adjusted laser beam is split into two beams by the first beam splitter (BS1). One beam is modulated and reflected by an SLM (LTD-FSLM-2K55-P02X3, spatial light modulator) with 1920×1080 pixels and individual pixel sizes of 6.4µm×6.4µm. The reflected light is encoded by BM2 (second random mask), while the other beam (i.e., the reference beam) is encoded by BM1 (first random mask). The two encoded beams then interfere through the second beam splitter (BS2) and continue propagating to the third beam splitter (BS3). The interference light is split into two beams by BS3. One beam is modulated by the attenuator (AF) and received by CCD2 (the second CCD camera). The other beam is encoded by BM3 (the third random mask) and received by CCD1 (the first CCD camera).

[0037] (2) Encryption process:

[0038] (i) 3000 images were extracted from the digit images in the MINIST dataset and the letter images in the MINIST-Letter dataset, respectively. 2900 images were used as the training set and 100 images were used as the test set. The images in the original dataset were all 28×28 pixels in size.

[0039] (ii) The extracted image is resized to 256×256 and zero-padding is applied, then loaded into the optical system via SLM. At the receiving end, a 1024×1024 pixel image is captured from the center of both CCDs, and then the image size is resized to 128×128 pixels.

[0040] (3) Building a neural network model:

[0041] (i) In this embodiment, a GAN model based on the pix2pix architecture is used (the network structure diagram is shown below). Figure 3 (As shown). The GAN model consists of a generator (G) and a discriminator (D). The combined MS is input into model G to obtain an estimate of the original data. Model D receives the estimate generated by model G and the original image, respectively, to determine the authenticity of the estimate. Model D continuously improves its ability to distinguish between the true and the estimated values, maximizing the probability of the true value. During this process, model G continuously improves the similarity between its estimate and the true value, making it impossible for the discriminator to distinguish between the estimate and the true value, as the difference between the estimate and the true value is very small at this point. After a certain period of training, model D and model G reach Nash equilibrium. This process is as follows: Figure 3 As shown in (a), the discriminator will become ineffective and be discarded after training is complete.

[0042] (ii) The generator structure of the neural network model is as follows Figure 3 As shown in (b), the applicant used a Unet structure with 7 downsampling operations as the generator. After 7 downsampling operations, the feature map size was adjusted to 1×1, and the number of channels was expanded to 512. Each downsampling layer consisted of a convolutional layer with a kernel size of 4×4, a stride of 2, and padding of 1, a batch normalization layer (BatchNorm (BN),) and a non-linear activation function (Leaky ReLU). Afterwards, 7 upsampling operations were performed to resize the output image to 128×128. The first 6 upsampling layers consisted of deconvolutional layers with a kernel size of 4×4, a stride of 2, and padding of 1, a batch normalization layer (BN), and a non-linear activation function (ReLU). The output layer consisted of a deconvolutional layer with a kernel size of 4×4, a stride of 2, and padding of 1, and a non-linear activation function (Tanh). The structure of the discriminator D is as follows: Figure 3 As shown in (c), D is essentially a classifier. The estimated value is fed into D after being concatenated with the true value in the channel dimension. The discrimination result is obtained through three convolutional layers with a kernel size of 1×1, a stride of 1, and padding of 0. Leaky ReLU is applied to each layer except the output layer, and a BN layer is performed on the second layer. The number of channels in the three convolutional layers are 128, 256, and 1, respectively.

[0043] (4) Training the network model:

[0044] (i)If Figure 2 As shown, the speckle patterns obtained from the two acquisitions are first adjusted to 128×128. Then, two different sparse matrices are used to sparse the speckle patterns obtained from CCD1 and CCD2 respectively. Finally, the two sparse speckle patterns are combined to obtain the mixed speckle pattern (MS). The MS can be obtained using the formula:

[0045] MS = C1 × S1 + C2 × S2;

[0046] Where × represents the matrix multiplication of corresponding pixels, C1 and C2 represent the speckle patterns acquired by CCD1 and CCD2 respectively, and S1 and S2 represent the sparse matrices obtained by performing sparse operations on C1 and C2 respectively.

[0047] (ii) Resize the image extracted in step (i) to 128×128, and learn the mapping relationship between the MS and the resized image using a CGAN model based on a pix2pix structure. The optimization problem of the CGAN model can be expressed as a max-min game:

[0048]

[0049] Where t represents the input of the CGAN model, x represents the estimated value of the generator output, and y represents the true value E. x,y E represents the gradient in the x and y directions. x,t This represents the gradient in the x and t directions. In addition, the error between the estimated value generated by the model generator and the true value will be calculated using the L1 loss function (mean absolute error function), and the gradient of this error will be used as another part of the loss function for updating the network weights, as shown in the following expression:

[0050] L L1 (G)=E x,y,z [||yG(x,t)||];

[0051] Where ||·|| represents the modulo operation, E x,y,z Let x represent the gradient in the x, y, and z directions. Therefore, according to the above equation, we get:

[0052]

[0053] Where γ is the weight of the L1 loss, This represents the parameters obtained when the adversarial game between the generator and the discriminator tends to stabilize.

[0054] (iii) Training setup and time consumption:

[0055] The adaptive matrix estimation algorithm (Adam) was used during neural network training. The initial learning rate was set to 0.002, and a total of 150 epochs were trained. No learning rate decay was applied to the first 10 epochs, and the learning rate was linearly decayed to 0 for the subsequent 140 epochs. The neural network was built using the PyTorch framework and trained on an NVIDIA-RTX3060 GPU, taking 1.5 hours.

[0056] (5) Decryption process:

[0057] (i) The two ciphertexts obtained from the first encryption are calculated with the two sparse matrices S1 and S2, which are used as keys, according to the equation to obtain MS1.

[0058] (ii) Input MS1 into the trained CGAN model to obtain the decrypted image.

[0059] The invention will be further explained below with reference to examples and experiments.

[0060] The applicant calculated the average structural similarity (SSIM), fused image evaluation index (CC), and peak signal-to-noise ratio (PSNR) between the decrypted and original images for each of the 100 images in the test set. The average SSIM, CC, and PSNR for the MINIST test set were 23.0216, 0.9613, and 0.9203, respectively. The average SSIM, CC, and PSNR for the MINIST-Letter test set were 17.3937, 0.947, and 0.8527, respectively, verifying the feasibility of the applicant's proposed method. The applicant also tested the security of the trained CGAN model by inputting the test set into incorrect CGAN models, and the results are as follows. Figure 4 As shown in (f), the decrypted image is unrecognizable, which indicates that the trained model has good security.

[0061] The applicant also tested the security of two sparse matrices (S1 and S2). The applicant simultaneously set the eavesdropping rates of the two sparse matrices to 99.9%, 99.8%, 99.7%, 99.6%, 99.5%, 99.4%, 99.3%, 99.2%, 99.0%, 98.8%, and 98.5%, respectively. S1 and S2 at different eavesdropping rates were then combined with Ciphertext1 and Ciphertext2 according to the mixed speckle formula and the decryption results of S1 and S2 with different eavesdropping percentages were obtained using a correct CGAN model. The average SSIM, CC, and PSNR of all decrypted images and the original images in the test set were calculated. The relationship between the average SSIM, CC, and PSNR of the decrypted images and the original images when different percentages of S1 and S2 were eavesdropped is shown below. Figure 5 As shown. Figure 6 It can be seen that when decrypting digital images in the MINIST dataset, a correct decrypted image can only be obtained if S1 and S2 are eavesdropped on more than 99.7% of the data. Similarly, when decrypting letter images in the MINIST-Letter dataset, a correct decryption result can only be obtained if the eavesdropping rate of S1 and S2 exceeds 99.7%, further demonstrating the security of the encryption method proposed by the applicant.

[0062] The applicant also tested the system's robustness against noise attacks. Gaussian noise with a mean of 0 and variances of 0.01, 0.02, 0.03, and 0.04 was applied to the ciphertext in two test sets, respectively. The resulting decrypted images are shown below. Figure 7 As shown. The applicant calculated the PSNR, CC, and SSIM of the decrypted image and the original image, respectively. When Gaussian noise with a mean of 0 and a variance of 0.01 is applied, the decrypted image is as follows. Figure 7As shown in (a), the mean PSNR, CC, and SSIM of the MINIST and MINIST-Letter test sets are 22.8278, 0.96, and 0.9182, and 16.7608, 0.9412, and 0.8406, respectively. When Gaussian noise with a mean of 0 and a variance of 0.02 is applied, the decrypted image is as follows. Figure 7 As shown in (b), the mean PSNR, CC, and SSIM of the MINIST and MINIST-Letter test sets are 22.0476, 0.9543, and 0.9047, and 14.9924, 0.9149, and 0.7932, respectively. When Gaussian noise with a mean of 0 and a variance of 0.03 is applied, the decrypted image is as follows. Figure 7 As shown in (c), the mean PSNR, CC, and SSIM of the MINIST and MINIST-Letter test sets are 21.1733, 0.9445, and 0.8969, and 14.3339, 0.8986, and 0.7743, respectively. When Gaussian noise with a mean of 0 and a variance of 0.04 is applied, the decrypted image is as follows. Figure 7 As shown in (d), the average PSNR, CC, and SSIM of the MINIST test set and the MINIST-Letter test set are 20.4100, 0.9344, and 0.8823, and 13.1922, 0.8726, and 0.7337, respectively. Through the experimental results, the applicant can see that when the ciphertext faces different Gaussian noise attacks, the present invention still exhibits good performance and can obtain relatively clear decryption results. This demonstrates that the method proposed in this invention has good robustness against noise attacks.

[0063] In summary, this invention encodes encrypted images by placing random masks in interference optical paths at different locations, resulting in two speckle patterns as ciphertext at the receiving end of the optical device. Instead of using the parameters in the encryption device as the key, this invention uses a neural network model, its parameters, and two sparse matrices as the key. Compared to methods that directly use the neural network model for decryption, the proposed method further expands the key space. The neural network model is not trained using plaintext-ciphertext pairs directly, but rather by using a mixed speckle pattern obtained by sparsely combining the two ciphertexts as input to the neural network model, further enhancing system security. This invention's method demonstrates good performance under multiple random mask encoding, capable of recovering high-quality images, and is applicable to other cryptographic systems.

Claims

1. An optical image encryption and decryption method based on deep learning and random mask coding, characterized in that: During the encryption process, the encrypted image is passed through an optical device with two parallel optocouplers and encoded using random masks at different positions, resulting in two speckles as ciphertext at the receiving end of the optical device. Before decryption, the two collected speckles are sparsed using two different sparse matrices and then combined together, and the two sparse matrices are used as part of the key for the decryption process. During the decryption process, the trained neural network model is used as another part of the key, and the combined speckle and pure phase images are used as the input and label of the trained neural network model, respectively. The trained neural network model outputs the decrypted image. The optical device includes a laser. The laser emitted by the laser is collimated by a beam expander and the size of the laser beam is adjusted by an aperture. The adjusted laser beam is split into two beams by a first beam splitter. One beam is modulated and reflected by a spatial light modulator. The reflected light is encoded by a second random mask, and the other beam is encoded by a first random mask. The two encoded beams interfere with each other by the second beam splitter and then continue to a third beam splitter. The interference beam is split into two beams by the third beam splitter. One beam is modulated by an attenuator and received by a second CCD camera. The other beam is encoded by a third random mask and received by a first CCD camera. The images received by the first and second CCD cameras are the speckle pattern used as ciphertext. The pixel size of both speckle patterns is adjusted to 128×128, and the adjusted speckle patterns are then thinned using two different sparse matrices. Finally, the two sparse speckle patterns are combined to obtain a mixed speckle pattern. ; in, Indicates mixed speckle pattern. This indicates that the corresponding pixels in the matrix are multiplied. and These represent the speckle images obtained after adjusting the two acquired speckle pixels to 128×128. and They represent respectively to and A sparse matrix for sparse encoding; The neural network model adopts a pix2pix architecture. The model, the The model is generated by the generator and discriminator composition; The neural network model is trained by using the model to learn mixed speckle patterns. The mapping relationship between the corresponding encrypted images; the mapping relationship between the... The training and optimization problem of the model is formulated as a max-min game.

2. The optical image encryption and decryption method based on deep learning and random mask coding according to claim 1, characterized in that: The generator A Unet structure with 7 downsampling layers is used as the generator. After 7 downsampling operations, the feature map size is adjusted to 1×1, and the number of channels is expanded to 512. Each downsampling layer consists of a convolutional layer with a kernel size of 4×4, a stride of 2, and padding of 1, a batch normalization layer, and a non-linear activation function Leaky ReLU. After that, the output image size is readjusted to 128×128 through 7 upsampling operations. The first 6 upsampling layers consist of deconvolutional layers with a kernel size of 4×4, a stride of 2, and padding of 1, a batch normalization layer (BN), and a non-linear activation function ReLU. The output layer consists of a deconvolutional layer with a kernel size of 4×4, a stride of 2, and padding of 1, and a non-linear activation function Tanh.

3. The optical image encryption and decryption method based on deep learning and random mask coding according to claim 2, characterized in that: The discriminator It is a classifier that feeds the estimated value and the true value into the discriminator by concatenating them along the channel dimension. The discrimination result is obtained through three convolutional layers with a kernel size of 1×1, a stride of 1, and padding of 0. Leaky ReLU is applied to each layer except the output layer, and a batch normalization (BN) layer is performed on the second layer. The number of channels in the three convolutional layers are 128, 256, and 1, respectively.

4. The optical image encryption and decryption method based on deep learning and random mask coding according to claim 1, characterized in that: During the training of the neural network model, an adaptive matrix estimation algorithm is used, with the initial learning rate set to 0.

002. A total of 150 training cycles are conducted, with no learning rate decay in the first 10 cycles and the learning rate linearly decaying to 0 in the following 140 cycles.

5. The optical image encryption and decryption method based on deep learning and random mask coding according to claim 1, characterized in that: The neural network model was trained using 3000 images each from the digit images in the MINIST dataset and the letter images in the MINIST-Letter dataset. 2900 images were used as the training set and 100 images were used as the test set. The images in the original dataset were all 28×28 pixels, and were adjusted to 128×128 pixels during training.

6. The optical image encryption and decryption method based on deep learning and random mask coding according to claim 1, characterized in that: The decryption process involves calculating the mixed speckle pattern using the formula for the two ciphertexts and the two sparse matrices used as the key. The image is input into the trained neural network model to obtain the decrypted image.

Citation Information

Patent Citations

  • Fresnel transform domain chaotic double random phase encoding optical image encryption method

    CN106447588A

  • CGAN-based computational ghost imaging reconstruction and recovery method

    CN110490818A