diff --git a/arborescence_protocol.pdf b/arborescence_protocol.pdf deleted file mode 100644 index b92b8e207250d0b0d1bb9d4022ec4d1c0da20934..0000000000000000000000000000000000000000 Binary files a/arborescence_protocol.pdf and /dev/null differ diff --git a/readme.md b/readme.md index 77a5f22dcd682076802c0bd578f0c9daacb43efc..350687d05d3792386b0e724c791a434fd1985a10 100644 --- a/readme.md +++ b/readme.md @@ -1,5 +1,19 @@ -The protocol is made to run on a multi-GPU platform, with orders in .slurm files. -This is the main.py to launch. It will create slurm files with CLI commands depending on the task of the protocol, such as it can run on a cluster. +# Overall idea + +The protocol is made to run on a multi-GPU platform, with orders launched via .slurm files. +The protocols runs automatically via main.py, which is the script which creates slurm files with CLI commands depending on the task of the protocol. + +The python files contained in this folder are codes called by main.py. +A run of a protocol is saved in a folder like 'experiment/'. All stegos, cost maps, classifiers, evaluation on every classifier on every data bases, are saved in it. The structure of thoses files are shown in the .png file displayed at the end of this documentation. + +A run of a protocol need data in input, which are: +* a data base of cover images, where each cover is saved in a different .npy file. +* a data base of stego images (each in a different .npy file) +* a data base of initial costs (each in a different .npy). It can have two shapes: + * 3 x image_size x image_size : in that case, first channel for cost of -1, second for 0 and final for +1 + * or image_size x image_size: in that case, only channel for symmetric cost of doing -1 or +1 + +# Details ### Here are the steps of the protocol: If --begin_step=0, the run of the protocol will begin with initialization which contains the following steps: @@ -15,7 +29,6 @@ It produces files at iteration $k are: - ### Structure of the results of a run of the protocol A run of a protocol is an experiment for given values of QF, emb_rate, intial cost_maps, different steganalysts... A run of the protocol will save all values in a folder, which is defined in the parameter --data_dir_prot. @@ -63,9 +76,9 @@ Evalution of classifier with architecture $model trained at iteration $j on adve The classifiers are trained between cover images, and new stegos are generated in each batch with the corresponding cost map. It allows to train the classifier, if desired (depending on parameters --CL and --start_emb_rate) to use curriculum learning during the training, such as new stegos embedding any size of payload can be generated during the training. -# In this folder: +# Files and folders in the root -##### FOLDER: +##### Folders * models: folder containing some constants, and .py files describing three different models * NUMPY FILES : * DCT_4.npy : preprocessing kernel of size 4x4 containing DCT coefficients used in XUNet architecture @@ -73,7 +86,7 @@ The classifiers are trained between cover images, and new stegos are generated i * permutation_files.npy : permutation of files (take the first images to be in train, after in valid and last in test set) * PYTHON FILES: * efficientnet.py, srnet.py and xunet.py for describing three steganalysts models -##### PYTHON FILES: +##### Files * main.py: Script to call for launching a protocol. It will itself run during the whole protocol and call other scripts to proceed to some actions. At the beginning, it creates the files description.txt which resumes the parameters of the experiment. * backpack.py: the class Backpack with SGE, which provides the output and the gradient of the output of a classifier w.r.t. costs. * double_tanh.py: the class with Backpack but with Double Tanh or Double Compact Tanh instead of SGE