Skip to content

Commit b8957b3

Browse files
authored
add rtdetrv2 (#389)
1 parent 104afd3 commit b8957b3

File tree

126 files changed

+11884
-30
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+11884
-30
lines changed

README.md

Lines changed: 47 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,25 @@ English | [简体中文](README_cn.md)
2828

2929
---
3030

31+
32+
This is the official implementation of papers
33+
- [DETRs Beat YOLOs on Real-time Object Detection](https://arxiv.org/abs/2304.08069)
34+
- [RT-DETRv2: Improved Baseline with Bag-of-Freebies for Real-Time Detection Transformer](https://arxiv.org/abs/2407.17140)
35+
36+
37+
<details>
38+
<summary>Fig</summary>
39+
3140
<div align="center">
3241
<img src="https://github.com/lyuwenyu/RT-DETR/assets/77494834/0ede1dc1-a854-43b6-9986-cf9090f11a61" width=500 >
3342
</div>
3443

44+
</details>
3545

3646

3747

38-
This is the official implementation of the paper "[DETRs Beat YOLOs on Real-time Object Detection](https://arxiv.org/abs/2304.08069)".
39-
40-
4148
## 🚀 Updates
49+
- \[2024.07.24\] Release RT-DETRv2!
4250
- \[2024.02.27\] Our work has been accepted to CVPR 2024!
4351
- \[2024.01.23\] Fix difference on data augmentation with paper in rtdetr_pytorch [#84](https://github.com/lyuwenyu/RT-DETR/commit/5dc64138e439247b4e707dd6cebfe19d8d77f5b1).
4452
- \[2023.11.07\] Add pytorch ✅ *rtdetr_r34vd* for requests [#107](https://github.com/lyuwenyu/RT-DETR/issues/107), [#114](https://github.com/lyuwenyu/RT-DETR/issues/114).
@@ -56,33 +64,36 @@ This is the official implementation of the paper "[DETRs Beat YOLOs on Real-time
5664
- \[2023.04.17\] Release RT-DETR-R50, RT-DETR-R101, RT-DETR-L, RT-DETR-X.
5765

5866
## 📍 Implementations
59-
- 🔥 RT-DETR paddle: [code](./rtdetr_paddle), [weights](./rtdetr_paddle)
60-
- 🔥 RT-DETR pytorch: [code](./rtdetr_pytorch), [weights](./rtdetr_pytorch)
61-
62-
63-
| Model | Epoch | Input shape | Dataset | $AP^{val}$ | $AP^{val}_{50}$| Params(M) | FLOPs(G) | T4 TensorRT FP16(FPS)
64-
|:---:|:---:|:---:| :---:|:---:|:---:|:---:|:---:|:---:|
65-
| RT-DETR-R18 | 6x | 640 | COCO | 46.5 | 63.8 | 20 | 60 | 217 |
66-
| RT-DETR-R34 | 6x | 640 | COCO | 48.9 | 66.8 | 31 | 92 | 161 |
67-
| RT-DETR-R50-m | 6x | 640 | COCO | 51.3 | 69.6 | 36 | 100 | 145 |
68-
| RT-DETR-R50 | 6x | 640 | COCO | 53.1 | 71.3 | 42 | 136 | 108 |
69-
| RT-DETR-R101 | 6x | 640 | COCO | 54.3 | 72.7 | 76 | 259 | 74 |
70-
| RT-DETR-HGNetv2-L | 6x | 640 | COCO | 53.0 | 71.6 | 32 | 110 | 114 |
71-
| RT-DETR-HGNetv2-X | 6x | 640 | COCO | 54.8 | 73.1 | 67 | 234 | 74 |
72-
| RT-DETR-R18 | 5x | 640 | COCO + Objects365 | **49.2** | **66.6** | 20 | 60 | **217** |
73-
| RT-DETR-R50 | 2x | 640 | COCO + Objects365 | **55.3** | **73.4** | 42 | 136 | **108** |
74-
| RT-DETR-R101 | 2x | 640 | COCO + Objects365 | **56.2** | **74.6** | 76 | 259 | **74** |
67+
- 🔥 RT-DETRv2
68+
- paddle: [code&weight](./rtdetrv2_paddle/)
69+
- pytorch: [code&weight](./rtdetrv2_pytorch/)
70+
- 🔥 RT-DETR
71+
- paddle: [code&weight](./rtdetr_paddle)
72+
- pytorch: [code&weight](./rtdetr_pytorch)
73+
74+
75+
| Model | Input shape | Dataset | $AP^{val}$ | $AP^{val}_{50}$| Params(M) | FLOPs(G) | T4 TensorRT FP16(FPS)
76+
|:---:|:---:| :---:|:---:|:---:|:---:|:---:|:---:|
77+
| RT-DETR-R18 | 640 | COCO | 46.5 | 63.8 | 20 | 60 | 217 |
78+
| RT-DETR-R34 | 640 | COCO | 48.9 | 66.8 | 31 | 92 | 161 |
79+
| RT-DETR-R50-m | 640 | COCO | 51.3 | 69.6 | 36 | 100 | 145 |
80+
| RT-DETR-R50 | 640 | COCO | 53.1 | 71.3 | 42 | 136 | 108 |
81+
| RT-DETR-R101 | 640 | COCO | 54.3 | 72.7 | 76 | 259 | 74 |
82+
| RT-DETR-HGNetv2-L | 640 | COCO | 53.0 | 71.6 | 32 | 110 | 114 |
83+
| RT-DETR-HGNetv2-X | 640 | COCO | 54.8 | 73.1 | 67 | 234 | 74 |
84+
| RT-DETR-R18 | 640 | COCO + Objects365 | **49.2** | **66.6** | 20 | 60 | **217** |
85+
| RT-DETR-R50 | 640 | COCO + Objects365 | **55.3** | **73.4** | 42 | 136 | **108** |
86+
| RT-DETR-R101 | 640 | COCO + Objects365 | **56.2** | **74.6** | 76 | 259 | **74** |
87+
**RT-DETRv2-S** | 640 | COCO | **47.9** <font color=green>(+1.4)</font> | **64.9** | 20 | 60 | 217 |
88+
**RT-DETRv2-M** | 640 | COCO | **49.9** <font color=green>(+1.0)</font> | **67.5** | 31 | 92 | 161 |
89+
**RT-DETRv2-M**<sup>*<sup> | 640 | COCO | **51.9** <font color=green>(+0.6)</font> | **69.9** | 36 | 100 | 145 |
90+
**RT-DETRv2-L** | 640 | COCO | **53.4** <font color=green>(+0.3)</font> | **71.6** | 42 | 136 | 108 |
91+
**RT-DETRv2-X** | 640 | COCO | 54.3 | **72.8** <font color=green>(+0.1)</font> | 76 | 259| 74 |
7592

7693
**Notes:**
7794
- `COCO + Objects365` in the table means finetuned model on COCO using pretrained weights trained on Objects365.
7895

7996

80-
## 💡 Introduction
81-
We propose a **R**eal-**T**ime **DE**tection **TR**ansformer (RT-DETR, aka RTDETR), the first real-time end-to-end object detector to our best knowledge. Our RT-DETR-R50 / R101 achieves 53.1% / 54.3% AP on COCO and 108 / 74 FPS on T4 GPU, outperforming previously advanced YOLOs in both speed and accuracy. Furthermore, RT-DETR-R50 outperforms DINO-R50 by 2.2% AP in accuracy and about 21 times in FPS. After pre-training with Objects365, RT-DETR-R50 / R101 achieves 55.3% / 56.2% AP.
82-
<div align="center">
83-
<img src="https://github.com/lyuwenyu/RT-DETR/assets/77494834/c211a164-ddce-4084-8b71-fb73f29f363b" width=500 >
84-
</div>
85-
8697
## 🦄 Performance
8798

8899
### 🏕️ Complex Scenarios
@@ -96,7 +107,7 @@ We propose a **R**eal-**T**ime **DE**tection **TR**ansformer (RT-DETR, aka RTDET
96107
</div>
97108

98109
## Citation
99-
If you use `RT-DETR` in your work, please use the following BibTeX entries:
110+
If you use `RT-DETR` or `RTDETRv2` in your work, please use the following BibTeX entries:
100111
```
101112
@misc{lv2023detrs,
102113
title={DETRs Beat YOLOs on Real-time Object Detection},
@@ -106,4 +117,14 @@ If you use `RT-DETR` in your work, please use the following BibTeX entries:
106117
archivePrefix={arXiv},
107118
primaryClass={cs.CV}
108119
}
120+
121+
@misc{lv2024rtdetrv2improvedbaselinebagoffreebies,
122+
title={RT-DETRv2: Improved Baseline with Bag-of-Freebies for Real-Time Detection Transformer},
123+
author={Wenyu Lv and Yian Zhao and Qinyao Chang and Kui Huang and Guanzhong Wang and Yi Liu},
124+
year={2024},
125+
eprint={2407.17140},
126+
archivePrefix={arXiv},
127+
primaryClass={cs.CV},
128+
url={https://arxiv.org/abs/2407.17140},
129+
}
109130
```

README_cn.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,33 @@
22

33
# RT-DETR
44

5-
This is the official implementation of the paper "[DETRs Beat YOLOs on Real-time Object Detection](https://arxiv.org/abs/2304.08069)".
5+
文章"[DETRs Beat YOLOs on Real-time Object Detection](https://arxiv.org/abs/2304.08069)"和"[RT-DETRv2: Improved Baseline with Bag-of-Freebies for Real-Time Detection Transformer](https://arxiv.org/abs/2407.17140)"的官方实现.
6+
7+
<details>
8+
<summary>Fig</summary>
69

710
<div align="center">
811
<img src="https://github.com/lyuwenyu/RT-DETR/assets/77494834/0ede1dc1-a854-43b6-9986-cf9090f11a61" width=500 >
912
</div>
1013

11-
## 最新动态
14+
</details>
1215

16+
17+
## 最新动态
18+
- 发布RT-DETRv2系列模型
1319
- 发布RT-DETR-R50, RT-DETR-R101模型
1420
- 发布RT-DETR-R50-m模型(scale模型的范例)
1521
- 发布RT-DETR-R34, RT-DETR-R18模型
1622
- 发布RT-DETR-L, RT-DETR-X模型
1723

1824

1925
## 代码仓库
20-
- [RT-DETR-paddle](./rtdetr_paddle)
21-
- [RT-DETR--pytorch](./rtdetr_pytorch)
26+
- 🔥 RT-DETRv2
27+
- paddle: [code&weight](./rtdetrv2_paddle/)
28+
- pytorch: [code&weight](./rtdetrv2_pytorch/)
29+
- 🔥 RT-DETR
30+
- paddle: [code&weight](./rtdetr_paddle)
31+
- pytorch: [code&weight](./rtdetr_pytorch)
2232

2333

2434
## 简介
@@ -41,4 +51,14 @@ RT-DETR是第一个实时端到端目标检测器。具体而言,我们设计
4151
archivePrefix={arXiv},
4252
primaryClass={cs.CV}
4353
}
54+
55+
@misc{lv2024rtdetrv2improvedbaselinebagoffreebies,
56+
title={RT-DETRv2: Improved Baseline with Bag-of-Freebies for Real-Time Detection Transformer},
57+
author={Wenyu Lv and Yian Zhao and Qinyao Chang and Kui Huang and Guanzhong Wang and Yi Liu},
58+
year={2024},
59+
eprint={2407.17140},
60+
archivePrefix={arXiv},
61+
primaryClass={cs.CV},
62+
url={https://arxiv.org/abs/2407.17140},
63+
}
4464
```

rtdetrv2_paddle/readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
see https://github.com/PaddlePaddle/PaddleDetection

rtdetrv2_pytorch/README.md

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
2+
## Quick start
3+
4+
<details open>
5+
<summary>Setup</summary>
6+
7+
```shell
8+
9+
pip install -r requirements.txt
10+
```
11+
12+
The following is the corresponding `torch` and `torchvision` versions.
13+
`rtdetr` | `torch` | `torchvision`
14+
|---|---|---|
15+
| `-` | `2.2` | `0.17` |
16+
| `-` | `2.1` | `0.16` |
17+
| `-` | `2.0` | `0.15` |
18+
19+
</details>
20+
21+
22+
23+
## Model Zoo
24+
25+
### Base models
26+
27+
| Model | Dataset | Input Size | AP<sup>val</sup> | AP<sub>50</sub><sup>val</sup> | #Params(M) | FPS | config| checkpoint |
28+
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |:---: |
29+
**RT-DETRv2-S** | COCO | 640 | **47.9** <font color=green>(+1.4)</font> | **64.9** | 20 | 217 | [config](./configs/rtdetrv2/rtdetrv2_r18vd_120e_coco.yml) | [url](https://github.com/lyuwenyu/storage/releases/download/v0.1/rtdetrv2_r18vd_120e_coco.pth) |
30+
**RT-DETRv2-M** | COCO | 640 | **49.9** <font color=green>(+1.0)</font> | **67.5** | 31 | 161 | [config](./configs/rtdetrv2/rtdetrv2_r34vd_120e_coco.yml) | [url](https://github.com/lyuwenyu/storage/releases/download/v0.1/rtdetrv2_r34vd_120e_coco_ema.pth)
31+
**RT-DETRv2-M**<sup>*<sup> | COCO | 640 | **51.9** <font color=green>(+0.6)</font> | **69.9** | 36 | 145 | [config](./configs/rtdetrv2/rtdetrv2_r50vd_m_7x_coco.yml) | [url](https://github.com/lyuwenyu/storage/releases/download/v0.1/rtdetrv2_r50vd_m_7x_coco_ema.pth)
32+
**RT-DETRv2-L** | COCO | 640 | **53.4** <font color=green>(+0.3)</font> | **71.6** | 42 | 108 | [config](./configs/rtdetrv2/rtdetrv2_r50vd_6x_coco.yml) | [url](https://github.com/lyuwenyu/storage/releases/download/v0.1/rtdetrv2_r50vd_6x_coco_ema.pth)
33+
**RT-DETRv2-X** | COCO | 640 | 54.3 | **72.8** <font color=green>(+0.1)</font> | 76 | 74 | [config](./configs/rtdetrv2/rtdetrv2_r101vd_6x_coco.yml) | [url](https://github.com/lyuwenyu/storage/releases/download/v0.1/rtdetrv2_r101vd_6x_coco_from_paddle.pth)
34+
<!-- rtdetrv2_hgnetv2_l | COCO | 640 | 52.9 | 71.5 | 32 | 114 | [url<sup>*</sup>](https://github.com/lyuwenyu/storage/releases/download/v0.1/rtdetrv2_hgnetv2_l_6x_coco_from_paddle.pth)
35+
rtdetrv2_hgnetv2_x | COCO | 640 | 54.7 | 72.9 | 67 | 74 | [url<sup>*</sup>](https://github.com/lyuwenyu/storage/releases/download/v0.1/rtdetrv2_hgnetv2_x_6x_coco_from_paddle.pth)
36+
rtdetrv2_hgnetv2_h | COCO | 640 | 56.3 | 74.8 | 123 | 40 | [url<sup>*</sup>](https://github.com/lyuwenyu/storage/releases/download/v0.1/rtdetrv2_hgnetv2_h_6x_coco_from_paddle.pth)
37+
rtdetrv2_18vd | COCO+Objects365 | 640 | 49.0 | 66.5 | 20 | 217 | [url<sup>*</sup>](https://github.com/lyuwenyu/storage/releases/download/v0.1/rtdetrv2_r18vd_5x_coco_objects365_from_paddle.pth)
38+
rtdetrv2_r50vd | COCO+Objects365 | 640 | 55.2 | 73.4 | 42 | 108 | [url<sup>*</sup>](https://github.com/lyuwenyu/storage/releases/download/v0.1/rtdetrv2_r50vd_2x_coco_objects365_from_paddle.pth)
39+
rtdetrv2_r101vd | COCO+Objects365 | 640 | 56.2 | 74.5 | 76 | 74 | [url<sup>*</sup>](https://github.com/lyuwenyu/storage/releases/download/v0.1/rtdetrv2_r101vd_2x_coco_objects365_from_paddle.pth)
40+
-->
41+
42+
**Notes:**
43+
- `AP` is evaluated on *MSCOCO val2017* dataset.
44+
- `FPS` is evaluated on a single T4 GPU with $batch\\_size = 1$, $fp16$, and $TensorRT>=8.5.1$.
45+
- `COCO + Objects365` in the table means finetuned model on `COCO` using pretrained weights trained on `Objects365`.
46+
47+
48+
49+
### Models of discrete sampling
50+
51+
| Model | Sampling Method | AP<sup>val</sup> | AP<sub>50</sub><sup>val</sup> | config| checkpoint
52+
| :---: | :---: | :---: | :---: | :---: | :---: |
53+
**RT-DETRv2-S_dsp** | discrete_sampling | 47.4 | 64.8 <font color=red>(-0.1)</font> | [config](./configs/rtdetrv2/rtdetrv2_r18vd_dsp_3x_coco.yml) | [url](https://github.com/lyuwenyu/storage/releases/download/v0.1/rtdetrv2_r18vd_dsp_3x_coco.pth)
54+
**RT-DETRv2-M_dsp** | discrete_sampling | 49.2 | 67.1 <font color=red>(-0.4)</font> | [config](./configs/rtdetrv2/rtdetrv2_r34vd_dsp_1x_coco.yml) | [url](https://github.com/lyuwenyu/storage/releases/download/v0.1/rrtdetrv2_r34vd_dsp_1x_coco.pth)
55+
**RT-DETRv2-M**<sup>*</sup>**_dsp** | discrete_sampling | 51.4 | 69.7 <font color=red>(-0.2)</font> | [config](./configs/rtdetrv2/rtdetrv2_r50vd_m_dsp_3x_coco.yml) | [url](https://github.com/lyuwenyu/storage/releases/download/v0.1/rtdetrv2_r50vd_m_dsp_3x_coco.pth)
56+
**RT-DETRv2-L_dsp** | discrete_sampling | 52.9 | 71.3 <font color=red>(-0.3)</font> |[config](./configs/rtdetrv2/rtdetrv2_r50vd_dsp_1x_coco.yml)| [url](https://github.com/lyuwenyu/storage/releases/download/v0.1/rtdetrv2_r50vd_dsp_1x_coco.pth)
57+
58+
59+
<!-- **rtdetrv2_r18vd_dsp1** | discrete_sampling | 21600 | 46.3 | 63.9 | [url](https://github.com/lyuwenyu/storage/releases/download/v0.1/rtdetrv2_r18vd_dsp1_1x_coco.pth) -->
60+
61+
<!-- rtdetrv2_r18vd_dsp1 | discrete_sampling | 21600 | 45.5 | 63.0 | 4.34 | [url](https://github.com/lyuwenyu/storage/releases/download/v0.1/rtdetrv2_r18vd_dsp1_120e_coco.pth) -->
62+
<!-- 4.3 -->
63+
64+
**Notes:**
65+
- The impact on inference speed is related to specific device and software.
66+
- `*_dsp*` is the model inherit `*_sp*` model's knowledge and adapt to `discrete_sampling` strategy. **You can use TensorRT 8.4 (or even older versions) to inference for these models**
67+
<!-- - `grid_sampling` use `grid_sample` to sample attention map, `discrete_sampling` use `index_select` method to sample attention map. -->
68+
69+
70+
### Ablation on sampling points
71+
72+
<!-- Flexible samping strategy in cross attenstion layer for devices that do **not** optimize (or not support) `grid_sampling` well. You can choose models based on specific scenarios and the trade-off between speed and accuracy. -->
73+
74+
| Model | Sampling Method | #Points | AP<sup>val</sup> | AP<sub>50</sub><sup>val</sup> | checkpoint
75+
| :---: | :---: | :---: | :---: | :---: | :---: |
76+
**rtdetrv2_r18vd_sp1** | grid_sampling | 21,600 | 47.3 | 64.3 <font color=red>(-0.6) | [url](https://github.com/lyuwenyu/storage/releases/download/v0.1/rtdetrv2_r18vd_sp1_120e_coco.pth)
77+
**rtdetrv2_r18vd_sp2** | grid_sampling | 43,200 | 47.7 | 64.7 <font color=red>(-0.2) | [url](https://github.com/lyuwenyu/storage/releases/download/v0.1/rtdetrv2_r18vd_sp2_120e_coco.pth)
78+
**rtdetrv2_r18vd_sp3** | grid_sampling | 64,800 | 47.8 | 64.8 <font color=red>(-0.1) | [url](https://github.com/lyuwenyu/storage/releases/download/v0.1/rtdetrv2_r18vd_sp3_120e_coco.pth)
79+
rtdetrv2_r18vd(_sp4)| grid_sampling | 86,400 | 47.9 | 64.9 | [url](https://github.com/lyuwenyu/storage/releases/download/v0.1/rtdetrv2_r18vd_120e_coco.pth)
80+
81+
**Notes:**
82+
- The impact on inference speed is related to specific device and software.
83+
- `#points` the total number of sampling points in decoder for per image inference.
84+
85+
86+
## Usage
87+
<details>
88+
<summary> details </summary>
89+
90+
<!-- <summary>1. Training </summary> -->
91+
1. Training
92+
```shell
93+
CUDA_VISIBLE_DEVICES=0,1,2,3 torchrun --master_port=9909 --nproc_per_node=4 tools/train.py -c path/to/config --use-amp --seed=0 &> log.txt 2>&1 &
94+
```
95+
96+
<!-- <summary>2. Testing </summary> -->
97+
2. Testing
98+
```shell
99+
CUDA_VISIBLE_DEVICES=0,1,2,3 torchrun --master_port=9909 --nproc_per_node=4 tools/train.py -c path/to/config -r path/to/checkpoint --test-only
100+
```
101+
102+
<!-- <summary>3. Tuning </summary> -->
103+
3. Tuning
104+
```shell
105+
CUDA_VISIBLE_DEVICES=0,1,2,3 torchrun --master_port=9909 --nproc_per_node=4 tools/train.py -c path/to/config -t path/to/checkpoint --use-amp --seed=0 &> log.txt 2>&1 &
106+
```
107+
108+
<!-- <summary>4. Export onnx </summary> -->
109+
4. Export onnx
110+
```shell
111+
python tools/export_onnx.py -c path/to/config -r path/to/checkpoint --check
112+
```
113+
114+
<!-- <summary>5. Inference </summary> -->
115+
5. Inference
116+
117+
Support torch, onnxruntime, tensorrt and openvino, see details in *references/deploy*
118+
```shell
119+
python references/deploy/rtdetrv2_onnx.py --onnx-file=model.onnx --im-file=xxxx
120+
python references/deploy/rtdetrv2_tensorrt.py --trt-file=model.trt --im-file=xxxx
121+
python references/deploy/rtdetrv2_torch.py -c path/to/config -r path/to/checkpoint --im-file=xxx --device=cuda:0
122+
```
123+
</details>
124+
125+
126+
127+
## Citation
128+
If you use `RTDETR` or `RTDETRv2` in your work, please use the following BibTeX entries:
129+
130+
<details>
131+
<summary> bibtex </summary>
132+
133+
```latex
134+
@misc{lv2023detrs,
135+
title={DETRs Beat YOLOs on Real-time Object Detection},
136+
author={Wenyu Lv and Shangliang Xu and Yian Zhao and Guanzhong Wang and Jinman Wei and Cheng Cui and Yuning Du and Qingqing Dang and Yi Liu},
137+
year={2023},
138+
eprint={2304.08069},
139+
archivePrefix={arXiv},
140+
primaryClass={cs.CV}
141+
}
142+
143+
@misc{lv2024rtdetrv2improvedbaselinebagoffreebies,
144+
title={RT-DETRv2: Improved Baseline with Bag-of-Freebies for Real-Time Detection Transformer},
145+
author={Wenyu Lv and Yian Zhao and Qinyao Chang and Kui Huang and Guanzhong Wang and Yi Liu},
146+
year={2024},
147+
eprint={2407.17140},
148+
archivePrefix={arXiv},
149+
primaryClass={cs.CV},
150+
url={https://arxiv.org/abs/2407.17140},
151+
}
152+
```
153+
</details>
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
task: detection
2+
3+
evaluator:
4+
type: CocoEvaluator
5+
iou_types: ['bbox', ]
6+
7+
# num_classes: 365
8+
# remap_mscoco_category: False
9+
10+
# num_classes: 91
11+
# remap_mscoco_category: False
12+
13+
num_classes: 80
14+
remap_mscoco_category: True
15+
16+
17+
train_dataloader:
18+
type: DataLoader
19+
dataset:
20+
type: CocoDetection
21+
img_folder: ./dataset/coco/train2017/
22+
ann_file: ./dataset/coco/annotations/instances_train2017.json
23+
return_masks: False
24+
transforms:
25+
type: Compose
26+
ops: ~
27+
shuffle: True
28+
num_workers: 4
29+
drop_last: True
30+
collate_fn:
31+
type: BatchImageCollateFuncion
32+
33+
34+
val_dataloader:
35+
type: DataLoader
36+
dataset:
37+
type: CocoDetection
38+
img_folder: ./dataset/coco/val2017/
39+
ann_file: ./dataset/coco/annotations/instances_val2017.json
40+
return_masks: False
41+
transforms:
42+
type: Compose
43+
ops: ~
44+
shuffle: False
45+
num_workers: 4
46+
drop_last: False
47+
collate_fn:
48+
type: BatchImageCollateFuncion

0 commit comments

Comments
 (0)