Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding changes to README.md for more details on the configuration file. #30

Open
wants to merge 1 commit into
base: pytorch
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ We re-implement PEN-Net in Pytorch for faster speed, which is slightly different
* Our codes are built upon distributed training with Pytorch.
* Run `python train.py -c [config_file] -n [model_name] -m [mask_type] -s [image_size] `.
* For example, `python train.py -c configs/celebahq.json -n pennet -m square -s 256 `
* If you have any trouble with the configuration, please refer to configuration section.
2. Resume training:
* Run `python train.py -n pennet -m square -s 256 `.
3. Testing:
Expand All @@ -45,6 +46,37 @@ We re-implement PEN-Net in Pytorch for faster speed, which is slightly different
* Run `python eval.py -r [result_path]`

<!-- ------------------------------------------------------------------- -->

## Configuration

### Training

Inside `configs/celebahq.json` or other custom JSON files,

- In `data_loader`
- `name`: name of images.
- `zip_root`: Root directory containing the zip folder with `name`
- `flist_root`: Root directory containing several sub-directories with `name` whcih contain the corresponding `train.flist`, ... etc

For example, if we have

```
"data_loader": {
"name": "celebahq",
"zip_root": "datazip"
"flist_root": "flist",
...
}
```

Then we must have:

- `cd PEN-Net-for-Inpainting`
- `datazip/celebahq/celebahq.zip` where `celebahq.zip` is a zip folder containing input images.
- `flist/celebahq/train.flist` or other flist files which contain paths to images relative to the zip folder. In this case, e.g. `celebahq/celebahq1.png`

<!-- ------------------------------------------------------------------- -->

## Pretrained models
Download the models below and put it under `release_model/`

Expand Down