Skip to content

Commit

Permalink
fast dataloader coco_seg.py
Browse files Browse the repository at this point in the history
  • Loading branch information
xieenze committed Nov 12, 2019
1 parent 1ce9911 commit d6d1287
Show file tree
Hide file tree
Showing 29 changed files with 1,998 additions and 183 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ The code for implementing the **[PolarMask](https://arxiv.org/abs/1909.13226)**.


## News
- Fast DataLoader is updated. Please Check [coco_seg_fast.py](mmdet/datasets/coco_seg_fast.py) and [config file](configs/polarmask/32gpu/polar_768_1x_r50_FastLoader.py).
Changes can be found in [FastLoader](imgs/FastLoader.png).
The training speed can improve 100% and the performance is nearly the same.(2019.11.04)
- New Fast DataLoader is updated. 4 V100 can train PolarMask in 15 hours.(2019.11.12)
- PolarMask-X101 with DCN, ms train and 2x can achieve 35.9 mAP. Code is released.(2019.10.26)
- PolarMask-X101 with DCN can achieve 34.9 mAP. Code is released.(2019.10.23)
- PolarMask-X101 with 2x and multi-scale train can achieve 33.5 mAP. Code and trained models with 2x and mstrain for R50,R101 and X101 are released.(2019.10.19)
Expand Down
4 changes: 2 additions & 2 deletions configs/polarmask/32gpu/polar_640_800_2x_r101.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# model settings
model = dict(
type='FCOS',
type='PolarMask',
pretrained='open-mmlab://resnet101_caffe',
backbone=dict(
type='ResNet',
Expand All @@ -20,7 +20,7 @@
num_outs=5,
relu_before_extra_convs=True),
bbox_head=dict(
type='FCOS_Instance_Head_MIOU_MSKCTNESS',
type='PolarMask_Head',
num_classes=81,
in_channels=256,
stacked_convs=4,
Expand Down
4 changes: 2 additions & 2 deletions configs/polarmask/32gpu/polar_640_800_2x_r101_dcn2.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# model settings
model = dict(
type='FCOS',
type='PolarMask',
pretrained='open-mmlab://resnet101_caffe',
backbone=dict(
type='ResNet',
Expand All @@ -25,7 +25,7 @@
num_outs=5,
relu_before_extra_convs=True),
bbox_head=dict(
type='FCOS_Instance_Head_MIOU_MSKCTNESS',
type='PolarMask_Head',
num_classes=81,
in_channels=256,
stacked_convs=4,
Expand Down
4 changes: 2 additions & 2 deletions configs/polarmask/32gpu/polar_640_800_2x_r50.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# model settings
model = dict(
type='FCOS',
type='PolarMask',
pretrained='open-mmlab://resnet50_caffe',
backbone=dict(
type='ResNet',
Expand All @@ -20,7 +20,7 @@
num_outs=5,
relu_before_extra_convs=True),
bbox_head=dict(
type='FCOS_Instance_Head_MIOU_MSKCTNESS',
type='PolarMask_Head',
num_classes=81,
in_channels=256,
stacked_convs=4,
Expand Down
4 changes: 2 additions & 2 deletions configs/polarmask/32gpu/polar_640_800_2x_r50_dcn2.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# model settings
model = dict(
type='FCOS',
type='PolarMask',
pretrained='open-mmlab://resnet50_caffe',
backbone=dict(
type='ResNet',
Expand All @@ -25,7 +25,7 @@
num_outs=5,
relu_before_extra_convs=True),
bbox_head=dict(
type='FCOS_Instance_Head_MIOU_MSKCTNESS',
type='PolarMask_Head',
num_classes=81,
in_channels=256,
stacked_convs=4,
Expand Down
4 changes: 2 additions & 2 deletions configs/polarmask/32gpu/polar_640_800_2x_x101.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# model settings
model = dict(
type='FCOS',
type='PolarMask',
pretrained='open-mmlab://resnext101_64x4d',
backbone=dict(
type='ResNeXt',
Expand All @@ -22,7 +22,7 @@
num_outs=5,
relu_before_extra_convs=True),
bbox_head=dict(
type='FCOS_Instance_Head_MIOU_MSKCTNESS',
type='PolarMask_Head',
num_classes=81,
in_channels=256,
stacked_convs=4,
Expand Down
4 changes: 2 additions & 2 deletions configs/polarmask/32gpu/polar_640_800_2x_x101_dcn2.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# model settings
model = dict(
type='FCOS',
type='PolarMask',
pretrained='open-mmlab://resnext101_64x4d',
backbone=dict(
type='ResNeXt',
Expand Down Expand Up @@ -28,7 +28,7 @@
num_outs=5,
relu_before_extra_convs=True),
bbox_head=dict(
type='FCOS_Instance_Head_MIOU_MSKCTNESS',
type='PolarMask_Head',
num_classes=81,
in_channels=256,
stacked_convs=4,
Expand Down
6 changes: 3 additions & 3 deletions configs/polarmask/32gpu/polar_640_800_6x_r101_dcn2.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# model settings
model = dict(
type='FCOS',
type='PolarMask',
pretrained='open-mmlab://resnet101_caffe',
backbone=dict(
type='ResNet',
type='PolarMask',
depth=101,
num_stages=4,
out_indices=(0, 1, 2, 3),
Expand All @@ -25,7 +25,7 @@
num_outs=5,
relu_before_extra_convs=True),
bbox_head=dict(
type='FCOS_Instance_Head_MIOU_MSKCTNESS',
type='PolarMask_Head',
num_classes=81,
in_channels=256,
stacked_convs=4,
Expand Down
4 changes: 2 additions & 2 deletions configs/polarmask/32gpu/polar_768_1x_r101.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# model settings
model = dict(
type='FCOS',
type='PolarMask',
pretrained='open-mmlab://resnet101_caffe',
backbone=dict(
type='ResNet',
Expand All @@ -20,7 +20,7 @@
num_outs=5,
relu_before_extra_convs=True),
bbox_head=dict(
type='FCOS_Instance_Head_MIOU_MSKCTNESS',
type='PolarMask_Head',
num_classes=81,
in_channels=256,
stacked_convs=4,
Expand Down
4 changes: 2 additions & 2 deletions configs/polarmask/32gpu/polar_768_1x_r101_dcn2.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# model settings
model = dict(
type='FCOS',
type='PolarMask',
pretrained='open-mmlab://resnet101_caffe',
backbone=dict(
type='ResNet',
Expand All @@ -25,7 +25,7 @@
num_outs=5,
relu_before_extra_convs=True),
bbox_head=dict(
type='FCOS_Instance_Head_MIOU_MSKCTNESS',
type='PolarMask_Head',
num_classes=81,
in_channels=256,
stacked_convs=4,
Expand Down
4 changes: 2 additions & 2 deletions configs/polarmask/32gpu/polar_768_1x_r50.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# model settings
model = dict(
type='FCOS',
type='PolarMask',
pretrained='open-mmlab://resnet50_caffe',
backbone=dict(
type='ResNet',
Expand All @@ -20,7 +20,7 @@
num_outs=5,
relu_before_extra_convs=True),
bbox_head=dict(
type='FCOS_Instance_Head_MIOU_MSKCTNESS',
type='PolarMask_Head',
num_classes=81,
in_channels=256,
stacked_convs=4,
Expand Down
4 changes: 2 additions & 2 deletions configs/polarmask/32gpu/polar_768_1x_r50_FastLoader.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# model settings
model = dict(
type='FCOS',
type='PolarMask',
pretrained='open-mmlab://resnet50_caffe',
backbone=dict(
type='ResNet',
Expand All @@ -20,7 +20,7 @@
num_outs=5,
relu_before_extra_convs=True),
bbox_head=dict(
type='FCOS_Instance_Head_MIOU_MSKCTNESS',
type='PolarMask_Head',
num_classes=81,
in_channels=256,
stacked_convs=4,
Expand Down
4 changes: 2 additions & 2 deletions configs/polarmask/32gpu/polar_768_1x_r50_dcn2.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# model settings
model = dict(
type='FCOS',
type='PolarMask',
pretrained='open-mmlab://resnet50_caffe',
backbone=dict(
type='ResNet',
Expand All @@ -25,7 +25,7 @@
num_outs=5,
relu_before_extra_convs=True),
bbox_head=dict(
type='FCOS_Instance_Head_MIOU_MSKCTNESS',
type='PolarMask_Head',
num_classes=81,
in_channels=256,
stacked_convs=4,
Expand Down
4 changes: 2 additions & 2 deletions configs/polarmask/32gpu/polar_768_1x_x101.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# model settings
model = dict(
type='FCOS',
type='PolarMask',
pretrained='open-mmlab://resnext101_64x4d',
backbone=dict(
type='ResNeXt',
Expand All @@ -22,7 +22,7 @@
num_outs=5,
relu_before_extra_convs=True),
bbox_head=dict(
type='FCOS_Instance_Head_MIOU_MSKCTNESS',
type='PolarMask_Head',
num_classes=81,
in_channels=256,
stacked_convs=4,
Expand Down
4 changes: 2 additions & 2 deletions configs/polarmask/32gpu/polar_768_1x_x101_dcn2.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# model settings
model = dict(
type='FCOS',
type='PolarMask',
pretrained='open-mmlab://resnext101_64x4d',
backbone=dict(
type='ResNeXt',
Expand Down Expand Up @@ -28,7 +28,7 @@
num_outs=5,
relu_before_extra_convs=True),
bbox_head=dict(
type='FCOS_Instance_Head_MIOU_MSKCTNESS',
type='PolarMask_Head',
num_classes=81,
in_channels=256,
stacked_convs=4,
Expand Down
4 changes: 2 additions & 2 deletions configs/polarmask/32gpu/polar_800_1x_r50.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# model settings
model = dict(
type='FCOS',
type='PolarMask',
pretrained='open-mmlab://resnet50_caffe',
backbone=dict(
type='ResNet',
Expand All @@ -20,7 +20,7 @@
num_outs=5,
relu_before_extra_convs=True),
bbox_head=dict(
type='FCOS_Instance_Head_MIOU_MSKCTNESS',
type='PolarMask_Head',
num_classes=81,
in_channels=256,
stacked_convs=4,
Expand Down
6 changes: 3 additions & 3 deletions configs/polarmask/4gpu/polar_768_1x_r101.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# model settings
model = dict(
type='FCOS',
type='PolarMask',
pretrained='open-mmlab://resnet101_caffe',
backbone=dict(
type='ResNet',
Expand All @@ -20,7 +20,7 @@
num_outs=5,
relu_before_extra_convs=True),
bbox_head=dict(
type='FCOS_Instance_Head_MIOU_MSKCTNESS',
type='PolarMask_Head',
num_classes=81,
in_channels=256,
stacked_convs=4,
Expand Down Expand Up @@ -59,7 +59,7 @@
mean=[102.9801, 115.9465, 122.7717], std=[1.0, 1.0, 1.0], to_rgb=False)
data = dict(
imgs_per_gpu=4,
workers_per_gpu=15,
workers_per_gpu=5,
train=dict(
type=dataset_type,
ann_file=data_root + 'annotations/instances_train2017.json',
Expand Down
6 changes: 3 additions & 3 deletions configs/polarmask/4gpu/polar_768_1x_r50.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# model settings
model = dict(
type='FCOS',
type='PolarMask',
pretrained='open-mmlab://resnet50_caffe',
backbone=dict(
type='ResNet',
Expand All @@ -20,7 +20,7 @@
num_outs=5,
relu_before_extra_convs=True),
bbox_head=dict(
type='FCOS_Instance_Head_MIOU_MSKCTNESS',
type='PolarMask_Head',
num_classes=81,
in_channels=256,
stacked_convs=4,
Expand Down Expand Up @@ -59,7 +59,7 @@
mean=[102.9801, 115.9465, 122.7717], std=[1.0, 1.0, 1.0], to_rgb=False)
data = dict(
imgs_per_gpu=4,
workers_per_gpu=15,
workers_per_gpu=5,
train=dict(
type=dataset_type,
ann_file=data_root + 'annotations/instances_train2017.json',
Expand Down
6 changes: 3 additions & 3 deletions configs/polarmask/4gpu/polar_768_1x_x101.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# model settings
model = dict(
type='FCOS',
type='PolarMask',
pretrained='open-mmlab://resnext101_64x4d',
backbone=dict(
type='ResNeXt',
Expand All @@ -22,7 +22,7 @@
num_outs=5,
relu_before_extra_convs=True),
bbox_head=dict(
type='FCOS_Instance_Head_MIOU_MSKCTNESS',
type='PolarMask_Head',
num_classes=81,
in_channels=256,
stacked_convs=4,
Expand Down Expand Up @@ -61,7 +61,7 @@
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
data = dict(
imgs_per_gpu=2,
workers_per_gpu=15,
workers_per_gpu=5,
train=dict(
type=dataset_type,
ann_file=data_root + 'annotations/instances_train2017.json',
Expand Down
Loading

0 comments on commit d6d1287

Please sign in to comment.