-
Notifications
You must be signed in to change notification settings - Fork 444
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bring RTMDetInst Optimization and tile unit test to Dev (#3195)
* Add rtmdet inst optim & Add tile unit test
- Loading branch information
1 parent
54422a7
commit 2277ec5
Showing
13 changed files
with
992 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
407 changes: 407 additions & 0 deletions
407
src/otx/algo/instance_segmentation/heads/custom_rtmdet_ins_head.py
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,4 +35,4 @@ overrides: | |
image_color_channel: RGB | ||
data_format: coco_instances | ||
test_subset: | ||
batch_size: 2 | ||
batch_size: 64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
117 changes: 117 additions & 0 deletions
117
src/otx/recipe/instance_segmentation/rtmdet_inst_tiny_tile.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
model: | ||
class_path: otx.algo.instance_segmentation.rtmdet_inst.RTMDetInst | ||
init_args: | ||
num_classes: 80 | ||
variant: tiny | ||
|
||
optimizer: | ||
class_path: torch.optim.SGD | ||
init_args: | ||
lr: 0.001 | ||
momentum: 0.9 | ||
weight_decay: 0.0001 | ||
|
||
scheduler: | ||
- class_path: otx.algo.schedulers.warmup_schedulers.LinearWarmupScheduler | ||
init_args: | ||
num_warmup_steps: 20 | ||
- class_path: lightning.pytorch.cli.ReduceLROnPlateau | ||
init_args: | ||
mode: max | ||
factor: 0.1 | ||
patience: 9 | ||
monitor: val/map_50 | ||
min_lr: 4e-06 | ||
|
||
engine: | ||
task: INSTANCE_SEGMENTATION | ||
device: auto | ||
|
||
callback_monitor: val/map_50 | ||
|
||
data: ../_base_/data/mmdet_base.yaml | ||
overrides: | ||
precision: 32 | ||
max_epochs: 100 | ||
gradient_clip_val: 35.0 | ||
data: | ||
task: INSTANCE_SEGMENTATION | ||
config: | ||
tile_config: | ||
enable_tiler: true | ||
enable_adaptive_tiling: true | ||
include_polygons: true | ||
train_subset: | ||
batch_size: 4 | ||
num_workers: 8 | ||
transforms: | ||
- type: LoadImageFromFile | ||
backend_args: null | ||
- type: LoadAnnotations | ||
with_bbox: true | ||
with_mask: true | ||
- type: Resize | ||
scale: | ||
- 640 | ||
- 640 | ||
keep_ratio: false | ||
- type: Pad | ||
size: | ||
- 640 | ||
- 640 | ||
pad_val: 114 | ||
- type: RandomFlip | ||
prob: 0.5 | ||
- type: PackDetInputs | ||
val_subset: | ||
batch_size: 1 | ||
num_workers: 4 | ||
transforms: | ||
- type: LoadImageFromFile | ||
backend_args: null | ||
- type: Resize | ||
scale: | ||
- 640 | ||
- 640 | ||
keep_ratio: true | ||
- type: Pad | ||
size: | ||
- 640 | ||
- 640 | ||
pad_val: 114 | ||
- type: LoadAnnotations | ||
with_bbox: true | ||
with_mask: true | ||
- type: PackDetInputs | ||
meta_keys: | ||
- img_id | ||
- img_path | ||
- ori_shape | ||
- img_shape | ||
- scale_factor | ||
test_subset: | ||
batch_size: 1 | ||
num_workers: 4 | ||
transforms: | ||
- type: LoadImageFromFile | ||
backend_args: null | ||
- type: Resize | ||
scale: | ||
- 640 | ||
- 640 | ||
keep_ratio: true | ||
- type: Pad | ||
size: | ||
- 640 | ||
- 640 | ||
pad_val: 114 | ||
- type: LoadAnnotations | ||
with_bbox: true | ||
with_mask: true | ||
- type: PackDetInputs | ||
meta_keys: | ||
- img_id | ||
- img_path | ||
- ori_shape | ||
- img_shape | ||
- scale_factor |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.