Skip to content

Commit

Permalink
Update Readme with config usage
Browse files Browse the repository at this point in the history
Add config usage in Readme

Update README with config usage instructions
  • Loading branch information
meetps committed Oct 26, 2018
1 parent 98103aa commit 89f4abe
Showing 1 changed file with 65 additions and 1 deletion.
66 changes: 65 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,75 @@ This repository aims at mirroring popular semantic segmentation architectures in
### Data

* Download data for desired dataset(s) from list of URLs [here](https://meetshah1995.github.io/semantic-segmentation/deep-learning/pytorch/visdom/2017/06/01/semantic-segmentation-over-the-years.html#sec_datasets).
* Extract the zip / tar and modify the path appropriately in `config.yaml`
* Extract the zip / tar and modify the path appropriately in your `config.yaml`


### Usage

**Setup config file**

```yaml
# Model Configuration
model:
arch: <name> [options: 'fcn[8,16,32]s, unet, segnet, pspnet, icnet, icnetBN, linknet, frrn[A,B]'
<model_keyarg_1>:<value>

# Data Configuration
data:
dataset: <name> [options: 'pascal, camvid, ade20k, mit_sceneparsing_benchmark, cityscapes, nyuv2, sunrgbd, vistas']
train_split: <split_to_train_on>
val_split: <spit_to_validate_on>
img_rows: 512
img_cols: 1024
path: <path/to/data>
<dataset_keyarg1>:<value>

# Training Configuration
training:
n_workers: 64
train_iters: 35000
batch_size: 16
val_interval: 500
print_interval: 25
loss:
name: <loss_type> [options: 'cross_entropy, bootstrapped_cross_entropy, multi_scale_crossentropy']
<loss_keyarg1>:<value>

# Optmizer Configuration
optimizer:
name: <optimizer_name> [options: 'sgd, adam, adamax, asgd, adadelta, adagrad, rmsprop']
lr: 1.0e-3
<optimizer_keyarg1>:<value>

# Warmup LR Configuration
warmup_iters: <iters for lr warmup>
mode: <'constant' or 'linear' for warmup'>
gamma: <gamma for warm up>

# Augmentations Configuration
augmentations:
gamma: x #[gamma varied in 1 to 1+x]
hue: x #[hue varied in -x to x]
brightness: x #[brightness varied in 1-x to 1+x]
saturation: x #[saturation varied in 1-x to 1+x]
contrast: x #[contrast varied in 1-x to 1+x]
rcrop: [h, w] #[crop of size (h,w)]
translate: [dh, dw] #[reflective translation by (dh, dw)]
rotate: d #[rotate -d to d degrees]
scale: [h,w] #[scale to size (h,w)]
ccrop: [h,w] #[center crop of (h,w)]
hflip: p #[flip horizontally with chance p]
vflip: p #[flip vertically with chance p]

# LR Schedule Configuration
lr_schedule:
name: <schedule_type> [options: 'constant_lr, poly_lr, multi_step, cosine_annealing, exp_lr']
<scheduler_keyarg1>:<value>

# Resume from checkpoint
resume: <path_to_checkpoint>
```
**To train the model :**
```
Expand Down

0 comments on commit 89f4abe

Please sign in to comment.