Training Manual
---------------
English | [中文版](#jump_zh)
## Introduction
The whole training is not end-to-end which must be split into several phases to get a best performance.
So, reviewing the paper and codes structure will make you understand the training phase better.
As the paper shows, the whole model needs two separate models: `EdgeModel` and `InpaintingModel`.
But in practice, the whole work actually needs **three training phases** with **the two separate models**
, which makes results best while the training is confusing.
**IMPORTANT**: The three training phases I define here are called `model` in the original codes , which should not be confused with `EdgeModel` and `InpaintingModel`.
Phase | Command | Model | Input | Output | Description
-----|-------|------|------|-------|-------
1st | --model 1 | `EdgeModel` | Masked Greyscale Image + Masked Edge + Mask | Full Edge | Train `EdgeModel` solely
2nd | --model 2 | `InpaintingModel` | Masked Image + Full canny Edge from Original full Image+ Mask | Full Image | Pre-train `InpaintingModel` solely to learn the importance of edges
3rd | --model 3 | `InpaintingModel` | Masked Image + Full Edge from 1st phase output + Mask | Full Image | Actual train `InpaintingModel` with the predicted edges from phase 1
## Dataset
1. We need to prepare images dataset and masks dataset both.
- Mask dataset:
- Irregular Mask Dataset ([download link](http://masc.cs.gmu.edu/wiki/uploads/partialconv/mask.zip)) provided by [Liu et al.](http://masc.cs.gmu.edu/wiki/partialconv) is recommended to handle with normal irregular defects.
- Block Masks don't need dataset which can be random generated by codes.
- Image dataset:
- Places2, CelebA and Paris Street-View datasets are [here](https://github.com/knazeri/edge-connect#datasets).
- Anime Face dataset from `getchu.com` I used: [ANIME305](https://github.com/ANIME305/Anime-GAN-tensorflow#open-sourced-dataset)
2. We should split the whole image dataset into train/validation/test parts.
```bash
python scripts/flist_train_split.py --path --output