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

PASCAL VOC 2012 support & improvements #53

Merged
merged 2 commits into from
Feb 23, 2019
Merged
Show file tree
Hide file tree
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
456 changes: 279 additions & 177 deletions README.md

Large diffs are not rendered by default.

11 changes: 0 additions & 11 deletions config/README.md

This file was deleted.

25 changes: 0 additions & 25 deletions config/conda_env.yaml

This file was deleted.

58 changes: 58 additions & 0 deletions configs/coco.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
EXP:
ID: coco
OUTPUT_DIR: data

DATASET:
NAME: coco
ROOT:
LABELS: ./data/datasets/coco/labels.txt
N_CLASSES: 91
IGNORE_LABEL:
SCALES:
SPLIT:
TRAIN:
VAL:
TEST:

DATALOADER:
NUM_WORKERS: 0

IMAGE:
MEAN:
R: 122.675
G: 116.669
B: 104.008
SIZE:
BASE:
TRAIN:
TEST: 513

MODEL:
NAME: DeepLabV1_ResNet101
N_BLOCKS: [3, 4, 23, 3]
ATROUS_RATES:
INIT_MODEL:

SOLVER:
BATCH_SIZE:
TRAIN: 5
TEST: 1
ITER_MAX: 100000
ITER_SIZE: 2
ITER_SAVE: 5000
ITER_TB: 100
LR_DECAY: 10
LR: 2.5e-4
MOMENTUM: 0.9
OPTIMIZER: sgd
POLY_POWER: 0.9
WEIGHT_DECAY: 5.0e-4
AVERAGE_LOSS: 20

CRF:
ITER_MAX: 10
POS_W: 3
POS_XY_STD: 1
BI_W: 4
BI_XY_STD: 67
BI_RGB_STD: 3
22 changes: 11 additions & 11 deletions config/cocostuff10k.yaml → configs/cocostuff10k.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
EXP:
ID: cocostuff10k
OUTPUT_DIR: data

DATASET:
NAME: cocostuff10k
ROOT: /media/kazuto1011/Extra/cocostuff/cocostuff-10k-v1.1
LABELS: ./data/datasets/cocostuff/labels_2.txt
N_CLASSES: 182
IGNORE_LABEL: -1
WARP_IMAGE: True
LABELS: ./data/datasets/cocostuff/labels.txt
N_CLASSES: 182
IGNORE_LABEL: 255
SCALES: [0.5, 0.75, 1.0, 1.25, 1.5]
SPLIT:
TRAIN: train
Expand All @@ -20,17 +23,15 @@ IMAGE:
G: 116.669
B: 104.008
SIZE:
TRAIN:
BASE: 513
CROP: 321
BASE:
TRAIN: 321
TEST: 513

MODEL:
NAME: DeepLabV2_ResNet101_MSC
N_BLOCKS: [3, 4, 23, 3]
ATROUS_RATES: [6, 12, 18, 24]
INIT_MODEL: ./data/models/deeplab_resnet101/coco_init/deeplabv2_resnet101_COCO_init.pth
SAVE_DIR: ./data/models/deeplab_resnet101/cocostuff10k
INIT_MODEL: data/models/coco/deeplabv1_resnet101/caffemodel/deeplabv1_resnet101-coco.pth

SOLVER:
BATCH_SIZE:
Expand All @@ -46,7 +47,6 @@ SOLVER:
OPTIMIZER: sgd
POLY_POWER: 0.9
WEIGHT_DECAY: 5.0e-4
LOG_DIR: runs/cocostuff10k
AVERAGE_LOSS: 20

CRF:
Expand All @@ -55,4 +55,4 @@ CRF:
POS_XY_STD: 1
BI_W: 4
BI_XY_STD: 67
BI_RGB_STD: 3
BI_RGB_STD: 3
20 changes: 10 additions & 10 deletions config/cocostuff164k.yaml → configs/cocostuff164k.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
EXP:
ID: cocostuff164k
OUTPUT_DIR: data

DATASET:
NAME: cocostuff164k
ROOT: /media/kazuto1011/Extra/cocostuff/cocostuff-164k
LABELS: ./data/datasets/cocostuff/labels_2.txt
LABELS: ./data/datasets/cocostuff/labels.txt
N_CLASSES: 182
IGNORE_LABEL: 255
WARP_IMAGE: True
SCALES: [0.5, 0.75, 1.0, 1.25, 1.5]
SPLIT:
TRAIN: train2017
Expand All @@ -20,22 +23,20 @@ IMAGE:
G: 116.669
B: 104.008
SIZE:
TRAIN:
BASE: 513
CROP: 321
BASE: # None
TRAIN: 321
TEST: 513

MODEL:
NAME: DeepLabV2_ResNet101_MSC
N_BLOCKS: [3, 4, 23, 3]
ATROUS_RATES: [6, 12, 18, 24]
INIT_MODEL: ./data/models/deeplab_resnet101/coco_init/deeplabv2_resnet101_COCO_init.pth
SAVE_DIR: ./data/models/deeplab_resnet101/cocostuff164k
INIT_MODEL: data/models/coco/deeplabv1_resnet101/caffemodel/deeplabv1_resnet101-coco.pth

SOLVER:
BATCH_SIZE:
TRAIN: 5
TEST: 5
TEST: 1
ITER_MAX: 100000
ITER_SIZE: 2
ITER_SAVE: 5000
Expand All @@ -46,7 +47,6 @@ SOLVER:
OPTIMIZER: sgd
POLY_POWER: 0.9
WEIGHT_DECAY: 5.0e-4
LOG_DIR: runs/cocostuff164k
AVERAGE_LOSS: 20

CRF:
Expand All @@ -55,4 +55,4 @@ CRF:
POS_XY_STD: 1
BI_W: 4
BI_XY_STD: 67
BI_RGB_STD: 3
BI_RGB_STD: 3
26 changes: 26 additions & 0 deletions configs/conda_env.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: deeplab-pytorch
channels:
- pytorch
- conda-forge
- defaults
dependencies:
# - clang # For MacOS
# - clangxx # For MacOS
- click
- cudatoolkit=10.0
- cython
- matplotlib
- pytorch
- pyyaml
- scipy
- torchvision
- tqdm
- pip:
- addict
- black
- joblib
- opencv-python
- pydensecrf
- tensorboardX
- tensorflow
- torchnet
28 changes: 14 additions & 14 deletions config/voc12.yaml → configs/voc12.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
EXP:
ID: voc12
OUTPUT_DIR: data

DATASET:
NAME: voc12
ROOT:
NAME: vocaug
ROOT: /media/kazuto1011/Extra/VOCdevkit
LABELS: ./data/datasets/voc12/labels.txt
N_CLASSES: 21
IGNORE_LABEL: 255
WARP_IMAGE: False
SCALES: [0.5, 0.75, 1.0, 1.25, 1.5]
SPLIT:
TRAIN:
VAL:
TEST:
TRAIN: train_aug
VAL: val
TEST: test

DATALOADER:
NUM_WORKERS: 0
Expand All @@ -20,22 +23,20 @@ IMAGE:
G: 116.669
B: 104.008
SIZE:
TRAIN:
BASE: 513
CROP: 321
BASE: # None
TRAIN: 321
TEST: 513

MODEL:
NAME: DeepLabV2_ResNet101_MSC
N_BLOCKS: [3, 4, 23, 3]
ATROUS_RATES: [6, 12, 18, 24]
INIT_MODEL: ./data/models/deeplab_resnet101/coco_init/deeplabv2_resnet101_COCO_init.pth
SAVE_DIR: ./data/models/deeplab_resnet101/voc12
INIT_MODEL: data/models/coco/deeplabv1_resnet101/caffemodel/deeplabv1_resnet101-coco.pth

SOLVER:
BATCH_SIZE:
TRAIN: 5
TEST: 5
TEST: 1
ITER_MAX: 20000
ITER_SIZE: 2
ITER_SAVE: 5000
Expand All @@ -46,7 +47,6 @@ SOLVER:
OPTIMIZER: sgd
POLY_POWER: 0.9
WEIGHT_DECAY: 5.0e-4
LOG_DIR: runs/voc12
AVERAGE_LOSS: 20

CRF:
Expand All @@ -55,4 +55,4 @@ CRF:
POS_XY_STD: 1
BI_W: 4
BI_XY_STD: 67
BI_RGB_STD: 3
BI_RGB_STD: 3
Loading