Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file.

## \[2.7.0\]

### New features

- Add MobileNetV4 medium recipe
(https://github.com/open-edge-platform/training_extensions/pull/4341)

## \[2.6.0\]

### New features
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<!-- markdownlint-disable MD042 -->

[![python](https://img.shields.io/badge/python-3.11%2B-green)]()
[![pytorch](https://img.shields.io/badge/pytorch-2.7%2B-orange)]()
[![openvino](https://img.shields.io/badge/openvino-2025.2-purple)]()
[![pytorch](https://img.shields.io/badge/pytorch-2.8%2B-orange)]()
[![openvino](https://img.shields.io/badge/openvino-2025.3-purple)]()

<!-- markdownlint-enable MD042 -->

Expand Down
2 changes: 1 addition & 1 deletion library/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ dependencies = [
"lightning==2.4.0",
"torchmetrics==1.6.0",
"pytorchcv==0.0.67",
"timm==1.0.3",
"timm==1.0.22",
"openvino==2025.3",
"openvino-model-api==0.3.0.4",
"onnx==1.19.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
task: H_LABEL_CLS
model:
class_path: otx.backend.native.models.classification.hlabel_models.timm_model.TimmModelHLabelCls
init_args:
model_name: mobilenetv4_conv_medium.e500_r224_in1k

optimizer:
class_path: torch.optim.AdamW
init_args:
lr: 0.0005
weight_decay: 0.015

scheduler:
class_path: otx.backend.native.schedulers.LinearWarmupSchedulerCallable
init_args:
num_warmup_steps: 10
main_scheduler_callable:
class_path: lightning.pytorch.cli.ReduceLROnPlateau
init_args:
mode: max
factor: 0.5
patience: 3
monitor: val/accuracy

engine:
device: auto

callback_monitor: val/accuracy

data: ../../_base_/data/classification.yaml

callbacks:
- class_path: otx.backend.native.callbacks.adaptive_early_stopping.EarlyStoppingWithWarmup
init_args:
patience: 5
- class_path: lightning.pytorch.callbacks.ModelCheckpoint
init_args:
dirpath: "" # use engine.work_dir
monitor: val/accuracy
mode: max
save_top_k: 1
save_last: true
auto_insert_metric_name: false
filename: "checkpoints/epoch_{epoch:03d}"

overrides:
max_epochs: 90

data:
task: H_LABEL_CLS
data_format: datumaro
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@ task: MULTI_CLASS_CLS
model:
class_path: otx.backend.native.models.classification.multiclass_models.timm_model.TimmModelMulticlassCls
init_args:
model_name: mobilenetv4_conv_small
model_name: mobilenetv4_conv_medium.e500_r224_in1k
label_info: 1000
freeze_backbone: False

optimizer:
class_path: torch.optim.SGD
class_path: torch.optim.AdamW
init_args:
lr: 0.0058
momentum: 0.9
weight_decay: 0.0001
lr: 0.0005
weight_decay: 0.015

scheduler:
class_path: otx.backend.native.schedulers.LinearWarmupSchedulerCallable
init_args:
Expand All @@ -21,13 +23,27 @@ model:
factor: 0.5
patience: 3
monitor: val/accuracy

engine:
device: auto

callback_monitor: val/accuracy

data: ../../_base_/data/classification.yaml

callbacks:
- class_path: otx.backend.native.callbacks.adaptive_early_stopping.EarlyStoppingWithWarmup
init_args:
patience: 5
- class_path: lightning.pytorch.callbacks.ModelCheckpoint
init_args:
dirpath: "" # use engine.work_dir
monitor: val/accuracy
mode: max
save_top_k: 1
save_last: true
auto_insert_metric_name: false
filename: "checkpoints/epoch_{epoch:03d}"

overrides:
max_epochs: 90
callbacks:
- class_path: otx.backend.native.callbacks.adaptive_early_stopping.EarlyStoppingWithWarmup
init_args:
patience: 5
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
task: MULTI_LABEL_CLS
model:
class_path: otx.backend.native.models.classification.multilabel_models.timm_model.TimmModelMultilabelCls
init_args:
model_name: mobilenetv4_conv_medium.e500_r224_in1k
label_info: 1000

optimizer:
class_path: torch.optim.AdamW
init_args:
lr: 0.0005
weight_decay: 0.015

scheduler:
class_path: otx.backend.native.schedulers.LinearWarmupSchedulerCallable
init_args:
num_warmup_steps: 10
main_scheduler_callable:
class_path: lightning.pytorch.cli.ReduceLROnPlateau
init_args:
mode: max
factor: 0.5
patience: 3
monitor: val/accuracy

engine:
device: auto

callback_monitor: val/accuracy

data: ../../_base_/data/classification.yaml

callbacks:
- class_path: otx.backend.native.callbacks.adaptive_early_stopping.EarlyStoppingWithWarmup
init_args:
patience: 5
- class_path: lightning.pytorch.callbacks.ModelCheckpoint
init_args:
dirpath: "" # use engine.work_dir
monitor: val/accuracy
mode: max
save_top_k: 1
save_last: true
auto_insert_metric_name: false
filename: "checkpoints/epoch_{epoch:03d}"

overrides:
data:
task: MULTI_LABEL_CLS
data_format: datumaro
Loading