Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

add 'once_differentiable' for dcn and modify 'configs/cityscapes/README.md' #701

Merged
merged 39 commits into from
Apr 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
f93b369
make pixel indexes 0-based for bounding box in pascal voc dataset
zimenglan-sysu-512 Nov 25, 2018
45e4ba8
Merge remote-tracking branch 'upstream/master'
zimenglan-sysu-512 Nov 29, 2018
86caae2
Merge remote-tracking branch 'upstream/master'
zimenglan-sysu-512 Dec 5, 2018
a46bfb9
replacing all instances of torch.distributed.deprecated with torch.di…
zimenglan-sysu-512 Dec 5, 2018
7bbf46f
replacing all instances of torch.distributed.deprecated with torch.di…
zimenglan-sysu-512 Dec 5, 2018
7c8cf41
Merge remote-tracking branch 'upstream/master'
zimenglan-sysu-512 Dec 6, 2018
07a0f9c
Merge remote-tracking branch 'upstream/master'
zimenglan-sysu-512 Dec 26, 2018
6f09a6f
Merge remote-tracking branch 'upstream/master'
zimenglan-sysu-512 Jan 11, 2019
c4e3245
Merge remote-tracking branch 'upstream/master'
zimenglan-sysu-512 Jan 15, 2019
baba31f
add GroupNorm
zimenglan-sysu-512 Jan 15, 2019
4877e36
add GroupNorm -- sort out yaml files
zimenglan-sysu-512 Jan 16, 2019
d4ae039
use torch.nn.GroupNorm instead, replace 'use_gn' with 'conv_block' an…
zimenglan-sysu-512 Jan 18, 2019
333864d
modification on 'group_norm' and 'conv_with_kaiming_uniform' function
zimenglan-sysu-512 Jan 18, 2019
58da4d5
modification on yaml files in configs/gn_baselines/ and reduce the am…
zimenglan-sysu-512 Jan 21, 2019
1798e63
Merge remote-tracking branch 'upstream/master'
zimenglan-sysu-512 Jan 21, 2019
ecc68c4
Merge remote-tracking branch 'upstream/master'
zimenglan-sysu-512 Jan 22, 2019
02a86f3
Merge remote-tracking branch 'upstream/master'
zimenglan-sysu-512 Jan 23, 2019
9808a21
use 'kaiming_uniform' to initialize resnet, disable gn after fc layer…
zimenglan-sysu-512 Jan 23, 2019
d1ce06e
Merge remote-tracking branch 'upstream/master'
zimenglan-sysu-512 Jan 28, 2019
4de3488
agnostic-regression for bbox
zimenglan-sysu-512 Jan 28, 2019
52be8d7
Merge remote-tracking branch 'upstream/master'
zimenglan-sysu-512 Feb 1, 2019
288e16f
Merge remote-tracking branch 'upstream/master'
zimenglan-sysu-512 Feb 5, 2019
d91ff2d
Merge remote-tracking branch 'upstream/master'
zimenglan-sysu-512 Feb 10, 2019
d177092
Merge remote-tracking branch 'upstream/master'
zimenglan-sysu-512 Feb 15, 2019
a52e159
Merge remote-tracking branch 'upstream/master'
zimenglan-sysu-512 Feb 15, 2019
f7ad55e
Merge remote-tracking branch 'upstream/master'
zimenglan-sysu-512 Feb 19, 2019
483fca8
please set 'STRIDE_IN_1X1' to be 'False' when backbone use GN
zimenglan-sysu-512 Feb 19, 2019
f5786e9
merge from upstream/master
zimenglan-sysu-512 Feb 25, 2019
d2d55f9
add README.md for GN
zimenglan-sysu-512 Feb 26, 2019
fc08cdd
Merge remote-tracking branch 'upstream/master'
zimenglan-sysu-512 Mar 6, 2019
db01edb
Merge remote-tracking branch 'upstream/master'
zimenglan-sysu-512 Apr 1, 2019
ca7276d
Merge remote-tracking branch 'upstream/master'
zimenglan-sysu-512 Apr 18, 2019
eee83fc
add dcn from mmdetection
zimenglan-sysu-512 Apr 19, 2019
1ff6d5b
Merge remote-tracking branch 'upstream/master'
zimenglan-sysu-512 Apr 20, 2019
99fc0f3
add documentation for finetuning cityscapes
zimenglan-sysu-512 Apr 20, 2019
fbf3733
add documentation for finetuning cityscapes
zimenglan-sysu-512 Apr 20, 2019
4765e21
add documentation for finetuning cityscapes
zimenglan-sysu-512 Apr 20, 2019
116c360
Merge remote-tracking branch 'upstream/master'
zimenglan-sysu-512 Apr 20, 2019
0b12fdb
add 'once_differentiable' for dcn and modify 'configs/cityscapes/READ…
zimenglan-sysu-512 Apr 20, 2019
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
8 changes: 6 additions & 2 deletions configs/cityscapes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,13 @@ def clip_weights_from_pretrain_of_coco_to_cityscapes(f, out_file):
print("f: {}\nout_file: {}".format(f, out_file))
torch.save(m, out_file)
```
Step 3: modify the `input&solver` configuration in the `yaml` file, like this:
Step 3: modify the `input&weight&solver` configuration in the `yaml` file, like this:
```
MODEL:
WEIGHT: "xxx.pth" # the model u save from above code

INPUT:
MIN_SIZE_TRAIN: (800, 832, 863, 896, 928, 960, 992, 1024, 1024)
MIN_SIZE_TRAIN: (800, 832, 864, 896, 928, 960, 992, 1024, 1024)
MAX_SIZE_TRAIN: 2048
MIN_SIZE_TEST: 1024
MAX_SIZE_TEST: 2048
Expand All @@ -210,4 +213,5 @@ SOLVER:
STEPS: (3000,)
MAX_ITER: 4000
```
Step 4: train the model.

3 changes: 3 additions & 0 deletions maskrcnn_benchmark/layers/dcn/deform_conv_func.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import torch
from torch.autograd import Function
from torch.autograd.function import once_differentiable
from torch.nn.modules.utils import _pair

from maskrcnn_benchmark import _C
Expand Down Expand Up @@ -67,6 +68,7 @@ def forward(
return output

@staticmethod
@once_differentiable
def backward(ctx, grad_output):
input, offset, weight = ctx.saved_tensors

Expand Down Expand Up @@ -201,6 +203,7 @@ def forward(
return output

@staticmethod
@once_differentiable
def backward(ctx, grad_output):
if not grad_output.is_cuda:
raise NotImplementedError
Expand Down
2 changes: 2 additions & 0 deletions maskrcnn_benchmark/layers/dcn/deform_pool_func.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import torch
from torch.autograd import Function
from torch.autograd.function import once_differentiable

from maskrcnn_benchmark import _C

Expand Down Expand Up @@ -60,6 +61,7 @@ def forward(
return output

@staticmethod
@once_differentiable
def backward(ctx, grad_output):
if not grad_output.is_cuda:
raise NotImplementedError
Expand Down