1 Star 0 Fork 0

李辉 / LhNet-1.0-vision

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

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

PyPI Shield Travis CI Shield Coverage Status Downloads

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.

NOTE SteganoGAN currently requires torch version to be 1.0.0 in order to work properly.

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(architecture='dense')

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!')

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.

What's next?

For more details about SteganoGAN and all its possibilities and features, please check the project documentation site!

Citing SteganoGAN

If you use SteganoGAN for your research, please consider citing the following work:

Zhang, Kevin Alex and Cuesta-Infante, Alfredo and Veeramachaneni, Kalyan. SteganoGAN: High Capacity Image Steganography with GANs. MIT EECS, January 2019. (PDF)

@article{zhang2019steganogan,
  title={SteganoGAN: High Capacity Image Steganography with GANs},
  author={Zhang, Kevin Alex and Cuesta-Infante, Alfredo and Veeramachaneni, Kalyan},
  journal={arXiv preprint arXiv:1901.03892},
  year={2019},
  url={https://arxiv.org/abs/1901.03892}
}
MIT License Copyright (c) 2018, MIT Data To AI Lab Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
Python 等 3 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/li_hui180/LhNet-1.0-vision.git
git@gitee.com:li_hui180/LhNet-1.0-vision.git
li_hui180
LhNet-1.0-vision
LhNet-1.0-vision
master

搜索帮助