-
Notifications
You must be signed in to change notification settings - Fork 443
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor MaskRCNN rotated detection (#3858)
* Refactor MaskRCNN rotated detection * update rotated ov model recipe * update rotated det recipes
- Loading branch information
1 parent
8e6f831
commit 4f696f1
Showing
7 changed files
with
217 additions
and
104 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
This file was deleted.
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
89 changes: 89 additions & 0 deletions
89
src/otx/recipe/rotated_detection/maskrcnn_efficientnetb2b_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,89 @@ | ||
model: | ||
class_path: otx.core.model.rotated_detection.RotatedMaskRCNNEfficientNet | ||
init_args: | ||
label_info: 80 | ||
|
||
optimizer: | ||
class_path: torch.optim.SGD | ||
init_args: | ||
lr: 0.007 | ||
momentum: 0.9 | ||
weight_decay: 0.001 | ||
|
||
scheduler: | ||
class_path: otx.core.schedulers.LinearWarmupSchedulerCallable | ||
init_args: | ||
num_warmup_steps: 100 | ||
main_scheduler_callable: | ||
class_path: lightning.pytorch.cli.ReduceLROnPlateau | ||
init_args: | ||
mode: max | ||
factor: 0.1 | ||
patience: 9 | ||
monitor: val/map_50 | ||
|
||
engine: | ||
task: ROTATED_DETECTION | ||
device: auto | ||
|
||
callback_monitor: val/map_50 | ||
|
||
data: ../_base_/data/instance_segmentation.yaml | ||
overrides: | ||
task: ROTATED_DETECTION | ||
max_epochs: 100 | ||
data: | ||
input_size: | ||
- 512 | ||
- 512 | ||
tile_config: | ||
enable_tiler: true | ||
enable_adaptive_tiling: true | ||
|
||
train_subset: | ||
batch_size: 4 | ||
num_workers: 8 | ||
transforms: | ||
- class_path: otx.core.data.transform_libs.torchvision.Resize | ||
init_args: | ||
keep_ratio: false | ||
scale: $(input_size) | ||
- class_path: otx.core.data.transform_libs.torchvision.Pad | ||
init_args: | ||
pad_to_square: false | ||
size_divisor: 32 | ||
- class_path: torchvision.transforms.v2.Normalize | ||
init_args: | ||
std: [1.0, 1.0, 1.0] | ||
sampler: | ||
class_path: otx.algo.samplers.balanced_sampler.BalancedSampler | ||
|
||
val_subset: | ||
num_workers: 4 | ||
transforms: | ||
- class_path: otx.core.data.transform_libs.torchvision.Resize | ||
init_args: | ||
keep_ratio: false | ||
scale: $(input_size) | ||
- class_path: otx.core.data.transform_libs.torchvision.Pad | ||
init_args: | ||
pad_to_square: false | ||
size_divisor: 32 | ||
- class_path: torchvision.transforms.v2.Normalize | ||
init_args: | ||
std: [1.0, 1.0, 1.0] | ||
|
||
test_subset: | ||
num_workers: 4 | ||
transforms: | ||
- class_path: otx.core.data.transform_libs.torchvision.Resize | ||
init_args: | ||
keep_ratio: false | ||
scale: $(input_size) | ||
- class_path: otx.core.data.transform_libs.torchvision.Pad | ||
init_args: | ||
pad_to_square: false | ||
size_divisor: 32 | ||
- class_path: torchvision.transforms.v2.Normalize | ||
init_args: | ||
std: [1.0, 1.0, 1.0] |
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 |
---|---|---|
@@ -0,0 +1,79 @@ | ||
model: | ||
class_path: otx.core.model.rotated_detection.RotatedMaskRCNNResNet50 | ||
init_args: | ||
label_info: 80 | ||
|
||
optimizer: | ||
class_path: torch.optim.SGD | ||
init_args: | ||
lr: 0.007 | ||
momentum: 0.9 | ||
weight_decay: 0.001 | ||
|
||
scheduler: | ||
class_path: otx.core.schedulers.LinearWarmupSchedulerCallable | ||
init_args: | ||
num_warmup_steps: 100 | ||
main_scheduler_callable: | ||
class_path: lightning.pytorch.cli.ReduceLROnPlateau | ||
init_args: | ||
mode: max | ||
factor: 0.1 | ||
patience: 4 | ||
monitor: val/map_50 | ||
|
||
engine: | ||
task: ROTATED_DETECTION | ||
device: auto | ||
|
||
callback_monitor: val/map_50 | ||
|
||
data: ../_base_/data/instance_segmentation.yaml | ||
overrides: | ||
task: ROTATED_DETECTION | ||
max_epochs: 100 | ||
gradient_clip_val: 35.0 | ||
data: | ||
input_size: | ||
- 512 | ||
- 512 | ||
tile_config: | ||
enable_tiler: true | ||
enable_adaptive_tiling: true | ||
|
||
train_subset: | ||
batch_size: 4 | ||
num_workers: 8 | ||
transforms: | ||
- class_path: otx.core.data.transform_libs.torchvision.Resize | ||
init_args: | ||
keep_ratio: false | ||
scale: $(input_size) | ||
- class_path: otx.core.data.transform_libs.torchvision.Pad | ||
init_args: | ||
pad_to_square: false | ||
size_divisor: 32 | ||
|
||
val_subset: | ||
num_workers: 4 | ||
transforms: | ||
- class_path: otx.core.data.transform_libs.torchvision.Resize | ||
init_args: | ||
keep_ratio: false | ||
scale: $(input_size) | ||
- class_path: otx.core.data.transform_libs.torchvision.Pad | ||
init_args: | ||
pad_to_square: false | ||
size_divisor: 32 | ||
|
||
test_subset: | ||
num_workers: 4 | ||
transforms: | ||
- class_path: otx.core.data.transform_libs.torchvision.Resize | ||
init_args: | ||
keep_ratio: false | ||
scale: $(input_size) | ||
- class_path: otx.core.data.transform_libs.torchvision.Pad | ||
init_args: | ||
pad_to_square: false | ||
size_divisor: 32 |
Oops, something went wrong.