Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
seminar-breakout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
seminar-breakout
Commits
02c40d10
Commit
02c40d10
authored
Aug 29, 2019
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MaskRCNN] set FPN to default; don't eval mask if not used
parent
0146287b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
16 deletions
+19
-16
examples/FasterRCNN/README.md
examples/FasterRCNN/README.md
+15
-14
examples/FasterRCNN/config.py
examples/FasterRCNN/config.py
+1
-1
examples/FasterRCNN/dataset/coco.py
examples/FasterRCNN/dataset/coco.py
+3
-1
No files found.
examples/FasterRCNN/README.md
View file @
02c40d10
...
@@ -90,22 +90,23 @@ Performance in [Detectron](https://github.com/facebookresearch/Detectron/) can b
...
@@ -90,22 +90,23 @@ Performance in [Detectron](https://github.com/facebookresearch/Detectron/) can b
| Backbone | mAP
<br/>
(box;mask) | Detectron mAP
<sup>
[
1
](
#ft1
)
</sup><br/>
(box;mask) | Time
<br/>
(on 8 V100s) | Configurations
<br/>
(click to expand) |
| Backbone | mAP
<br/>
(box;mask) | Detectron mAP
<sup>
[
1
](
#ft1
)
</sup><br/>
(box;mask) | Time
<br/>
(on 8 V100s) | Configurations
<br/>
(click to expand) |
| - | - | - | - | - |
| - | - | - | - | - |
| R50-
C4 | 34.1 | | 7h |
<details><summary>
super quick
</summary>
`MODE_MASK=False FRCNN.BATCH_PER_IM=64`
<br/>
`PREPROC.TRAIN_SHORT_EDGE_SIZE=600 PREPROC.MAX_SIZE=1024`
<br/>
`TRAIN.LR_SCHEDULE=[140000,180000,200000]`
</details>
|
| R50-
FPN | 34.8 | | 6.5h |
<details><summary>
super quick
</summary>
`MODE_MASK=False FRCNN.BATCH_PER_IM=64`
<br/>
`PREPROC.TRAIN_SHORT_EDGE_SIZE=[500,800] PREPROC.MAX_SIZE=1024`
</details>
|
| R50-C4 | 35.6 | 34.8 | 22.5h
|
<details><summary>
standard
</summary>
`MODE_MASK=False`
</details>
|
| R50-C4 | 35.6 | 34.8 | 22.5h
|
<details><summary>
standard
</summary>
`MODE_MASK=False MODE_FPN=False`
</details>
|
| R50-FPN | 37.5 | 36.7 | 10.5h
|
<details><summary>
standard
</summary>
`MODE_MASK=False MODE_FPN=True`
</details>
|
| R50-FPN | 37.5 | 36.7 | 10.5h
|
<details><summary>
standard
</summary>
`MODE_MASK=False`
</details>
|
| R50-C4 | 36.2;31.8
[
:arrow_down:
][
R50C41x
]
| 35.8;31.4 | 23h
|
<details><summary>
standard
</summary>
this is the default, no changes in config needed
</details>
|
| R50-C4 | 36.2;31.8
[
:arrow_down:
][
R50C41x
]
| 35.8;31.4 | 23h
|
<details><summary>
standard
</summary>
`MODE_FPN=False`
</details>
|
| R50-FPN | 38.2;34.8 | 37.7;33.9 | 12.5h |
<details><summary>
standard
</summary>
`MODE_FPN=True`
</details>
|
| R50-FPN | 38.2;34.8 | 37.7;33.9 | 12.5h |
<details><summary>
standard
</summary>
this is the default
</details>
|
| R50-FPN | 38.9;35.4
[
:arrow_down:
][
R50FPN2x
]
| 38.6;34.5 | 24h |
<details><summary>
2x
</summary>
`
MODE_FPN=True`
<br/>
`TRAIN.LR_SCHEDULE=2x`
</details>
|
| R50-FPN | 38.9;35.4
[
:arrow_down:
][
R50FPN2x
]
| 38.6;34.5 | 24h |
<details><summary>
2x
</summary>
`
TRAIN.LR_SCHEDULE=2x`
</details>
|
| R50-FPN-GN | 40.4;36.3
[
:arrow_down:
][
R50FPN2xGN
]
| 40.3;35.7 | 29h |
<details><summary>
2x+GN
</summary>
`
MODE_FPN=True`
<br/>
`FPN.NORM=GN BACKBONE.NORM=GN`
<br/>
`FPN.FRCNN_HEAD_FUNC=fastrcnn_4conv1fc_gn_head`
<br/>
`FPN.MRCNN_HEAD_FUNC=maskrcnn_up4conv_gn_head`
<br/>
`TRAIN.LR_SCHEDULE=2x`
|
| R50-FPN-GN | 40.4;36.3
[
:arrow_down:
][
R50FPN2xGN
]
| 40.3;35.7 | 29h |
<details><summary>
2x+GN
</summary>
`
FPN.NORM=GN BACKBONE.NORM=GN`
<br/>
`FPN.FRCNN_HEAD_FUNC=fastrcnn_4conv1fc_gn_head`
<br/>
`FPN.MRCNN_HEAD_FUNC=maskrcnn_up4conv_gn_head`
<br/>
`TRAIN.LR_SCHEDULE=2x`
|
| R50-FPN | 41.7;36.2
| | 16h |
<details><summary>
+Cascade
</summary>
`MODE_FPN=True FPN.CASCADE=True`
</details>
|
| R50-FPN | 41.7;36.2
[
:arrow_down:
][
R50FPN1xCas
]
| | 16h |
<details><summary>
+Cascade
</summary>
`FPN.CASCADE=True`
</details>
|
| R101-C4 | 40.1;34.6
[
:arrow_down:
][
R101C41x
]
| | 27h |
<details><summary>
standard
</summary>
`
BACKBONE.RESNET_NUM_BLOCKS=[3,4,23,3]`
</details>
|
| R101-C4 | 40.1;34.6
[
:arrow_down:
][
R101C41x
]
| | 27h |
<details><summary>
standard
</summary>
`
MODE_FPN=False`
<br
/`
BACKBONE.RESNET_NUM_BLOCKS=
[3,4,23,3]`
</
details
>
|
| R101-FPN | 40.7;36.8
[
:arrow_down:
][
R101FPN1x
]
| 40.0;35.9 | 17h |
<details><summary>
standard
</summary>
`
MODE_FPN=True`
<br/>
`BACKBONE.RESNET_NUM_BLOCKS=[3,4,23,3]`
</details>
|
| R101-FPN | 40.7;36.8
[
:arrow_down:
][
R101FPN1x
]
| 40.0;35.9 | 17h |
<details><summary>
standard
</summary>
`
BACKBONE.RESNET_NUM_BLOCKS=[3,4,23,3]`
</details>
|
| R101-FPN | 46.6;40.3
[
:arrow_down:
][
R101FPN3xCasAug
]
<sup>
[
2
](
#ft2
)
</sup>
| | 64h |
<details><summary>
3x+Cascade+TrainAug
</summary>
`
MODE_FPN=True
FPN.CASCADE=True`
<br/>
`BACKBONE.RESNET_NUM_BLOCKS=[3,4,23,3]`
<br/>
`TEST.RESULT_SCORE_THRESH=1e-4`
<br/>
`PREPROC.TRAIN_SHORT_EDGE_SIZE=[640,800]`
<br/>
`TRAIN.LR_SCHEDULE=3x`
</details>
|
| R101-FPN | 46.6;40.3
[
:arrow_down:
][
R101FPN3xCasAug
]
<sup>
[
2
](
#ft2
)
</sup>
| | 64h |
<details><summary>
3x+Cascade+TrainAug
</summary>
` FPN.CASCADE=True`
<br/>
`BACKBONE.RESNET_NUM_BLOCKS=[3,4,23,3]`
<br/>
`TEST.RESULT_SCORE_THRESH=1e-4`
<br/>
`PREPROC.TRAIN_SHORT_EDGE_SIZE=[640,800]`
<br/>
`TRAIN.LR_SCHEDULE=3x`
</details>
|
| R101-FPN-GN
<br/>
(From Scratch) | 47.7;41.7
[
:arrow_down:
][
R101FPN9xGNCasAugScratch
]
<sup>
[
3
](
#ft3
)
</sup>
| 47.4;40.5 | 28h (on 64 V100s) |
<details><summary>
9x+GN+Cascade+TrainAug
</summary>
`
MODE_FPN=True
FPN.CASCADE=True`
<br/>
`BACKBONE.RESNET_NUM_BLOCKS=[3,4,23,3]`
<br/>
`FPN.NORM=GN BACKBONE.NORM=GN`
<br/>
`FPN.FRCNN_HEAD_FUNC=fastrcnn_4conv1fc_gn_head`
<br/>
`FPN.MRCNN_HEAD_FUNC=maskrcnn_up4conv_gn_head`
<br/>
`PREPROC.TRAIN_SHORT_EDGE_SIZE=[640,800]`
<br/>
`TRAIN.LR_SCHEDULE=9x`
<br/>
`BACKBONE.FREEZE_AT=0`
</details>
|
| R101-FPN-GN
<br/>
(From Scratch) | 47.7;41.7
[
:arrow_down:
][
R101FPN9xGNCasAugScratch
]
<sup>
[
3
](
#ft3
)
</sup>
| 47.4;40.5 | 28h (on 64 V100s) |
<details><summary>
9x+GN+Cascade+TrainAug
</summary>
` FPN.CASCADE=True`
<br/>
`BACKBONE.RESNET_NUM_BLOCKS=[3,4,23,3]`
<br/>
`FPN.NORM=GN BACKBONE.NORM=GN`
<br/>
`FPN.FRCNN_HEAD_FUNC=fastrcnn_4conv1fc_gn_head`
<br/>
`FPN.MRCNN_HEAD_FUNC=maskrcnn_up4conv_gn_head`
<br/>
`PREPROC.TRAIN_SHORT_EDGE_SIZE=[640,800]`
<br/>
`TRAIN.LR_SCHEDULE=9x`
<br/>
`BACKBONE.FREEZE_AT=0`
</details>
|
[
R50C41x
]:
http://models.tensorpack.com/FasterRCNN/COCO-MaskRCNN-R50C41x.npz
[
R50C41x
]:
http://models.tensorpack.com/FasterRCNN/COCO-MaskRCNN-R50C41x.npz
[
R50FPN2x
]:
http://models.tensorpack.com/FasterRCNN/COCO-MaskRCNN-R50FPN2x.npz
[
R50FPN2x
]:
http://models.tensorpack.com/FasterRCNN/COCO-MaskRCNN-R50FPN2x.npz
[
R50FPN2xGN
]:
http://models.tensorpack.com/FasterRCNN/COCO-MaskRCNN-R50FPN2xGN.npz
[
R50FPN2xGN
]:
http://models.tensorpack.com/FasterRCNN/COCO-MaskRCNN-R50FPN2xGN.npz
[
R50FPN1xCas
]:
http://models.tensorpack.com/FasterRCNN/COCO-MaskRCNN-R50FPN1xCas.npz
[
R101C41x
]:
http://models.tensorpack.com/FasterRCNN/COCO-MaskRCNN-R101C41x.npz
[
R101C41x
]:
http://models.tensorpack.com/FasterRCNN/COCO-MaskRCNN-R101C41x.npz
[
R101FPN1x
]:
http://models.tensorpack.com/FasterRCNN/COCO-MaskRCNN-R101FPN1x.npz
[
R101FPN1x
]:
http://models.tensorpack.com/FasterRCNN/COCO-MaskRCNN-R101FPN1x.npz
[
R101FPN3xCasAug
]:
http://models.tensorpack.com/FasterRCNN/COCO-MaskRCNN-R101FPN3xCasAug.npz
[
R101FPN3xCasAug
]:
http://models.tensorpack.com/FasterRCNN/COCO-MaskRCNN-R101FPN3xCasAug.npz
...
...
examples/FasterRCNN/config.py
View file @
02c40d10
...
@@ -80,7 +80,7 @@ _C = config # short alias to avoid coding
...
@@ -80,7 +80,7 @@ _C = config # short alias to avoid coding
# mode flags ---------------------
# mode flags ---------------------
_C
.
TRAINER
=
'replicated'
# options: 'horovod', 'replicated'
_C
.
TRAINER
=
'replicated'
# options: 'horovod', 'replicated'
_C
.
MODE_MASK
=
True
# Faster R-CNN or Mask R-CNN
_C
.
MODE_MASK
=
True
# Faster R-CNN or Mask R-CNN
_C
.
MODE_FPN
=
Fals
e
_C
.
MODE_FPN
=
Tru
e
# dataset -----------------------
# dataset -----------------------
_C
.
DATA
.
BASEDIR
=
'/path/to/your/DATA/DIR'
_C
.
DATA
.
BASEDIR
=
'/path/to/your/DATA/DIR'
...
...
examples/FasterRCNN/dataset/coco.py
View file @
02c40d10
...
@@ -70,6 +70,8 @@ class COCODetection(DatasetSplit):
...
@@ -70,6 +70,8 @@ class COCODetection(DatasetSplit):
"""
"""
from
pycocotools.cocoeval
import
COCOeval
from
pycocotools.cocoeval
import
COCOeval
ret
=
{}
ret
=
{}
has_mask
=
"segmentation"
in
results
[
0
]
# results will be modified by loadRes
cocoDt
=
self
.
coco
.
loadRes
(
results
)
cocoDt
=
self
.
coco
.
loadRes
(
results
)
cocoEval
=
COCOeval
(
self
.
coco
,
cocoDt
,
'bbox'
)
cocoEval
=
COCOeval
(
self
.
coco
,
cocoDt
,
'bbox'
)
cocoEval
.
evaluate
()
cocoEval
.
evaluate
()
...
@@ -79,7 +81,7 @@ class COCODetection(DatasetSplit):
...
@@ -79,7 +81,7 @@ class COCODetection(DatasetSplit):
for
k
in
range
(
6
):
for
k
in
range
(
6
):
ret
[
'mAP(bbox)/'
+
fields
[
k
]]
=
cocoEval
.
stats
[
k
]
ret
[
'mAP(bbox)/'
+
fields
[
k
]]
=
cocoEval
.
stats
[
k
]
if
len
(
results
)
>
0
and
'segmentation'
in
results
[
0
]
:
if
len
(
results
)
>
0
and
has_mask
:
cocoEval
=
COCOeval
(
self
.
coco
,
cocoDt
,
'segm'
)
cocoEval
=
COCOeval
(
self
.
coco
,
cocoDt
,
'segm'
)
cocoEval
.
evaluate
()
cocoEval
.
evaluate
()
cocoEval
.
accumulate
()
cocoEval
.
accumulate
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment