Skip to content

Lemok00/EDA-RISE

Repository files navigation

EDA-RISE

An Enhanced Disentanglement Autoencoder for Robust Image Steganography without Embedding

Xiyao Liu, Ziping Ma, Hui Fang, Jian Zhang, Gerald Schaefer, Kehua Guo, Yuesheng Zhu and Shichao Zhang

This repo provides pre-trained networks of EDA-RISE for evaluation.

Requirements

  • Only Linux is supported.
  • Ninja >= 1.10.2, GCC/G++ >= 9.4.0
  • One high-end NVIDIA GPU with at least 11GB of memory. We have done all testing using a NVIDIA RTX 2080Ti.
  • Python >= 3.7 and PyTorch >= 1.8.2.
  • CUDA toolkit 11.2 or later.
  • Python libraries: pip install lmdb imutils opencv-python pandas tqdm. We use the Anaconda3 2020.11 distribution which installs most of these by default.

Download pre-trained models

Please download the pre-trained models of EDA-RISE from Google Drive.

| Bedroom N=1 | Bedroom N=2 | Church N=1 | Church N=2 | FFHQ N=1 | FFHQ N=2 |

Evaluating extraction accuracies

python test_accuracies_under_attacks.py --checkpoint_path <path of a downloaded model>
  • The evaluating results will be saved in ./accuracy_results/ by default, in the form of .csv files like:
Attack Name Accuracy
0 w/o Attack 1.0
1 Gaussian Noise sig. = 0.05 0.999709375
... ... ...
63 Shearing r = 10 0.9699296875
  • Use --save_result_dir to change the directory for saving .csv files.
python test_accuracies_under_attacks.py --checkpoint_path <path of a downloaded model> --save_result_dir <your saving directory>
  • Use --use_tqdm to show the evaluating progress through a bar.
python test_accuracies_under_attacks.py --checkpoint_path <path of a downloaded model> --use_tqdm
  • Use --test_num to change the number of tests, which is 1000 by default.
python test_accuracies_under_attacks.py --checkpoint_path <path of a downloaded model> --test_num 10

Evaluating FID scores

1. Synthesise container images

python synthesise_container_image_samples.py checkpoint_path <path of a downloaded model>
  • The synthesised images are save in ./synthesised_samples/ by default, or you can change the saving directory using --save_result_dir.
python synthesise_container_image_samples.py checkpoint_path <path of a downloaded model> --save_result_dir <your saving directory>
  • You can also use --use_tqdm to show the synthesising progress.
python synthesise_container_image_samples.py checkpoint_path <path of a downloaded model> --use_tqdm

2. Calculate the FID score of synthesised images

python calculate_fid_score.py <path of dataset statistics> <directory of synthesised images>
  • We provide prepared dataset statistics in ./dataset_statistics/ for calculation. For example, you can evaluate the FID score of the pre-trained Bedroom N=1 model by using the prepared statistics of LSUN Bedroom dataset.
python calculate_fid_score.py ./synthesised_samples/synthesised_Bedroon_N=1_checkpoint_samples ./dataset_statistics/bedroom.npz
python prepare_dataset_statistical_features.py --dataset_path <path of dataset> --dataset_type <type of dataset> --dataset_name <name of dataset>
  • Our code support two types of datasets, including official_lmdb for lmdb datasets downloaded from LSUN, and image_folder for datasets consisting of folders.
  • The prepared dataset statistics will be saved as ./dataset_statistics/<dataset_name>.npz.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published