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.
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
To generate the chaotic map sequence, run the following command:
python generate_chaotic_map_sequence.py
To shuffle and deshuffle an image, run the following command:
python shuffling_deshuffling_images.py
Input image
Shuffle image
Deshuffle image
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
To prepare the dataset, run the following command:
python data_loader.py
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
original_vs_compressed_vs_reconstruction
python inference.py
Original image
encoder compressed image
Decoder decompressed image
- 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
python salt_and_pepper_noise.py
Noisy image