Skip to content

Commit 8e5caee

Browse files
committed
Add MNv4 medium recipe
1 parent e9e1b47 commit 8e5caee

File tree

3 files changed

+92
-2
lines changed

3 files changed

+92
-2
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
model:
2+
class_path: otx.algo.classification.hlabel_models.timm_model.TimmModelHLabelCls
3+
init_args:
4+
model_name: mobilenetv4_medium_conv
5+
6+
optimizer:
7+
class_path: torch.optim.SGD
8+
init_args:
9+
lr: 0.0058
10+
momentum: 0.9
11+
weight_decay: 0.0001
12+
13+
scheduler:
14+
class_path: otx.core.schedulers.LinearWarmupSchedulerCallable
15+
init_args:
16+
num_warmup_steps: 10
17+
main_scheduler_callable:
18+
class_path: lightning.pytorch.cli.ReduceLROnPlateau
19+
init_args:
20+
mode: max
21+
factor: 0.5
22+
patience: 3
23+
monitor: val/accuracy
24+
25+
engine:
26+
task: H_LABEL_CLS
27+
device: auto
28+
29+
callback_monitor: val/accuracy
30+
31+
data: ../../_base_/data/classification.yaml
32+
overrides:
33+
max_epochs: 90
34+
35+
callbacks:
36+
- class_path: otx.algo.callbacks.adaptive_early_stopping.EarlyStoppingWithWarmup
37+
init_args:
38+
patience: 5
39+
40+
data:
41+
task: H_LABEL_CLS
42+
data_format: datumaro

src/otx/recipe/classification/multi_class_cls/mobilenet_v4.yaml renamed to src/otx/recipe/classification/multi_class_cls/mobilenet_v4_medium.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
model:
22
class_path: otx.algo.classification.multiclass_models.timm_model.TimmModelMulticlassCls
33
init_args:
4-
model_name: mobilenetv4_conv_small
4+
model_name: mobilenetv4_medium_conv
55
label_info: 1000
6+
freeze_backbone: False
7+
68
optimizer:
79
class_path: torch.optim.SGD
810
init_args:
911
lr: 0.0058
1012
momentum: 0.9
1113
weight_decay: 0.0001
14+
1215
scheduler:
1316
class_path: otx.core.schedulers.LinearWarmupSchedulerCallable
1417
init_args:
@@ -20,13 +23,17 @@ model:
2023
factor: 0.5
2124
patience: 3
2225
monitor: val/accuracy
26+
2327
engine:
2428
task: MULTI_CLASS_CLS
2529
device: auto
30+
2631
callback_monitor: val/accuracy
27-
data: ../../base/data/classification.yaml
32+
33+
data: ../../_base_/data/classification.yaml
2834
overrides:
2935
max_epochs: 90
36+
3037
callbacks:
3138
- class_path: otx.algo.callbacks.adaptive_early_stopping.EarlyStoppingWithWarmup
3239
init_args:
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
model:
2+
class_path: otx.algo.classification.multilabel_models.timm_model.TimmModelMultilabelCls
3+
init_args:
4+
model_name: mobilenetv3_large
5+
label_info: 1000
6+
7+
optimizer:
8+
class_path: torch.optim.SGD
9+
init_args:
10+
lr: 0.0058
11+
momentum: 0.9
12+
weight_decay: 0.0005
13+
14+
scheduler:
15+
class_path: otx.core.schedulers.LinearWarmupSchedulerCallable
16+
init_args:
17+
num_warmup_steps: 10
18+
main_scheduler_callable:
19+
class_path: lightning.pytorch.cli.ReduceLROnPlateau
20+
init_args:
21+
mode: max
22+
factor: 0.5
23+
patience: 3
24+
monitor: val/accuracy
25+
26+
engine:
27+
task: MULTI_LABEL_CLS
28+
device: auto
29+
30+
callback_monitor: val/accuracy
31+
32+
data: ../../_base_/data/classification.yaml
33+
overrides:
34+
data:
35+
task: MULTI_LABEL_CLS
36+
data_format: datumaro
37+
38+
callbacks:
39+
- class_path: otx.algo.callbacks.adaptive_early_stopping.EarlyStoppingWithWarmup
40+
init_args:
41+
patience: 5

0 commit comments

Comments
 (0)