Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/faisalahmedbijoy/image_cryptography_with_autoencoders
Deep learning in image Cryptography
https://github.com/faisalahmedbijoy/image_cryptography_with_autoencoders
cryptography deep-learning image image-processing security
Last synced: about 4 hours ago
JSON representation
Deep learning in image Cryptography
- Host: GitHub
- URL: https://github.com/faisalahmedbijoy/image_cryptography_with_autoencoders
- Owner: FaisalAhmedBijoy
- Created: 2023-08-19T03:42:20.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-26T19:00:22.000Z (5 months ago)
- Last Synced: 2024-06-26T23:24:35.304Z (5 months ago)
- Topics: cryptography, deep-learning, image, image-processing, security
- Language: Python
- Homepage:
- Size: 31.6 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Image_Cryptography_with_Autoencoders
Deep learning in image CryptographyImage 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
```bash
conda env create --file environment.yml
```
**Install packages**```bash
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:
```bash
pip install -r requirements.txt
```
## 1. Chaotic map sequence generation
To generate the chaotic map sequence, run the following command:
```bash
python generate_chaotic_map_sequence.py
```
## 2. Shuffle and Deshuffle image
To shuffle and deshuffle an image, run the following command:
```bash
python shuffling_deshuffling_images.py
```
**Input image****Shuffle image**
![](images/shuffled_deshuffled_image/faisal_shuffled_image.png)
**Deshuffle image**
![](images/shuffled_deshuffled_image/faisal_deshuffled_image.png)
## 3. Encryption and Decryption of image using chaotic map sequence
To encrypt and decrypt an image using chaotic map sequence, run the following command:
```bash
python image_encryption_decryption.py
```
**Encryption of image**![](images/encrypted_decrypted_images/faisal_encrypted_image.png)
**Decryption of image**
![](images/encrypted_decrypted_images/faisal_decrypted_image.png)
## 4. Dataset preparation
To prepare the dataset, run the following command:
```bash
python data_loader.py
```## 5. Autoencoder for image encryption and decryption
To use the autoencoder for image encryption and decryption, run the following command:
```bash
python auto_encoder.py
```**Model architecture**
![](images/model_architecture_and_performances/autoencoder_architecture.png)
**Model training**
```bash
python train.py
```
**Model loss performance graph**![](images/model_architecture_and_performances/loss_graph.png)
## 6. Inferencing the model
*original_vs_compressed_vs_reconstruction*
```bash
python inference.py
```
**Original image**![](images/model_architecture_and_performances/original_image.png)
**encoder compressed image**
![](images/model_architecture_and_performances/compressed_encoded_image.png)
**Decoder decompressed image**
![](images/model_architecture_and_performances/decompressed_decoded_image.png)
## 7. Performance metrics
- Structural Similarity Index (SSIM)
```bash
python structural_similarity_SSIM_calculation.py
```
- Number of pixel change rate (NPCR)```bash
python nnumber_of_pixel_change_rate_NPCR_comparision.py
```
- NPCR computation**image 1 output**
![](images/NPCR_images/NPCR_difference_1_faisal.png)
**image 2 output**
![](images/NPCR_images/NPCR_difference_2_faisal.png)
- Unified Average Changing Intensity (UACI)
```bash
python unified_average_changing_intensity_UACI_comparision.py
```
![](images/UACI_images/UACI_difference_faisal.png)## 8. Salt and paper noise
```bash
python salt_and_pepper_noise.py
```**Noisy image**
![](images/noisy_images/faisal_noisy.png)