Skip to content

FaisalAhmedBijoy/Image_Cryptography_with_Autoencoders

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image_Cryptography_with_Autoencoders

Deep learning in image Cryptography

Image encryption and decryption using a chaotic map sequence and an autoencoder. The repository includes code for generating chaotic map sequences, shuffling and deshuffling images, preparing datasets, and computing performance metrics.

Environment setup

conda env create --file environment.yml

Install packages

keygen==0.0.3
matplotlib==3.3.3
numpy==1.23.1
numpy==1.23.2
opencv_python==4.4.0.46
scikit_learn==0.23.2
skimage==0.0
tensorflow==2.3.0

To install the required packages, run the following command:

pip install -r requirements.txt

1. Chaotic map sequence generation

To generate the chaotic map sequence, run the following command:

python generate_chaotic_map_sequence.py

2. Shuffle and Deshuffle image

To shuffle and deshuffle an image, run the following command:

python shuffling_deshuffling_images.py

Input image

Shuffle image

Deshuffle image

3. Encryption and Decryption of image using chaotic map sequence

To encrypt and decrypt an image using chaotic map sequence, run the following command:

python image_encryption_decryption.py

Encryption of image

Decryption of image

4. Dataset preparation

To prepare the dataset, run the following command:

python data_loader.py

5. Autoencoder for image encryption and decryption

To use the autoencoder for image encryption and decryption, run the following command:

python auto_encoder.py

Model architecture

Model training

python train.py

Model loss performance graph

6. Inferencing the model

original_vs_compressed_vs_reconstruction

python inference.py

Original image

encoder compressed image

Decoder decompressed image

7. Performance metrics

  • Structural Similarity Index (SSIM)
python structural_similarity_SSIM_calculation.py
  • Number of pixel change rate (NPCR)
python nnumber_of_pixel_change_rate_NPCR_comparision.py
  • NPCR computation

image 1 output

image 2 output

  • Unified Average Changing Intensity (UACI)
python unified_average_changing_intensity_UACI_comparision.py

8. Salt and paper noise

  python salt_and_pepper_noise.py

Noisy image

Releases

No releases published

Packages

No packages published