TLMHoang commited on
Commit
4f2a3dd
·
verified ·
1 Parent(s): 63eb2d3

Delete mmdet_code/SR-TOD

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. mmdet_code/SR-TOD/CITATION.cff +0 -8
  2. mmdet_code/SR-TOD/LICENSE +0 -203
  3. mmdet_code/SR-TOD/MANIFEST.in +0 -7
  4. mmdet_code/SR-TOD/README.md +0 -59
  5. mmdet_code/SR-TOD/configs/_base_/datasets/ade20k_instance.py +0 -53
  6. mmdet_code/SR-TOD/configs/_base_/datasets/ade20k_panoptic.py +0 -38
  7. mmdet_code/SR-TOD/configs/_base_/datasets/ade20k_semantic.py +0 -48
  8. mmdet_code/SR-TOD/configs/_base_/datasets/cityscapes_detection.py +0 -84
  9. mmdet_code/SR-TOD/configs/_base_/datasets/cityscapes_instance.py +0 -113
  10. mmdet_code/SR-TOD/configs/_base_/datasets/coco_caption.py +0 -60
  11. mmdet_code/SR-TOD/configs/_base_/datasets/coco_detection_aitod.py +0 -96
  12. mmdet_code/SR-TOD/configs/_base_/datasets/coco_detection_dota.py +0 -96
  13. mmdet_code/SR-TOD/configs/_base_/datasets/coco_detection_drones.py +0 -96
  14. mmdet_code/SR-TOD/configs/_base_/datasets/coco_detection_visdrone.py +0 -96
  15. mmdet_code/SR-TOD/configs/_base_/datasets/coco_instance.py +0 -95
  16. mmdet_code/SR-TOD/configs/_base_/datasets/coco_instance_semantic.py +0 -78
  17. mmdet_code/SR-TOD/configs/_base_/datasets/coco_panoptic.py +0 -94
  18. mmdet_code/SR-TOD/configs/_base_/datasets/coco_semantic.py +0 -78
  19. mmdet_code/SR-TOD/configs/_base_/datasets/deepfashion.py +0 -95
  20. mmdet_code/SR-TOD/configs/_base_/datasets/dsdl.py +0 -62
  21. mmdet_code/SR-TOD/configs/_base_/datasets/isaid_instance.py +0 -59
  22. mmdet_code/SR-TOD/configs/_base_/datasets/lvis_v0.5_instance.py +0 -79
  23. mmdet_code/SR-TOD/configs/_base_/datasets/lvis_v1_instance.py +0 -22
  24. mmdet_code/SR-TOD/configs/_base_/datasets/mot_challenge.py +0 -90
  25. mmdet_code/SR-TOD/configs/_base_/datasets/mot_challenge_det.py +0 -66
  26. mmdet_code/SR-TOD/configs/_base_/datasets/mot_challenge_reid.py +0 -61
  27. mmdet_code/SR-TOD/configs/_base_/datasets/objects365v1_detection.py +0 -74
  28. mmdet_code/SR-TOD/configs/_base_/datasets/objects365v2_detection.py +0 -73
  29. mmdet_code/SR-TOD/configs/_base_/datasets/openimages_detection.py +0 -81
  30. mmdet_code/SR-TOD/configs/_base_/datasets/refcoco+.py +0 -55
  31. mmdet_code/SR-TOD/configs/_base_/datasets/refcoco.py +0 -55
  32. mmdet_code/SR-TOD/configs/_base_/datasets/refcocog.py +0 -55
  33. mmdet_code/SR-TOD/configs/_base_/datasets/semi_coco_detection.py +0 -178
  34. mmdet_code/SR-TOD/configs/_base_/datasets/voc0712.py +0 -92
  35. mmdet_code/SR-TOD/configs/_base_/datasets/wider_face.py +0 -73
  36. mmdet_code/SR-TOD/configs/_base_/datasets/youtube_vis.py +0 -66
  37. mmdet_code/SR-TOD/configs/_base_/default_runtime.py +0 -25
  38. mmdet_code/SR-TOD/configs/_base_/models/cascade-mask-rcnn_r50_fpn.py +0 -203
  39. mmdet_code/SR-TOD/configs/_base_/models/cascade-rcnn_r50_fpn.py +0 -280
  40. mmdet_code/SR-TOD/configs/_base_/models/fast-rcnn_r50_fpn.py +0 -68
  41. mmdet_code/SR-TOD/configs/_base_/models/faster-rcnn_r50-caffe-c4.py +0 -123
  42. mmdet_code/SR-TOD/configs/_base_/models/faster-rcnn_r50-caffe-dc5.py +0 -111
  43. mmdet_code/SR-TOD/configs/_base_/models/faster-rcnn_r50_fpn.py +0 -168
  44. mmdet_code/SR-TOD/configs/_base_/models/mask-rcnn_r50-caffe-c4.py +0 -132
  45. mmdet_code/SR-TOD/configs/_base_/models/mask-rcnn_r50_fpn.py +0 -127
  46. mmdet_code/SR-TOD/configs/_base_/models/retinanet_r50_fpn copy.py +0 -68
  47. mmdet_code/SR-TOD/configs/_base_/models/retinanet_r50_fpn.py +0 -78
  48. mmdet_code/SR-TOD/configs/_base_/models/rpn_r50-caffe-c4.py +0 -64
  49. mmdet_code/SR-TOD/configs/_base_/models/rpn_r50_fpn.py +0 -64
  50. mmdet_code/SR-TOD/configs/_base_/models/ssd300.py +0 -63
mmdet_code/SR-TOD/CITATION.cff DELETED
@@ -1,8 +0,0 @@
1
- cff-version: 1.2.0
2
- message: "If you use this software, please cite it as below."
3
- authors:
4
- - name: "MMDetection Contributors"
5
- title: "OpenMMLab Detection Toolbox and Benchmark"
6
- date-released: 2018-08-22
7
- url: "https://github.com/open-mmlab/mmdetection"
8
- license: Apache-2.0
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/LICENSE DELETED
@@ -1,203 +0,0 @@
1
- Copyright 2018-2023 OpenMMLab. All rights reserved.
2
-
3
- Apache License
4
- Version 2.0, January 2004
5
- http://www.apache.org/licenses/
6
-
7
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
-
9
- 1. Definitions.
10
-
11
- "License" shall mean the terms and conditions for use, reproduction,
12
- and distribution as defined by Sections 1 through 9 of this document.
13
-
14
- "Licensor" shall mean the copyright owner or entity authorized by
15
- the copyright owner that is granting the License.
16
-
17
- "Legal Entity" shall mean the union of the acting entity and all
18
- other entities that control, are controlled by, or are under common
19
- control with that entity. For the purposes of this definition,
20
- "control" means (i) the power, direct or indirect, to cause the
21
- direction or management of such entity, whether by contract or
22
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
23
- outstanding shares, or (iii) beneficial ownership of such entity.
24
-
25
- "You" (or "Your") shall mean an individual or Legal Entity
26
- exercising permissions granted by this License.
27
-
28
- "Source" form shall mean the preferred form for making modifications,
29
- including but not limited to software source code, documentation
30
- source, and configuration files.
31
-
32
- "Object" form shall mean any form resulting from mechanical
33
- transformation or translation of a Source form, including but
34
- not limited to compiled object code, generated documentation,
35
- and conversions to other media types.
36
-
37
- "Work" shall mean the work of authorship, whether in Source or
38
- Object form, made available under the License, as indicated by a
39
- copyright notice that is included in or attached to the work
40
- (an example is provided in the Appendix below).
41
-
42
- "Derivative Works" shall mean any work, whether in Source or Object
43
- form, that is based on (or derived from) the Work and for which the
44
- editorial revisions, annotations, elaborations, or other modifications
45
- represent, as a whole, an original work of authorship. For the purposes
46
- of this License, Derivative Works shall not include works that remain
47
- separable from, or merely link (or bind by name) to the interfaces of,
48
- the Work and Derivative Works thereof.
49
-
50
- "Contribution" shall mean any work of authorship, including
51
- the original version of the Work and any modifications or additions
52
- to that Work or Derivative Works thereof, that is intentionally
53
- submitted to Licensor for inclusion in the Work by the copyright owner
54
- or by an individual or Legal Entity authorized to submit on behalf of
55
- the copyright owner. For the purposes of this definition, "submitted"
56
- means any form of electronic, verbal, or written communication sent
57
- to the Licensor or its representatives, including but not limited to
58
- communication on electronic mailing lists, source code control systems,
59
- and issue tracking systems that are managed by, or on behalf of, the
60
- Licensor for the purpose of discussing and improving the Work, but
61
- excluding communication that is conspicuously marked or otherwise
62
- designated in writing by the copyright owner as "Not a Contribution."
63
-
64
- "Contributor" shall mean Licensor and any individual or Legal Entity
65
- on behalf of whom a Contribution has been received by Licensor and
66
- subsequently incorporated within the Work.
67
-
68
- 2. Grant of Copyright License. Subject to the terms and conditions of
69
- this License, each Contributor hereby grants to You a perpetual,
70
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
71
- copyright license to reproduce, prepare Derivative Works of,
72
- publicly display, publicly perform, sublicense, and distribute the
73
- Work and such Derivative Works in Source or Object form.
74
-
75
- 3. Grant of Patent License. Subject to the terms and conditions of
76
- this License, each Contributor hereby grants to You a perpetual,
77
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
78
- (except as stated in this section) patent license to make, have made,
79
- use, offer to sell, sell, import, and otherwise transfer the Work,
80
- where such license applies only to those patent claims licensable
81
- by such Contributor that are necessarily infringed by their
82
- Contribution(s) alone or by combination of their Contribution(s)
83
- with the Work to which such Contribution(s) was submitted. If You
84
- institute patent litigation against any entity (including a
85
- cross-claim or counterclaim in a lawsuit) alleging that the Work
86
- or a Contribution incorporated within the Work constitutes direct
87
- or contributory patent infringement, then any patent licenses
88
- granted to You under this License for that Work shall terminate
89
- as of the date such litigation is filed.
90
-
91
- 4. Redistribution. You may reproduce and distribute copies of the
92
- Work or Derivative Works thereof in any medium, with or without
93
- modifications, and in Source or Object form, provided that You
94
- meet the following conditions:
95
-
96
- (a) You must give any other recipients of the Work or
97
- Derivative Works a copy of this License; and
98
-
99
- (b) You must cause any modified files to carry prominent notices
100
- stating that You changed the files; and
101
-
102
- (c) You must retain, in the Source form of any Derivative Works
103
- that You distribute, all copyright, patent, trademark, and
104
- attribution notices from the Source form of the Work,
105
- excluding those notices that do not pertain to any part of
106
- the Derivative Works; and
107
-
108
- (d) If the Work includes a "NOTICE" text file as part of its
109
- distribution, then any Derivative Works that You distribute must
110
- include a readable copy of the attribution notices contained
111
- within such NOTICE file, excluding those notices that do not
112
- pertain to any part of the Derivative Works, in at least one
113
- of the following places: within a NOTICE text file distributed
114
- as part of the Derivative Works; within the Source form or
115
- documentation, if provided along with the Derivative Works; or,
116
- within a display generated by the Derivative Works, if and
117
- wherever such third-party notices normally appear. The contents
118
- of the NOTICE file are for informational purposes only and
119
- do not modify the License. You may add Your own attribution
120
- notices within Derivative Works that You distribute, alongside
121
- or as an addendum to the NOTICE text from the Work, provided
122
- that such additional attribution notices cannot be construed
123
- as modifying the License.
124
-
125
- You may add Your own copyright statement to Your modifications and
126
- may provide additional or different license terms and conditions
127
- for use, reproduction, or distribution of Your modifications, or
128
- for any such Derivative Works as a whole, provided Your use,
129
- reproduction, and distribution of the Work otherwise complies with
130
- the conditions stated in this License.
131
-
132
- 5. Submission of Contributions. Unless You explicitly state otherwise,
133
- any Contribution intentionally submitted for inclusion in the Work
134
- by You to the Licensor shall be under the terms and conditions of
135
- this License, without any additional terms or conditions.
136
- Notwithstanding the above, nothing herein shall supersede or modify
137
- the terms of any separate license agreement you may have executed
138
- with Licensor regarding such Contributions.
139
-
140
- 6. Trademarks. This License does not grant permission to use the trade
141
- names, trademarks, service marks, or product names of the Licensor,
142
- except as required for reasonable and customary use in describing the
143
- origin of the Work and reproducing the content of the NOTICE file.
144
-
145
- 7. Disclaimer of Warranty. Unless required by applicable law or
146
- agreed to in writing, Licensor provides the Work (and each
147
- Contributor provides its Contributions) on an "AS IS" BASIS,
148
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
149
- implied, including, without limitation, any warranties or conditions
150
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
151
- PARTICULAR PURPOSE. You are solely responsible for determining the
152
- appropriateness of using or redistributing the Work and assume any
153
- risks associated with Your exercise of permissions under this License.
154
-
155
- 8. Limitation of Liability. In no event and under no legal theory,
156
- whether in tort (including negligence), contract, or otherwise,
157
- unless required by applicable law (such as deliberate and grossly
158
- negligent acts) or agreed to in writing, shall any Contributor be
159
- liable to You for damages, including any direct, indirect, special,
160
- incidental, or consequential damages of any character arising as a
161
- result of this License or out of the use or inability to use the
162
- Work (including but not limited to damages for loss of goodwill,
163
- work stoppage, computer failure or malfunction, or any and all
164
- other commercial damages or losses), even if such Contributor
165
- has been advised of the possibility of such damages.
166
-
167
- 9. Accepting Warranty or Additional Liability. While redistributing
168
- the Work or Derivative Works thereof, You may choose to offer,
169
- and charge a fee for, acceptance of support, warranty, indemnity,
170
- or other liability obligations and/or rights consistent with this
171
- License. However, in accepting such obligations, You may act only
172
- on Your own behalf and on Your sole responsibility, not on behalf
173
- of any other Contributor, and only if You agree to indemnify,
174
- defend, and hold each Contributor harmless for any liability
175
- incurred by, or claims asserted against, such Contributor by reason
176
- of your accepting any such warranty or additional liability.
177
-
178
- END OF TERMS AND CONDITIONS
179
-
180
- APPENDIX: How to apply the Apache License to your work.
181
-
182
- To apply the Apache License to your work, attach the following
183
- boilerplate notice, with the fields enclosed by brackets "[]"
184
- replaced with your own identifying information. (Don't include
185
- the brackets!) The text should be enclosed in the appropriate
186
- comment syntax for the file format. We also recommend that a
187
- file or class name and description of purpose be included on the
188
- same "printed page" as the copyright notice for easier
189
- identification within third-party archives.
190
-
191
- Copyright 2018-2023 OpenMMLab.
192
-
193
- Licensed under the Apache License, Version 2.0 (the "License");
194
- you may not use this file except in compliance with the License.
195
- You may obtain a copy of the License at
196
-
197
- http://www.apache.org/licenses/LICENSE-2.0
198
-
199
- Unless required by applicable law or agreed to in writing, software
200
- distributed under the License is distributed on an "AS IS" BASIS,
201
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
202
- See the License for the specific language governing permissions and
203
- limitations under the License.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/MANIFEST.in DELETED
@@ -1,7 +0,0 @@
1
- include requirements/*.txt
2
- include mmdet/VERSION
3
- include mmdet/.mim/model-index.yml
4
- include mmdet/.mim/dataset-index.yml
5
- include mmdet/.mim/demo/*/*
6
- recursive-include mmdet/.mim/configs *.py *.yml
7
- recursive-include mmdet/.mim/tools *.sh *.py
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/README.md DELETED
@@ -1,59 +0,0 @@
1
- # SR-TOD
2
-
3
- # Introduce
4
-
5
- This is the official code for the paper Visible and Clear: Finding Tiny Objects in Difference Map.
6
-
7
- The link to the paper is https://arxiv.org/abs/2405.11276.
8
-
9
- This project is built based on mmdetection 3.1 and mmcv 2.0.1.
10
-
11
- **NOTE: Our paper has been accepted by ECCV 2024.**
12
-
13
- # Environment
14
-
15
- pytorch 1.12.0
16
-
17
- torchvision 0.13.0
18
-
19
- mmdetection 3.1
20
-
21
- mmcv 2.0.1
22
-
23
- The installation and usage of mmdetection can be referred to at the following link: https://mmdetection.readthedocs.io/en/latest/get_started.html.
24
-
25
- To use the AI-TOD evaluation metrics, you need to download aitodpycocotools. You can install it using the following command:
26
-
27
- ```shell
28
- pip install "git+https://github.com/jwwangchn/cocoapi-aitod.git#subdirectory=aitodpycocotools"
29
- ```
30
-
31
- For other environment requirements, please refer to mmdetection.
32
-
33
-
34
- # Training and Test
35
- The training and test commands can also be referenced from mmdetection.
36
-
37
- 1 gpu:
38
-
39
- ```shell
40
- python tools/train.py ./srtod_project/srtod_cascade_rcnn/config/srtod-cascade-rcnn_r50_fpn_1x_coco.py
41
- ```
42
- ```shell
43
- python tools/test.py ./srtod_project/srtod_cascade_rcnn/config/srtod-cascade-rcnn_r50_fpn_1x_coco.py your_model.pth
44
- ```
45
-
46
- If you need to use more GPUs, you should use ./tools/dist_train.sh instead of tools/train.py.
47
-
48
- # DroneSwarms
49
- If you want to access the DroneSwarms dataset, please visit the following link:[DroneSwarms](https://hiyuur.github.io)
50
-
51
- # Reference
52
- ```shell
53
- @article{cao2024visible,
54
- title={Visible and Clear: Finding Tiny Objects in Difference Map},
55
- author={Cao, Bing and Yao, Haiyu and Zhu, Pengfei and Hu, Qinghua},
56
- journal={arXiv preprint arXiv:2405.11276},
57
- year={2024}
58
- }
59
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/datasets/ade20k_instance.py DELETED
@@ -1,53 +0,0 @@
1
- # dataset settings
2
- dataset_type = 'ADE20KInstanceDataset'
3
- data_root = 'data/ADEChallengeData2016/'
4
-
5
- # Example to use different file client
6
- # Method 1: simply set the data root and let the file I/O module
7
- # automatically infer from prefix (not support LMDB and Memcache yet)
8
-
9
- # data_root = 's3://openmmlab/datasets/detection/ADEChallengeData2016/'
10
-
11
- # Method 2: Use `backend_args`, `file_client_args` in versions before 3.0.0rc6
12
- # backend_args = dict(
13
- # backend='petrel',
14
- # path_mapping=dict({
15
- # './data/': 's3://openmmlab/datasets/detection/',
16
- # 'data/': 's3://openmmlab/datasets/detection/'
17
- # }))
18
- backend_args = None
19
-
20
- test_pipeline = [
21
- dict(type='LoadImageFromFile', backend_args=backend_args),
22
- dict(type='Resize', scale=(2560, 640), keep_ratio=True),
23
- # If you don't have a gt annotation, delete the pipeline
24
- dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
25
- dict(
26
- type='PackDetInputs',
27
- meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
28
- 'scale_factor'))
29
- ]
30
-
31
- val_dataloader = dict(
32
- batch_size=1,
33
- num_workers=2,
34
- persistent_workers=True,
35
- drop_last=False,
36
- sampler=dict(type='DefaultSampler', shuffle=False),
37
- dataset=dict(
38
- type=dataset_type,
39
- data_root=data_root,
40
- ann_file='ade20k_instance_val.json',
41
- data_prefix=dict(img='images/validation'),
42
- test_mode=True,
43
- pipeline=test_pipeline,
44
- backend_args=backend_args))
45
- test_dataloader = val_dataloader
46
-
47
- val_evaluator = dict(
48
- type='CocoMetric',
49
- ann_file=data_root + 'ade20k_instance_val.json',
50
- metric=['bbox', 'segm'],
51
- format_only=False,
52
- backend_args=backend_args)
53
- test_evaluator = val_evaluator
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/datasets/ade20k_panoptic.py DELETED
@@ -1,38 +0,0 @@
1
- # dataset settings
2
- dataset_type = 'ADE20KPanopticDataset'
3
- data_root = 'data/ADEChallengeData2016/'
4
-
5
- backend_args = None
6
-
7
- test_pipeline = [
8
- dict(type='LoadImageFromFile', backend_args=backend_args),
9
- dict(type='Resize', scale=(2560, 640), keep_ratio=True),
10
- dict(type='LoadPanopticAnnotations', backend_args=backend_args),
11
- dict(
12
- type='PackDetInputs',
13
- meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
14
- 'scale_factor'))
15
- ]
16
-
17
- val_dataloader = dict(
18
- batch_size=1,
19
- num_workers=0,
20
- persistent_workers=False,
21
- drop_last=False,
22
- sampler=dict(type='DefaultSampler', shuffle=False),
23
- dataset=dict(
24
- type=dataset_type,
25
- data_root=data_root,
26
- ann_file='ade20k_panoptic_val.json',
27
- data_prefix=dict(img='images/validation/', seg='ade20k_panoptic_val/'),
28
- test_mode=True,
29
- pipeline=test_pipeline,
30
- backend_args=backend_args))
31
- test_dataloader = val_dataloader
32
-
33
- val_evaluator = dict(
34
- type='CocoPanopticMetric',
35
- ann_file=data_root + 'ade20k_panoptic_val.json',
36
- seg_prefix=data_root + 'ade20k_panoptic_val/',
37
- backend_args=backend_args)
38
- test_evaluator = val_evaluator
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/datasets/ade20k_semantic.py DELETED
@@ -1,48 +0,0 @@
1
- dataset_type = 'ADE20KSegDataset'
2
- data_root = 'data/ADEChallengeData2016/'
3
-
4
- # Example to use different file client
5
- # Method 1: simply set the data root and let the file I/O module
6
- # automatically infer from prefix (not support LMDB and Memcache yet)
7
-
8
- # data_root = 's3://openmmlab/datasets/detection/ADEChallengeData2016/'
9
-
10
- # Method 2: Use `backend_args`, `file_client_args` in versions before 3.0.0rc6
11
- # backend_args = dict(
12
- # backend='petrel',
13
- # path_mapping=dict({
14
- # './data/': 's3://openmmlab/datasets/detection/',
15
- # 'data/': 's3://openmmlab/datasets/detection/'
16
- # }))
17
- backend_args = None
18
-
19
- test_pipeline = [
20
- dict(type='LoadImageFromFile', backend_args=backend_args),
21
- dict(type='Resize', scale=(2048, 512), keep_ratio=True),
22
- dict(
23
- type='LoadAnnotations',
24
- with_bbox=False,
25
- with_mask=False,
26
- with_seg=True,
27
- reduce_zero_label=True),
28
- dict(
29
- type='PackDetInputs', meta_keys=('img_path', 'ori_shape', 'img_shape'))
30
- ]
31
-
32
- val_dataloader = dict(
33
- batch_size=1,
34
- num_workers=2,
35
- persistent_workers=True,
36
- drop_last=False,
37
- sampler=dict(type='DefaultSampler', shuffle=False),
38
- dataset=dict(
39
- type=dataset_type,
40
- data_root=data_root,
41
- data_prefix=dict(
42
- img_path='images/validation',
43
- seg_map_path='annotations/validation'),
44
- pipeline=test_pipeline))
45
- test_dataloader = val_dataloader
46
-
47
- val_evaluator = dict(type='SemSegMetric', iou_metrics=['mIoU'])
48
- test_evaluator = val_evaluator
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/datasets/cityscapes_detection.py DELETED
@@ -1,84 +0,0 @@
1
- # dataset settings
2
- dataset_type = 'CityscapesDataset'
3
- data_root = 'data/cityscapes/'
4
-
5
- # Example to use different file client
6
- # Method 1: simply set the data root and let the file I/O module
7
- # automatically infer from prefix (not support LMDB and Memcache yet)
8
-
9
- # data_root = 's3://openmmlab/datasets/segmentation/cityscapes/'
10
-
11
- # Method 2: Use `backend_args`, `file_client_args` in versions before 3.0.0rc6
12
- # backend_args = dict(
13
- # backend='petrel',
14
- # path_mapping=dict({
15
- # './data/': 's3://openmmlab/datasets/segmentation/',
16
- # 'data/': 's3://openmmlab/datasets/segmentation/'
17
- # }))
18
- backend_args = None
19
-
20
- train_pipeline = [
21
- dict(type='LoadImageFromFile', backend_args=backend_args),
22
- dict(type='LoadAnnotations', with_bbox=True),
23
- dict(
24
- type='RandomResize',
25
- scale=[(2048, 800), (2048, 1024)],
26
- keep_ratio=True),
27
- dict(type='RandomFlip', prob=0.5),
28
- dict(type='PackDetInputs')
29
- ]
30
-
31
- test_pipeline = [
32
- dict(type='LoadImageFromFile', backend_args=backend_args),
33
- dict(type='Resize', scale=(2048, 1024), keep_ratio=True),
34
- # If you don't have a gt annotation, delete the pipeline
35
- dict(type='LoadAnnotations', with_bbox=True),
36
- dict(
37
- type='PackDetInputs',
38
- meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
39
- 'scale_factor'))
40
- ]
41
-
42
- train_dataloader = dict(
43
- batch_size=1,
44
- num_workers=2,
45
- persistent_workers=True,
46
- sampler=dict(type='DefaultSampler', shuffle=True),
47
- batch_sampler=dict(type='AspectRatioBatchSampler'),
48
- dataset=dict(
49
- type='RepeatDataset',
50
- times=8,
51
- dataset=dict(
52
- type=dataset_type,
53
- data_root=data_root,
54
- ann_file='annotations/instancesonly_filtered_gtFine_train.json',
55
- data_prefix=dict(img='leftImg8bit/train/'),
56
- filter_cfg=dict(filter_empty_gt=True, min_size=32),
57
- pipeline=train_pipeline,
58
- backend_args=backend_args)))
59
-
60
- val_dataloader = dict(
61
- batch_size=1,
62
- num_workers=2,
63
- persistent_workers=True,
64
- drop_last=False,
65
- sampler=dict(type='DefaultSampler', shuffle=False),
66
- dataset=dict(
67
- type=dataset_type,
68
- data_root=data_root,
69
- ann_file='annotations/instancesonly_filtered_gtFine_val.json',
70
- data_prefix=dict(img='leftImg8bit/val/'),
71
- test_mode=True,
72
- filter_cfg=dict(filter_empty_gt=True, min_size=32),
73
- pipeline=test_pipeline,
74
- backend_args=backend_args))
75
-
76
- test_dataloader = val_dataloader
77
-
78
- val_evaluator = dict(
79
- type='CocoMetric',
80
- ann_file=data_root + 'annotations/instancesonly_filtered_gtFine_val.json',
81
- metric='bbox',
82
- backend_args=backend_args)
83
-
84
- test_evaluator = val_evaluator
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/datasets/cityscapes_instance.py DELETED
@@ -1,113 +0,0 @@
1
- # dataset settings
2
- dataset_type = 'CityscapesDataset'
3
- data_root = 'data/cityscapes/'
4
-
5
- # Example to use different file client
6
- # Method 1: simply set the data root and let the file I/O module
7
- # automatically infer from prefix (not support LMDB and Memcache yet)
8
-
9
- # data_root = 's3://openmmlab/datasets/segmentation/cityscapes/'
10
-
11
- # Method 2: Use backend_args, file_client_args in versions before 3.0.0rc6
12
- # backend_args = dict(
13
- # backend='petrel',
14
- # path_mapping=dict({
15
- # './data/': 's3://openmmlab/datasets/segmentation/',
16
- # 'data/': 's3://openmmlab/datasets/segmentation/'
17
- # }))
18
- backend_args = None
19
-
20
- train_pipeline = [
21
- dict(type='LoadImageFromFile', backend_args=backend_args),
22
- dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
23
- dict(
24
- type='RandomResize',
25
- scale=[(2048, 800), (2048, 1024)],
26
- keep_ratio=True),
27
- dict(type='RandomFlip', prob=0.5),
28
- dict(type='PackDetInputs')
29
- ]
30
-
31
- test_pipeline = [
32
- dict(type='LoadImageFromFile', backend_args=backend_args),
33
- dict(type='Resize', scale=(2048, 1024), keep_ratio=True),
34
- # If you don't have a gt annotation, delete the pipeline
35
- dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
36
- dict(
37
- type='PackDetInputs',
38
- meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
39
- 'scale_factor'))
40
- ]
41
-
42
- train_dataloader = dict(
43
- batch_size=1,
44
- num_workers=2,
45
- persistent_workers=True,
46
- sampler=dict(type='DefaultSampler', shuffle=True),
47
- batch_sampler=dict(type='AspectRatioBatchSampler'),
48
- dataset=dict(
49
- type='RepeatDataset',
50
- times=8,
51
- dataset=dict(
52
- type=dataset_type,
53
- data_root=data_root,
54
- ann_file='annotations/instancesonly_filtered_gtFine_train.json',
55
- data_prefix=dict(img='leftImg8bit/train/'),
56
- filter_cfg=dict(filter_empty_gt=True, min_size=32),
57
- pipeline=train_pipeline,
58
- backend_args=backend_args)))
59
-
60
- val_dataloader = dict(
61
- batch_size=1,
62
- num_workers=2,
63
- persistent_workers=True,
64
- drop_last=False,
65
- sampler=dict(type='DefaultSampler', shuffle=False),
66
- dataset=dict(
67
- type=dataset_type,
68
- data_root=data_root,
69
- ann_file='annotations/instancesonly_filtered_gtFine_val.json',
70
- data_prefix=dict(img='leftImg8bit/val/'),
71
- test_mode=True,
72
- filter_cfg=dict(filter_empty_gt=True, min_size=32),
73
- pipeline=test_pipeline,
74
- backend_args=backend_args))
75
-
76
- test_dataloader = val_dataloader
77
-
78
- val_evaluator = [
79
- dict(
80
- type='CocoMetric',
81
- ann_file=data_root +
82
- 'annotations/instancesonly_filtered_gtFine_val.json',
83
- metric=['bbox', 'segm'],
84
- backend_args=backend_args),
85
- dict(
86
- type='CityScapesMetric',
87
- seg_prefix=data_root + 'gtFine/val',
88
- outfile_prefix='./work_dirs/cityscapes_metric/instance',
89
- backend_args=backend_args)
90
- ]
91
-
92
- test_evaluator = val_evaluator
93
-
94
- # inference on test dataset and
95
- # format the output results for submission.
96
- # test_dataloader = dict(
97
- # batch_size=1,
98
- # num_workers=2,
99
- # persistent_workers=True,
100
- # drop_last=False,
101
- # sampler=dict(type='DefaultSampler', shuffle=False),
102
- # dataset=dict(
103
- # type=dataset_type,
104
- # data_root=data_root,
105
- # ann_file='annotations/instancesonly_filtered_gtFine_test.json',
106
- # data_prefix=dict(img='leftImg8bit/test/'),
107
- # test_mode=True,
108
- # filter_cfg=dict(filter_empty_gt=True, min_size=32),
109
- # pipeline=test_pipeline))
110
- # test_evaluator = dict(
111
- # type='CityScapesMetric',
112
- # format_only=True,
113
- # outfile_prefix='./work_dirs/cityscapes_metric/test')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/datasets/coco_caption.py DELETED
@@ -1,60 +0,0 @@
1
- # data settings
2
-
3
- dataset_type = 'CocoCaptionDataset'
4
- data_root = 'data/coco/'
5
-
6
- # Example to use different file client
7
- # Method 1: simply set the data root and let the file I/O module
8
- # automatically infer from prefix (not support LMDB and Memcache yet)
9
-
10
- # data_root = 's3://openmmlab/datasets/detection/coco/'
11
-
12
- # Method 2: Use `backend_args`, `file_client_args` in versions before 3.0.0rc6
13
- # backend_args = dict(
14
- # backend='petrel',
15
- # path_mapping=dict({
16
- # './data/': 's3://openmmlab/datasets/detection/',
17
- # 'data/': 's3://openmmlab/datasets/detection/'
18
- # }))
19
- backend_args = None
20
-
21
- test_pipeline = [
22
- dict(
23
- type='LoadImageFromFile',
24
- imdecode_backend='pillow',
25
- backend_args=backend_args),
26
- dict(
27
- type='Resize',
28
- scale=(224, 224),
29
- interpolation='bicubic',
30
- backend='pillow'),
31
- dict(type='PackInputs', meta_keys=['image_id']),
32
- ]
33
-
34
- # ann_file download from
35
- # train dataset: https://storage.googleapis.com/sfr-vision-language-research/datasets/coco_karpathy_train.json # noqa
36
- # val dataset: https://storage.googleapis.com/sfr-vision-language-research/datasets/coco_karpathy_val.json # noqa
37
- # test dataset: https://storage.googleapis.com/sfr-vision-language-research/datasets/coco_karpathy_test.json # noqa
38
- # val evaluator: https://storage.googleapis.com/sfr-vision-language-research/datasets/coco_karpathy_val_gt.json # noqa
39
- # test evaluator: https://storage.googleapis.com/sfr-vision-language-research/datasets/coco_karpathy_test_gt.json # noqa
40
- val_dataloader = dict(
41
- batch_size=1,
42
- num_workers=2,
43
- persistent_workers=True,
44
- drop_last=False,
45
- sampler=dict(type='DefaultSampler', shuffle=False),
46
- dataset=dict(
47
- type=dataset_type,
48
- data_root=data_root,
49
- ann_file='annotations/coco_karpathy_val.json',
50
- pipeline=test_pipeline,
51
- ))
52
-
53
- val_evaluator = dict(
54
- type='COCOCaptionMetric',
55
- ann_file=data_root + 'annotations/coco_karpathy_val_gt.json',
56
- )
57
-
58
- # # If you want standard test, please manually configure the test dataset
59
- test_dataloader = val_dataloader
60
- test_evaluator = val_evaluator
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/datasets/coco_detection_aitod.py DELETED
@@ -1,96 +0,0 @@
1
- # dataset settings
2
- dataset_type = 'AITODDataset'
3
- data_root = '/root/nas-resource-linkdata/AI-TOD/'
4
-
5
- # Example to use different file client
6
- # Method 1: simply set the data root and let the file I/O module
7
- # automatically infer from prefix (not support LMDB and Memcache yet)
8
-
9
- # data_root = 's3://openmmlab/datasets/detection/coco/'
10
-
11
- # Method 2: Use `backend_args`, `file_client_args` in versions before 3.0.0rc6
12
- # backend_args = dict(
13
- # backend='petrel',
14
- # path_mapping=dict({
15
- # './data/': 's3://openmmlab/datasets/detection/',
16
- # 'data/': 's3://openmmlab/datasets/detection/'
17
- # }))
18
- backend_args = None
19
-
20
- train_pipeline = [
21
- dict(type='LoadImageFromFile', backend_args=backend_args),
22
- dict(type='LoadAnnotations', with_bbox=True),
23
- dict(type='Resize', scale=(800, 800), keep_ratio=True),
24
- dict(type='RandomFlip', prob=0.5),
25
- dict(type='PackDetInputs')
26
- ]
27
- test_pipeline = [
28
- dict(type='LoadImageFromFile', backend_args=backend_args),
29
- dict(type='Resize', scale=(800, 800), keep_ratio=True),
30
- # If you don't have a gt annotation, delete the pipeline
31
- dict(type='LoadAnnotations', with_bbox=True),
32
- dict(
33
- type='PackDetInputs',
34
- meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
35
- 'scale_factor'))
36
- ]
37
- train_dataloader = dict(
38
- batch_size=2,
39
- num_workers=2,
40
- persistent_workers=True,
41
- sampler=dict(type='DefaultSampler', shuffle=True),
42
- batch_sampler=dict(type='AspectRatioBatchSampler'),
43
- dataset=dict(
44
- type=dataset_type,
45
- data_root=data_root,
46
- ann_file=data_root + 'annotations/aitod_trainval_v1.json',
47
- data_prefix=dict(img='trainval/images/'),
48
- filter_cfg=dict(filter_empty_gt=True, min_size=32),
49
- pipeline=train_pipeline,
50
- backend_args=backend_args))
51
- val_dataloader = dict(
52
- batch_size=1,
53
- num_workers=2,
54
- persistent_workers=True,
55
- drop_last=False,
56
- sampler=dict(type='DefaultSampler', shuffle=False),
57
- dataset=dict(
58
- type=dataset_type,
59
- data_root=data_root,
60
- ann_file=data_root + 'annotations/aitod_test_v1.json',
61
- data_prefix=dict(img='test/images/'),
62
- test_mode=True,
63
- pipeline=test_pipeline,
64
- backend_args=backend_args))
65
- test_dataloader = val_dataloader
66
-
67
- val_evaluator = dict(
68
- #type='CocoMetric',
69
- type='AITODMetric',
70
- ann_file=data_root + 'annotations/aitod_test_v1.json',
71
- metric='bbox',
72
- format_only=False,
73
- backend_args=backend_args)
74
- test_evaluator = val_evaluator
75
-
76
- # inference on test dataset and
77
- # format the output results for submission.
78
- # test_dataloader = dict(
79
- # batch_size=1,
80
- # num_workers=2,
81
- # persistent_workers=True,
82
- # drop_last=False,
83
- # sampler=dict(type='DefaultSampler', shuffle=False),
84
- # dataset=dict(
85
- # type=dataset_type,
86
- # data_root=data_root,
87
- # ann_file=data_root + 'annotations/image_info_test-dev2017.json',
88
- # data_prefix=dict(img='test2017/'),
89
- # test_mode=True,
90
- # pipeline=test_pipeline))
91
- # test_evaluator = dict(
92
- # type='CocoMetric',
93
- # metric='bbox',
94
- # format_only=True,
95
- # ann_file=data_root + 'annotations/image_info_test-dev2017.json',
96
- # outfile_prefix='./work_dirs/coco_detection/test')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/datasets/coco_detection_dota.py DELETED
@@ -1,96 +0,0 @@
1
- # dataset settings
2
- dataset_type = 'DOTADataset'
3
- data_root = "/root/nas-resource-tju/Dataset/DOTA/DOTA_split/"
4
-
5
- # Example to use different file client
6
- # Method 1: simply set the data root and let the file I/O module
7
- # automatically infer from prefix (not support LMDB and Memcache yet)
8
-
9
- # data_root = 's3://openmmlab/datasets/detection/coco/'
10
-
11
- # Method 2: Use `backend_args`, `file_client_args` in versions before 3.0.0rc6
12
- # backend_args = dict(
13
- # backend='petrel',
14
- # path_mapping=dict({
15
- # './data/': 's3://openmmlab/datasets/detection/',
16
- # 'data/': 's3://openmmlab/datasets/detection/'
17
- # }))
18
- backend_args = None
19
-
20
- train_pipeline = [
21
- dict(type='LoadImageFromFile', backend_args=backend_args),
22
- dict(type='LoadAnnotations', with_bbox=True),
23
- dict(type='Resize', scale=(1024, 1024), keep_ratio=True),
24
- dict(type='RandomFlip', prob=0.5),
25
- dict(type='PackDetInputs')
26
- ]
27
- test_pipeline = [
28
- dict(type='LoadImageFromFile', backend_args=backend_args),
29
- dict(type='Resize', scale=(1024, 1024), keep_ratio=True),
30
- # If you don't have a gt annotation, delete the pipeline
31
- dict(type='LoadAnnotations', with_bbox=True),
32
- dict(
33
- type='PackDetInputs',
34
- meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
35
- 'scale_factor'))
36
- ]
37
- train_dataloader = dict(
38
- batch_size=2,
39
- num_workers=2,
40
- persistent_workers=True,
41
- sampler=dict(type='DefaultSampler', shuffle=True),
42
- batch_sampler=dict(type='AspectRatioBatchSampler'),
43
- dataset=dict(
44
- type=dataset_type,
45
- data_root=data_root,
46
- ann_file=data_root + 'train/DOTA_train1024.json',
47
- data_prefix=dict(img='train/images/'),
48
- filter_cfg=dict(filter_empty_gt=True, min_size=32),
49
- pipeline=train_pipeline,
50
- backend_args=backend_args))
51
- val_dataloader = dict(
52
- batch_size=1,
53
- num_workers=2,
54
- persistent_workers=True,
55
- drop_last=False,
56
- sampler=dict(type='DefaultSampler', shuffle=False),
57
- dataset=dict(
58
- type=dataset_type,
59
- data_root=data_root,
60
- ann_file=data_root + 'val/DOTA_val1024.json',
61
- data_prefix=dict(img='val/images/'),
62
- test_mode=True,
63
- pipeline=test_pipeline,
64
- backend_args=backend_args))
65
- test_dataloader = val_dataloader
66
-
67
- val_evaluator = dict(
68
- #type='CocoMetric',
69
- type='AITODMetric',
70
- ann_file=data_root + 'val/DOTA_val1024.json',
71
- metric='bbox',
72
- format_only=False,
73
- backend_args=backend_args)
74
- test_evaluator = val_evaluator
75
-
76
- # inference on test dataset and
77
- # format the output results for submission.
78
- # test_dataloader = dict(
79
- # batch_size=1,
80
- # num_workers=2,
81
- # persistent_workers=True,
82
- # drop_last=False,
83
- # sampler=dict(type='DefaultSampler', shuffle=False),
84
- # dataset=dict(
85
- # type=dataset_type,
86
- # data_root=data_root,
87
- # ann_file=data_root + 'annotations/image_info_test-dev2017.json',
88
- # data_prefix=dict(img='test2017/'),
89
- # test_mode=True,
90
- # pipeline=test_pipeline))
91
- # test_evaluator = dict(
92
- # type='CocoMetric',
93
- # metric='bbox',
94
- # format_only=True,
95
- # ann_file=data_root + 'annotations/image_info_test-dev2017.json',
96
- # outfile_prefix='./work_dirs/coco_detection/test')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/datasets/coco_detection_drones.py DELETED
@@ -1,96 +0,0 @@
1
- # dataset settings
2
- dataset_type = 'DronesDataset'
3
- data_root = '/root/nas-public-linkdata/dataset/Drones/'
4
-
5
- # Example to use different file client
6
- # Method 1: simply set the data root and let the file I/O module
7
- # automatically infer from prefix (not support LMDB and Memcache yet)
8
-
9
- # data_root = 's3://openmmlab/datasets/detection/coco/'
10
-
11
- # Method 2: Use `backend_args`, `file_client_args` in versions before 3.0.0rc6
12
- # backend_args = dict(
13
- # backend='petrel',
14
- # path_mapping=dict({
15
- # './data/': 's3://openmmlab/datasets/detection/',
16
- # 'data/': 's3://openmmlab/datasets/detection/'
17
- # }))
18
- backend_args = None
19
-
20
- train_pipeline = [
21
- dict(type='LoadImageFromFile', backend_args=backend_args),
22
- dict(type='LoadAnnotations', with_bbox=True),
23
- dict(type='Resize', scale=(1920, 1080), keep_ratio=True),
24
- dict(type='RandomFlip', prob=0.5),
25
- dict(type='PackDetInputs')
26
- ]
27
- test_pipeline = [
28
- dict(type='LoadImageFromFile', backend_args=backend_args),
29
- dict(type='Resize', scale=(1920, 1080), keep_ratio=True),
30
- # If you don't have a gt annotation, delete the pipeline
31
- dict(type='LoadAnnotations', with_bbox=True),
32
- dict(
33
- type='PackDetInputs',
34
- meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
35
- 'scale_factor'))
36
- ]
37
- train_dataloader = dict(
38
- batch_size=2,
39
- num_workers=2,
40
- persistent_workers=True,
41
- sampler=dict(type='DefaultSampler', shuffle=True),
42
- batch_sampler=dict(type='AspectRatioBatchSampler'),
43
- dataset=dict(
44
- type=dataset_type,
45
- data_root=data_root,
46
- ann_file=data_root + 'train/train.json',
47
- data_prefix=dict(img='train/JPEGImages/'),
48
- filter_cfg=dict(filter_empty_gt=True, min_size=32),
49
- pipeline=train_pipeline,
50
- backend_args=backend_args))
51
- val_dataloader = dict(
52
- batch_size=1,
53
- num_workers=2,
54
- persistent_workers=True,
55
- drop_last=False,
56
- sampler=dict(type='DefaultSampler', shuffle=False),
57
- dataset=dict(
58
- type=dataset_type,
59
- data_root=data_root,
60
- ann_file=data_root + 'test/test.json',
61
- data_prefix=dict(img='test/JPEGImages/'),
62
- test_mode=True,
63
- pipeline=test_pipeline,
64
- backend_args=backend_args))
65
- test_dataloader = val_dataloader
66
-
67
- val_evaluator = dict(
68
- #type='CocoMetric',
69
- type='AITODMetric',
70
- ann_file=data_root + 'test/test.json',
71
- metric='bbox',
72
- format_only=False,
73
- backend_args=backend_args)
74
- test_evaluator = val_evaluator
75
-
76
- # inference on test dataset and
77
- # format the output results for submission.
78
- # test_dataloader = dict(
79
- # batch_size=1,
80
- # num_workers=2,
81
- # persistent_workers=True,
82
- # drop_last=False,
83
- # sampler=dict(type='DefaultSampler', shuffle=False),
84
- # dataset=dict(
85
- # type=dataset_type,
86
- # data_root=data_root,
87
- # ann_file=data_root + 'annotations/image_info_test-dev2017.json',
88
- # data_prefix=dict(img='test2017/'),
89
- # test_mode=True,
90
- # pipeline=test_pipeline))
91
- # test_evaluator = dict(
92
- # type='CocoMetric',
93
- # metric='bbox',
94
- # format_only=True,
95
- # ann_file=data_root + 'annotations/image_info_test-dev2017.json',
96
- # outfile_prefix='./work_dirs/coco_detection/test')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/datasets/coco_detection_visdrone.py DELETED
@@ -1,96 +0,0 @@
1
- # dataset settings
2
- dataset_type = 'VisDroneDataset'
3
- data_root = '/root/nas-resource-linkdata/VisDrone-DET2019/'
4
-
5
- # Example to use different file client
6
- # Method 1: simply set the data root and let the file I/O module
7
- # automatically infer from prefix (not support LMDB and Memcache yet)
8
-
9
- # data_root = 's3://openmmlab/datasets/detection/coco/'
10
-
11
- # Method 2: Use `backend_args`, `file_client_args` in versions before 3.0.0rc6
12
- # backend_args = dict(
13
- # backend='petrel',
14
- # path_mapping=dict({
15
- # './data/': 's3://openmmlab/datasets/detection/',
16
- # 'data/': 's3://openmmlab/datasets/detection/'
17
- # }))
18
- backend_args = None
19
-
20
- train_pipeline = [
21
- dict(type='LoadImageFromFile', backend_args=backend_args),
22
- dict(type='LoadAnnotations', with_bbox=True),
23
- dict(type='Resize', scale=(1280, 1280), keep_ratio=True),
24
- dict(type='RandomFlip', prob=0.5),
25
- dict(type='PackDetInputs')
26
- ]
27
- test_pipeline = [
28
- dict(type='LoadImageFromFile', backend_args=backend_args),
29
- dict(type='Resize', scale=(1280, 1280), keep_ratio=True),
30
- # If you don't have a gt annotation, delete the pipeline
31
- dict(type='LoadAnnotations', with_bbox=True),
32
- dict(
33
- type='PackDetInputs',
34
- meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
35
- 'scale_factor'))
36
- ]
37
- train_dataloader = dict(
38
- batch_size=2,
39
- num_workers=2,
40
- persistent_workers=True,
41
- sampler=dict(type='DefaultSampler', shuffle=True),
42
- batch_sampler=dict(type='AspectRatioBatchSampler'),
43
- dataset=dict(
44
- type=dataset_type,
45
- data_root=data_root,
46
- ann_file=data_root + 'VisDrone2019-DET-train/visdrone_train_coco.json',
47
- data_prefix=dict(img='VisDrone2019-DET-train/images/'),
48
- filter_cfg=dict(filter_empty_gt=True, min_size=32),
49
- pipeline=train_pipeline,
50
- backend_args=backend_args))
51
- val_dataloader = dict(
52
- batch_size=1,
53
- num_workers=2,
54
- persistent_workers=True,
55
- drop_last=False,
56
- sampler=dict(type='DefaultSampler', shuffle=False),
57
- dataset=dict(
58
- type=dataset_type,
59
- data_root=data_root,
60
- ann_file=data_root + 'VisDrone2019-DET-val/visdrone_val_coco.json',
61
- data_prefix=dict(img='VisDrone2019-DET-val/images/'),
62
- test_mode=True,
63
- pipeline=test_pipeline,
64
- backend_args=backend_args))
65
- test_dataloader = val_dataloader
66
-
67
- val_evaluator = dict(
68
- #type='CocoMetric',
69
- type='AITODMetric',
70
- ann_file=data_root + 'VisDrone2019-DET-val/visdrone_val_coco.json',
71
- metric='bbox',
72
- format_only=False,
73
- backend_args=backend_args)
74
- test_evaluator = val_evaluator
75
-
76
- # inference on test dataset and
77
- # format the output results for submission.
78
- # test_dataloader = dict(
79
- # batch_size=1,
80
- # num_workers=2,
81
- # persistent_workers=True,
82
- # drop_last=False,
83
- # sampler=dict(type='DefaultSampler', shuffle=False),
84
- # dataset=dict(
85
- # type=dataset_type,
86
- # data_root=data_root,
87
- # ann_file=data_root + 'annotations/image_info_test-dev2017.json',
88
- # data_prefix=dict(img='test2017/'),
89
- # test_mode=True,
90
- # pipeline=test_pipeline))
91
- # test_evaluator = dict(
92
- # type='CocoMetric',
93
- # metric='bbox',
94
- # format_only=True,
95
- # ann_file=data_root + 'annotations/image_info_test-dev2017.json',
96
- # outfile_prefix='./work_dirs/coco_detection/test')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/datasets/coco_instance.py DELETED
@@ -1,95 +0,0 @@
1
- # dataset settings
2
- dataset_type = 'CocoDataset'
3
- data_root = 'data/coco/'
4
-
5
- # Example to use different file client
6
- # Method 1: simply set the data root and let the file I/O module
7
- # automatically infer from prefix (not support LMDB and Memcache yet)
8
-
9
- # data_root = 's3://openmmlab/datasets/detection/coco/'
10
-
11
- # Method 2: Use `backend_args`, `file_client_args` in versions before 3.0.0rc6
12
- # backend_args = dict(
13
- # backend='petrel',
14
- # path_mapping=dict({
15
- # './data/': 's3://openmmlab/datasets/detection/',
16
- # 'data/': 's3://openmmlab/datasets/detection/'
17
- # }))
18
- backend_args = None
19
-
20
- train_pipeline = [
21
- dict(type='LoadImageFromFile', backend_args=backend_args),
22
- dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
23
- dict(type='Resize', scale=(1333, 800), keep_ratio=True),
24
- dict(type='RandomFlip', prob=0.5),
25
- dict(type='PackDetInputs')
26
- ]
27
- test_pipeline = [
28
- dict(type='LoadImageFromFile', backend_args=backend_args),
29
- dict(type='Resize', scale=(1333, 800), keep_ratio=True),
30
- # If you don't have a gt annotation, delete the pipeline
31
- dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
32
- dict(
33
- type='PackDetInputs',
34
- meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
35
- 'scale_factor'))
36
- ]
37
- train_dataloader = dict(
38
- batch_size=2,
39
- num_workers=2,
40
- persistent_workers=True,
41
- sampler=dict(type='DefaultSampler', shuffle=True),
42
- batch_sampler=dict(type='AspectRatioBatchSampler'),
43
- dataset=dict(
44
- type=dataset_type,
45
- data_root=data_root,
46
- ann_file='annotations/instances_train2017.json',
47
- data_prefix=dict(img='train2017/'),
48
- filter_cfg=dict(filter_empty_gt=True, min_size=32),
49
- pipeline=train_pipeline,
50
- backend_args=backend_args))
51
- val_dataloader = dict(
52
- batch_size=1,
53
- num_workers=2,
54
- persistent_workers=True,
55
- drop_last=False,
56
- sampler=dict(type='DefaultSampler', shuffle=False),
57
- dataset=dict(
58
- type=dataset_type,
59
- data_root=data_root,
60
- ann_file='annotations/instances_val2017.json',
61
- data_prefix=dict(img='val2017/'),
62
- test_mode=True,
63
- pipeline=test_pipeline,
64
- backend_args=backend_args))
65
- test_dataloader = val_dataloader
66
-
67
- val_evaluator = dict(
68
- type='CocoMetric',
69
- ann_file=data_root + 'annotations/instances_val2017.json',
70
- metric=['bbox', 'segm'],
71
- format_only=False,
72
- backend_args=backend_args)
73
- test_evaluator = val_evaluator
74
-
75
- # inference on test dataset and
76
- # format the output results for submission.
77
- # test_dataloader = dict(
78
- # batch_size=1,
79
- # num_workers=2,
80
- # persistent_workers=True,
81
- # drop_last=False,
82
- # sampler=dict(type='DefaultSampler', shuffle=False),
83
- # dataset=dict(
84
- # type=dataset_type,
85
- # data_root=data_root,
86
- # ann_file=data_root + 'annotations/image_info_test-dev2017.json',
87
- # data_prefix=dict(img='test2017/'),
88
- # test_mode=True,
89
- # pipeline=test_pipeline))
90
- # test_evaluator = dict(
91
- # type='CocoMetric',
92
- # metric=['bbox', 'segm'],
93
- # format_only=True,
94
- # ann_file=data_root + 'annotations/image_info_test-dev2017.json',
95
- # outfile_prefix='./work_dirs/coco_instance/test')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/datasets/coco_instance_semantic.py DELETED
@@ -1,78 +0,0 @@
1
- # dataset settings
2
- dataset_type = 'CocoDataset'
3
- data_root = 'data/coco/'
4
-
5
- # Example to use different file client
6
- # Method 1: simply set the data root and let the file I/O module
7
- # automatically infer from prefix (not support LMDB and Memcache yet)
8
-
9
- # data_root = 's3://openmmlab/datasets/detection/coco/'
10
-
11
- # Method 2: Use `backend_args`, `file_client_args` in versions before 3.0.0rc6
12
- # backend_args = dict(
13
- # backend='petrel',
14
- # path_mapping=dict({
15
- # './data/': 's3://openmmlab/datasets/detection/',
16
- # 'data/': 's3://openmmlab/datasets/detection/'
17
- # }))
18
- backend_args = None
19
-
20
- train_pipeline = [
21
- dict(type='LoadImageFromFile', backend_args=backend_args),
22
- dict(
23
- type='LoadAnnotations', with_bbox=True, with_mask=True, with_seg=True),
24
- dict(type='Resize', scale=(1333, 800), keep_ratio=True),
25
- dict(type='RandomFlip', prob=0.5),
26
- dict(type='PackDetInputs')
27
- ]
28
- test_pipeline = [
29
- dict(type='LoadImageFromFile', backend_args=backend_args),
30
- dict(type='Resize', scale=(1333, 800), keep_ratio=True),
31
- # If you don't have a gt annotation, delete the pipeline
32
- dict(
33
- type='LoadAnnotations', with_bbox=True, with_mask=True, with_seg=True),
34
- dict(
35
- type='PackDetInputs',
36
- meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
37
- 'scale_factor'))
38
- ]
39
-
40
- train_dataloader = dict(
41
- batch_size=2,
42
- num_workers=2,
43
- persistent_workers=True,
44
- sampler=dict(type='DefaultSampler', shuffle=True),
45
- batch_sampler=dict(type='AspectRatioBatchSampler'),
46
- dataset=dict(
47
- type=dataset_type,
48
- data_root=data_root,
49
- ann_file='annotations/instances_train2017.json',
50
- data_prefix=dict(img='train2017/', seg='stuffthingmaps/train2017/'),
51
- filter_cfg=dict(filter_empty_gt=True, min_size=32),
52
- pipeline=train_pipeline,
53
- backend_args=backend_args))
54
-
55
- val_dataloader = dict(
56
- batch_size=1,
57
- num_workers=2,
58
- persistent_workers=True,
59
- drop_last=False,
60
- sampler=dict(type='DefaultSampler', shuffle=False),
61
- dataset=dict(
62
- type=dataset_type,
63
- data_root=data_root,
64
- ann_file='annotations/instances_val2017.json',
65
- data_prefix=dict(img='val2017/'),
66
- test_mode=True,
67
- pipeline=test_pipeline,
68
- backend_args=backend_args))
69
-
70
- test_dataloader = val_dataloader
71
-
72
- val_evaluator = dict(
73
- type='CocoMetric',
74
- ann_file=data_root + 'annotations/instances_val2017.json',
75
- metric=['bbox', 'segm'],
76
- format_only=False,
77
- backend_args=backend_args)
78
- test_evaluator = val_evaluator
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/datasets/coco_panoptic.py DELETED
@@ -1,94 +0,0 @@
1
- # dataset settings
2
- dataset_type = 'CocoPanopticDataset'
3
- data_root = 'data/coco/'
4
-
5
- # Example to use different file client
6
- # Method 1: simply set the data root and let the file I/O module
7
- # automatically infer from prefix (not support LMDB and Memcache yet)
8
-
9
- # data_root = 's3://openmmlab/datasets/detection/coco/'
10
-
11
- # Method 2: Use `backend_args`, `file_client_args` in versions before 3.0.0rc6
12
- # backend_args = dict(
13
- # backend='petrel',
14
- # path_mapping=dict({
15
- # './data/': 's3://openmmlab/datasets/detection/',
16
- # 'data/': 's3://openmmlab/datasets/detection/'
17
- # }))
18
- backend_args = None
19
-
20
- train_pipeline = [
21
- dict(type='LoadImageFromFile', backend_args=backend_args),
22
- dict(type='LoadPanopticAnnotations', backend_args=backend_args),
23
- dict(type='Resize', scale=(1333, 800), keep_ratio=True),
24
- dict(type='RandomFlip', prob=0.5),
25
- dict(type='PackDetInputs')
26
- ]
27
- test_pipeline = [
28
- dict(type='LoadImageFromFile', backend_args=backend_args),
29
- dict(type='Resize', scale=(1333, 800), keep_ratio=True),
30
- dict(type='LoadPanopticAnnotations', backend_args=backend_args),
31
- dict(
32
- type='PackDetInputs',
33
- meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
34
- 'scale_factor'))
35
- ]
36
-
37
- train_dataloader = dict(
38
- batch_size=2,
39
- num_workers=2,
40
- persistent_workers=True,
41
- sampler=dict(type='DefaultSampler', shuffle=True),
42
- batch_sampler=dict(type='AspectRatioBatchSampler'),
43
- dataset=dict(
44
- type=dataset_type,
45
- data_root=data_root,
46
- ann_file='annotations/panoptic_train2017.json',
47
- data_prefix=dict(
48
- img='train2017/', seg='annotations/panoptic_train2017/'),
49
- filter_cfg=dict(filter_empty_gt=True, min_size=32),
50
- pipeline=train_pipeline,
51
- backend_args=backend_args))
52
- val_dataloader = dict(
53
- batch_size=1,
54
- num_workers=2,
55
- persistent_workers=True,
56
- drop_last=False,
57
- sampler=dict(type='DefaultSampler', shuffle=False),
58
- dataset=dict(
59
- type=dataset_type,
60
- data_root=data_root,
61
- ann_file='annotations/panoptic_val2017.json',
62
- data_prefix=dict(img='val2017/', seg='annotations/panoptic_val2017/'),
63
- test_mode=True,
64
- pipeline=test_pipeline,
65
- backend_args=backend_args))
66
- test_dataloader = val_dataloader
67
-
68
- val_evaluator = dict(
69
- type='CocoPanopticMetric',
70
- ann_file=data_root + 'annotations/panoptic_val2017.json',
71
- seg_prefix=data_root + 'annotations/panoptic_val2017/',
72
- backend_args=backend_args)
73
- test_evaluator = val_evaluator
74
-
75
- # inference on test dataset and
76
- # format the output results for submission.
77
- # test_dataloader = dict(
78
- # batch_size=1,
79
- # num_workers=1,
80
- # persistent_workers=True,
81
- # drop_last=False,
82
- # sampler=dict(type='DefaultSampler', shuffle=False),
83
- # dataset=dict(
84
- # type=dataset_type,
85
- # data_root=data_root,
86
- # ann_file='annotations/panoptic_image_info_test-dev2017.json',
87
- # data_prefix=dict(img='test2017/'),
88
- # test_mode=True,
89
- # pipeline=test_pipeline))
90
- # test_evaluator = dict(
91
- # type='CocoPanopticMetric',
92
- # format_only=True,
93
- # ann_file=data_root + 'annotations/panoptic_image_info_test-dev2017.json',
94
- # outfile_prefix='./work_dirs/coco_panoptic/test')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/datasets/coco_semantic.py DELETED
@@ -1,78 +0,0 @@
1
- # dataset settings
2
- dataset_type = 'CocoSegDataset'
3
- data_root = 'data/coco/'
4
-
5
- # Example to use different file client
6
- # Method 1: simply set the data root and let the file I/O module
7
- # automatically infer from prefix (not support LMDB and Memcache yet)
8
-
9
- # data_root = 's3://openmmlab/datasets/detection/coco/'
10
-
11
- # Method 2: Use `backend_args`, `file_client_args` in versions before 3.0.0rc6
12
- # backend_args = dict(
13
- # backend='petrel',
14
- # path_mapping=dict({
15
- # './data/': 's3://openmmlab/datasets/detection/',
16
- # 'data/': 's3://openmmlab/datasets/detection/'
17
- # }))
18
- backend_args = None
19
-
20
- train_pipeline = [
21
- dict(type='LoadImageFromFile', backend_args=backend_args),
22
- dict(
23
- type='LoadAnnotations',
24
- with_bbox=False,
25
- with_label=False,
26
- with_seg=True),
27
- dict(type='Resize', scale=(1333, 800), keep_ratio=True),
28
- dict(type='RandomFlip', prob=0.5),
29
- dict(type='PackDetInputs')
30
- ]
31
-
32
- test_pipeline = [
33
- dict(type='LoadImageFromFile', backend_args=backend_args),
34
- dict(type='Resize', scale=(1333, 800), keep_ratio=True),
35
- dict(
36
- type='LoadAnnotations',
37
- with_bbox=False,
38
- with_label=False,
39
- with_seg=True),
40
- dict(
41
- type='PackDetInputs',
42
- meta_keys=('img_path', 'ori_shape', 'img_shape', 'scale_factor'))
43
- ]
44
-
45
- # For stuffthingmaps_semseg, please refer to
46
- # `docs/en/user_guides/dataset_prepare.md`
47
- train_dataloader = dict(
48
- batch_size=2,
49
- num_workers=2,
50
- persistent_workers=True,
51
- sampler=dict(type='DefaultSampler', shuffle=True),
52
- batch_sampler=dict(type='AspectRatioBatchSampler'),
53
- dataset=dict(
54
- type=dataset_type,
55
- data_root=data_root,
56
- data_prefix=dict(
57
- img_path='train2017/',
58
- seg_map_path='stuffthingmaps_semseg/train2017/'),
59
- pipeline=train_pipeline))
60
-
61
- val_dataloader = dict(
62
- batch_size=1,
63
- num_workers=2,
64
- persistent_workers=True,
65
- drop_last=False,
66
- sampler=dict(type='DefaultSampler', shuffle=False),
67
- dataset=dict(
68
- type=dataset_type,
69
- data_root=data_root,
70
- data_prefix=dict(
71
- img_path='val2017/',
72
- seg_map_path='stuffthingmaps_semseg/val2017/'),
73
- pipeline=test_pipeline))
74
-
75
- test_dataloader = val_dataloader
76
-
77
- val_evaluator = dict(type='SemSegMetric', iou_metrics=['mIoU'])
78
- test_evaluator = val_evaluator
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/datasets/deepfashion.py DELETED
@@ -1,95 +0,0 @@
1
- # dataset settings
2
- dataset_type = 'DeepFashionDataset'
3
- data_root = 'data/DeepFashion/In-shop/'
4
-
5
- # Example to use different file client
6
- # Method 1: simply set the data root and let the file I/O module
7
- # automatically infer from prefix (not support LMDB and Memcache yet)
8
-
9
- # data_root = 's3://openmmlab/datasets/detection/coco/'
10
-
11
- # Method 2: Use `backend_args`, `file_client_args` in versions before 3.0.0rc6
12
- # backend_args = dict(
13
- # backend='petrel',
14
- # path_mapping=dict({
15
- # './data/': 's3://openmmlab/datasets/detection/',
16
- # 'data/': 's3://openmmlab/datasets/detection/'
17
- # }))
18
- backend_args = None
19
-
20
- train_pipeline = [
21
- dict(type='LoadImageFromFile', backend_args=backend_args),
22
- dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
23
- dict(type='Resize', scale=(750, 1101), keep_ratio=True),
24
- dict(type='RandomFlip', prob=0.5),
25
- dict(type='PackDetInputs')
26
- ]
27
- test_pipeline = [
28
- dict(type='LoadImageFromFile', backend_args=backend_args),
29
- dict(type='Resize', scale=(750, 1101), keep_ratio=True),
30
- dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
31
- dict(
32
- type='PackDetInputs',
33
- meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
34
- 'scale_factor'))
35
- ]
36
- train_dataloader = dict(
37
- batch_size=2,
38
- num_workers=2,
39
- persistent_workers=True,
40
- sampler=dict(type='DefaultSampler', shuffle=True),
41
- batch_sampler=dict(type='AspectRatioBatchSampler'),
42
- dataset=dict(
43
- type='RepeatDataset',
44
- times=2,
45
- dataset=dict(
46
- type=dataset_type,
47
- data_root=data_root,
48
- ann_file='Anno/segmentation/DeepFashion_segmentation_train.json',
49
- data_prefix=dict(img='Img/'),
50
- filter_cfg=dict(filter_empty_gt=True, min_size=32),
51
- pipeline=train_pipeline,
52
- backend_args=backend_args)))
53
- val_dataloader = dict(
54
- batch_size=1,
55
- num_workers=2,
56
- persistent_workers=True,
57
- drop_last=False,
58
- sampler=dict(type='DefaultSampler', shuffle=False),
59
- dataset=dict(
60
- type=dataset_type,
61
- data_root=data_root,
62
- ann_file='Anno/segmentation/DeepFashion_segmentation_query.json',
63
- data_prefix=dict(img='Img/'),
64
- test_mode=True,
65
- pipeline=test_pipeline,
66
- backend_args=backend_args))
67
- test_dataloader = dict(
68
- batch_size=1,
69
- num_workers=2,
70
- persistent_workers=True,
71
- drop_last=False,
72
- sampler=dict(type='DefaultSampler', shuffle=False),
73
- dataset=dict(
74
- type=dataset_type,
75
- data_root=data_root,
76
- ann_file='Anno/segmentation/DeepFashion_segmentation_gallery.json',
77
- data_prefix=dict(img='Img/'),
78
- test_mode=True,
79
- pipeline=test_pipeline,
80
- backend_args=backend_args))
81
-
82
- val_evaluator = dict(
83
- type='CocoMetric',
84
- ann_file=data_root +
85
- 'Anno/segmentation/DeepFashion_segmentation_query.json',
86
- metric=['bbox', 'segm'],
87
- format_only=False,
88
- backend_args=backend_args)
89
- test_evaluator = dict(
90
- type='CocoMetric',
91
- ann_file=data_root +
92
- 'Anno/segmentation/DeepFashion_segmentation_gallery.json',
93
- metric=['bbox', 'segm'],
94
- format_only=False,
95
- backend_args=backend_args)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/datasets/dsdl.py DELETED
@@ -1,62 +0,0 @@
1
- dataset_type = 'DSDLDetDataset'
2
- data_root = 'path to dataset folder'
3
- train_ann = 'path to train yaml file'
4
- val_ann = 'path to val yaml file'
5
-
6
- backend_args = None
7
- # backend_args = dict(
8
- # backend='petrel',
9
- # path_mapping=dict({
10
- # './data/': "s3://open_data/",
11
- # 'data/': "s3://open_data/"
12
- # }))
13
-
14
- train_pipeline = [
15
- dict(type='LoadImageFromFile', backend_args=backend_args),
16
- dict(type='LoadAnnotations', with_bbox=True),
17
- dict(type='Resize', scale=(1333, 800), keep_ratio=True),
18
- dict(type='RandomFlip', prob=0.5),
19
- dict(type='PackDetInputs')
20
- ]
21
- test_pipeline = [
22
- dict(type='LoadImageFromFile', backend_args=backend_args),
23
- dict(type='Resize', scale=(1333, 800), keep_ratio=True),
24
- # If you don't have a gt annotation, delete the pipeline
25
- dict(type='LoadAnnotations', with_bbox=True),
26
- dict(
27
- type='PackDetInputs',
28
- meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
29
- 'scale_factor', 'instances'))
30
- ]
31
-
32
- train_dataloader = dict(
33
- batch_size=2,
34
- num_workers=2,
35
- persistent_workers=True,
36
- sampler=dict(type='DefaultSampler', shuffle=True),
37
- batch_sampler=dict(type='AspectRatioBatchSampler'),
38
- dataset=dict(
39
- type=dataset_type,
40
- data_root=data_root,
41
- ann_file=train_ann,
42
- filter_cfg=dict(filter_empty_gt=True, min_size=32, bbox_min_size=32),
43
- pipeline=train_pipeline))
44
-
45
- val_dataloader = dict(
46
- batch_size=1,
47
- num_workers=2,
48
- persistent_workers=True,
49
- drop_last=False,
50
- sampler=dict(type='DefaultSampler', shuffle=False),
51
- dataset=dict(
52
- type=dataset_type,
53
- data_root=data_root,
54
- ann_file=val_ann,
55
- test_mode=True,
56
- pipeline=test_pipeline))
57
-
58
- test_dataloader = val_dataloader
59
-
60
- val_evaluator = dict(type='CocoMetric', metric='bbox')
61
- # val_evaluator = dict(type='VOCMetric', metric='mAP', eval_mode='11points')
62
- test_evaluator = val_evaluator
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/datasets/isaid_instance.py DELETED
@@ -1,59 +0,0 @@
1
- # dataset settings
2
- dataset_type = 'iSAIDDataset'
3
- data_root = 'data/iSAID/'
4
- backend_args = None
5
-
6
- # Please see `projects/iSAID/README.md` for data preparation
7
- train_pipeline = [
8
- dict(type='LoadImageFromFile', backend_args=backend_args),
9
- dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
10
- dict(type='Resize', scale=(800, 800), keep_ratio=True),
11
- dict(type='RandomFlip', prob=0.5),
12
- dict(type='PackDetInputs')
13
- ]
14
- test_pipeline = [
15
- dict(type='LoadImageFromFile', backend_args=backend_args),
16
- dict(type='Resize', scale=(800, 800), keep_ratio=True),
17
- dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
18
- dict(
19
- type='PackDetInputs',
20
- meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
21
- 'scale_factor'))
22
- ]
23
- train_dataloader = dict(
24
- batch_size=2,
25
- num_workers=2,
26
- persistent_workers=True,
27
- sampler=dict(type='DefaultSampler', shuffle=True),
28
- batch_sampler=dict(type='AspectRatioBatchSampler'),
29
- dataset=dict(
30
- type=dataset_type,
31
- data_root=data_root,
32
- ann_file='train/instancesonly_filtered_train.json',
33
- data_prefix=dict(img='train/images/'),
34
- filter_cfg=dict(filter_empty_gt=True, min_size=32),
35
- pipeline=train_pipeline,
36
- backend_args=backend_args))
37
- val_dataloader = dict(
38
- batch_size=1,
39
- num_workers=2,
40
- persistent_workers=True,
41
- drop_last=False,
42
- sampler=dict(type='DefaultSampler', shuffle=False),
43
- dataset=dict(
44
- type=dataset_type,
45
- data_root=data_root,
46
- ann_file='val/instancesonly_filtered_val.json',
47
- data_prefix=dict(img='val/images/'),
48
- test_mode=True,
49
- pipeline=test_pipeline,
50
- backend_args=backend_args))
51
- test_dataloader = val_dataloader
52
-
53
- val_evaluator = dict(
54
- type='CocoMetric',
55
- ann_file=data_root + 'val/instancesonly_filtered_val.json',
56
- metric=['bbox', 'segm'],
57
- format_only=False,
58
- backend_args=backend_args)
59
- test_evaluator = val_evaluator
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/datasets/lvis_v0.5_instance.py DELETED
@@ -1,79 +0,0 @@
1
- # dataset settings
2
- dataset_type = 'LVISV05Dataset'
3
- data_root = 'data/lvis_v0.5/'
4
-
5
- # Example to use different file client
6
- # Method 1: simply set the data root and let the file I/O module
7
- # automatically infer from prefix (not support LMDB and Memcache yet)
8
-
9
- # data_root = 's3://openmmlab/datasets/detection/lvis_v0.5/'
10
-
11
- # Method 2: Use `backend_args`, `file_client_args` in versions before 3.0.0rc6
12
- # backend_args = dict(
13
- # backend='petrel',
14
- # path_mapping=dict({
15
- # './data/': 's3://openmmlab/datasets/detection/',
16
- # 'data/': 's3://openmmlab/datasets/detection/'
17
- # }))
18
- backend_args = None
19
-
20
- train_pipeline = [
21
- dict(type='LoadImageFromFile', backend_args=backend_args),
22
- dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
23
- dict(
24
- type='RandomChoiceResize',
25
- scales=[(1333, 640), (1333, 672), (1333, 704), (1333, 736),
26
- (1333, 768), (1333, 800)],
27
- keep_ratio=True),
28
- dict(type='RandomFlip', prob=0.5),
29
- dict(type='PackDetInputs')
30
- ]
31
- test_pipeline = [
32
- dict(type='LoadImageFromFile', backend_args=backend_args),
33
- dict(type='Resize', scale=(1333, 800), keep_ratio=True),
34
- dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
35
- dict(
36
- type='PackDetInputs',
37
- meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
38
- 'scale_factor'))
39
- ]
40
-
41
- train_dataloader = dict(
42
- batch_size=2,
43
- num_workers=2,
44
- persistent_workers=True,
45
- sampler=dict(type='DefaultSampler', shuffle=True),
46
- batch_sampler=dict(type='AspectRatioBatchSampler'),
47
- dataset=dict(
48
- type='ClassBalancedDataset',
49
- oversample_thr=1e-3,
50
- dataset=dict(
51
- type=dataset_type,
52
- data_root=data_root,
53
- ann_file='annotations/lvis_v0.5_train.json',
54
- data_prefix=dict(img='train2017/'),
55
- filter_cfg=dict(filter_empty_gt=True, min_size=32),
56
- pipeline=train_pipeline,
57
- backend_args=backend_args)))
58
- val_dataloader = dict(
59
- batch_size=1,
60
- num_workers=2,
61
- persistent_workers=True,
62
- drop_last=False,
63
- sampler=dict(type='DefaultSampler', shuffle=False),
64
- dataset=dict(
65
- type=dataset_type,
66
- data_root=data_root,
67
- ann_file='annotations/lvis_v0.5_val.json',
68
- data_prefix=dict(img='val2017/'),
69
- test_mode=True,
70
- pipeline=test_pipeline,
71
- backend_args=backend_args))
72
- test_dataloader = val_dataloader
73
-
74
- val_evaluator = dict(
75
- type='LVISMetric',
76
- ann_file=data_root + 'annotations/lvis_v0.5_val.json',
77
- metric=['bbox', 'segm'],
78
- backend_args=backend_args)
79
- test_evaluator = val_evaluator
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/datasets/lvis_v1_instance.py DELETED
@@ -1,22 +0,0 @@
1
- # dataset settings
2
- _base_ = 'lvis_v0.5_instance.py'
3
- dataset_type = 'LVISV1Dataset'
4
- data_root = 'data/lvis_v1/'
5
-
6
- train_dataloader = dict(
7
- dataset=dict(
8
- dataset=dict(
9
- type=dataset_type,
10
- data_root=data_root,
11
- ann_file='annotations/lvis_v1_train.json',
12
- data_prefix=dict(img=''))))
13
- val_dataloader = dict(
14
- dataset=dict(
15
- type=dataset_type,
16
- data_root=data_root,
17
- ann_file='annotations/lvis_v1_val.json',
18
- data_prefix=dict(img='')))
19
- test_dataloader = val_dataloader
20
-
21
- val_evaluator = dict(ann_file=data_root + 'annotations/lvis_v1_val.json')
22
- test_evaluator = val_evaluator
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/datasets/mot_challenge.py DELETED
@@ -1,90 +0,0 @@
1
- # dataset settings
2
- dataset_type = 'MOTChallengeDataset'
3
- data_root = 'data/MOT17/'
4
- img_scale = (1088, 1088)
5
-
6
- backend_args = None
7
- # data pipeline
8
- train_pipeline = [
9
- dict(
10
- type='UniformRefFrameSample',
11
- num_ref_imgs=1,
12
- frame_range=10,
13
- filter_key_img=True),
14
- dict(
15
- type='TransformBroadcaster',
16
- share_random_params=True,
17
- transforms=[
18
- dict(type='LoadImageFromFile', backend_args=backend_args),
19
- dict(type='LoadTrackAnnotations'),
20
- dict(
21
- type='RandomResize',
22
- scale=img_scale,
23
- ratio_range=(0.8, 1.2),
24
- keep_ratio=True,
25
- clip_object_border=False),
26
- dict(type='PhotoMetricDistortion')
27
- ]),
28
- dict(
29
- type='TransformBroadcaster',
30
- # different cropped positions for different frames
31
- share_random_params=False,
32
- transforms=[
33
- dict(
34
- type='RandomCrop', crop_size=img_scale, bbox_clip_border=False)
35
- ]),
36
- dict(
37
- type='TransformBroadcaster',
38
- share_random_params=True,
39
- transforms=[
40
- dict(type='RandomFlip', prob=0.5),
41
- ]),
42
- dict(type='PackTrackInputs')
43
- ]
44
-
45
- test_pipeline = [
46
- dict(
47
- type='TransformBroadcaster',
48
- transforms=[
49
- dict(type='LoadImageFromFile', backend_args=backend_args),
50
- dict(type='Resize', scale=img_scale, keep_ratio=True),
51
- dict(type='LoadTrackAnnotations')
52
- ]),
53
- dict(type='PackTrackInputs')
54
- ]
55
-
56
- # dataloader
57
- train_dataloader = dict(
58
- batch_size=2,
59
- num_workers=2,
60
- persistent_workers=True,
61
- sampler=dict(type='TrackImgSampler'), # image-based sampling
62
- dataset=dict(
63
- type=dataset_type,
64
- data_root=data_root,
65
- visibility_thr=-1,
66
- ann_file='annotations/half-train_cocoformat.json',
67
- data_prefix=dict(img_path='train'),
68
- metainfo=dict(classes=('pedestrian', )),
69
- pipeline=train_pipeline))
70
- val_dataloader = dict(
71
- batch_size=1,
72
- num_workers=2,
73
- persistent_workers=True,
74
- # Now we support two ways to test, image_based and video_based
75
- # if you want to use video_based sampling, you can use as follows
76
- # sampler=dict(type='DefaultSampler', shuffle=False, round_up=False),
77
- sampler=dict(type='TrackImgSampler'), # image-based sampling
78
- dataset=dict(
79
- type=dataset_type,
80
- data_root=data_root,
81
- ann_file='annotations/half-val_cocoformat.json',
82
- data_prefix=dict(img_path='train'),
83
- test_mode=True,
84
- pipeline=test_pipeline))
85
- test_dataloader = val_dataloader
86
-
87
- # evaluator
88
- val_evaluator = dict(
89
- type='MOTChallengeMetric', metric=['HOTA', 'CLEAR', 'Identity'])
90
- test_evaluator = val_evaluator
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/datasets/mot_challenge_det.py DELETED
@@ -1,66 +0,0 @@
1
- # dataset settings
2
- dataset_type = 'CocoDataset'
3
- data_root = 'data/MOT17/'
4
-
5
- backend_args = None
6
- train_pipeline = [
7
- dict(type='LoadImageFromFile', backend_args=backend_args, to_float32=True),
8
- dict(type='LoadAnnotations', with_bbox=True),
9
- dict(
10
- type='RandomResize',
11
- scale=(1088, 1088),
12
- ratio_range=(0.8, 1.2),
13
- keep_ratio=True,
14
- clip_object_border=False),
15
- dict(type='PhotoMetricDistortion'),
16
- dict(type='RandomCrop', crop_size=(1088, 1088), bbox_clip_border=False),
17
- dict(type='RandomFlip', prob=0.5),
18
- dict(type='PackDetInputs')
19
- ]
20
-
21
- test_pipeline = [
22
- dict(type='LoadImageFromFile', backend_args=backend_args),
23
- dict(type='Resize', scale=(1088, 1088), keep_ratio=True),
24
- dict(type='LoadAnnotations', with_bbox=True),
25
- dict(
26
- type='PackDetInputs',
27
- meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
28
- 'scale_factor'))
29
- ]
30
-
31
- train_dataloader = dict(
32
- batch_size=2,
33
- num_workers=2,
34
- persistent_workers=True,
35
- sampler=dict(type='DefaultSampler', shuffle=True),
36
- batch_sampler=dict(type='AspectRatioBatchSampler'),
37
- dataset=dict(
38
- type=dataset_type,
39
- data_root=data_root,
40
- ann_file='annotations/half-train_cocoformat.json',
41
- data_prefix=dict(img='train/'),
42
- metainfo=dict(classes=('pedestrian', )),
43
- filter_cfg=dict(filter_empty_gt=True, min_size=32),
44
- pipeline=train_pipeline))
45
- val_dataloader = dict(
46
- batch_size=1,
47
- num_workers=2,
48
- persistent_workers=True,
49
- drop_last=False,
50
- sampler=dict(type='DefaultSampler', shuffle=False),
51
- dataset=dict(
52
- type=dataset_type,
53
- data_root=data_root,
54
- ann_file='annotations/half-val_cocoformat.json',
55
- data_prefix=dict(img='train/'),
56
- metainfo=dict(classes=('pedestrian', )),
57
- test_mode=True,
58
- pipeline=test_pipeline))
59
- test_dataloader = val_dataloader
60
-
61
- val_evaluator = dict(
62
- type='CocoMetric',
63
- ann_file=data_root + 'annotations/half-val_cocoformat.json',
64
- metric='bbox',
65
- format_only=False)
66
- test_evaluator = val_evaluator
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/datasets/mot_challenge_reid.py DELETED
@@ -1,61 +0,0 @@
1
- # dataset settings
2
- dataset_type = 'ReIDDataset'
3
- data_root = 'data/MOT17/'
4
-
5
- backend_args = None
6
- # data pipeline
7
- train_pipeline = [
8
- dict(
9
- type='TransformBroadcaster',
10
- share_random_params=False,
11
- transforms=[
12
- dict(
13
- type='LoadImageFromFile',
14
- backend_args=backend_args,
15
- to_float32=True),
16
- dict(
17
- type='Resize',
18
- scale=(128, 256),
19
- keep_ratio=False,
20
- clip_object_border=False),
21
- dict(type='RandomFlip', prob=0.5, direction='horizontal'),
22
- ]),
23
- dict(type='PackReIDInputs', meta_keys=('flip', 'flip_direction'))
24
- ]
25
- test_pipeline = [
26
- dict(type='LoadImageFromFile', backend_args=backend_args, to_float32=True),
27
- dict(type='Resize', scale=(128, 256), keep_ratio=False),
28
- dict(type='PackReIDInputs')
29
- ]
30
-
31
- # dataloader
32
- train_dataloader = dict(
33
- batch_size=1,
34
- num_workers=2,
35
- persistent_workers=True,
36
- sampler=dict(type='DefaultSampler', shuffle=True),
37
- dataset=dict(
38
- type=dataset_type,
39
- data_root=data_root,
40
- triplet_sampler=dict(num_ids=8, ins_per_id=4),
41
- data_prefix=dict(img_path='reid/imgs'),
42
- ann_file='reid/meta/train_80.txt',
43
- pipeline=train_pipeline))
44
- val_dataloader = dict(
45
- batch_size=1,
46
- num_workers=2,
47
- persistent_workers=True,
48
- drop_last=False,
49
- sampler=dict(type='DefaultSampler', shuffle=False),
50
- dataset=dict(
51
- type=dataset_type,
52
- data_root=data_root,
53
- triplet_sampler=None,
54
- data_prefix=dict(img_path='reid/imgs'),
55
- ann_file='reid/meta/val_20.txt',
56
- pipeline=test_pipeline))
57
- test_dataloader = val_dataloader
58
-
59
- # evaluator
60
- val_evaluator = dict(type='ReIDMetrics', metric=['mAP', 'CMC'])
61
- test_evaluator = val_evaluator
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/datasets/objects365v1_detection.py DELETED
@@ -1,74 +0,0 @@
1
- # dataset settings
2
- dataset_type = 'Objects365V1Dataset'
3
- data_root = 'data/Objects365/Obj365_v1/'
4
-
5
- # Example to use different file client
6
- # Method 1: simply set the data root and let the file I/O module
7
- # automatically infer from prefix (not support LMDB and Memcache yet)
8
-
9
- # data_root = 's3://openmmlab/datasets/detection/coco/'
10
-
11
- # Method 2: Use `backend_args`, `file_client_args` in versions before 3.0.0rc6
12
- # backend_args = dict(
13
- # backend='petrel',
14
- # path_mapping=dict({
15
- # './data/': 's3://openmmlab/datasets/detection/',
16
- # 'data/': 's3://openmmlab/datasets/detection/'
17
- # }))
18
- backend_args = None
19
-
20
- train_pipeline = [
21
- dict(type='LoadImageFromFile', backend_args=backend_args),
22
- dict(type='LoadAnnotations', with_bbox=True),
23
- dict(type='Resize', scale=(1333, 800), keep_ratio=True),
24
- dict(type='RandomFlip', prob=0.5),
25
- dict(type='PackDetInputs')
26
- ]
27
- test_pipeline = [
28
- dict(type='LoadImageFromFile', backend_args=backend_args),
29
- dict(type='Resize', scale=(1333, 800), keep_ratio=True),
30
- # If you don't have a gt annotation, delete the pipeline
31
- dict(type='LoadAnnotations', with_bbox=True),
32
- dict(
33
- type='PackDetInputs',
34
- meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
35
- 'scale_factor'))
36
- ]
37
- train_dataloader = dict(
38
- batch_size=2,
39
- num_workers=2,
40
- persistent_workers=True,
41
- sampler=dict(type='DefaultSampler', shuffle=True),
42
- batch_sampler=dict(type='AspectRatioBatchSampler'),
43
- dataset=dict(
44
- type=dataset_type,
45
- data_root=data_root,
46
- ann_file='annotations/objects365_train.json',
47
- data_prefix=dict(img='train/'),
48
- filter_cfg=dict(filter_empty_gt=True, min_size=32),
49
- pipeline=train_pipeline,
50
- backend_args=backend_args))
51
- val_dataloader = dict(
52
- batch_size=1,
53
- num_workers=2,
54
- persistent_workers=True,
55
- drop_last=False,
56
- sampler=dict(type='DefaultSampler', shuffle=False),
57
- dataset=dict(
58
- type=dataset_type,
59
- data_root=data_root,
60
- ann_file='annotations/objects365_val.json',
61
- data_prefix=dict(img='val/'),
62
- test_mode=True,
63
- pipeline=test_pipeline,
64
- backend_args=backend_args))
65
- test_dataloader = val_dataloader
66
-
67
- val_evaluator = dict(
68
- type='CocoMetric',
69
- ann_file=data_root + 'annotations/objects365_val.json',
70
- metric='bbox',
71
- sort_categories=True,
72
- format_only=False,
73
- backend_args=backend_args)
74
- test_evaluator = val_evaluator
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/datasets/objects365v2_detection.py DELETED
@@ -1,73 +0,0 @@
1
- # dataset settings
2
- dataset_type = 'Objects365V2Dataset'
3
- data_root = 'data/Objects365/Obj365_v2/'
4
-
5
- # Example to use different file client
6
- # Method 1: simply set the data root and let the file I/O module
7
- # automatically infer from prefix (not support LMDB and Memcache yet)
8
-
9
- # data_root = 's3://openmmlab/datasets/detection/coco/'
10
-
11
- # Method 2: Use `backend_args`, `file_client_args` in versions before 3.0.0rc6
12
- # backend_args = dict(
13
- # backend='petrel',
14
- # path_mapping=dict({
15
- # './data/': 's3://openmmlab/datasets/detection/',
16
- # 'data/': 's3://openmmlab/datasets/detection/'
17
- # }))
18
- backend_args = None
19
-
20
- train_pipeline = [
21
- dict(type='LoadImageFromFile', backend_args=backend_args),
22
- dict(type='LoadAnnotations', with_bbox=True),
23
- dict(type='Resize', scale=(1333, 800), keep_ratio=True),
24
- dict(type='RandomFlip', prob=0.5),
25
- dict(type='PackDetInputs')
26
- ]
27
- test_pipeline = [
28
- dict(type='LoadImageFromFile', backend_args=backend_args),
29
- dict(type='Resize', scale=(1333, 800), keep_ratio=True),
30
- # If you don't have a gt annotation, delete the pipeline
31
- dict(type='LoadAnnotations', with_bbox=True),
32
- dict(
33
- type='PackDetInputs',
34
- meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
35
- 'scale_factor'))
36
- ]
37
- train_dataloader = dict(
38
- batch_size=2,
39
- num_workers=2,
40
- persistent_workers=True,
41
- sampler=dict(type='DefaultSampler', shuffle=True),
42
- batch_sampler=dict(type='AspectRatioBatchSampler'),
43
- dataset=dict(
44
- type=dataset_type,
45
- data_root=data_root,
46
- ann_file='annotations/zhiyuan_objv2_train.json',
47
- data_prefix=dict(img='train/'),
48
- filter_cfg=dict(filter_empty_gt=True, min_size=32),
49
- pipeline=train_pipeline,
50
- backend_args=backend_args))
51
- val_dataloader = dict(
52
- batch_size=1,
53
- num_workers=2,
54
- persistent_workers=True,
55
- drop_last=False,
56
- sampler=dict(type='DefaultSampler', shuffle=False),
57
- dataset=dict(
58
- type=dataset_type,
59
- data_root=data_root,
60
- ann_file='annotations/zhiyuan_objv2_val.json',
61
- data_prefix=dict(img='val/'),
62
- test_mode=True,
63
- pipeline=test_pipeline,
64
- backend_args=backend_args))
65
- test_dataloader = val_dataloader
66
-
67
- val_evaluator = dict(
68
- type='CocoMetric',
69
- ann_file=data_root + 'annotations/zhiyuan_objv2_val.json',
70
- metric='bbox',
71
- format_only=False,
72
- backend_args=backend_args)
73
- test_evaluator = val_evaluator
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/datasets/openimages_detection.py DELETED
@@ -1,81 +0,0 @@
1
- # dataset settings
2
- dataset_type = 'OpenImagesDataset'
3
- data_root = 'data/OpenImages/'
4
-
5
- # Example to use different file client
6
- # Method 1: simply set the data root and let the file I/O module
7
- # automatically infer from prefix (not support LMDB and Memcache yet)
8
-
9
- # data_root = 's3://openmmlab/datasets/detection/coco/'
10
-
11
- # Method 2: Use `backend_args`, `file_client_args` in versions before 3.0.0rc6
12
- # backend_args = dict(
13
- # backend='petrel',
14
- # path_mapping=dict({
15
- # './data/': 's3://openmmlab/datasets/detection/',
16
- # 'data/': 's3://openmmlab/datasets/detection/'
17
- # }))
18
- backend_args = None
19
-
20
- train_pipeline = [
21
- dict(type='LoadImageFromFile', backend_args=backend_args),
22
- dict(type='LoadAnnotations', with_bbox=True),
23
- dict(type='Resize', scale=(1024, 800), keep_ratio=True),
24
- dict(type='RandomFlip', prob=0.5),
25
- dict(type='PackDetInputs')
26
- ]
27
- test_pipeline = [
28
- dict(type='LoadImageFromFile', backend_args=backend_args),
29
- dict(type='Resize', scale=(1024, 800), keep_ratio=True),
30
- # avoid bboxes being resized
31
- dict(type='LoadAnnotations', with_bbox=True),
32
- # TODO: find a better way to collect image_level_labels
33
- dict(
34
- type='PackDetInputs',
35
- meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
36
- 'scale_factor', 'instances', 'image_level_labels'))
37
- ]
38
-
39
- train_dataloader = dict(
40
- batch_size=2,
41
- num_workers=0, # workers_per_gpu > 0 may occur out of memory
42
- persistent_workers=False,
43
- sampler=dict(type='DefaultSampler', shuffle=True),
44
- batch_sampler=dict(type='AspectRatioBatchSampler'),
45
- dataset=dict(
46
- type=dataset_type,
47
- data_root=data_root,
48
- ann_file='annotations/oidv6-train-annotations-bbox.csv',
49
- data_prefix=dict(img='OpenImages/train/'),
50
- label_file='annotations/class-descriptions-boxable.csv',
51
- hierarchy_file='annotations/bbox_labels_600_hierarchy.json',
52
- meta_file='annotations/train-image-metas.pkl',
53
- pipeline=train_pipeline,
54
- backend_args=backend_args))
55
- val_dataloader = dict(
56
- batch_size=1,
57
- num_workers=0,
58
- persistent_workers=False,
59
- drop_last=False,
60
- sampler=dict(type='DefaultSampler', shuffle=False),
61
- dataset=dict(
62
- type=dataset_type,
63
- data_root=data_root,
64
- ann_file='annotations/validation-annotations-bbox.csv',
65
- data_prefix=dict(img='OpenImages/validation/'),
66
- label_file='annotations/class-descriptions-boxable.csv',
67
- hierarchy_file='annotations/bbox_labels_600_hierarchy.json',
68
- meta_file='annotations/validation-image-metas.pkl',
69
- image_level_ann_file='annotations/validation-'
70
- 'annotations-human-imagelabels-boxable.csv',
71
- pipeline=test_pipeline,
72
- backend_args=backend_args))
73
- test_dataloader = val_dataloader
74
-
75
- val_evaluator = dict(
76
- type='OpenImagesMetric',
77
- iou_thrs=0.5,
78
- ioa_thrs=0.5,
79
- use_group_of=True,
80
- get_supercategory=True)
81
- test_evaluator = val_evaluator
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/datasets/refcoco+.py DELETED
@@ -1,55 +0,0 @@
1
- # dataset settings
2
- dataset_type = 'RefCocoDataset'
3
- data_root = 'data/coco/'
4
-
5
- backend_args = None
6
-
7
- test_pipeline = [
8
- dict(type='LoadImageFromFile', backend_args=backend_args),
9
- dict(type='Resize', scale=(1333, 800), keep_ratio=True),
10
- dict(
11
- type='LoadAnnotations',
12
- with_mask=True,
13
- with_bbox=False,
14
- with_seg=False,
15
- with_label=False),
16
- dict(
17
- type='PackDetInputs',
18
- meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
19
- 'scale_factor', 'gt_masks', 'text'))
20
- ]
21
-
22
- val_dataloader = dict(
23
- batch_size=1,
24
- num_workers=2,
25
- persistent_workers=True,
26
- drop_last=False,
27
- sampler=dict(type='DefaultSampler', shuffle=False),
28
- dataset=dict(
29
- type=dataset_type,
30
- data_root=data_root,
31
- data_prefix=dict(img_path='train2014/'),
32
- ann_file='refcoco+/instances.json',
33
- split_file='refcoco+/refs(unc).p',
34
- split='val',
35
- text_mode='select_first',
36
- pipeline=test_pipeline))
37
-
38
- test_dataloader = dict(
39
- batch_size=1,
40
- num_workers=2,
41
- persistent_workers=True,
42
- drop_last=False,
43
- sampler=dict(type='DefaultSampler', shuffle=False),
44
- dataset=dict(
45
- type=dataset_type,
46
- data_root=data_root,
47
- data_prefix=dict(img_path='train2014/'),
48
- ann_file='refcoco+/instances.json',
49
- split_file='refcoco+/refs(unc).p',
50
- split='testA', # or 'testB'
51
- text_mode='select_first',
52
- pipeline=test_pipeline))
53
-
54
- val_evaluator = dict(type='RefSegMetric', metric=['cIoU', 'mIoU'])
55
- test_evaluator = val_evaluator
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/datasets/refcoco.py DELETED
@@ -1,55 +0,0 @@
1
- # dataset settings
2
- dataset_type = 'RefCocoDataset'
3
- data_root = 'data/coco/'
4
-
5
- backend_args = None
6
-
7
- test_pipeline = [
8
- dict(type='LoadImageFromFile', backend_args=backend_args),
9
- dict(type='Resize', scale=(1333, 800), keep_ratio=True),
10
- dict(
11
- type='LoadAnnotations',
12
- with_mask=True,
13
- with_bbox=False,
14
- with_seg=False,
15
- with_label=False),
16
- dict(
17
- type='PackDetInputs',
18
- meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
19
- 'scale_factor', 'gt_masks', 'text'))
20
- ]
21
-
22
- val_dataloader = dict(
23
- batch_size=1,
24
- num_workers=2,
25
- persistent_workers=True,
26
- drop_last=False,
27
- sampler=dict(type='DefaultSampler', shuffle=False),
28
- dataset=dict(
29
- type=dataset_type,
30
- data_root=data_root,
31
- data_prefix=dict(img_path='train2014/'),
32
- ann_file='refcoco/instances.json',
33
- split_file='refcoco/refs(unc).p',
34
- split='val',
35
- text_mode='select_first',
36
- pipeline=test_pipeline))
37
-
38
- test_dataloader = dict(
39
- batch_size=1,
40
- num_workers=2,
41
- persistent_workers=True,
42
- drop_last=False,
43
- sampler=dict(type='DefaultSampler', shuffle=False),
44
- dataset=dict(
45
- type=dataset_type,
46
- data_root=data_root,
47
- data_prefix=dict(img_path='train2014/'),
48
- ann_file='refcoco/instances.json',
49
- split_file='refcoco/refs(unc).p',
50
- split='testA', # or 'testB'
51
- text_mode='select_first',
52
- pipeline=test_pipeline))
53
-
54
- val_evaluator = dict(type='RefSegMetric', metric=['cIoU', 'mIoU'])
55
- test_evaluator = val_evaluator
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/datasets/refcocog.py DELETED
@@ -1,55 +0,0 @@
1
- # dataset settings
2
- dataset_type = 'RefCocoDataset'
3
- data_root = 'data/coco/'
4
-
5
- backend_args = None
6
-
7
- test_pipeline = [
8
- dict(type='LoadImageFromFile', backend_args=backend_args),
9
- dict(type='Resize', scale=(1333, 800), keep_ratio=True),
10
- dict(
11
- type='LoadAnnotations',
12
- with_mask=True,
13
- with_bbox=False,
14
- with_seg=False,
15
- with_label=False),
16
- dict(
17
- type='PackDetInputs',
18
- meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
19
- 'scale_factor', 'gt_masks', 'text'))
20
- ]
21
-
22
- val_dataloader = dict(
23
- batch_size=1,
24
- num_workers=2,
25
- persistent_workers=True,
26
- drop_last=False,
27
- sampler=dict(type='DefaultSampler', shuffle=False),
28
- dataset=dict(
29
- type=dataset_type,
30
- data_root=data_root,
31
- data_prefix=dict(img_path='train2014/'),
32
- ann_file='refcocog/instances.json',
33
- split_file='refcocog/refs(umd).p',
34
- split='val',
35
- text_mode='select_first',
36
- pipeline=test_pipeline))
37
-
38
- test_dataloader = dict(
39
- batch_size=1,
40
- num_workers=2,
41
- persistent_workers=True,
42
- drop_last=False,
43
- sampler=dict(type='DefaultSampler', shuffle=False),
44
- dataset=dict(
45
- type=dataset_type,
46
- data_root=data_root,
47
- data_prefix=dict(img_path='train2014/'),
48
- ann_file='refcocog/instances.json',
49
- split_file='refcocog/refs(umd).p',
50
- split='test',
51
- text_mode='select_first',
52
- pipeline=test_pipeline))
53
-
54
- val_evaluator = dict(type='RefSegMetric', metric=['cIoU', 'mIoU'])
55
- test_evaluator = val_evaluator
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/datasets/semi_coco_detection.py DELETED
@@ -1,178 +0,0 @@
1
- # dataset settings
2
- dataset_type = 'CocoDataset'
3
- data_root = 'data/coco/'
4
-
5
- # Example to use different file client
6
- # Method 1: simply set the data root and let the file I/O module
7
- # automatically infer from prefix (not support LMDB and Memcache yet)
8
-
9
- # data_root = 's3://openmmlab/datasets/detection/coco/'
10
-
11
- # Method 2: Use `backend_args`, `file_client_args` in versions before 3.0.0rc6
12
- # backend_args = dict(
13
- # backend='petrel',
14
- # path_mapping=dict({
15
- # './data/': 's3://openmmlab/datasets/detection/',
16
- # 'data/': 's3://openmmlab/datasets/detection/'
17
- # }))
18
- backend_args = None
19
-
20
- color_space = [
21
- [dict(type='ColorTransform')],
22
- [dict(type='AutoContrast')],
23
- [dict(type='Equalize')],
24
- [dict(type='Sharpness')],
25
- [dict(type='Posterize')],
26
- [dict(type='Solarize')],
27
- [dict(type='Color')],
28
- [dict(type='Contrast')],
29
- [dict(type='Brightness')],
30
- ]
31
-
32
- geometric = [
33
- [dict(type='Rotate')],
34
- [dict(type='ShearX')],
35
- [dict(type='ShearY')],
36
- [dict(type='TranslateX')],
37
- [dict(type='TranslateY')],
38
- ]
39
-
40
- scale = [(1333, 400), (1333, 1200)]
41
-
42
- branch_field = ['sup', 'unsup_teacher', 'unsup_student']
43
- # pipeline used to augment labeled data,
44
- # which will be sent to student model for supervised training.
45
- sup_pipeline = [
46
- dict(type='LoadImageFromFile', backend_args=backend_args),
47
- dict(type='LoadAnnotations', with_bbox=True),
48
- dict(type='RandomResize', scale=scale, keep_ratio=True),
49
- dict(type='RandomFlip', prob=0.5),
50
- dict(type='RandAugment', aug_space=color_space, aug_num=1),
51
- dict(type='FilterAnnotations', min_gt_bbox_wh=(1e-2, 1e-2)),
52
- dict(
53
- type='MultiBranch',
54
- branch_field=branch_field,
55
- sup=dict(type='PackDetInputs'))
56
- ]
57
-
58
- # pipeline used to augment unlabeled data weakly,
59
- # which will be sent to teacher model for predicting pseudo instances.
60
- weak_pipeline = [
61
- dict(type='RandomResize', scale=scale, keep_ratio=True),
62
- dict(type='RandomFlip', prob=0.5),
63
- dict(
64
- type='PackDetInputs',
65
- meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
66
- 'scale_factor', 'flip', 'flip_direction',
67
- 'homography_matrix')),
68
- ]
69
-
70
- # pipeline used to augment unlabeled data strongly,
71
- # which will be sent to student model for unsupervised training.
72
- strong_pipeline = [
73
- dict(type='RandomResize', scale=scale, keep_ratio=True),
74
- dict(type='RandomFlip', prob=0.5),
75
- dict(
76
- type='RandomOrder',
77
- transforms=[
78
- dict(type='RandAugment', aug_space=color_space, aug_num=1),
79
- dict(type='RandAugment', aug_space=geometric, aug_num=1),
80
- ]),
81
- dict(type='RandomErasing', n_patches=(1, 5), ratio=(0, 0.2)),
82
- dict(type='FilterAnnotations', min_gt_bbox_wh=(1e-2, 1e-2)),
83
- dict(
84
- type='PackDetInputs',
85
- meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
86
- 'scale_factor', 'flip', 'flip_direction',
87
- 'homography_matrix')),
88
- ]
89
-
90
- # pipeline used to augment unlabeled data into different views
91
- unsup_pipeline = [
92
- dict(type='LoadImageFromFile', backend_args=backend_args),
93
- dict(type='LoadEmptyAnnotations'),
94
- dict(
95
- type='MultiBranch',
96
- branch_field=branch_field,
97
- unsup_teacher=weak_pipeline,
98
- unsup_student=strong_pipeline,
99
- )
100
- ]
101
-
102
- test_pipeline = [
103
- dict(type='LoadImageFromFile', backend_args=backend_args),
104
- dict(type='Resize', scale=(1333, 800), keep_ratio=True),
105
- dict(
106
- type='PackDetInputs',
107
- meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
108
- 'scale_factor'))
109
- ]
110
-
111
- batch_size = 5
112
- num_workers = 5
113
- # There are two common semi-supervised learning settings on the coco dataset:
114
- # (1) Divide the train2017 into labeled and unlabeled datasets
115
- # by a fixed percentage, such as 1%, 2%, 5% and 10%.
116
- # The format of labeled_ann_file and unlabeled_ann_file are
117
- # instances_train2017.{fold}@{percent}.json, and
118
- # instances_train2017.{fold}@{percent}-unlabeled.json
119
- # `fold` is used for cross-validation, and `percent` represents
120
- # the proportion of labeled data in the train2017.
121
- # (2) Choose the train2017 as the labeled dataset
122
- # and unlabeled2017 as the unlabeled dataset.
123
- # The labeled_ann_file and unlabeled_ann_file are
124
- # instances_train2017.json and image_info_unlabeled2017.json
125
- # We use this configuration by default.
126
- labeled_dataset = dict(
127
- type=dataset_type,
128
- data_root=data_root,
129
- ann_file='annotations/instances_train2017.json',
130
- data_prefix=dict(img='train2017/'),
131
- filter_cfg=dict(filter_empty_gt=True, min_size=32),
132
- pipeline=sup_pipeline,
133
- backend_args=backend_args)
134
-
135
- unlabeled_dataset = dict(
136
- type=dataset_type,
137
- data_root=data_root,
138
- ann_file='annotations/instances_unlabeled2017.json',
139
- data_prefix=dict(img='unlabeled2017/'),
140
- filter_cfg=dict(filter_empty_gt=False),
141
- pipeline=unsup_pipeline,
142
- backend_args=backend_args)
143
-
144
- train_dataloader = dict(
145
- batch_size=batch_size,
146
- num_workers=num_workers,
147
- persistent_workers=True,
148
- sampler=dict(
149
- type='GroupMultiSourceSampler',
150
- batch_size=batch_size,
151
- source_ratio=[1, 4]),
152
- dataset=dict(
153
- type='ConcatDataset', datasets=[labeled_dataset, unlabeled_dataset]))
154
-
155
- val_dataloader = dict(
156
- batch_size=1,
157
- num_workers=2,
158
- persistent_workers=True,
159
- drop_last=False,
160
- sampler=dict(type='DefaultSampler', shuffle=False),
161
- dataset=dict(
162
- type=dataset_type,
163
- data_root=data_root,
164
- ann_file='annotations/instances_val2017.json',
165
- data_prefix=dict(img='val2017/'),
166
- test_mode=True,
167
- pipeline=test_pipeline,
168
- backend_args=backend_args))
169
-
170
- test_dataloader = val_dataloader
171
-
172
- val_evaluator = dict(
173
- type='CocoMetric',
174
- ann_file=data_root + 'annotations/instances_val2017.json',
175
- metric='bbox',
176
- format_only=False,
177
- backend_args=backend_args)
178
- test_evaluator = val_evaluator
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/datasets/voc0712.py DELETED
@@ -1,92 +0,0 @@
1
- # dataset settings
2
- dataset_type = 'VOCDataset'
3
- data_root = 'data/VOCdevkit/'
4
-
5
- # Example to use different file client
6
- # Method 1: simply set the data root and let the file I/O module
7
- # automatically Infer from prefix (not support LMDB and Memcache yet)
8
-
9
- # data_root = 's3://openmmlab/datasets/detection/segmentation/VOCdevkit/'
10
-
11
- # Method 2: Use `backend_args`, `file_client_args` in versions before 3.0.0rc6
12
- # backend_args = dict(
13
- # backend='petrel',
14
- # path_mapping=dict({
15
- # './data/': 's3://openmmlab/datasets/segmentation/',
16
- # 'data/': 's3://openmmlab/datasets/segmentation/'
17
- # }))
18
- backend_args = None
19
-
20
- train_pipeline = [
21
- dict(type='LoadImageFromFile', backend_args=backend_args),
22
- dict(type='LoadAnnotations', with_bbox=True),
23
- dict(type='Resize', scale=(1000, 600), keep_ratio=True),
24
- dict(type='RandomFlip', prob=0.5),
25
- dict(type='PackDetInputs')
26
- ]
27
- test_pipeline = [
28
- dict(type='LoadImageFromFile', backend_args=backend_args),
29
- dict(type='Resize', scale=(1000, 600), keep_ratio=True),
30
- # avoid bboxes being resized
31
- dict(type='LoadAnnotations', with_bbox=True),
32
- dict(
33
- type='PackDetInputs',
34
- meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
35
- 'scale_factor'))
36
- ]
37
- train_dataloader = dict(
38
- batch_size=2,
39
- num_workers=2,
40
- persistent_workers=True,
41
- sampler=dict(type='DefaultSampler', shuffle=True),
42
- batch_sampler=dict(type='AspectRatioBatchSampler'),
43
- dataset=dict(
44
- type='RepeatDataset',
45
- times=3,
46
- dataset=dict(
47
- type='ConcatDataset',
48
- # VOCDataset will add different `dataset_type` in dataset.metainfo,
49
- # which will get error if using ConcatDataset. Adding
50
- # `ignore_keys` can avoid this error.
51
- ignore_keys=['dataset_type'],
52
- datasets=[
53
- dict(
54
- type=dataset_type,
55
- data_root=data_root,
56
- ann_file='VOC2007/ImageSets/Main/trainval.txt',
57
- data_prefix=dict(sub_data_root='VOC2007/'),
58
- filter_cfg=dict(
59
- filter_empty_gt=True, min_size=32, bbox_min_size=32),
60
- pipeline=train_pipeline,
61
- backend_args=backend_args),
62
- dict(
63
- type=dataset_type,
64
- data_root=data_root,
65
- ann_file='VOC2012/ImageSets/Main/trainval.txt',
66
- data_prefix=dict(sub_data_root='VOC2012/'),
67
- filter_cfg=dict(
68
- filter_empty_gt=True, min_size=32, bbox_min_size=32),
69
- pipeline=train_pipeline,
70
- backend_args=backend_args)
71
- ])))
72
-
73
- val_dataloader = dict(
74
- batch_size=1,
75
- num_workers=2,
76
- persistent_workers=True,
77
- drop_last=False,
78
- sampler=dict(type='DefaultSampler', shuffle=False),
79
- dataset=dict(
80
- type=dataset_type,
81
- data_root=data_root,
82
- ann_file='VOC2007/ImageSets/Main/test.txt',
83
- data_prefix=dict(sub_data_root='VOC2007/'),
84
- test_mode=True,
85
- pipeline=test_pipeline,
86
- backend_args=backend_args))
87
- test_dataloader = val_dataloader
88
-
89
- # Pascal VOC2007 uses `11points` as default evaluate mode, while PASCAL
90
- # VOC2012 defaults to use 'area'.
91
- val_evaluator = dict(type='VOCMetric', metric='mAP', eval_mode='11points')
92
- test_evaluator = val_evaluator
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/datasets/wider_face.py DELETED
@@ -1,73 +0,0 @@
1
- # dataset settings
2
- dataset_type = 'WIDERFaceDataset'
3
- data_root = 'data/WIDERFace/'
4
- # Example to use different file client
5
- # Method 1: simply set the data root and let the file I/O module
6
- # automatically infer from prefix (not support LMDB and Memcache yet)
7
-
8
- # data_root = 's3://openmmlab/datasets/detection/cityscapes/'
9
-
10
- # Method 2: Use `backend_args`, `file_client_args` in versions before 3.0.0rc6
11
- # backend_args = dict(
12
- # backend='petrel',
13
- # path_mapping=dict({
14
- # './data/': 's3://openmmlab/datasets/detection/',
15
- # 'data/': 's3://openmmlab/datasets/detection/'
16
- # }))
17
- backend_args = None
18
-
19
- img_scale = (640, 640) # VGA resolution
20
-
21
- train_pipeline = [
22
- dict(type='LoadImageFromFile', backend_args=backend_args),
23
- dict(type='LoadAnnotations', with_bbox=True),
24
- dict(type='Resize', scale=img_scale, keep_ratio=True),
25
- dict(type='RandomFlip', prob=0.5),
26
- dict(type='PackDetInputs')
27
- ]
28
- test_pipeline = [
29
- dict(type='LoadImageFromFile', backend_args=backend_args),
30
- dict(type='Resize', scale=img_scale, keep_ratio=True),
31
- dict(type='LoadAnnotations', with_bbox=True),
32
- dict(
33
- type='PackDetInputs',
34
- meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
35
- 'scale_factor'))
36
- ]
37
-
38
- train_dataloader = dict(
39
- batch_size=2,
40
- num_workers=2,
41
- persistent_workers=True,
42
- drop_last=False,
43
- sampler=dict(type='DefaultSampler', shuffle=True),
44
- batch_sampler=dict(type='AspectRatioBatchSampler'),
45
- dataset=dict(
46
- type=dataset_type,
47
- data_root=data_root,
48
- ann_file='train.txt',
49
- data_prefix=dict(img='WIDER_train'),
50
- filter_cfg=dict(filter_empty_gt=True, bbox_min_size=17, min_size=32),
51
- pipeline=train_pipeline))
52
-
53
- val_dataloader = dict(
54
- batch_size=1,
55
- num_workers=2,
56
- persistent_workers=True,
57
- drop_last=False,
58
- sampler=dict(type='DefaultSampler', shuffle=False),
59
- dataset=dict(
60
- type=dataset_type,
61
- data_root=data_root,
62
- ann_file='val.txt',
63
- data_prefix=dict(img='WIDER_val'),
64
- test_mode=True,
65
- pipeline=test_pipeline))
66
- test_dataloader = val_dataloader
67
-
68
- val_evaluator = dict(
69
- # TODO: support WiderFace-Evaluation for easy, medium, hard cases
70
- type='VOCMetric',
71
- metric='mAP',
72
- eval_mode='11points')
73
- test_evaluator = val_evaluator
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/datasets/youtube_vis.py DELETED
@@ -1,66 +0,0 @@
1
- dataset_type = 'YouTubeVISDataset'
2
- data_root = 'data/youtube_vis_2019/'
3
- dataset_version = data_root[-5:-1] # 2019 or 2021
4
-
5
- backend_args = None
6
-
7
- # dataset settings
8
- train_pipeline = [
9
- dict(
10
- type='UniformRefFrameSample',
11
- num_ref_imgs=1,
12
- frame_range=100,
13
- filter_key_img=True),
14
- dict(
15
- type='TransformBroadcaster',
16
- share_random_params=True,
17
- transforms=[
18
- dict(type='LoadImageFromFile', backend_args=backend_args),
19
- dict(type='LoadTrackAnnotations', with_mask=True),
20
- dict(type='Resize', scale=(640, 360), keep_ratio=True),
21
- dict(type='RandomFlip', prob=0.5),
22
- ]),
23
- dict(type='PackTrackInputs')
24
- ]
25
-
26
- test_pipeline = [
27
- dict(
28
- type='TransformBroadcaster',
29
- transforms=[
30
- dict(type='LoadImageFromFile', backend_args=backend_args),
31
- dict(type='Resize', scale=(640, 360), keep_ratio=True),
32
- dict(type='LoadTrackAnnotations', with_mask=True),
33
- ]),
34
- dict(type='PackTrackInputs')
35
- ]
36
-
37
- # dataloader
38
- train_dataloader = dict(
39
- batch_size=2,
40
- num_workers=2,
41
- persistent_workers=True,
42
- # sampler=dict(type='TrackImgSampler'), # image-based sampling
43
- sampler=dict(type='DefaultSampler', shuffle=True),
44
- batch_sampler=dict(type='TrackAspectRatioBatchSampler'),
45
- dataset=dict(
46
- type=dataset_type,
47
- data_root=data_root,
48
- dataset_version=dataset_version,
49
- ann_file='annotations/youtube_vis_2019_train.json',
50
- data_prefix=dict(img_path='train/JPEGImages'),
51
- pipeline=train_pipeline))
52
- val_dataloader = dict(
53
- batch_size=1,
54
- num_workers=2,
55
- persistent_workers=True,
56
- drop_last=False,
57
- sampler=dict(type='DefaultSampler', shuffle=False, round_up=False),
58
- dataset=dict(
59
- type=dataset_type,
60
- data_root=data_root,
61
- dataset_version=dataset_version,
62
- ann_file='annotations/youtube_vis_2019_valid.json',
63
- data_prefix=dict(img_path='valid/JPEGImages'),
64
- test_mode=True,
65
- pipeline=test_pipeline))
66
- test_dataloader = val_dataloader
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/default_runtime.py DELETED
@@ -1,25 +0,0 @@
1
- default_scope = 'mmdet'
2
-
3
- default_hooks = dict(
4
- timer=dict(type='IterTimerHook'),
5
- logger=dict(type='LoggerHook', interval=50),
6
- param_scheduler=dict(type='ParamSchedulerHook'),
7
- checkpoint=dict(type='CheckpointHook', interval=1),
8
- sampler_seed=dict(type='DistSamplerSeedHook'),
9
- visualization=dict(type='DetVisualizationHook'))
10
-
11
- env_cfg = dict(
12
- cudnn_benchmark=False,
13
- mp_cfg=dict(mp_start_method='fork', opencv_num_threads=0),
14
- dist_cfg=dict(backend='nccl'),
15
- )
16
-
17
- vis_backends = [dict(type='LocalVisBackend')]
18
- visualizer = dict(
19
- type='DetLocalVisualizer', vis_backends=vis_backends, name='visualizer', save_dir="/root/nas-public-linkdata/mmdet/public_result/vis/1/")
20
- log_processor = dict(type='LogProcessor', window_size=50, by_epoch=True)
21
-
22
- log_level = 'INFO'
23
- load_from = None
24
- resume = False
25
- #find_unused_parameters = True
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/models/cascade-mask-rcnn_r50_fpn.py DELETED
@@ -1,203 +0,0 @@
1
- # model settings
2
- model = dict(
3
- type='CascadeRCNN',
4
- data_preprocessor=dict(
5
- type='DetDataPreprocessor',
6
- mean=[123.675, 116.28, 103.53],
7
- std=[58.395, 57.12, 57.375],
8
- bgr_to_rgb=True,
9
- pad_mask=True,
10
- pad_size_divisor=32),
11
- backbone=dict(
12
- type='ResNet',
13
- depth=50,
14
- num_stages=4,
15
- out_indices=(0, 1, 2, 3),
16
- frozen_stages=1,
17
- norm_cfg=dict(type='BN', requires_grad=True),
18
- norm_eval=True,
19
- style='pytorch',
20
- init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')),
21
- neck=dict(
22
- type='FPN',
23
- in_channels=[256, 512, 1024, 2048],
24
- out_channels=256,
25
- num_outs=5),
26
- rpn_head=dict(
27
- type='RPNHead',
28
- in_channels=256,
29
- feat_channels=256,
30
- anchor_generator=dict(
31
- type='AnchorGenerator',
32
- scales=[8],
33
- ratios=[0.5, 1.0, 2.0],
34
- strides=[4, 8, 16, 32, 64]),
35
- bbox_coder=dict(
36
- type='DeltaXYWHBBoxCoder',
37
- target_means=[.0, .0, .0, .0],
38
- target_stds=[1.0, 1.0, 1.0, 1.0]),
39
- loss_cls=dict(
40
- type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
41
- loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0)),
42
- roi_head=dict(
43
- type='CascadeRoIHead',
44
- num_stages=3,
45
- stage_loss_weights=[1, 0.5, 0.25],
46
- bbox_roi_extractor=dict(
47
- type='SingleRoIExtractor',
48
- roi_layer=dict(type='RoIAlign', output_size=7, sampling_ratio=0),
49
- out_channels=256,
50
- featmap_strides=[4, 8, 16, 32]),
51
- bbox_head=[
52
- dict(
53
- type='Shared2FCBBoxHead',
54
- in_channels=256,
55
- fc_out_channels=1024,
56
- roi_feat_size=7,
57
- num_classes=80,
58
- bbox_coder=dict(
59
- type='DeltaXYWHBBoxCoder',
60
- target_means=[0., 0., 0., 0.],
61
- target_stds=[0.1, 0.1, 0.2, 0.2]),
62
- reg_class_agnostic=True,
63
- loss_cls=dict(
64
- type='CrossEntropyLoss',
65
- use_sigmoid=False,
66
- loss_weight=1.0),
67
- loss_bbox=dict(type='SmoothL1Loss', beta=1.0,
68
- loss_weight=1.0)),
69
- dict(
70
- type='Shared2FCBBoxHead',
71
- in_channels=256,
72
- fc_out_channels=1024,
73
- roi_feat_size=7,
74
- num_classes=80,
75
- bbox_coder=dict(
76
- type='DeltaXYWHBBoxCoder',
77
- target_means=[0., 0., 0., 0.],
78
- target_stds=[0.05, 0.05, 0.1, 0.1]),
79
- reg_class_agnostic=True,
80
- loss_cls=dict(
81
- type='CrossEntropyLoss',
82
- use_sigmoid=False,
83
- loss_weight=1.0),
84
- loss_bbox=dict(type='SmoothL1Loss', beta=1.0,
85
- loss_weight=1.0)),
86
- dict(
87
- type='Shared2FCBBoxHead',
88
- in_channels=256,
89
- fc_out_channels=1024,
90
- roi_feat_size=7,
91
- num_classes=80,
92
- bbox_coder=dict(
93
- type='DeltaXYWHBBoxCoder',
94
- target_means=[0., 0., 0., 0.],
95
- target_stds=[0.033, 0.033, 0.067, 0.067]),
96
- reg_class_agnostic=True,
97
- loss_cls=dict(
98
- type='CrossEntropyLoss',
99
- use_sigmoid=False,
100
- loss_weight=1.0),
101
- loss_bbox=dict(type='SmoothL1Loss', beta=1.0, loss_weight=1.0))
102
- ],
103
- mask_roi_extractor=dict(
104
- type='SingleRoIExtractor',
105
- roi_layer=dict(type='RoIAlign', output_size=14, sampling_ratio=0),
106
- out_channels=256,
107
- featmap_strides=[4, 8, 16, 32]),
108
- mask_head=dict(
109
- type='FCNMaskHead',
110
- num_convs=4,
111
- in_channels=256,
112
- conv_out_channels=256,
113
- num_classes=80,
114
- loss_mask=dict(
115
- type='CrossEntropyLoss', use_mask=True, loss_weight=1.0))),
116
- # model training and testing settings
117
- train_cfg=dict(
118
- rpn=dict(
119
- assigner=dict(
120
- type='MaxIoUAssigner',
121
- pos_iou_thr=0.7,
122
- neg_iou_thr=0.3,
123
- min_pos_iou=0.3,
124
- match_low_quality=True,
125
- ignore_iof_thr=-1),
126
- sampler=dict(
127
- type='RandomSampler',
128
- num=256,
129
- pos_fraction=0.5,
130
- neg_pos_ub=-1,
131
- add_gt_as_proposals=False),
132
- allowed_border=0,
133
- pos_weight=-1,
134
- debug=False),
135
- rpn_proposal=dict(
136
- nms_pre=2000,
137
- max_per_img=2000,
138
- nms=dict(type='nms', iou_threshold=0.7),
139
- min_bbox_size=0),
140
- rcnn=[
141
- dict(
142
- assigner=dict(
143
- type='MaxIoUAssigner',
144
- pos_iou_thr=0.5,
145
- neg_iou_thr=0.5,
146
- min_pos_iou=0.5,
147
- match_low_quality=False,
148
- ignore_iof_thr=-1),
149
- sampler=dict(
150
- type='RandomSampler',
151
- num=512,
152
- pos_fraction=0.25,
153
- neg_pos_ub=-1,
154
- add_gt_as_proposals=True),
155
- mask_size=28,
156
- pos_weight=-1,
157
- debug=False),
158
- dict(
159
- assigner=dict(
160
- type='MaxIoUAssigner',
161
- pos_iou_thr=0.6,
162
- neg_iou_thr=0.6,
163
- min_pos_iou=0.6,
164
- match_low_quality=False,
165
- ignore_iof_thr=-1),
166
- sampler=dict(
167
- type='RandomSampler',
168
- num=512,
169
- pos_fraction=0.25,
170
- neg_pos_ub=-1,
171
- add_gt_as_proposals=True),
172
- mask_size=28,
173
- pos_weight=-1,
174
- debug=False),
175
- dict(
176
- assigner=dict(
177
- type='MaxIoUAssigner',
178
- pos_iou_thr=0.7,
179
- neg_iou_thr=0.7,
180
- min_pos_iou=0.7,
181
- match_low_quality=False,
182
- ignore_iof_thr=-1),
183
- sampler=dict(
184
- type='RandomSampler',
185
- num=512,
186
- pos_fraction=0.25,
187
- neg_pos_ub=-1,
188
- add_gt_as_proposals=True),
189
- mask_size=28,
190
- pos_weight=-1,
191
- debug=False)
192
- ]),
193
- test_cfg=dict(
194
- rpn=dict(
195
- nms_pre=1000,
196
- max_per_img=1000,
197
- nms=dict(type='nms', iou_threshold=0.7),
198
- min_bbox_size=0),
199
- rcnn=dict(
200
- score_thr=0.05,
201
- nms=dict(type='nms', iou_threshold=0.5),
202
- max_per_img=100,
203
- mask_thr_binary=0.5)))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/models/cascade-rcnn_r50_fpn.py DELETED
@@ -1,280 +0,0 @@
1
- # model settings
2
- model = dict(
3
- type='CascadeRCNN',
4
- data_preprocessor=dict(
5
- type='DetDataPreprocessor',
6
- mean=[123.675, 116.28, 103.53],
7
- std=[58.395, 57.12, 57.375],
8
- bgr_to_rgb=True,
9
- pad_size_divisor=32),
10
- backbone=dict(
11
- type='ResNet',
12
- depth=50,
13
- num_stages=4,
14
- out_indices=(0, 1, 2, 3),
15
- frozen_stages=1,
16
- norm_cfg=dict(type='BN', requires_grad=True),
17
- norm_eval=True,
18
- style='pytorch',
19
- init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')),
20
- neck=dict(
21
- type='FPN',
22
- in_channels=[256, 512, 1024, 2048],
23
- out_channels=256,
24
- num_outs=5),
25
- rpn_head=dict(
26
- type='RPNHead',
27
- in_channels=256,
28
- feat_channels=256,
29
- anchor_generator=dict(
30
- type='AnchorGenerator',
31
- scales=[8], #[8]
32
- ratios=[0.5, 1.0, 2.0],
33
- strides=[4, 8, 16, 32, 64]),
34
- bbox_coder=dict(
35
- type='DeltaXYWHBBoxCoder',
36
- target_means=[.0, .0, .0, .0],
37
- target_stds=[1.0, 1.0, 1.0, 1.0]),
38
- loss_cls=dict(
39
- type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
40
- loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0)),
41
- roi_head=dict(
42
- type='CascadeRoIHead',
43
- num_stages=3,
44
- stage_loss_weights=[1, 0.5, 0.25],
45
- bbox_roi_extractor=dict(
46
- type='SingleRoIExtractor',
47
- roi_layer=dict(type='RoIAlign', output_size=7, sampling_ratio=0),
48
- out_channels=256,
49
- featmap_strides=[4, 8, 16, 32]),
50
- bbox_head=[
51
- dict(
52
- type='Shared2FCBBoxHead',
53
- in_channels=256,
54
- fc_out_channels=1024,
55
- roi_feat_size=7,
56
- num_classes=10,
57
- bbox_coder=dict(
58
- type='DeltaXYWHBBoxCoder',
59
- target_means=[0., 0., 0., 0.],
60
- target_stds=[0.1, 0.1, 0.2, 0.2]),
61
- reg_class_agnostic=True,
62
- loss_cls=dict(
63
- type='CrossEntropyLoss',
64
- use_sigmoid=False,
65
- loss_weight=1.0),
66
- loss_bbox=dict(type='SmoothL1Loss', beta=1.0,
67
- loss_weight=1.0)),
68
- dict(
69
- type='Shared2FCBBoxHead',
70
- in_channels=256,
71
- fc_out_channels=1024,
72
- roi_feat_size=7,
73
- num_classes=10,
74
- bbox_coder=dict(
75
- type='DeltaXYWHBBoxCoder',
76
- target_means=[0., 0., 0., 0.],
77
- target_stds=[0.05, 0.05, 0.1, 0.1]),
78
- reg_class_agnostic=True,
79
- loss_cls=dict(
80
- type='CrossEntropyLoss',
81
- use_sigmoid=False,
82
- loss_weight=1.0),
83
- loss_bbox=dict(type='SmoothL1Loss', beta=1.0,
84
- loss_weight=1.0)),
85
- dict(
86
- type='Shared2FCBBoxHead',
87
- in_channels=256,
88
- fc_out_channels=1024,
89
- roi_feat_size=7,
90
- num_classes=10,
91
- bbox_coder=dict(
92
- type='DeltaXYWHBBoxCoder',
93
- target_means=[0., 0., 0., 0.],
94
- target_stds=[0.033, 0.033, 0.067, 0.067]),
95
- reg_class_agnostic=True,
96
- loss_cls=dict(
97
- type='CrossEntropyLoss',
98
- use_sigmoid=False,
99
- loss_weight=1.0),
100
- loss_bbox=dict(type='SmoothL1Loss', beta=1.0, loss_weight=1.0))
101
- ]),
102
- # model training and testing settings
103
- # train_cfg=dict(
104
- # rpn=dict(
105
- # assigner=dict(
106
- # type='MaxIoUAssigner',
107
- # pos_iou_thr=0.7,
108
- # neg_iou_thr=0.3,
109
- # min_pos_iou=0.3,
110
- # match_low_quality=True,
111
- # ignore_iof_thr=-1),
112
- # sampler=dict(
113
- # type='RandomSampler',
114
- # num=256,
115
- # pos_fraction=0.5,
116
- # neg_pos_ub=-1,
117
- # add_gt_as_proposals=False),
118
- # allowed_border=0,
119
- # pos_weight=-1,
120
- # debug=False),
121
- # rpn_proposal=dict(
122
- # nms_pre=2000,
123
- # max_per_img=2000,
124
- # nms=dict(type='nms', iou_threshold=0.7),
125
- # min_bbox_size=0),
126
- # rcnn=[
127
- # dict(
128
- # assigner=dict(
129
- # type='MaxIoUAssigner',
130
- # pos_iou_thr=0.5,
131
- # neg_iou_thr=0.5,
132
- # min_pos_iou=0.5,
133
- # match_low_quality=False,
134
- # ignore_iof_thr=-1),
135
- # sampler=dict(
136
- # type='RandomSampler',
137
- # num=512,
138
- # pos_fraction=0.25,
139
- # neg_pos_ub=-1,
140
- # add_gt_as_proposals=True),
141
- # pos_weight=-1,
142
- # debug=False),
143
- # dict(
144
- # assigner=dict(
145
- # type='MaxIoUAssigner',
146
- # pos_iou_thr=0.6,
147
- # neg_iou_thr=0.6,
148
- # min_pos_iou=0.6,
149
- # match_low_quality=False,
150
- # ignore_iof_thr=-1),
151
- # sampler=dict(
152
- # type='RandomSampler',
153
- # num=512,
154
- # pos_fraction=0.25,
155
- # neg_pos_ub=-1,
156
- # add_gt_as_proposals=True),
157
- # pos_weight=-1,
158
- # debug=False),
159
- # dict(
160
- # assigner=dict(
161
- # type='MaxIoUAssigner',
162
- # pos_iou_thr=0.7,
163
- # neg_iou_thr=0.7,
164
- # min_pos_iou=0.7,
165
- # match_low_quality=False,
166
- # ignore_iof_thr=-1),
167
- # sampler=dict(
168
- # type='RandomSampler',
169
- # num=512,
170
- # pos_fraction=0.25,
171
- # neg_pos_ub=-1,
172
- # add_gt_as_proposals=True),
173
- # pos_weight=-1,
174
- # debug=False)
175
- # ]),
176
- # test_cfg=dict(
177
- # rpn=dict(
178
- # nms_pre=1000,
179
- # max_per_img=1000,
180
- # nms=dict(type='nms', iou_threshold=0.7),
181
- # min_bbox_size=0),
182
- # rcnn=dict(
183
- # score_thr=0.05,
184
- # nms=dict(type='nms', iou_threshold=0.5),
185
- # max_per_img=100)))
186
- train_cfg=dict(
187
- rpn=dict(
188
- assigner=dict(
189
- type='MaxIoUAssigner',
190
- pos_iou_thr=0.7,
191
- neg_iou_thr=0.3,
192
- min_pos_iou=0.3,
193
- match_low_quality=True,
194
- ignore_iof_thr=-1),
195
- sampler=dict(
196
- type='RandomSampler',
197
- num=256,
198
- pos_fraction=0.5,
199
- neg_pos_ub=-1,
200
- add_gt_as_proposals=False),
201
- allowed_border=0,
202
- pos_weight=-1,
203
- debug=False),
204
- rpn_proposal=dict(
205
- nms_pre=3000,
206
- max_per_img=3000,
207
- nms=dict(type='nms', iou_threshold=0.7),
208
- min_bbox_size=0),
209
- rcnn=[
210
- dict(
211
- assigner=dict(
212
- type='MaxIoUAssigner',
213
- pos_iou_thr=0.5,
214
- neg_iou_thr=0.5,
215
- min_pos_iou=0.5,
216
- match_low_quality=False,
217
- ignore_iof_thr=-1),
218
- sampler=dict(
219
- type='RandomSampler',
220
- num=512,
221
- pos_fraction=0.25,
222
- neg_pos_ub=-1,
223
- add_gt_as_proposals=True),
224
- pos_weight=-1,
225
- debug=False),
226
- dict(
227
- assigner=dict(
228
- type='MaxIoUAssigner',
229
- pos_iou_thr=0.6,
230
- neg_iou_thr=0.6,
231
- min_pos_iou=0.6,
232
- match_low_quality=False,
233
- ignore_iof_thr=-1),
234
- sampler=dict(
235
- type='RandomSampler',
236
- num=512,
237
- pos_fraction=0.25,
238
- neg_pos_ub=-1,
239
- add_gt_as_proposals=True),
240
- pos_weight=-1,
241
- debug=False),
242
- dict(
243
- assigner=dict(
244
- type='MaxIoUAssigner',
245
- pos_iou_thr=0.7,
246
- neg_iou_thr=0.7,
247
- min_pos_iou=0.7,
248
- match_low_quality=False,
249
- ignore_iof_thr=-1),
250
- sampler=dict(
251
- type='RandomSampler',
252
- num=512,
253
- pos_fraction=0.25,
254
- neg_pos_ub=-1,
255
- add_gt_as_proposals=True),
256
- pos_weight=-1,
257
- debug=False)
258
- ]),
259
- test_cfg=dict(
260
- rpn=dict(
261
- nms_pre=3000,
262
- max_per_img=3000,
263
- nms=dict(type='nms', iou_threshold=0.7),
264
- min_bbox_size=0),
265
- rcnn=dict(
266
- score_thr=0.05,
267
- nms=dict(type='nms', iou_threshold=0.5),
268
- max_per_img=3000)))
269
-
270
- optimizer = dict(type='SGD', lr=0.02/4, momentum=0.9, weight_decay=0.0001)
271
- # learning policy
272
- checkpoint_config = dict(interval=4)
273
- lr_config = dict(
274
- policy='step',
275
- warmup='linear',
276
- warmup_iters=5000,
277
- warmup_ratio=0.001,
278
- step=[8, 11])
279
- runner = dict(type='EpochBasedRunner', max_epochs=12)
280
- evaluation = dict(interval=12, metric='bbox')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/models/fast-rcnn_r50_fpn.py DELETED
@@ -1,68 +0,0 @@
1
- # model settings
2
- model = dict(
3
- type='FastRCNN',
4
- data_preprocessor=dict(
5
- type='DetDataPreprocessor',
6
- mean=[123.675, 116.28, 103.53],
7
- std=[58.395, 57.12, 57.375],
8
- bgr_to_rgb=True,
9
- pad_size_divisor=32),
10
- backbone=dict(
11
- type='ResNet',
12
- depth=50,
13
- num_stages=4,
14
- out_indices=(0, 1, 2, 3),
15
- frozen_stages=1,
16
- norm_cfg=dict(type='BN', requires_grad=True),
17
- norm_eval=True,
18
- style='pytorch',
19
- init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')),
20
- neck=dict(
21
- type='FPN',
22
- in_channels=[256, 512, 1024, 2048],
23
- out_channels=256,
24
- num_outs=5),
25
- roi_head=dict(
26
- type='StandardRoIHead',
27
- bbox_roi_extractor=dict(
28
- type='SingleRoIExtractor',
29
- roi_layer=dict(type='RoIAlign', output_size=7, sampling_ratio=0),
30
- out_channels=256,
31
- featmap_strides=[4, 8, 16, 32]),
32
- bbox_head=dict(
33
- type='Shared2FCBBoxHead',
34
- in_channels=256,
35
- fc_out_channels=1024,
36
- roi_feat_size=7,
37
- num_classes=80,
38
- bbox_coder=dict(
39
- type='DeltaXYWHBBoxCoder',
40
- target_means=[0., 0., 0., 0.],
41
- target_stds=[0.1, 0.1, 0.2, 0.2]),
42
- reg_class_agnostic=False,
43
- loss_cls=dict(
44
- type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0),
45
- loss_bbox=dict(type='L1Loss', loss_weight=1.0))),
46
- # model training and testing settings
47
- train_cfg=dict(
48
- rcnn=dict(
49
- assigner=dict(
50
- type='MaxIoUAssigner',
51
- pos_iou_thr=0.5,
52
- neg_iou_thr=0.5,
53
- min_pos_iou=0.5,
54
- match_low_quality=False,
55
- ignore_iof_thr=-1),
56
- sampler=dict(
57
- type='RandomSampler',
58
- num=512,
59
- pos_fraction=0.25,
60
- neg_pos_ub=-1,
61
- add_gt_as_proposals=True),
62
- pos_weight=-1,
63
- debug=False)),
64
- test_cfg=dict(
65
- rcnn=dict(
66
- score_thr=0.05,
67
- nms=dict(type='nms', iou_threshold=0.5),
68
- max_per_img=100)))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/models/faster-rcnn_r50-caffe-c4.py DELETED
@@ -1,123 +0,0 @@
1
- # model settings
2
- norm_cfg = dict(type='BN', requires_grad=False)
3
- model = dict(
4
- type='FasterRCNN',
5
- data_preprocessor=dict(
6
- type='DetDataPreprocessor',
7
- mean=[103.530, 116.280, 123.675],
8
- std=[1.0, 1.0, 1.0],
9
- bgr_to_rgb=False,
10
- pad_size_divisor=32),
11
- backbone=dict(
12
- type='ResNet',
13
- depth=50,
14
- num_stages=3,
15
- strides=(1, 2, 2),
16
- dilations=(1, 1, 1),
17
- out_indices=(2, ),
18
- frozen_stages=1,
19
- norm_cfg=norm_cfg,
20
- norm_eval=True,
21
- style='caffe',
22
- init_cfg=dict(
23
- type='Pretrained',
24
- checkpoint='open-mmlab://detectron2/resnet50_caffe')),
25
- rpn_head=dict(
26
- type='RPNHead',
27
- in_channels=1024,
28
- feat_channels=1024,
29
- anchor_generator=dict(
30
- type='AnchorGenerator',
31
- scales=[2, 4, 8, 16, 32],
32
- ratios=[0.5, 1.0, 2.0],
33
- strides=[16]),
34
- bbox_coder=dict(
35
- type='DeltaXYWHBBoxCoder',
36
- target_means=[.0, .0, .0, .0],
37
- target_stds=[1.0, 1.0, 1.0, 1.0]),
38
- loss_cls=dict(
39
- type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
40
- loss_bbox=dict(type='L1Loss', loss_weight=1.0)),
41
- roi_head=dict(
42
- type='StandardRoIHead',
43
- shared_head=dict(
44
- type='ResLayer',
45
- depth=50,
46
- stage=3,
47
- stride=2,
48
- dilation=1,
49
- style='caffe',
50
- norm_cfg=norm_cfg,
51
- norm_eval=True,
52
- init_cfg=dict(
53
- type='Pretrained',
54
- checkpoint='open-mmlab://detectron2/resnet50_caffe')),
55
- bbox_roi_extractor=dict(
56
- type='SingleRoIExtractor',
57
- roi_layer=dict(type='RoIAlign', output_size=14, sampling_ratio=0),
58
- out_channels=1024,
59
- featmap_strides=[16]),
60
- bbox_head=dict(
61
- type='BBoxHead',
62
- with_avg_pool=True,
63
- roi_feat_size=7,
64
- in_channels=2048,
65
- num_classes=1,
66
- bbox_coder=dict(
67
- type='DeltaXYWHBBoxCoder',
68
- target_means=[0., 0., 0., 0.],
69
- target_stds=[0.1, 0.1, 0.2, 0.2]),
70
- reg_class_agnostic=False,
71
- loss_cls=dict(
72
- type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0),
73
- loss_bbox=dict(type='L1Loss', loss_weight=1.0))),
74
- # model training and testing settings
75
- train_cfg=dict(
76
- rpn=dict(
77
- assigner=dict(
78
- type='MaxIoUAssigner',
79
- pos_iou_thr=0.7,
80
- neg_iou_thr=0.3,
81
- min_pos_iou=0.3,
82
- match_low_quality=True,
83
- ignore_iof_thr=-1),
84
- sampler=dict(
85
- type='RandomSampler',
86
- num=256,
87
- pos_fraction=0.5,
88
- neg_pos_ub=-1,
89
- add_gt_as_proposals=False),
90
- allowed_border=-1,
91
- pos_weight=-1,
92
- debug=False),
93
- rpn_proposal=dict(
94
- nms_pre=12000,
95
- max_per_img=2000,
96
- nms=dict(type='nms', iou_threshold=0.7),
97
- min_bbox_size=0),
98
- rcnn=dict(
99
- assigner=dict(
100
- type='MaxIoUAssigner',
101
- pos_iou_thr=0.5,
102
- neg_iou_thr=0.5,
103
- min_pos_iou=0.5,
104
- match_low_quality=False,
105
- ignore_iof_thr=-1),
106
- sampler=dict(
107
- type='RandomSampler',
108
- num=512,
109
- pos_fraction=0.25,
110
- neg_pos_ub=-1,
111
- add_gt_as_proposals=True),
112
- pos_weight=-1,
113
- debug=False)),
114
- test_cfg=dict(
115
- rpn=dict(
116
- nms_pre=6000,
117
- max_per_img=1000,
118
- nms=dict(type='nms', iou_threshold=0.7),
119
- min_bbox_size=0),
120
- rcnn=dict(
121
- score_thr=0.05,
122
- nms=dict(type='nms', iou_threshold=0.5),
123
- max_per_img=100)))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/models/faster-rcnn_r50-caffe-dc5.py DELETED
@@ -1,111 +0,0 @@
1
- # model settings
2
- norm_cfg = dict(type='BN', requires_grad=False)
3
- model = dict(
4
- type='FasterRCNN',
5
- data_preprocessor=dict(
6
- type='DetDataPreprocessor',
7
- mean=[103.530, 116.280, 123.675],
8
- std=[1.0, 1.0, 1.0],
9
- bgr_to_rgb=False,
10
- pad_size_divisor=32),
11
- backbone=dict(
12
- type='ResNet',
13
- depth=50,
14
- num_stages=4,
15
- strides=(1, 2, 2, 1),
16
- dilations=(1, 1, 1, 2),
17
- out_indices=(3, ),
18
- frozen_stages=1,
19
- norm_cfg=norm_cfg,
20
- norm_eval=True,
21
- style='caffe',
22
- init_cfg=dict(
23
- type='Pretrained',
24
- checkpoint='open-mmlab://detectron2/resnet50_caffe')),
25
- rpn_head=dict(
26
- type='RPNHead',
27
- in_channels=2048,
28
- feat_channels=2048,
29
- anchor_generator=dict(
30
- type='AnchorGenerator',
31
- scales=[2, 4, 8, 16, 32],
32
- ratios=[0.5, 1.0, 2.0],
33
- strides=[16]),
34
- bbox_coder=dict(
35
- type='DeltaXYWHBBoxCoder',
36
- target_means=[.0, .0, .0, .0],
37
- target_stds=[1.0, 1.0, 1.0, 1.0]),
38
- loss_cls=dict(
39
- type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
40
- loss_bbox=dict(type='L1Loss', loss_weight=1.0)),
41
- roi_head=dict(
42
- type='StandardRoIHead',
43
- bbox_roi_extractor=dict(
44
- type='SingleRoIExtractor',
45
- roi_layer=dict(type='RoIAlign', output_size=7, sampling_ratio=0),
46
- out_channels=2048,
47
- featmap_strides=[16]),
48
- bbox_head=dict(
49
- type='Shared2FCBBoxHead',
50
- in_channels=2048,
51
- fc_out_channels=1024,
52
- roi_feat_size=7,
53
- num_classes=80,
54
- bbox_coder=dict(
55
- type='DeltaXYWHBBoxCoder',
56
- target_means=[0., 0., 0., 0.],
57
- target_stds=[0.1, 0.1, 0.2, 0.2]),
58
- reg_class_agnostic=False,
59
- loss_cls=dict(
60
- type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0),
61
- loss_bbox=dict(type='L1Loss', loss_weight=1.0))),
62
- # model training and testing settings
63
- train_cfg=dict(
64
- rpn=dict(
65
- assigner=dict(
66
- type='MaxIoUAssigner',
67
- pos_iou_thr=0.7,
68
- neg_iou_thr=0.3,
69
- min_pos_iou=0.3,
70
- match_low_quality=True,
71
- ignore_iof_thr=-1),
72
- sampler=dict(
73
- type='RandomSampler',
74
- num=256,
75
- pos_fraction=0.5,
76
- neg_pos_ub=-1,
77
- add_gt_as_proposals=False),
78
- allowed_border=0,
79
- pos_weight=-1,
80
- debug=False),
81
- rpn_proposal=dict(
82
- nms_pre=12000,
83
- max_per_img=2000,
84
- nms=dict(type='nms', iou_threshold=0.7),
85
- min_bbox_size=0),
86
- rcnn=dict(
87
- assigner=dict(
88
- type='MaxIoUAssigner',
89
- pos_iou_thr=0.5,
90
- neg_iou_thr=0.5,
91
- min_pos_iou=0.5,
92
- match_low_quality=False,
93
- ignore_iof_thr=-1),
94
- sampler=dict(
95
- type='RandomSampler',
96
- num=512,
97
- pos_fraction=0.25,
98
- neg_pos_ub=-1,
99
- add_gt_as_proposals=True),
100
- pos_weight=-1,
101
- debug=False)),
102
- test_cfg=dict(
103
- rpn=dict(
104
- nms=dict(type='nms', iou_threshold=0.7),
105
- nms_pre=6000,
106
- max_per_img=1000,
107
- min_bbox_size=0),
108
- rcnn=dict(
109
- score_thr=0.05,
110
- nms=dict(type='nms', iou_threshold=0.5),
111
- max_per_img=100)))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/models/faster-rcnn_r50_fpn.py DELETED
@@ -1,168 +0,0 @@
1
- # model settings
2
- model = dict(
3
- type='FasterRCNN',
4
- data_preprocessor=dict(
5
- type='DetDataPreprocessor',
6
- mean=[123.675, 116.28, 103.53],
7
- std=[58.395, 57.12, 57.375],
8
- bgr_to_rgb=True,
9
- pad_size_divisor=32),
10
- backbone=dict(
11
- type='ResNet',
12
- depth=50,
13
- num_stages=4,
14
- out_indices=(0, 1, 2, 3),
15
- frozen_stages=1,
16
- norm_cfg=dict(type='BN', requires_grad=True),
17
- norm_eval=True,
18
- style='pytorch',
19
- init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')),
20
- neck=dict(
21
- type='FPN',
22
- in_channels=[256, 512, 1024, 2048],
23
- out_channels=256,
24
- num_outs=5),
25
- rpn_head=dict(
26
- type='RPNHead',
27
- in_channels=256,
28
- feat_channels=256,
29
- anchor_generator=dict(
30
- type='AnchorGenerator',
31
- scales=[8],
32
- ratios=[0.5, 1.0, 2.0],
33
- strides=[4, 8, 16, 32, 64]),
34
- bbox_coder=dict(
35
- type='DeltaXYWHBBoxCoder',
36
- target_means=[.0, .0, .0, .0],
37
- target_stds=[1.0, 1.0, 1.0, 1.0]),
38
- loss_cls=dict(
39
- type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
40
- loss_bbox=dict(type='L1Loss', loss_weight=1.0)),
41
- roi_head=dict(
42
- type='StandardRoIHead',
43
- bbox_roi_extractor=dict(
44
- type='SingleRoIExtractor',
45
- roi_layer=dict(type='RoIAlign', output_size=7, sampling_ratio=0),
46
- out_channels=256,
47
- featmap_strides=[4, 8, 16, 32]),
48
- bbox_head=dict(
49
- type='Shared2FCBBoxHead',
50
- in_channels=256,
51
- fc_out_channels=1024,
52
- roi_feat_size=7,
53
- num_classes=8,
54
- bbox_coder=dict(
55
- type='DeltaXYWHBBoxCoder',
56
- target_means=[0., 0., 0., 0.],
57
- target_stds=[0.1, 0.1, 0.2, 0.2]),
58
- reg_class_agnostic=False,
59
- loss_cls=dict(
60
- type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0),
61
- loss_bbox=dict(type='L1Loss', loss_weight=1.0))),
62
- # model training and testing settings
63
- # train_cfg=dict(
64
- # rpn=dict(
65
- # assigner=dict(
66
- # type='MaxIoUAssigner',
67
- # pos_iou_thr=0.7,
68
- # neg_iou_thr=0.3,
69
- # min_pos_iou=0.3,
70
- # match_low_quality=True,
71
- # ignore_iof_thr=-1),
72
- # sampler=dict(
73
- # type='RandomSampler',
74
- # num=256,
75
- # pos_fraction=0.5,
76
- # neg_pos_ub=-1,
77
- # add_gt_as_proposals=False),
78
- # allowed_border=-1,
79
- # pos_weight=-1,
80
- # debug=False),
81
- # rpn_proposal=dict(
82
- # nms_pre=2000,
83
- # max_per_img=1000,
84
- # nms=dict(type='nms', iou_threshold=0.7),
85
- # min_bbox_size=0),
86
- # rcnn=dict(
87
- # assigner=dict(
88
- # type='MaxIoUAssigner',
89
- # pos_iou_thr=0.5,
90
- # neg_iou_thr=0.5,
91
- # min_pos_iou=0.5,
92
- # match_low_quality=False,
93
- # ignore_iof_thr=-1),
94
- # sampler=dict(
95
- # type='RandomSampler',
96
- # num=512,
97
- # pos_fraction=0.25,
98
- # neg_pos_ub=-1,
99
- # add_gt_as_proposals=True),
100
- # pos_weight=-1,
101
- # debug=False)),
102
- # test_cfg=dict(
103
- # rpn=dict(
104
- # nms_pre=1000,
105
- # max_per_img=1000,
106
- # nms=dict(type='nms', iou_threshold=0.7),
107
- # min_bbox_size=0),
108
- # rcnn=dict(
109
- # score_thr=0.05,
110
- # nms=dict(type='nms', iou_threshold=0.5),
111
- # max_per_img=100)
112
- # # soft-nms is also supported for rcnn testing
113
- # # e.g., nms=dict(type='soft_nms', iou_threshold=0.5, min_score=0.05)
114
- # ))
115
- train_cfg=dict(
116
- rpn=dict(
117
- assigner=dict(
118
- type='MaxIoUAssigner',
119
- pos_iou_thr=0.7,
120
- neg_iou_thr=0.3,
121
- min_pos_iou=0.3,
122
- match_low_quality=True,
123
- ignore_iof_thr=-1,
124
- gpu_assign_thr=512),
125
- sampler=dict(
126
- type='RandomSampler',
127
- num=256,
128
- pos_fraction=0.5,
129
- neg_pos_ub=-1,
130
- add_gt_as_proposals=False),
131
- allowed_border=-1,
132
- pos_weight=-1,
133
- debug=False),
134
- rpn_proposal=dict(
135
- nms_pre=3000,
136
- max_per_img=3000,
137
- nms=dict(type='nms', iou_threshold=0.7),
138
- min_bbox_size=0),
139
- rcnn=dict(
140
- assigner=dict(
141
- type='MaxIoUAssigner',
142
- pos_iou_thr=0.5,
143
- neg_iou_thr=0.5,
144
- min_pos_iou=0.5,
145
- match_low_quality=False,
146
- ignore_iof_thr=-1,
147
- gpu_assign_thr=512),
148
- sampler=dict(
149
- type='RandomSampler',
150
- num=512,
151
- pos_fraction=0.25,
152
- neg_pos_ub=-1,
153
- add_gt_as_proposals=True),
154
- pos_weight=-1,
155
- debug=False)),
156
- test_cfg=dict(
157
- rpn=dict(
158
- nms_pre=3000,
159
- max_per_img=3000,
160
- nms=dict(type='nms', iou_threshold=0.7),
161
- min_bbox_size=0),
162
- rcnn=dict(
163
- score_thr=0.05,
164
- nms=dict(type='nms', iou_threshold=0.5),
165
- max_per_img=3000)
166
- # soft-nms is also supported for rcnn testing
167
- # e.g., nms=dict(type='soft_nms', iou_threshold=0.5, min_score=0.05)
168
- ))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/models/mask-rcnn_r50-caffe-c4.py DELETED
@@ -1,132 +0,0 @@
1
- # model settings
2
- norm_cfg = dict(type='BN', requires_grad=False)
3
- model = dict(
4
- type='MaskRCNN',
5
- data_preprocessor=dict(
6
- type='DetDataPreprocessor',
7
- mean=[103.530, 116.280, 123.675],
8
- std=[1.0, 1.0, 1.0],
9
- bgr_to_rgb=False,
10
- pad_mask=True,
11
- pad_size_divisor=32),
12
- backbone=dict(
13
- type='ResNet',
14
- depth=50,
15
- num_stages=3,
16
- strides=(1, 2, 2),
17
- dilations=(1, 1, 1),
18
- out_indices=(2, ),
19
- frozen_stages=1,
20
- norm_cfg=norm_cfg,
21
- norm_eval=True,
22
- style='caffe',
23
- init_cfg=dict(
24
- type='Pretrained',
25
- checkpoint='open-mmlab://detectron2/resnet50_caffe')),
26
- rpn_head=dict(
27
- type='RPNHead',
28
- in_channels=1024,
29
- feat_channels=1024,
30
- anchor_generator=dict(
31
- type='AnchorGenerator',
32
- scales=[2, 4, 8, 16, 32],
33
- ratios=[0.5, 1.0, 2.0],
34
- strides=[16]),
35
- bbox_coder=dict(
36
- type='DeltaXYWHBBoxCoder',
37
- target_means=[.0, .0, .0, .0],
38
- target_stds=[1.0, 1.0, 1.0, 1.0]),
39
- loss_cls=dict(
40
- type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
41
- loss_bbox=dict(type='L1Loss', loss_weight=1.0)),
42
- roi_head=dict(
43
- type='StandardRoIHead',
44
- shared_head=dict(
45
- type='ResLayer',
46
- depth=50,
47
- stage=3,
48
- stride=2,
49
- dilation=1,
50
- style='caffe',
51
- norm_cfg=norm_cfg,
52
- norm_eval=True),
53
- bbox_roi_extractor=dict(
54
- type='SingleRoIExtractor',
55
- roi_layer=dict(type='RoIAlign', output_size=14, sampling_ratio=0),
56
- out_channels=1024,
57
- featmap_strides=[16]),
58
- bbox_head=dict(
59
- type='BBoxHead',
60
- with_avg_pool=True,
61
- roi_feat_size=7,
62
- in_channels=2048,
63
- num_classes=80,
64
- bbox_coder=dict(
65
- type='DeltaXYWHBBoxCoder',
66
- target_means=[0., 0., 0., 0.],
67
- target_stds=[0.1, 0.1, 0.2, 0.2]),
68
- reg_class_agnostic=False,
69
- loss_cls=dict(
70
- type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0),
71
- loss_bbox=dict(type='L1Loss', loss_weight=1.0)),
72
- mask_roi_extractor=None,
73
- mask_head=dict(
74
- type='FCNMaskHead',
75
- num_convs=0,
76
- in_channels=2048,
77
- conv_out_channels=256,
78
- num_classes=80,
79
- loss_mask=dict(
80
- type='CrossEntropyLoss', use_mask=True, loss_weight=1.0))),
81
- # model training and testing settings
82
- train_cfg=dict(
83
- rpn=dict(
84
- assigner=dict(
85
- type='MaxIoUAssigner',
86
- pos_iou_thr=0.7,
87
- neg_iou_thr=0.3,
88
- min_pos_iou=0.3,
89
- match_low_quality=True,
90
- ignore_iof_thr=-1),
91
- sampler=dict(
92
- type='RandomSampler',
93
- num=256,
94
- pos_fraction=0.5,
95
- neg_pos_ub=-1,
96
- add_gt_as_proposals=False),
97
- allowed_border=0,
98
- pos_weight=-1,
99
- debug=False),
100
- rpn_proposal=dict(
101
- nms_pre=12000,
102
- max_per_img=2000,
103
- nms=dict(type='nms', iou_threshold=0.7),
104
- min_bbox_size=0),
105
- rcnn=dict(
106
- assigner=dict(
107
- type='MaxIoUAssigner',
108
- pos_iou_thr=0.5,
109
- neg_iou_thr=0.5,
110
- min_pos_iou=0.5,
111
- match_low_quality=False,
112
- ignore_iof_thr=-1),
113
- sampler=dict(
114
- type='RandomSampler',
115
- num=512,
116
- pos_fraction=0.25,
117
- neg_pos_ub=-1,
118
- add_gt_as_proposals=True),
119
- mask_size=14,
120
- pos_weight=-1,
121
- debug=False)),
122
- test_cfg=dict(
123
- rpn=dict(
124
- nms_pre=6000,
125
- nms=dict(type='nms', iou_threshold=0.7),
126
- max_per_img=1000,
127
- min_bbox_size=0),
128
- rcnn=dict(
129
- score_thr=0.05,
130
- nms=dict(type='nms', iou_threshold=0.5),
131
- max_per_img=100,
132
- mask_thr_binary=0.5)))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/models/mask-rcnn_r50_fpn.py DELETED
@@ -1,127 +0,0 @@
1
- # model settings
2
- model = dict(
3
- type='MaskRCNN',
4
- data_preprocessor=dict(
5
- type='DetDataPreprocessor',
6
- mean=[123.675, 116.28, 103.53],
7
- std=[58.395, 57.12, 57.375],
8
- bgr_to_rgb=True,
9
- pad_mask=True,
10
- pad_size_divisor=32),
11
- backbone=dict(
12
- type='ResNet',
13
- depth=50,
14
- num_stages=4,
15
- out_indices=(0, 1, 2, 3),
16
- frozen_stages=1,
17
- norm_cfg=dict(type='BN', requires_grad=True),
18
- norm_eval=True,
19
- style='pytorch',
20
- init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')),
21
- neck=dict(
22
- type='FPN',
23
- in_channels=[256, 512, 1024, 2048],
24
- out_channels=256,
25
- num_outs=5),
26
- rpn_head=dict(
27
- type='RPNHead',
28
- in_channels=256,
29
- feat_channels=256,
30
- anchor_generator=dict(
31
- type='AnchorGenerator',
32
- scales=[8],
33
- ratios=[0.5, 1.0, 2.0],
34
- strides=[4, 8, 16, 32, 64]),
35
- bbox_coder=dict(
36
- type='DeltaXYWHBBoxCoder',
37
- target_means=[.0, .0, .0, .0],
38
- target_stds=[1.0, 1.0, 1.0, 1.0]),
39
- loss_cls=dict(
40
- type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
41
- loss_bbox=dict(type='L1Loss', loss_weight=1.0)),
42
- roi_head=dict(
43
- type='StandardRoIHead',
44
- bbox_roi_extractor=dict(
45
- type='SingleRoIExtractor',
46
- roi_layer=dict(type='RoIAlign', output_size=7, sampling_ratio=0),
47
- out_channels=256,
48
- featmap_strides=[4, 8, 16, 32]),
49
- bbox_head=dict(
50
- type='Shared2FCBBoxHead',
51
- in_channels=256,
52
- fc_out_channels=1024,
53
- roi_feat_size=7,
54
- num_classes=80,
55
- bbox_coder=dict(
56
- type='DeltaXYWHBBoxCoder',
57
- target_means=[0., 0., 0., 0.],
58
- target_stds=[0.1, 0.1, 0.2, 0.2]),
59
- reg_class_agnostic=False,
60
- loss_cls=dict(
61
- type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0),
62
- loss_bbox=dict(type='L1Loss', loss_weight=1.0)),
63
- mask_roi_extractor=dict(
64
- type='SingleRoIExtractor',
65
- roi_layer=dict(type='RoIAlign', output_size=14, sampling_ratio=0),
66
- out_channels=256,
67
- featmap_strides=[4, 8, 16, 32]),
68
- mask_head=dict(
69
- type='FCNMaskHead',
70
- num_convs=4,
71
- in_channels=256,
72
- conv_out_channels=256,
73
- num_classes=80,
74
- loss_mask=dict(
75
- type='CrossEntropyLoss', use_mask=True, loss_weight=1.0))),
76
- # model training and testing settings
77
- train_cfg=dict(
78
- rpn=dict(
79
- assigner=dict(
80
- type='MaxIoUAssigner',
81
- pos_iou_thr=0.7,
82
- neg_iou_thr=0.3,
83
- min_pos_iou=0.3,
84
- match_low_quality=True,
85
- ignore_iof_thr=-1),
86
- sampler=dict(
87
- type='RandomSampler',
88
- num=256,
89
- pos_fraction=0.5,
90
- neg_pos_ub=-1,
91
- add_gt_as_proposals=False),
92
- allowed_border=-1,
93
- pos_weight=-1,
94
- debug=False),
95
- rpn_proposal=dict(
96
- nms_pre=2000,
97
- max_per_img=1000,
98
- nms=dict(type='nms', iou_threshold=0.7),
99
- min_bbox_size=0),
100
- rcnn=dict(
101
- assigner=dict(
102
- type='MaxIoUAssigner',
103
- pos_iou_thr=0.5,
104
- neg_iou_thr=0.5,
105
- min_pos_iou=0.5,
106
- match_low_quality=True,
107
- ignore_iof_thr=-1),
108
- sampler=dict(
109
- type='RandomSampler',
110
- num=512,
111
- pos_fraction=0.25,
112
- neg_pos_ub=-1,
113
- add_gt_as_proposals=True),
114
- mask_size=28,
115
- pos_weight=-1,
116
- debug=False)),
117
- test_cfg=dict(
118
- rpn=dict(
119
- nms_pre=1000,
120
- max_per_img=1000,
121
- nms=dict(type='nms', iou_threshold=0.7),
122
- min_bbox_size=0),
123
- rcnn=dict(
124
- score_thr=0.05,
125
- nms=dict(type='nms', iou_threshold=0.5),
126
- max_per_img=100,
127
- mask_thr_binary=0.5)))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/models/retinanet_r50_fpn copy.py DELETED
@@ -1,68 +0,0 @@
1
- # model settings
2
- model = dict(
3
- type='RetinaNet',
4
- data_preprocessor=dict(
5
- type='DetDataPreprocessor',
6
- mean=[123.675, 116.28, 103.53],
7
- std=[58.395, 57.12, 57.375],
8
- bgr_to_rgb=True,
9
- pad_size_divisor=32),
10
- backbone=dict(
11
- type='ResNet',
12
- depth=50,
13
- num_stages=4,
14
- out_indices=(0, 1, 2, 3),
15
- frozen_stages=1,
16
- norm_cfg=dict(type='BN', requires_grad=True),
17
- norm_eval=True,
18
- style='pytorch',
19
- init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')),
20
- neck=dict(
21
- type='FPN',
22
- in_channels=[256, 512, 1024, 2048],
23
- out_channels=256,
24
- start_level=1,
25
- add_extra_convs='on_input',
26
- num_outs=5),
27
- bbox_head=dict(
28
- type='RetinaHead',
29
- num_classes=1,
30
- in_channels=256,
31
- stacked_convs=4,
32
- feat_channels=256,
33
- anchor_generator=dict(
34
- type='AnchorGenerator',
35
- octave_base_scale=2,#4
36
- scales_per_octave=3,
37
- ratios=[0.5, 1.0, 2.0],
38
- strides=[8, 16, 32, 64, 128]),
39
- bbox_coder=dict(
40
- type='DeltaXYWHBBoxCoder',
41
- target_means=[.0, .0, .0, .0],
42
- target_stds=[1.0, 1.0, 1.0, 1.0]),
43
- loss_cls=dict(
44
- type='FocalLoss',
45
- use_sigmoid=True,
46
- gamma=2.0,
47
- alpha=0.25,
48
- loss_weight=1.0),
49
- loss_bbox=dict(type='L1Loss', loss_weight=1.0)),
50
- # model training and testing settings
51
- train_cfg=dict(
52
- assigner=dict(
53
- type='MaxIoUAssigner',
54
- pos_iou_thr=0.5,
55
- neg_iou_thr=0.4,
56
- min_pos_iou=0,
57
- ignore_iof_thr=-1),
58
- sampler=dict(
59
- type='PseudoSampler'), # Focal loss should use PseudoSampler
60
- allowed_border=-1,
61
- pos_weight=-1,
62
- debug=False),
63
- test_cfg=dict(
64
- nms_pre=1000,
65
- min_bbox_size=0,
66
- score_thr=0.05,
67
- nms=dict(type='nms', iou_threshold=0.5),
68
- max_per_img=100))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/models/retinanet_r50_fpn.py DELETED
@@ -1,78 +0,0 @@
1
- # model settings
2
- model = dict(
3
- type='RetinaNet',
4
- data_preprocessor=dict(
5
- type='DetDataPreprocessor',
6
- mean=[123.675, 116.28, 103.53],
7
- std=[58.395, 57.12, 57.375],
8
- bgr_to_rgb=True,
9
- pad_size_divisor=32),
10
- backbone=dict(
11
- type='ResNet',
12
- depth=50,
13
- num_stages=4,
14
- out_indices=(0, 1, 2, 3),
15
- frozen_stages=1,
16
- norm_cfg=dict(type='BN', requires_grad=True),
17
- norm_eval=True,
18
- style='pytorch',
19
- init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')),
20
- neck=dict(
21
- type='FPN',
22
- in_channels=[256, 512, 1024, 2048],
23
- out_channels=256,
24
- start_level=1,
25
- add_extra_convs='on_input',
26
- num_outs=5),
27
- bbox_head=dict(
28
- type='RetinaHead',
29
- num_classes=1,
30
- in_channels=256,
31
- stacked_convs=4,
32
- feat_channels=256,
33
- anchor_generator=dict(
34
- type='AnchorGenerator',
35
- octave_base_scale=2,#4
36
- scales_per_octave=3,
37
- ratios=[0.5, 1.0, 2.0],
38
- strides=[8, 16, 32, 64, 128]),
39
- bbox_coder=dict(
40
- type='DeltaXYWHBBoxCoder',
41
- target_means=[.0, .0, .0, .0],
42
- target_stds=[1.0, 1.0, 1.0, 1.0]),
43
- loss_cls=dict(
44
- type='FocalLoss',
45
- use_sigmoid=True,
46
- gamma=2.0,
47
- alpha=0.25,
48
- loss_weight=1.0),
49
- loss_bbox=dict(type='L1Loss', loss_weight=1.0)),
50
- # model training and testing settings
51
- train_cfg=dict(
52
- assigner=dict(
53
- type='MaxIoUAssigner',
54
- pos_iou_thr=0.5,
55
- neg_iou_thr=0.4,
56
- min_pos_iou=0,
57
- ignore_iof_thr=-1),
58
- sampler=dict(
59
- type='PseudoSampler'), # Focal loss should use PseudoSampler
60
- allowed_border=-1,
61
- pos_weight=-1,
62
- debug=False),
63
- test_cfg=dict(
64
- nms_pre=3000,
65
- min_bbox_size=0,
66
- score_thr=0.05,
67
- nms=dict(type='nms', iou_threshold=0.5),
68
- max_per_img=3000))
69
-
70
- #optimizer = dict(type='SGD', lr=0.0005, momentum=0.9, weight_decay=0.0001) # single gpu
71
- # learning policy
72
- checkpoint_config = dict(interval=4)
73
- # lr_config = dict(
74
- # policy='step',
75
- # warmup='linear',
76
- # warmup_iters=5000,
77
- # warmup_ratio=0.001,
78
- # step=[8, 11])
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/models/rpn_r50-caffe-c4.py DELETED
@@ -1,64 +0,0 @@
1
- # model settings
2
- model = dict(
3
- type='RPN',
4
- data_preprocessor=dict(
5
- type='DetDataPreprocessor',
6
- mean=[103.530, 116.280, 123.675],
7
- std=[1.0, 1.0, 1.0],
8
- bgr_to_rgb=False,
9
- pad_size_divisor=32),
10
- backbone=dict(
11
- type='ResNet',
12
- depth=50,
13
- num_stages=3,
14
- strides=(1, 2, 2),
15
- dilations=(1, 1, 1),
16
- out_indices=(2, ),
17
- frozen_stages=1,
18
- norm_cfg=dict(type='BN', requires_grad=False),
19
- norm_eval=True,
20
- style='caffe',
21
- init_cfg=dict(
22
- type='Pretrained',
23
- checkpoint='open-mmlab://detectron2/resnet50_caffe')),
24
- neck=None,
25
- rpn_head=dict(
26
- type='RPNHead',
27
- in_channels=1024,
28
- feat_channels=1024,
29
- anchor_generator=dict(
30
- type='AnchorGenerator',
31
- scales=[2, 4, 8, 16, 32],
32
- ratios=[0.5, 1.0, 2.0],
33
- strides=[16]),
34
- bbox_coder=dict(
35
- type='DeltaXYWHBBoxCoder',
36
- target_means=[.0, .0, .0, .0],
37
- target_stds=[1.0, 1.0, 1.0, 1.0]),
38
- loss_cls=dict(
39
- type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
40
- loss_bbox=dict(type='L1Loss', loss_weight=1.0)),
41
- # model training and testing settings
42
- train_cfg=dict(
43
- rpn=dict(
44
- assigner=dict(
45
- type='MaxIoUAssigner',
46
- pos_iou_thr=0.7,
47
- neg_iou_thr=0.3,
48
- min_pos_iou=0.3,
49
- ignore_iof_thr=-1),
50
- sampler=dict(
51
- type='RandomSampler',
52
- num=256,
53
- pos_fraction=0.5,
54
- neg_pos_ub=-1,
55
- add_gt_as_proposals=False),
56
- allowed_border=-1,
57
- pos_weight=-1,
58
- debug=False)),
59
- test_cfg=dict(
60
- rpn=dict(
61
- nms_pre=12000,
62
- max_per_img=2000,
63
- nms=dict(type='nms', iou_threshold=0.7),
64
- min_bbox_size=0)))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/models/rpn_r50_fpn.py DELETED
@@ -1,64 +0,0 @@
1
- # model settings
2
- model = dict(
3
- type='RPN',
4
- data_preprocessor=dict(
5
- type='DetDataPreprocessor',
6
- mean=[123.675, 116.28, 103.53],
7
- std=[58.395, 57.12, 57.375],
8
- bgr_to_rgb=True,
9
- pad_size_divisor=32),
10
- backbone=dict(
11
- type='ResNet',
12
- depth=50,
13
- num_stages=4,
14
- out_indices=(0, 1, 2, 3),
15
- frozen_stages=1,
16
- norm_cfg=dict(type='BN', requires_grad=True),
17
- norm_eval=True,
18
- style='pytorch',
19
- init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')),
20
- neck=dict(
21
- type='FPN',
22
- in_channels=[256, 512, 1024, 2048],
23
- out_channels=256,
24
- num_outs=5),
25
- rpn_head=dict(
26
- type='RPNHead',
27
- in_channels=256,
28
- feat_channels=256,
29
- anchor_generator=dict(
30
- type='AnchorGenerator',
31
- scales=[8],
32
- ratios=[0.5, 1.0, 2.0],
33
- strides=[4, 8, 16, 32, 64]),
34
- bbox_coder=dict(
35
- type='DeltaXYWHBBoxCoder',
36
- target_means=[.0, .0, .0, .0],
37
- target_stds=[1.0, 1.0, 1.0, 1.0]),
38
- loss_cls=dict(
39
- type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
40
- loss_bbox=dict(type='L1Loss', loss_weight=1.0)),
41
- # model training and testing settings
42
- train_cfg=dict(
43
- rpn=dict(
44
- assigner=dict(
45
- type='MaxIoUAssigner',
46
- pos_iou_thr=0.7,
47
- neg_iou_thr=0.3,
48
- min_pos_iou=0.3,
49
- ignore_iof_thr=-1),
50
- sampler=dict(
51
- type='RandomSampler',
52
- num=256,
53
- pos_fraction=0.5,
54
- neg_pos_ub=-1,
55
- add_gt_as_proposals=False),
56
- allowed_border=-1,
57
- pos_weight=-1,
58
- debug=False)),
59
- test_cfg=dict(
60
- rpn=dict(
61
- nms_pre=2000,
62
- max_per_img=1000,
63
- nms=dict(type='nms', iou_threshold=0.7),
64
- min_bbox_size=0)))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mmdet_code/SR-TOD/configs/_base_/models/ssd300.py DELETED
@@ -1,63 +0,0 @@
1
- # model settings
2
- input_size = 300
3
- model = dict(
4
- type='SingleStageDetector',
5
- data_preprocessor=dict(
6
- type='DetDataPreprocessor',
7
- mean=[123.675, 116.28, 103.53],
8
- std=[1, 1, 1],
9
- bgr_to_rgb=True,
10
- pad_size_divisor=1),
11
- backbone=dict(
12
- type='SSDVGG',
13
- depth=16,
14
- with_last_pool=False,
15
- ceil_mode=True,
16
- out_indices=(3, 4),
17
- out_feature_indices=(22, 34),
18
- init_cfg=dict(
19
- type='Pretrained', checkpoint='open-mmlab://vgg16_caffe')),
20
- neck=dict(
21
- type='SSDNeck',
22
- in_channels=(512, 1024),
23
- out_channels=(512, 1024, 512, 256, 256, 256),
24
- level_strides=(2, 2, 1, 1),
25
- level_paddings=(1, 1, 0, 0),
26
- l2_norm_scale=20),
27
- bbox_head=dict(
28
- type='SSDHead',
29
- in_channels=(512, 1024, 512, 256, 256, 256),
30
- num_classes=80,
31
- anchor_generator=dict(
32
- type='SSDAnchorGenerator',
33
- scale_major=False,
34
- input_size=input_size,
35
- basesize_ratio_range=(0.15, 0.9),
36
- strides=[8, 16, 32, 64, 100, 300],
37
- ratios=[[2], [2, 3], [2, 3], [2, 3], [2], [2]]),
38
- bbox_coder=dict(
39
- type='DeltaXYWHBBoxCoder',
40
- target_means=[.0, .0, .0, .0],
41
- target_stds=[0.1, 0.1, 0.2, 0.2])),
42
- # model training and testing settings
43
- train_cfg=dict(
44
- assigner=dict(
45
- type='MaxIoUAssigner',
46
- pos_iou_thr=0.5,
47
- neg_iou_thr=0.5,
48
- min_pos_iou=0.,
49
- ignore_iof_thr=-1,
50
- gt_max_assign_all=False),
51
- sampler=dict(type='PseudoSampler'),
52
- smoothl1_beta=1.,
53
- allowed_border=-1,
54
- pos_weight=-1,
55
- neg_pos_ratio=3,
56
- debug=False),
57
- test_cfg=dict(
58
- nms_pre=1000,
59
- nms=dict(type='nms', iou_threshold=0.45),
60
- min_bbox_size=0,
61
- score_thr=0.02,
62
- max_per_img=200))
63
- cudnn_benchmark = True