Git Product home page Git Product logo

deepmih's Introduction

DeepMIH: Deep Invertible Network for Multiple Image Hiding (TPAMI 2022)

This repo is the official code for

Published on IEEE Transactions of Pattern Analysis and Machine Intelligence (TPAMI 2022). @ Beihang University.

1. Pre-request

1.1 Dependencies and Installation

1.2 Dataset

  • In this paper, we use the commonly used dataset DIV2K, COCO, and ImageNet.
  • For train or test on your own path, change the code in config.py:
    line50: TRAIN_PATH_DIV2K = ''
    line51: VAL_PATH_DIV2K = ''
    line54: VAL_PATH_COCO = ''
    line55: TEST_PATH_COCO = ''
    line57: VAL_PATH_IMAGENET = ''

2. Test

  1. Here we provide a trained model.
  2. Download and update the MODEL_PATH and the file name suffix before testing by the trained model.
    For example, if the model name is model_checkpoint_03000_1.pt, model_checkpoint_03000_2.pt, model_checkpoint_03000_3.pt,
    and its path is /home/usrname/DeepMIH/model/,
    set:
    PRETRAIN_PATH = '/home/usrname/DeepMIH/model/',
    PRETRAIN_PATH_3 = '/home/usrname/DeepMIH/model/',
    file name suffix = 'model_checkpoint_03000'.
  3. Check the dataset path is correct.
  4. Create an image path to save the generated images. Update TEST_PATH.
  5. Run test_oldversion.py.

3. Train

  1. Create a path to save the trained models and update MODEL_PATH.
  2. Check the optim parameters in config.py is correct. Make sure the sub-model(net1, net2, net3...) you want to train is correct.
  3. Run train_old_version.py. Following the Algorithm 1 to train the model.
  4. Note: DeepMIH may be hard to train. The model may suffer from explosion. Our solution is to stop the training process at a normal node and abate the learning rate. Then, continue to train the model.

4. Further explanation

In the train_old_version.py at line 223:
rev_secret_dwt_2 = rev_dwt_2.narrow(1, 4 * c.channels_in, 4 * c.channels_in) # channels = 12,
the recovered secret image_2 is obtained by spliting the middle 12 channels of the varible rev_dwt_2. However, in the forward process_2, the input is obtained by concatenating (stego, imp, secret_2) together. This means that the original code train_old_version.py has a bug on recovery process (the last 12 channels of the varible rev_dwt_2 should be splited to be the recovered secret image_2, instead of the middle 12 one). We found that in this way the network is still able to converge, thus we keep this setting in the test process.
We also offer a corrected version train.py (see line 225) and test.py. You can also train your own model in this way.

Feel free to contact: [email protected].

Citation

If you find this repository helpful, you may cite:

@ARTICLE{9676416,
  author={Guan, Zhenyu and Jing, Junpeng and Deng, Xin and Xu, Mai and Jiang, Lai and Zhang, Zhou and Li, Yipeng},
  journal={IEEE Transactions on Pattern Analysis and Machine Intelligence}, 
  title={DeepMIH: Deep Invertible Network for Multiple Image Hiding}, 
  year={2022},
  volume={},
  number={},
  pages={1-1},
  doi={10.1109/TPAMI.2022.3141725}}

deepmih's People

Contributors

tomtomtommi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

deepmih's Issues

vgg_loss code

Hi, it's a good job! I have a problem, I can't find the vgg_loss code defined in your code, could you share it? I just use it to learn。

Are the results in HiNet and DeepMIH tested on RGB or Y,U,V?

Hi! Thank you for sharing your code! Are the results in HiNet and DeepMIH tested on RGB or Y,U,V?  When we reproduced HiNet, we found that the results in the paper could not be reproduced, and the PSNR in the log file given by HiNet's official code did not reach that in the paper.  When we use the provided DeepMIH model to test, PSNR also does not achieve the results in the paper.  Since we were all testing in RGB, and the code included testing on Y, this was questionable. 

net3 problem

Hi! Thanks for the code and I have a problem. When the number of pictures increases to 3 or 4, do the parameters of net3 share in the following training process? Or we need another network? Thanks.

代码使用

is:issue is:open 博主你好,请问有没有带备注版的代码啊,我在运行您的代码时多出报错,经过处理后dataset无法导入数据

your training set

Hi! Thank you for sharing your code! I found that the training set of your model in your paper uses the DIV2k dataset, but the training set of this dataset has only 800 images. I want to determine whether the pre-trained model you provided only uses these 800 images for training?

Hi, thanks for your interest. We only polish and offer the code and the model for DeepMIH with 2 images hidden, which contains the main experiments in the paper. For DeepMIH-P, it was added in the Response process, and we only added a commonly used vgg_loss, which can be found in lots of low-level works. Specifically, we mainly referred to [HiDDeN](https://github.com/ando-khachatryan/HiDDeN).

Hi, thanks for your interest. We only polish and offer the code and the model for DeepMIH with 2 images hidden, which contains the main experiments in the paper. For DeepMIH-P, it was added in the Response process, and we only added a commonly used vgg_loss, which can be found in lots of low-level works. Specifically, we mainly referred to HiDDeN.

Originally posted by @TomTomTommi in #1 (comment)

call for codes

Hello, I am very interested in your work. I noticed that your work is compared with the previous related work, but the ISN code is not open source. Do you reproduce it yourself or find the original author. If you reproduce it yourself, can you tell me what the reference code is? If the original author sent the code to you, can you share it?

self-attention

Excuse me,why convolution cannot be replaced with self-attention in the coupling module?

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.