Han Fang, Yupeng Qiu, Kejiang Chen*, Jiyi Zhang, Weiming Zhang, and Ee-Chien Chang*.
This is the source code of paper FIN: Flow-based Robust Watermarking with Invertible Noise Layer for Black-box Distortions, which is received by AAAI' 23.
The core packages we use in the project and their version information are as follows:
- kornia
0.6.6
- natsort
7.1.1
- numpy
1.22.3
- pandas
1.4.3
- torch
1.12.0
- torchvision
0.13.0
In this project we use DIV2K as the training dataset(which contains 800 images) and the validing dataset (which contians 100 images).
The data directory has the following structure:
├── Datasets
│ ├── DIV2K_train
│ │ ├── 0001.png
│ │ ├── ...
│ ├── DIV2K_valid
│ │ ├── 0801.png
│ │ ├── ...
├──
You will need to install the requirements, and change the settings in config.py
, then run :
python train.py
The log files and experiment result information will be saved in logging
in .txt format.
Since the black-box noise needs to be added by the user, the part of the test is divided into the message embedding part and the message extracting part. These two parts are implemented by encode.py
and decode.py
respectively.
python encode.py
python decode.py
There are some parameters for encoode.py
and decode.py
. Use
python encode.py(decode.py) --help
to see the description of all of the parameters.
Contact: [email protected]