Skip to main content

Steganography tool based on DeepLearning GANs

Project description

“SteganoGAN” An open source project from Data to AI Lab at MIT.

PyPI Shield Travis CI Shield

SteganoGAN

Overview

SteganoGAN is a tool for creating steganographic images using adversarial training.

Installation

To get started with SteganoGAN, we recommend using pip:

pip install steganogan

Alternatively, you can clone the repository and install it from source by running make install:

git clone git@github.com:DAI-Lab/SteganoGAN.git
cd SteganoGAN
make install

For development, you can use the make install-develop command instead in order to install all the required dependencies for testing and linting.

Usage

Command Line

SteganoGAN includes a simple command line interface for encoding and decoding steganographic images.

Hide a message inside an image

To create a steganographic image, you simply need to supply the path to the cover image and the secret message:

steganogan encode [options] path/to/cover/image.png "Message to hide"

Read a message from an image

To recover the secret message from a steganographic image, you simply supply the path to the steganographic image that was generated by a compatible model:

steganogan decode [options] path/to/generated/image.png

Additional options

The script has some additional options to control its behavior:

  • -o, --output PATH: Path where the generated image will be stored. Defaults to output.png.
  • -a, --architecture ARCH: Architecture to use, basic or dense. Defaults to dense.
  • -v, --verbose: Be verbose.
  • --cpu: force CPU usage even if CUDA is available. This might be needed if there is a GPU available in the system but the VRAM amount is too low.

WARNING: Make sure to use the same architecture specification (--architecture) during both the encoding and decoding stage; otherwise, SteganoGAN will fail to decode the message.

Python

The primary way to interact with SteganoGAN from Python is through the steganogan.SteganoGAN class. This class can be instantiated using a pretrained model:

>>> from steganogan import SteganoGAN
>>> steganogan = SteganoGAN.load('steganogan/pretrained/dense.steg')
Using CUDA device

Once we have loaded our model, we can give it the input image path, the output image path, and the secret message:

>>> steganogan.encode('research/input.png', 'research/output.png', 'This is a super secret message!')
Encoding completed.

This will generate an output.png image that closely resembles the input image but contains the secret message. In order to recover the message, we can simply pass output.png to the decode method:

>>> steganogan.decode('research/output.png')
'This is a super secret message!'

Research

We provide example scripts in the research folder which demonstrate how you can train your own SteganoGAN models from scratch on arbitrary datasets. In addition, we provide a convenience script in research/data for downloading two popular image datasets.

History

0.1.1

  • Add better pretrained models.
  • Improve support for non CUDA devices.

0.1.0 - First release to PyPi

  • SteganoGAN class which can be fitted, saved, loaded and used to encode and decode messages.
  • Basic command line interface that allow using pretrained models.
  • Basic and Dense pretrained models for demo purposes.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

steganogan-0.1.1.tar.gz (2.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

steganogan-0.1.1-py2.py3-none-any.whl (2.8 MB view details)

Uploaded Python 2Python 3

File details

Details for the file steganogan-0.1.1.tar.gz.

File metadata

  • Download URL: steganogan-0.1.1.tar.gz
  • Upload date:
  • Size: 2.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

File hashes

Hashes for steganogan-0.1.1.tar.gz
Algorithm Hash digest
SHA256 45515bf3593595db7d68390bfb9534a6783205dd19b90ee977cc00f5bc634f7c
MD5 8ac8facc01cb9342567e745863935121
BLAKE2b-256 b4f5f78f0938794aa85270c9c44480041e8c7e837530010c3ea35022a163f258

See more details on using hashes here.

File details

Details for the file steganogan-0.1.1-py2.py3-none-any.whl.

File metadata

  • Download URL: steganogan-0.1.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

File hashes

Hashes for steganogan-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f46b846b24ee977c148a2be0d17809e577e46984aab615ddbb5f03eea9d4679d
MD5 4fd4fdb82ea24d89e619662a38cdf080
BLAKE2b-256 7bc651f9877b85b39d0c70ebf512f5afbafe089751f8e62f363381bbb12c1071

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page