Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
shinya7y committed Oct 26, 2020
1 parent d2e4fbe commit 8f2ddff
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 21 deletions.
55 changes: 34 additions & 21 deletions configs/universenet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,19 @@ For fine-tuning from a COCO pre-trained model, please see [this example](univers

### Main results

| Method | Backbone | Lr schd | Mem (GB) | Inf time (fps) | box AP | Download |
| :---------------: | :------: | :-----: | :------: | :------------: | :----: | :---------------------------------------------------------------------------------------------------------------------------------------------------------: |
| ATSS+SEPC | R-50 | 1x | - | - | 42.1 | - |
| UniverseNet | R2-50 | 1x | 5.1 | 16.1 | 46.7 | - |
| UniverseNet | R2-50 | 2x | 5.1 | 16.1 | 48.9 | [model](https://github.com/shinya7y/UniverseNet/releases/download/20.06/universenet50_fp16_8x2_mstrain_480_960_2x_coco_20200523_epoch_23-f9f426a3.pth) |
| UniverseNet+GFL | R2-50 | 1x | 5.3 | 16.9 | 47.5 | [model](https://github.com/shinya7y/UniverseNet/releases/download/20.07/universenet50_gfl_fp16_4x4_mstrain_480_960_1x_coco_20200708_epoch_12-68bb73b9.pth) |
| UniverseNet+GFL | R2-50 | 2x | 5.3 | 16.9 | 49.4 | [model](https://github.com/shinya7y/UniverseNet/releases/download/20.07/universenet50_gfl_fp16_4x4_mstrain_480_960_2x_coco_20200729_epoch_24-c9308e66.pth) |
| UniverseNet+GFL | R2-101 | 2x | 8.5 | 11.7 | 50.8 | [model](https://github.com/shinya7y/UniverseNet/releases/download/20.07/universenet101_gfl_fp16_4x4_mstrain_480_960_2x_coco_20200716_epoch_24-1b9a1241.pth) |
| UniverseNet 20.08 | R2-50 | 1x | 5.5 | 23.6 | 47.5 | [model](https://github.com/shinya7y/UniverseNet/releases/download/20.08/universenet50_2008_fp16_4x4_mstrain_480_960_1x_coco_20200812_epoch_12-f522ede5.pth) |
| UniverseNet 20.08 | R2-50 | 2x | 5.5 | 23.6 | 48.5 | [model](https://github.com/shinya7y/UniverseNet/releases/download/20.08/universenet50_2008_fp16_4x4_mstrain_480_960_2x_coco_20200815_epoch_24-81356447.pth) |
| Method | Backbone | Lr schd | Mem (GB) | Inf time (fps) | box AP | Download |
| :----------------: | :------: | :-----: | :------: | :------------: | :----: | :------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| ATSS+SEPC | R-50 | 1x | - | - | 42.1 | - |
| UniverseNet | R2-50 | 1x | 5.1 | 16.1 | 46.7 | - |
| UniverseNet | R2-50 | 2x | 5.1 | 16.1 | 48.9 | [model](https://github.com/shinya7y/UniverseNet/releases/download/20.06/universenet50_fp16_8x2_mstrain_480_960_2x_coco_20200523_epoch_23-f9f426a3.pth) |
| UniverseNet+GFL | R2-50 | 1x | 5.3 | 16.9 | 47.5 | [model](https://github.com/shinya7y/UniverseNet/releases/download/20.07/universenet50_gfl_fp16_4x4_mstrain_480_960_1x_coco_20200708_epoch_12-68bb73b9.pth) |
| UniverseNet+GFL | R2-50 | 2x | 5.3 | 16.9 | 49.4 | [model](https://github.com/shinya7y/UniverseNet/releases/download/20.07/universenet50_gfl_fp16_4x4_mstrain_480_960_2x_coco_20200729_epoch_24-c9308e66.pth) |
| UniverseNet+GFL | R2-101 | 2x | 8.5 | 11.7 | 50.8 | [model](https://github.com/shinya7y/UniverseNet/releases/download/20.07/universenet101_gfl_fp16_4x4_mstrain_480_960_2x_coco_20200716_epoch_24-1b9a1241.pth) |
| UniverseNet 20.08d | R2-50 | 1x | 5.8 | - | 48.6 | [model](https://github.com/shinya7y/UniverseNet/releases/download/20.10/universenet50_2008d_fp16_4x4_mstrain_480_960_1x_coco_20201013_epoch_12-8d9334a9.pth) |
| UniverseNet 20.08d | R2-101 | 20e | 9.1 | - | 50.9 | [model](https://github.com/shinya7y/UniverseNet/releases/download/20.10/universenet101_2008d_fp16_4x4_mstrain_480_960_20e_coco_20201023_epoch_20-3e0d236a.pth) |
| UniverseNet 20.08d | R2-101 | 2x | 9.1 | - | 50.6 | [model](https://github.com/shinya7y/UniverseNet/releases/download/20.10/universenet101_2008d_fp16_4x4_mstrain_480_960_2x_coco_20201013_epoch_24-1f70df0b.pth) |
| UniverseNet 20.08 | R2-50 | 1x | 5.5 | 23.6 | 47.5 | [model](https://github.com/shinya7y/UniverseNet/releases/download/20.08/universenet50_2008_fp16_4x4_mstrain_480_960_1x_coco_20200812_epoch_12-f522ede5.pth) |
| UniverseNet 20.08 | R2-50 | 2x | 5.5 | 23.6 | 48.5 | [model](https://github.com/shinya7y/UniverseNet/releases/download/20.08/universenet50_2008_fp16_4x4_mstrain_480_960_2x_coco_20200815_epoch_24-81356447.pth) |

- In addition to ATSS+SEPC, UniverseNet uses Res2Net-v1b-50, DCN, and multi-scale training (480-960).
- The settings for normalization layers (including whether to use iBN of SEPC) depend on the config files.
Expand All @@ -35,14 +38,25 @@ For fine-tuning from a COCO pre-trained model, please see [this example](univers
- Inference time (fps) is measured using the DCN ops in mmdet/ops (not mmcv/ops).


### Faster models

| Method | Test scale | Lr schd | Mem (GB) | Inf time (fps) | box AP | Download |
| :----------------: | :--------: | :-----: | :------: | :------------: | :----: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------: |
| UniverseNet 20.08f | (512, 512) | 1x | 7.0 | - | 42.0 | [model](https://github.com/shinya7y/UniverseNet/releases/download/20.10/universenet50_2008f_fp16_4x16_mstrain_320_640_1x_coco_20201023_epoch_12-869a669c.pth) |
| UniverseNet 20.08f | (512, 512) | 2x | 7.0 | - | 43.3 | [model](https://github.com/shinya7y/UniverseNet/releases/download/20.10/universenet50_2008f_fp16_4x16_mstrain_320_640_2x_coco_20201023_epoch_24-bf6a623b.pth) |

- 4 GPUs x 16 `samples_per_gpu`. You will be able to use BatchNorm with `norm_eval=False` even on 1 GPU.
- Good to detect large objects (APL > 60%).


### Test scale and test-dev AP

UniverseNet can achieve the EfficientDet-D4 level AP (val AP: 49.0, test-dev AP: 49.4) with 24 epochs training.

| Test scale | Inf time (fps) | box AP (val) | box AP (test-dev) |
| :---------: | :------------: | :----------: | :---------------: |
| (1333, 800) | 15.8 | 48.9 | 49.2 |
| (1600, 960) | 14.5 | 49.2 | 49.5 |
| Method | Test scale | Inf time (fps) | box AP (val) | box AP (test-dev) |
| :---------: | :---------: | :------------: | :----------: | :---------------: |
| UniverseNet | (1333, 800) | 15.8 | 48.9 | 49.2 |
| UniverseNet | (1600, 960) | 14.5 | 49.2 | 49.5 |

<!-- (1333, 800)
0.489 0.675 0.535 0.323 0.534 0.633
Expand All @@ -56,15 +70,14 @@ UniverseNet can achieve the EfficientDet-D4 level AP (val AP: 49.0, test-dev AP:

### Other hyperparameters and details for reproduction

| warmup_iters | lcconv_padding | GPUs x samples_per_gpu | box AP |
| :----------: | :------------: | :--------------------: | :----: |
| 500 | 0 | 4x4 -> 8x2 | 48.9 |
| 1000 | 1 | 4x4 | 48.9 |
| 3665 | 0 | 4x4 | 48.8 |
| Method | warmup_iters | lcconv_padding | GPUs x samples_per_gpu | box AP |
| :---------: | :----------: | :------------: | :--------------------: | :----: |
| UniverseNet | 500 | 0 | 4x4 -> 8x2 | 48.9 |
| UniverseNet | 1000 | 1 | 4x4 | 48.9 |
| UniverseNet | 3665 | 0 | 4x4 | 48.8 |

- The above checkpoints were trained with a `warmup_iters` of 500.
- The checkpoints in [release 20.06](https://github.com/shinya7y/UniverseNet/releases/tag/20.06) were trained with a `warmup_iters` of 500.
To make training more stable, the current config sets `warmup_iters` to 1000. The difference will not affect the final accuracy so much.
Your training is going well if the AP of the first epoch model is around 20-22.
- In the official SEPC implementation, padding values in lconv and cconv (we call `lcconv_padding`) are [set to 0](https://github.com/jshilong/SEPC/issues/13).
Setting `lcconv_padding` to 1 doesn't affect accuracy.
- To accelerate training for CVPR competitions, we used 8 GPUs for 9-24 epochs, after using 4 GPUs for 1-8 epochs.
19 changes: 19 additions & 0 deletions configs/universenet/ablation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# UniverseNet ablation experiments

This directory contains configs for research and analysis.
Please use non-ablated models for practical purposes.

## Results and Models

### Ablation from UniverseNet 20.08

| Method | Backbone | box AP |
| :-------------------------------- | :------------ | :----: |
| UniverseNet 20.08 | R2-50-v1b | 47.5 |
| UniverseNet 20.08 | R2-50 (orig.) | 46.3 |
| UniverseNet 20.08 | R-50-B | 44.7 |
| UniverseNet 20.08 | R-50-C | 45.8 |
| UniverseNet 20.08 w/o SEPC | R2-50-v1b | 45.8 |
| UniverseNet 20.08 w/o DCN | R2-50-v1b | 45.9 |
| UniverseNet 20.08 w/o mstrain | R2-50-v1b | 45.9 |
| UniverseNet 20.08 w/o SyncBN, iBN | R2-50-v1b | 45.8 |
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
_base_ = [
'../../_base_/models/universenet50_2008.py',
'../../_base_/datasets/coco_detection_mstrain_480_960.py',
'../../_base_/schedules/schedule_1x.py', '../../_base_/default_runtime.py'
]
model = dict(
pretrained=('https://shanghuagao.oss-cn-beijing.aliyuncs.com/res2net/'
'res2net50_26w_4s-06e79181.pth'),
backbone=dict(
type='Res2Net',
depth=50,
scales=4,
base_width=26,
num_stages=4,
out_indices=(0, 1, 2, 3),
deep_stem=False,
avg_down=False,
frozen_stages=1,
norm_cfg=dict(type='SyncBN', requires_grad=True),
norm_eval=False,
style='pytorch',
dcn=dict(type='DCN', deform_groups=1, fallback_on_stride=False),
stage_with_dcn=(False, False, False, True)))

data = dict(samples_per_gpu=4)

optimizer = dict(type='SGD', lr=0.01, momentum=0.9, weight_decay=0.0001)
optimizer_config = dict(
_delete_=True, grad_clip=dict(max_norm=35, norm_type=2))
lr_config = dict(warmup_iters=1000)

fp16 = dict(loss_scale=512.)
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

data = dict(samples_per_gpu=16)

# lr=0.01 for total batch size 16 (1 GPU * 16 samples_per_gpu)
# lr=0.04 for total batch size 64 (4 GPUs * 16 samples_per_gpu)
optimizer = dict(type='SGD', lr=0.04, momentum=0.9, weight_decay=0.0001)
optimizer_config = dict(
_delete_=True, grad_clip=dict(max_norm=35, norm_type=2))
Expand Down

0 comments on commit 8f2ddff

Please sign in to comment.