All Projects → muziyongshixin → pytorch-Deep-Steganography

muziyongshixin / pytorch-Deep-Steganography

Licence: other
core code for High-Capacity Convolutional Video Steganography with Temporal Residual Modeling

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to pytorch-Deep-Steganography

prostate segmentation
NCI-ISBI 2013 Challenge - Automated Segmentation of Prostate Structures
Stars: ✭ 28 (-9.68%)
Mutual labels:  unet
7uring
An advanced cryptography tool for hashing, encrypting, encoding, steganography and more.
Stars: ✭ 15 (-51.61%)
Mutual labels:  steganography
Image-Restoration
Image registration using pytorch
Stars: ✭ 26 (-16.13%)
Mutual labels:  unet
gif-msg
Hide 127 bytes in a gif without touching any pixels or colors
Stars: ✭ 26 (-16.13%)
Mutual labels:  steganography
Hide-in-png
Hide any file in a PNG Image
Stars: ✭ 17 (-45.16%)
Mutual labels:  steganography
satellite-Image-Semantic-Segmentation-Unet-Tensorflow-keras
Collection of different Unet Variant suchas VggUnet, ResUnet, DenseUnet, Unet. AttUnet, MobileNetUnet, NestedUNet, R2AttUNet, R2UNet, SEUnet, scSEUnet, Unet_Xception_ResNetBlock
Stars: ✭ 43 (+38.71%)
Mutual labels:  unet
Brain-MRI-Segmentation
Smart India Hackathon 2019 project given by the Department of Atomic Energy
Stars: ✭ 29 (-6.45%)
Mutual labels:  unet
unet-pytorch
No description or website provided.
Stars: ✭ 18 (-41.94%)
Mutual labels:  unet
iconcolor
Automatic icon colorization using deep convolutional neural networks. "Towards Icon Design Using Machine Learning." In Stanford CS229, Fall 2017.
Stars: ✭ 35 (+12.9%)
Mutual labels:  unet
onnx tensorrt project
Support Yolov5(4.0)/Yolov5(5.0)/YoloR/YoloX/Yolov4/Yolov3/CenterNet/CenterFace/RetinaFace/Classify/Unet. use darknet/libtorch/pytorch/mxnet to onnx to tensorrt
Stars: ✭ 145 (+367.74%)
Mutual labels:  unet
fincher
A steganography tool for text
Stars: ✭ 80 (+158.06%)
Mutual labels:  steganography
fabric
Urban change model designed to identify changes across 2 timestamps
Stars: ✭ 53 (+70.97%)
Mutual labels:  unet
busysteg
👻 Hide information content into busy areas of images, optimally
Stars: ✭ 62 (+100%)
Mutual labels:  steganography
Image-Stegano
Analysis and Implementation of Image Steganography methods using Java
Stars: ✭ 19 (-38.71%)
Mutual labels:  steganography
hiddenwave
An Audio Steganography Tool, written in C++
Stars: ✭ 46 (+48.39%)
Mutual labels:  steganography
TensorMONK
A collection of deep learning models (PyTorch implemtation)
Stars: ✭ 21 (-32.26%)
Mutual labels:  unet
Pool2020
💼 Pools organized for Epitech's students in 2020.
Stars: ✭ 14 (-54.84%)
Mutual labels:  steganography
neural-imaging
[CVPR'19, ICLR'20] A Python toolbox for modeling and optimization of photo acquisition & distribution pipelines (camera ISP, compression, forensics, manipulation detection)
Stars: ✭ 109 (+251.61%)
Mutual labels:  steganography
StegoProxy
Steganography proxy implemented in java
Stars: ✭ 19 (-38.71%)
Mutual labels:  steganography
unet pytorch
Pytorch implementation of UNet for converting aerial satellite images into google maps kinda images.
Stars: ✭ 27 (-12.9%)
Mutual labels:  unet

pytorch-Deep-Image-Steganography

Introduction

This is a pytorch Implementation of image steganography using deep convolutional neural networks ,This repo contains the core code of the Image Model of the ICMR2019 paper:

High-Capacity Convolutional Video Steganography with Temporal Residual Modeling (ICMR2019, oral)

This repo mainly contains the code of Reference-frame-model, while the Residual-frame-model has the same structure, so you can use the code to achieve the similar result mentioned in the paper. Here are some video demo.

Steganography is the science of Hiding a message in another message. In this case, a Picture is hidden inside another picture using Deep convolutional neural networks.

Dependencies & Installation & Usage

You need to clone or download this repository first, Then the dependencies can be installed by using

pip install -r requirements.txt

If you just want to inference the model, you can type like this:

# because the filesize is limited to 100MB, so the model is separated into 2 file netH.tar.gz.1 and netH.tar.gz.2 in the checkPoint folder
cat ./checkPoint/netH.tar.gz* | tar -xzv -C ./checkPoint/
CUDA_VISIBLE_DEVICES=0 python main.py --test=./example_pics

You can also use your own image folder to replace the example_pics, just need to provide the correct path.


Otherwise if you need to train the model on your own dataset, you need to change the DATA_DIR path in the main.py, which is in the 35th line, both train and validation dataset need to be put into the folder.

35 DATA_DIR = '/n/liyz/data/deep-steganography-dataset/'

And then type like this:

CUDA_VISIBLE_DEVICES=0 python main.py 

This task requires a lot of computing resources, our model is trained in 45000 iamges from ImageNet, and evaluated on 5000 pics. All images are resized to 256*256 without normalization. And this take us nearly 24 hours on one nvidia GTX 1080 ti.

Framework & Results

The Framework takes in Two images. One is the cover image(the 1st row) and another is the secret image(the 3rd row) .

The goal is to 'hide' the secret image in the cover image Through a Hiding net such that only the cover image is visible. This is called container image(the 2nd row)

Then , this hidden image can be passed to a Revealing network, which can get the hidden image back, and this is called rev_secret img(the 4th row).

Result Picture

As you can see, it is visually very hard to find the difference between the cover image and the contianer image. Yet the Reveal network can get back the information of the secret image only with tiny deviation. (If you can not notice the tiny deviation, you can download the picture to zoom in)

Tiny Deviations

  • deviation between cover and contianer
cover image container image
  • deviation between secret and revealed secret
secret image revealed secret image

Network Architecture

  • Unlike the [1], we just used two nets to get the result, one Hiding net and one Revealing net.
  • For the Hiding net, an Unet structred convolutional network was used to achive this goal. Cover image and secret image are concatenated into a 6 channels tensor as the input of the Hiding net.
  • For Revealing net, there are 6 conv layers with 3*3 kernel size, and each layer is followed by a BN and ReLU except the last one. Contianer img produced by the Hiding net is used as the input of the Revealing net directly.
  • For more details of the network architecture, you can just read the source code which is in the models folder

Loss Curves & Averaged pixel-wise discrepancy (APD)

Two networks were trained with beta values 0.75), batch size of 32(16 covers and 16 secrets). The loss curves are shown below:

  • Loss curves on Hiding net and Revealing net
MSE loss on cover and contianer MSE loss on secret and revealed secret
  • Averaged pixel-wise discrepancy
Dataset contianer - cover(APD)   (0-255) secret - rev_secret(APD)   (0-255)
training 4.20 4.73
validation 4.16 4.40

Reference:

[1] Baluja S. Hiding Images in Plain Sight: Deep Steganography[C]//Advances in Neural Information Processing Systems. 2017: 2066-2076.

Acknowledgement

Thanks for the help of @arnoweng during this project.

Citation

If this code is helpful for you, please cite our paper:

@inproceedings{weng2019high,
  title={High-Capacity Convolutional Video Steganography with Temporal Residual Modeling},
  author={Weng, Xinyu and Li, Yongzhi and Chi, Lu and Mu, Yadong},
  booktitle={Proceedings of the 2019 on International Conference on Multimedia Retrieval},
  pages={87--95},
  year={2019}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].