Skip to content

Latest commit

 

History

History
360 lines (267 loc) · 15.8 KB

File metadata and controls

360 lines (267 loc) · 15.8 KB

Geti Library - getitune

A low-code transfer learning framework for training, evaluating, optimizing, and deploying computer vision models


Key FeaturesSupported Tasks & ModelsInstallationQuick StartDocsLicense

PyPI

python pytorch openvino numpy

Codecov OpenSSF Scorecard Pre-Merge Test License Downloads


Introduction

The Geti™ library (getitune) is a low-code transfer learning framework for Computer Vision. Its API and CLI let you train, evaluate, optimize, and deploy models quickly, even without deep expertise in deep learning. It supports diverse combinations of model architectures, learning methods, and task types built on PyTorch and the OpenVINO™ toolkit.

Each supported task ships with curated "recipes": YAML files that bundle the model, data pipeline, and training configuration into a single one-stop entry point. Recipes are validated on standard datasets so you get a strong baseline out of the box.

Key Features

  • Multi-task support: classification, object detection, rotated detection, instance segmentation, semantic segmentation, and keypoint detection, see the full model list below.
  • Tiling for large images across detection and segmentation tasks.
  • Multiple backends: train with PyTorch Lightning, export and run inference with ONNX and OpenVINO™.
  • Hardware acceleration: Intel GPU (XPU) and NVIDIA CUDA support.
  • Datumaro data frontend with automatic format detection (COCO, YOLO, VOC, native).
  • Distributed training across multiple GPUs.
  • Mixed-precision training to reduce memory and increase batch size.
  • Class-incremental learning to extend an existing model with new classes.
  • Deployment to OpenVINO™ IR and ONNX formats, with inference via OpenVINO™ ModelAPI.

Supported Tasks & Models

All recipes live under src/getitune/recipe/<task>/. Pass any of these YAMLs directly to the API as model=.... Recipes whose name ends in _tile enable the tiling pipeline for large images.

Task Recipe directory Example recipes
Classification (multi-class / multi-label / hierarchical) multi_class_cls, multi_label_cls, h_label_cls dino_v2, vit_tiny, efficientnet_b0, efficientnet_b3, efficientnet_v2, mobilenet_v3_large
Object detection detection atss_mobilenetv2, ssd_mobilenetv2, yolox_{tiny,s,l,x}, rtdetr_50, dfine_x, deim_dfine_{l,m,x}, deimv2_{s,m,l}, rfdetr_{small,medium,large}, yolo26_{n,s,m}
Rotated detection rotated_detection maskrcnn_r50, maskrcnn_efficientnetb2b (with _tile variants)
Instance segmentation instance_segmentation maskrcnn_{r50,swint,efficientnetb2b}, rtmdet_inst_tiny, rfdetr_seg_{small,medium,large,xlarge}, yolo26_{n,s,m}_seg
Semantic segmentation semantic_segmentation dino_v2, litehrnet_{s,18,x}, segnext_{t,s,b} (with _tile variants)
Keypoint detection keypoint_detection rtmpose_tiny

Each task directory also ships an openvino_model.yaml recipe for running and optimizing pre-exported OpenVINO IR models via OVEngine.

Licensing Information: Ultralytics YOLO models are distributed under the AGPL-3.0 license, an OSI approved license ideal for open-source research, academic, and personal projects. For commercial use, enhanced support, and tailored licensing terms, please explore flexible Ultralytics licensing options at https://www.ultralytics.com/license.


Installation

Requirements: Python 3.11–3.14, PyTorch 2.10, OpenVINO™ 2026.1, NumPy ≥ 2.0.

Note: getitune is not yet published to PyPI. Until the first release lands, install from source.

Quick Install

# With uv (recommended)
uv pip install "getitune[cpu]"

# Or with pip
pip install "getitune[cpu]"
Advanced Installation: Specify Hardware Backend

getitune ships three mutually exclusive extras that select the right PyTorch wheel for your hardware:

Extra PyTorch wheel Use when
[cpu] torch==2.10.0+cpu (Linux/Windows) or default torch==2.10.0 (macOS) No GPU, or running on Apple silicon.
[xpu] torch==2.10.0+xpu + triton-xpu Intel discrete or integrated GPUs.
[cuda] torch==2.10.0+cu128 NVIDIA GPUs with CUDA 12.8 drivers.
pip install "getitune[cpu]"   # CPU-only
pip install "getitune[xpu]"   # Intel GPU (XPU)
pip install "getitune[cuda]"  # NVIDIA GPU (CUDA 12.8)

macOS note: PyTorch's +cpu wheel is only published for Linux and Windows. The [cpu] extra resolves this automatically and installs the default torch==2.10.0 wheel on macOS.

Advanced Installation: Install from Source
git clone https://github.com/open-edge-platform/training_extensions.git
cd training_extensions/library

# Recommended: use uv to honor the lockfile
uv sync --extra cpu          # or --extra xpu / --extra cuda

# Or with pip in a virtual environment
python -m venv .venv && source .venv/bin/activate
pip install -e ".[cpu]"      # remove -e for a non-editable install

Quick Start

Training

Getitune supports an API-based training approach:

from getitune.engine import create_engine

# Initialize and train using the bundled test dataset
engine = create_engine(
    data="tests/assets/classification_cifar10",
    model="src/getitune/recipe/classification/multi_class_cls/efficientnet_b0.yaml",
)
engine.train()
engine.test()
exported_path = engine.export()  # writes OpenVINO IR

Inference

Getitune provides inference via PyTorch and OpenVINO backends:

from getitune.engine import create_engine

# PyTorch inference
engine = create_engine(data="/path/to/dataset", model="path/to/recipe.yaml")
predictions = engine.predict()

# OpenVINO inference and optimization
ov_engine = create_engine(data="/path/to/dataset", model="path/to/exported_model.xml")
ov_engine.test()
ov_engine.optimize()  # post-training quantization via NNCF

Note: For advanced inference options including OpenVINO optimization, check the API Quick-Guide.


Dataset Support

When you pass a path to data=, getitune uses Datumaro to auto-detect the dataset format. Supported formats:

Format Detection method
COCO annotations/ directory with COCO JSON files
YOLO data.yaml file (Ultralytics layout)
Pascal VOC JPEGImages/, Annotations/, ImageSets/ directories
Datumaro (native) metadata.json + data.parquet at root

Zip archives are also accepted, Datumaro extracts them on import.

# Works the same regardless of format, just point to the dataset root
engine = create_engine(
    data="/path/to/coco_or_yolo_or_voc_dataset",
    model="src/getitune/recipe/detection/yolox_s.yaml",
)
engine.train()

Advanced Usage

Override training hyperparameters

You can override engine-level training parameters directly:

engine.train(
    max_epochs=50,
    seed=42,
    deterministic=True,
    precision="16-mixed",          # mixed-precision training
    gradient_clip_val=1.0,
    check_val_every_n_epoch=5,
)

For model-level hyperparameters like learning rate and optimizer, you can pass them when instantiating a model class directly:

from torch.optim import AdamW
from getitune.models import EfficientNet

model = EfficientNet(
    label_info=datamodule.label_info,
    model_name="efficientnet_b0",
    optimizer=lambda params: AdamW(params, lr=0.001, weight_decay=0.01),
)

engine = create_engine(data=datamodule, model=model)
engine.train(max_epochs=100)

Alternatively, you can set these in a custom recipe YAML (copy and modify an existing one):

# my_recipe.yaml — custom learning rate and optimizer
task: MULTI_CLASS_CLS
model:
  class_path: getitune.backend.lightning.models.classification.multiclass_models.efficientnet.EfficientNetMulticlassCls
  init_args:
    label_info: 1000
    model_name: efficientnet_b0

    optimizer:
      class_path: torch.optim.AdamW
      init_args:
        lr: 0.001
        weight_decay: 0.01

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

data: src/getitune/recipe/_base_/data/classification.yaml

overrides:
  max_epochs: 100

For augmentations, override the data config. Augmentations run on CPU (augmentations_cpu) and GPU (augmentations_gpu) separately:

# my_data.yaml — stronger augmentations
task: MULTI_CLASS_CLS
input_size: [224, 224]
train_subset:
  subset_name: train
  batch_size: 32
  num_workers: 8
  augmentations_cpu:
    - class_path: torchvision.transforms.v2.RandomResizedCrop
      init_args:
        size: [224, 224]
        scale: [0.08, 1.0]
  augmentations_gpu:
    - class_path: kornia.augmentation.RandomHorizontalFlip
      init_args:
        p: 0.5
    - class_path: kornia.augmentation.ColorJiggle
      init_args:
        brightness: 0.4
        contrast: 0.4
        saturation: 0.4
        hue: 0.1
        p: 0.8
    - class_path: kornia.augmentation.RandomGaussianBlur
      init_args:
        kernel_size: [3, 3]
        sigma: [0.1, 2.0]
        p: 0.3
    - class_path: kornia.augmentation.Normalize
      init_args:
        mean: [0.485, 0.456, 0.406]
        std: [0.229, 0.224, 0.225]

Then reference your custom data config from your recipe with data: my_data.yaml, or build a DataModule explicitly (see below).

Build a DataModule explicitly
from getitune.data.module import DataModule
from getitune.types.task import TaskType

datamodule = DataModule(
    task=TaskType.DETECTION,
    data_root="/path/to/coco_dataset",
    input_size=(640, 640),
)

engine = create_engine(
    data=datamodule,
    model="src/getitune/recipe/detection/yolox_s.yaml",
)
engine.train()
Instantiate a model class directly
from getitune.models import ATSS

model = ATSS(label_info=datamodule.label_info)
engine = create_engine(data=datamodule, model=model)
engine.train()

Available model classes:

  • Detection: ATSS, SSD, YOLOX, RTDETR, DFine, DEIMDFine, DEIMV2
  • Instance segmentation: MaskRCNN, MaskRCNNTV, RTMDetInst
  • Semantic segmentation: DinoV2Seg, LiteHRNet, SegNext
  • Classification: EfficientNet, MobileNetV3, VisionTransformer, TimmModel, TVModel
  • Keypoint: RTMPose

License

The Geti™ Library (getitune) is licensed under Apache License Version 2.0. By contributing to the project, you agree to the license and copyright terms therein and release your contribution under these terms.