Skip to content

Commit 3362af4

Browse files
rentainhentianhe renntianhe ren
authored
Release detrex v0.2.0 (#127)
* set training seed * add 900 queries config for dab-deformable * add dab-deformable-detr new baseline * refine dab-deformable-detr configs * refine training results * refine ModelZoo * refine README * refine changelog Co-authored-by: ntianhe ren <[email protected]> Co-authored-by: ntianhe ren <[email protected]>
1 parent a11157f commit 3362af4

File tree

11 files changed

+76
-29
lines changed

11 files changed

+76
-29
lines changed

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,12 @@ The repo name detrex has several interpretations:
6060
- <font color=#008000> <b> de-t.rex </b> </font>: de means 'the' in Dutch. T.rex, also called Tyrannosaurus Rex, means 'king of the tyrant lizards' and connects to our research work 'DINO', which is short for Dinosaur.
6161

6262
## What's New
63-
v0.1.1 was released on 18/10/2022:
64-
- Add model analysis tools and benchmark in [tools](./tools/).
65-
- Support visualization on COCO eval results and annotations in [tools](./tools/)
66-
- Support [Group-DETR](./projects/group_detr/).
67-
- Release more DINO training results including `DINO-R50-24epochs`, `DINO-R101`, `DINO-Swin-Tiny`, `DINO-Swin-Small`, `DINO-Swin-Base`, `DINO-Swin-Large` in [DINO](./projects/dino/).
68-
- Release better `Deformable-DETR` baselines with **48.2 AP** on COCO dataset in [Deformable-DETR](./projects/deformable_detr/).
69-
63+
v0.2.0 was released on 13/11/2022:
64+
- Release new baselines for `DINO-R50-12ep`, `DINO-Swin-Large-36ep`, `DAB-Deformable-DETR-R50-50ep`, `DAB-Deformable-DETR-R50-Two-Stage`, please check [Model Zoo](https://detrex.readthedocs.io/en/latest/tutorials/Model_Zoo.html).
65+
- Rebuild a clearer config files for projects.
66+
- Support [H-Deformable-DETR](./projects/h_deformable_detr/)
67+
- Release H-Deformable-DETR pretrained weights including `H-Deformable-DETR-R50`, `H-Deformable-DETR-Swin-Tiny`, `H-Deformable-DETR-Swin-Large` in [H-Deformable-DETR](./projects/h_deformable_detr/)
68+
- Add demo for visualizing customized input images or videos using pretrained weights in [demo](./demo/)
7069

7170
Please see [changelog.md](./changlog.md) for details and release history.
7271

changlog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
## Change Log
22

3+
### v0.2.0 (13/11/2022)
4+
#### New Features
5+
- Rebuild a clearer config files for projects [#107](https://github.com/IDEA-Research/detrex/pull/107)
6+
- Support [H-Deformable-DETR](https://github.com/IDEA-Research/detrex/tree/main/projects/h_deformable_detr) [#110](https://github.com/IDEA-Research/detrex/pull/110)
7+
- Release H-Deformable-DETR pretrained weights including `H-Deformable-DETR-R50`, `H-Deformable-DETR-Swin-Tiny`, `H-Deformable-DETR-Swin-Large`.
8+
- Add demo for visualizing customized input images or videos using pretrained weights [#119](https://github.com/IDEA-Research/detrex/pull/119)
9+
- Release new baselines for `DINO-Swin-Large-36ep`, `DAB-Deformable-DETR-R50-50ep`, `DAB-Deformable-DETR-Two-Stage-50ep`, `H-DETR`.
10+
311
### v0.1.1 (18/10/2022)
412
#### New Features
513
- Add model analyze tools for detrex [#79](https://github.com/IDEA-Research/detrex/pull/79)

docs/source/changelog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
## Change Log
22

3+
### v0.2.0 (13/11/2022)
4+
#### New Features
5+
- Rebuild a clearer config files for projects [#107](https://github.com/IDEA-Research/detrex/pull/107)
6+
- Support [H-Deformable-DETR](https://github.com/IDEA-Research/detrex/tree/main/projects/h_deformable_detr) [#110](https://github.com/IDEA-Research/detrex/pull/110)
7+
- Release H-Deformable-DETR pretrained weights including `H-Deformable-DETR-R50`, `H-Deformable-DETR-Swin-Tiny`, `H-Deformable-DETR-Swin-Large`.
8+
- Add demo for visualizing customized input images or videos using pretrained weights [#119](https://github.com/IDEA-Research/detrex/pull/119)
9+
- Release new baselines for `DINO-Swin-Large-36ep`, `DAB-Deformable-DETR-R50-50ep`, `DAB-Deformable-DETR-Two-Stage-50ep`, `H-DETR`.
10+
311
### v0.1.1 (18/10/2022)
412
#### New Features
513
- Add model analyze tools for detrex [#79](https://github.com/IDEA-Research/detrex/pull/79)

docs/source/tutorials/Model_Zoo.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,15 @@ Here we provides our pretrained baselines with **detrex**. And more pretrained w
9393
<td align="center">R50</td>
9494
<td align="center">IN1k</td>
9595
<td align="center">50</td>
96-
<td align="center">48.87</td>
97-
<td align="center"> <a href="https://github.com/IDEA-Research/detrex-storage/releases/download/v0.1.0/dab_deformable_r50_50ep.pth"> model </a></td>
96+
<td align="center">49.01</td>
97+
<td align="center"> <a href="https://github.com/IDEA-Research/detrex-storage/releases/download/v0.2.0/dab_deformable_detr_r50_50ep_49AP.pth"> model </a></td>
9898
</tr>
9999
<tr><td align="left"> <a href="https://github.com/IDEA-Research/detrex/blob/main/projects/dab_deformable_detr/configs/dab_deformable_detr_r50_two_stage_50ep.py"> DAB-Deformable-DETR-R50-Two-Stage </a> </td>
100100
<td align="center">R50</td>
101101
<td align="center">IN1k</td>
102102
<td align="center">50</td>
103-
<td align="center">49.54</td>
104-
<td align="center"> <a href="https://github.com/IDEA-Research/detrex-storage/releases/download/v0.1.0/dab_deformable_r50_two_stage_50ep.pth"> model </a></td>
103+
<td align="center">49.70</td>
104+
<td align="center"> <a href="https://github.com/IDEA-Research/detrex-storage/releases/download/v0.2.0/dab_deformable_detr_r50_two_stage_49_7AP.pth"> model </a></td>
105105
</tr>
106106
</tbody></table>
107107

@@ -143,8 +143,8 @@ Here we provides our pretrained baselines with **detrex**. And more pretrained w
143143
<td align="center">IN1k</td>
144144
<td align="center">12</td>
145145
<td align="center">100</td>
146-
<td align="center">49.05</td>
147-
<td align="center"> <a href="https://github.com/IDEA-Research/detrex-storage/releases/download/v0.1.0/dino_r50_4scale_12ep.pth"> model </a></td>
146+
<td align="center">49.19</td>
147+
<td align="center"> <a href="https://github.com/IDEA-Research/detrex-storage/releases/download/v0.2.0/dino_r50_4scale_12ep_49_2AP.pth"> model </a></td>
148148
</tr>
149149
<tr><td align="left"> <a href="https://github.com/IDEA-Research/detrex/blob/main/projects/dino/configs/dino_r50_4scale_12ep_300dn.py"> DINO-R50-4Scale </a> </td>
150150
<td align="center">R50</td>

projects/dab_deformable_detr/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ Here we provide the pretrained `DAB-Deformable-DETR` weights based on detrex.
2525
<td align="center">R-50</td>
2626
<td align="center">IN1k</td>
2727
<td align="center">50</td>
28-
<td align="center">48.87</td>
29-
<td align="center"> <a href="https://github.com/IDEA-Research/detrex-storage/releases/download/v0.1.0/dab_deformable_r50_50ep.pth">model</a></td>
28+
<td align="center">49.01</td>
29+
<td align="center"> <a href="https://github.com/IDEA-Research/detrex-storage/releases/download/v0.2.0/dab_deformable_detr_r50_50ep_49AP.pth">model</a></td>
3030
</tr>
3131
<!-- ROW: dab_deformable_detr_r50_two_stage_50ep -->
3232
<tr><td align="left"><a href="configs/dab_deformable_detr_r50_two_stage_50ep.py">DAB-Deformable-DETR-R50-Two-Stage</a></td>
3333
<td align="center">R-50</td>
3434
<td align="center">IN1k</td>
3535
<td align="center">50</td>
36-
<td align="center">49.54</td>
37-
<td align="center"> <a href="https://github.com/IDEA-Research/detrex-storage/releases/download/v0.1.0/dab_deformable_r50_two_stage_50ep.pth">model</a></td>
36+
<td align="center">49.70</td>
37+
<td align="center"> <a href="https://github.com/IDEA-Research/detrex-storage/releases/download/v0.2.0/dab_deformable_detr_r50_two_stage_49_7AP.pth">model</a></td>
3838
</tr>
3939
</tbody></table>
4040

projects/dab_deformable_detr/configs/dab_deformable_detr_r50_50ep.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
train.init_checkpoint = "detectron2://ImageNetPretrained/torchvision/R-50.pkl"
1111
train.output_dir = "./output/dab_deformable_detr_r50_50ep"
1212

13+
# set training seed
14+
train.seed = 42
15+
1316
# max training iterations
1417
train.max_iter = 375000
1518

projects/dab_deformable_detr/configs/dab_deformable_detr_r50_two_stage_50ep.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,18 @@
66
model,
77
)
88

9-
# modify model config
10-
model.as_two_stage = True
11-
129
# modify training config
1310
train.init_checkpoint = "detectron2://ImageNetPretrained/torchvision/R-50.pkl"
1411
train.output_dir = "./output/dab_deformable_detr_r50_two_stage_50ep"
12+
13+
# modify model config
14+
model.as_two_stage = True
15+
16+
# modify loss weight dict
17+
# this is an hack implementation which will be improved in the future
18+
aux_weight_dict = {
19+
"loss_class_enc": 1.0,
20+
"loss_bbox_enc": 5.0,
21+
"loss_giou_enc": 2.0,
22+
}
23+
model.criterion.weight_dict.update(aux_weight_dict)
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
from .dab_deformable_detr_r50_50ep import (
2+
train,
3+
dataloader,
4+
optimizer,
5+
lr_multiplier,
6+
model,
7+
)
8+
9+
# modify training config
10+
train.init_checkpoint = "detectron2://ImageNetPretrained/torchvision/R-50.pkl"
11+
train.output_dir = "./output/dab_deformable_detr_r50_two_stage_50ep"
12+
13+
# add query nums
14+
model.num_queries = 900
15+
16+
# modify model config
17+
model.as_two_stage = True
18+
19+
# modify loss weight dict
20+
# this is an hack implementation which will be improved in the future
21+
aux_weight_dict = {
22+
"loss_class_enc": 1.0,
23+
"loss_bbox_enc": 5.0,
24+
"loss_giou_enc": 2.0,
25+
}
26+
model.criterion.weight_dict.update(aux_weight_dict)

projects/dab_deformable_detr/configs/models/dab_deformable_detr_r50.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,3 @@
113113
weight_dict.update(aux_weight_dict)
114114
model.criterion.weight_dict = weight_dict
115115

116-
if model.as_two_stage:
117-
weight_dict = model.criterion.weight_dict
118-
aux_weight_dict = {}
119-
aux_weight_dict.update({k + "_enc": v for k, v in base_weight_dict.items()})
120-
weight_dict.update(aux_weight_dict)
121-
model.criterion.weight_dict = weight_dict

projects/dino/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ Here we provide the pretrained `DINO` weights based on detrex.
2727
<td align="center">IN1k</td>
2828
<td align="center">12</td>
2929
<td align="center">100</td>
30-
<td align="center">49.05</td>
31-
<td align="center"> <a href="https://github.com/IDEA-Research/detrex-storage/releases/download/v0.1.0/dino_r50_4scale_12ep.pth">model</a></td>
30+
<td align="center">49.19</td>
31+
<td align="center"> <a href="https://github.com/IDEA-Research/detrex-storage/releases/download/v0.2.0/dino_r50_4scale_12ep_49_2AP.pth">model</a></td>
3232
</tr>
3333
<!-- ROW: dino_r50_4scale_12ep -->
3434
<tr><td align="left"><a href="configs/dino_r50_4cale_12ep.py">DINO-R50-4scale</a></td>

0 commit comments

Comments
 (0)