GithubHelp home page GithubHelp logo

zanonshao / caffe_deep_learning_for_steganalysis Goto Github PK

View Code? Open in Web Editor NEW

This project forked from guanshuoxu/caffe_deep_learning_for_steganalysis

0.0 1.0 0.0 8.19 MB

License: Other

CMake 2.70% Makefile 0.69% C++ 79.96% Shell 0.42% Cuda 6.58% C 0.05% MATLAB 0.88% Python 8.73%

caffe_deep_learning_for_steganalysis's Introduction

Introduction

Source code to reproduce the results in

G. Xu, “Deep Convolutional Neural Network to Detect J-UNIWARD,” in Proc. 5th ACM Workshop Inf. Hiding Multimedia Secur. (IH&MMSec), 2017, accepted.

https://arxiv.org/abs/1704.08378

Building Instructions

The DCT kernels are saved in /kernels. The directory to access them are hard-coded in /include/caffe/filler.hpp . So before building, please change the directories to make sure the DCT kernels can be found.

The code will compile with cudnnv6. If you are using cudnnv5, see the instruction in /cudnn_hpp_version

Features

This code has following features compared with the official Caffe.

  1. Memory-efficient BN-ReLU combo (bn_conv and relu_recover). Please see bn_conv_layer and relu_recover_layer.
  2. More stable testing performance (important for running average based BN) by parameter-wise averaging across N training iterations before testing. Please see the Step(int iters) function in solver.cpp. Usage: set use_polyak to true and num_iter_polyak in solver.prototxt.
  3. image_data_steganalysis_jpeg_dct_layer: a new input layer for jpeg_steganalysis that read jpeg images from hard drive and output BDCT coefficients. This layer is able to do per-epoch random shuffling and syncronized random mirroring and rotation for each cover-stego pair. This layer requires cover and its corresponding stego to have the save file name. Please refer to image_data_steganalysis_jpeg_dct_layer.cpp for more details.
  4. bdct_to_spatial_layer to tranform BDCT coeffients to spatial domain.
  5. quant_trunc_abs_layer to perform element-wise quantization, trunction and absolute operations.

Examples

Two examples are provided in examples/jpeg_steganalysis for QF75 and QF95 respectively. Minumum required GPU memory is 12GB. Recommend Titan X and Titan XP.

  1. Change the Caffe dir in cmd.sh and cmd_test.sh. The cmd_test.sh is used to output probabilities only.
  2. Set the source, cover_dir, and stego_dir in the input layer (in CNN.prototxt).
  3. The source is a txt file, each line contain a number (from 1 ~ 10000 for BOSSBase). See the txt files in /rand_num_generators. cover_dir and stego_dir simply contain images in '.jpg' format.

Citation

Please cite the following paper if the code helps your research.

G. Xu, “Deep Convolutional Neural Network to Detect J-UNIWARD,” in Proc. 5th ACM Workshop Inf. Hiding Multimedia Secur. (IH&MMSec), 2017, accepted.

Please cite two additional papers if you are using the BN-RELU combo (bn_conv and relu_recover).

G. Xu, H. Wu, and Y. Q. Shi, “Ensemble of CNNs for steganalysis: An empirical study,” in Proc. 4th ACM Workshop Inf. Hiding Multimedia Secur. (IH&MMSec), 2016, pp. 103–107.

G. Xu, H. Wu, and Y. Q. Shi, “Structural design of convolutional neural networks for steganalysis,” IEEE Signal Process. Lett., vol. 23, no. 5, pp. 708–712, Mar. 2016.

caffe_deep_learning_for_steganalysis's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.