Skip to content

Releases: FocoosAI/focoos

Release v0.25.0

11 Dec 16:33

Choose a tag to compare

0.25.0 (2025-12-11)

Adds full support for non-square image sizes with CLI parsing, data/augmentation/mappers/processors updates, inference/export benchmarking changes, and docs/examples; also updates AutoDataset.get_split to accept DatasetAugmentations.

  • Image size handling (core):
    • Make ModelInfo.im_size accept int | (H, W); propagate through TrainerArgs, processors, mappers, and ports.
    • Update processors (DETR, RTMO, MaskFormer, BisenetFormer, Classification) to accept tuple sizes and resize accordingly.
  • Adjust inference runtimes (ONNX, TorchScript, base model) warmup/benchmark to support non-square and log proper size; set latency im_size using height.
  • CLI:
    • Add parse_im_size to accept "640", "640,480", or "640x480".
    • Change train, val, and export --im-size option to string, parse to int | (H, W) and pass through.
  • Data pipeline:
    • DatasetAugmentations.resolution now int | (H, W); non-square uses direct Resize, square keeps ResizeShortestEdge; adjust crop to use absolute size.
    • get_default_by_task and all call sites now pass/return DatasetAugmentations (not raw list).
    • AutoDataset.get_split(augs=...) now expects DatasetAugmentations and forwards both augs and resolution; remove .get_augmentations() usage across code/tests/tutorials.
    • Mappers carry resolution; MapDataset exposes resolution property.
  • Export/Training:
    • export_command and model export accept tuple sizes; set model_info.im_size to the provided resolution.
    • After training, always reload best model/info and set model/processor to eval.
  • Docs:
    • Update README and docs (CLI, concepts, inference, training) with non-square examples and usage notes.

What's Changed

Full Changelog: v0.24.0...v0.25.0

Release v0.24.0

10 Dec 10:11

Choose a tag to compare

0.24.0 (2025-12-10)

Features

  • augmentation: add mosaic and copy-paste augmentations for dataset enhancement (97090ec)

Bug Fixes

  • Ensure new bounding box area is calculated (17c4d11)

What's Changed

  • Add mosaic and copy-paste augmentations by @fcdl94 in #162

Full Changelog: v0.23.0...v0.24.0

Release v0.23.0

21 Oct 09:50

Choose a tag to compare

0.23.0 (2025-10-21)

Features

  • device: enhance MPS support (1ebec24)
  • device: improve device selection logic for training (b64f999)
  • gpu: add MPS availability to GPUInfo and update focoos version (a4412be)
  • hub: add IMAGE_CLASSIFIER to supported model families (6724fab)
  • system: enhance archive extraction by removing __MACOSX directory and validating train/validation splits (3dedbae)

Bug Fixes

  • amp: enable automatic mixed precision by default and add CUDA availability check (0c23ca0)

Code Refactoring

  • system: rename list_dir to list_directories and streamline directory validation (058b6b2)

What's Changed

Full Changelog: v0.22.0...v0.23.0

Release v0.22.0

03 Oct 14:55

Choose a tag to compare

0.22.0 (2025-10-03)

Features

What's Changed

  • feat(system): enhance archive extraction by @fcdl94 in #161

Full Changelog: v0.21.0...v0.22.0

Release v0.21.0

29 Sep 10:46

Choose a tag to compare

0.21.0 (2025-09-29)

Features

  • catalog: update cls model configurations and add coco_2017_cls dataset (dee2b02)
  • model_registry: update focoos version and latency metrics and fix stdc config (bc96afb)
  • model_registry: update model description for fai-cls-n-coco (181faa2)
  • torchscript: enhance warmup size logic for model detection and classification and update quantization tutorial (c670049)

Bug Fixes

  • backbone: update model loading to use CPU mapping (5b6c20b)

What's Changed

Full Changelog: v0.20.2...v0.21.0

Release v0.20.2

26 Sep 08:36

Choose a tag to compare

0.20.2 (2025-09-26)

Bug Fixes

  • README.md: fix spelling in Python sample code (3992d51)

What's Changed

  • fix(README.md): fix spelling in Python sample code by @gmacario in #158

Full Changelog: v0.20.1...v0.20.2

Release v0.20.1

26 Sep 08:32

Choose a tag to compare

0.20.1 (2025-09-26)

Build Systems

  • devcontainer: cpu: remove deprecated extension (2ab82c3)
  • devcontainer: gpu: remove deprecated extension (ba61a93)
  • devcontainer: tensorrt: remove deprecated extension (9daf17d)

What's Changed

  • build(devcontainer): remove deprecated extension by @gmacario in #157

New Contributors

Full Changelog: v0.20.0...v0.20.1

Release v0.20.0

24 Sep 08:02

Choose a tag to compare

0.20.0 (2025-09-24)

🚀 Key Changes

✨ Introduce classification models

  • add fai-cls-n/s/m-coco classification pretrained model
    • compatible training datasets:
      • DatasetLatout.ROBOFLOW_COCO (multi-class)
      • DatasetLatout.CLS_FOLDER (multi-class)
from focoos import ModelManager
from PIL import Image

im = "https://public.focoos.ai/samples/federer.jpg"
model = ModelManager.get("fai-cls-m-coco")
detections = model.infer(im, annotate=True, threshold=0.5)
Image.fromarray(detections.image) # visualise or save annotated image

🛠️ Add new export parameters

  • add simplify_onnx (bool) parameter to simplify onnx graph with huggingface optimum
  • add dynamic_axes (bool) parameter
from focoos import ModelManager
from PIL import Image

im = "https://public.focoos.ai/samples/federer.jpg"
model = ModelManager.get("fai-cls-n-coco")
exported_model = model.export(runtime_type=RuntimeType.ONNX_CPU,
                    dynamic_axes=False,
                    simplify_onnx=True)

🤖 add quantization for classification models

  • support QDQ and QO onnx quantization for classification models
from focoos import ASSETS_DIR,RuntimeType
from focoos.infer.quantizer import OnnxQuantizer, QuantizationCfg

quantization_cfg = QuantizationCfg(
    size=image_size,  # input size: must be same as exported model
    calibration_images_folder=str(ASSETS_DIR),  # Calibration images folder: It is strongly recommended
    # to use the dataset validation split on which the model was trained.
    # Here, for example, we will use the assets folder.
    format="QDQ",  # QO (QOperator): All the quantized operators have their own ONNX definitions, like QLinearConv, MatMulInteger etc.
    # QDQ (Quantize-DeQuantize): inserts DeQuantizeLinear(QuantizeLinear(tensor)) between the original operators to simulate the quantization and dequantization process.
    per_channel=True,  # Per-channel quantization: each channel has its own scale/zero-point → more accurate,
    # especially for convolutions, at the cost of extra memory and computation.
    normalize_images=True,  # normalize images during preprocessing: some models have normalization outside of model forward
)

quantizer = OnnxQuantizer(
    input_model_path=model_path,
    cfg=cfg
)
quant_model_path = quantizer.quantize(benchmark=True)

quantized_model = InferModel(quant_model_path,runtime_type=RuntimeType.ONNX_CPU)

🏞️ Datasets

  • filter images without annotation in training and validation split

🤖 InferModel

  • use full model path instead of model folder

📖 Docs

  • add classification models docs
  • add quantization docs
  • add quantization notebook

🛠️ Misc

  • update logging with more human readable print

🛠️ Deps

  • add Huggingface Optimum
  • remove OnnxSlim

Full Changelog: v0.19.1...v0.20.0

Release v0.19.1

09 Sep 16:11

Choose a tag to compare

0.19.1 (2025-09-09)

Bug Fixes

  • InferModel: onnx cpu inference by add device parameter (d50265f)
  • runtime tests (ebcd463)

What's Changed

Full Changelog: v0.19.0...v0.19.1

Release v0.19.0

25 Aug 14:46

Choose a tag to compare

0.19.0 (2025-08-25)

Key Changes

✨ Introduce keypoints models

  • add RTMO-S/M/L-COCO keypoint pretrained model
    example:
from focoos import ModelManager
from PIL import Image

im = "https://public.focoos.ai/samples/federer.jpg"
model = ModelManager.get("rtmo-s-coco")
detections = model.infer(im,annotate=True, threshold=0.5)
Image.fromarray(detections.image) # visualise or save annotated image

📷 Unified Inference API

Standardize infer Method Signatures

  • consistent infer() method across FocoosModel, InferModel, and RemoteModel with unified parameters: infer(image, threshold=0.5, annotate=False) and use unified image loader for infer methods (with also remote image support)
  • add default threshold to 0.5
  • Remove dependency on external annotate_image() function calls
  • Streamlined workflow: get detections and visual annotations in a single call

example torch and exported model:

from focoos import ModelManager, RuntimeType
from PIL import Image


im = "https://public.focoos.ai/samples/motogp.jpg" # remote image, can also be local path, numpy array, or PIL image
model = ModelManager.get("fai-detr-l-obj365")
detections = model.infer(im,annotate=True, threshold=0.5) # annotatate param 
# Image.fromarray(detections.image) # visualise or save annotated image

# export model
model = model.export(RuntimeType.ONNX_CUDA32)
res = model.infer(im, annotate=True, threshold=0.5)

Image.fromarray(detections.image) # visualise or save annotated image

example with remote inference:

from focoos import FocoosHUB
from PIL import Image

hub = FocoosHUB()
model_ref = "fai-detr-l-obj365" # use any of pretrained model on app.focoos.ai or your own model reference
remote_model = hub.get_remote_model(model_ref)

im = "https://public.focoos.ai/samples/federer.jpg"

detections = remote_model.infer(im,annotate=True, threshold=0.5)

Image.fromarray(detections.image) # visualise or save annotated image

Enhanced FocoosDetections Structure

  • add new image field: stores annotated results as base64 string or numpy array
  • migrated from Pydantic to pure Python dataclasses for better performance,
    Improved serialization and memory usage
  • add new keypoints field
  • add pprint and print_infer methods to unify detections prints.

⌨️ CLI

  • add new CLI command: focoos gradio to launch a Gradio interface for image and video inference using Focoos pretrained models.

🕹️ Trainer

  • fix missing model preprocessing when amp=True (Automatic Mixed Precision) is enabled
  • add COSINE scheduler quadratic warmup
  • add KeypointEvaluator
  • enhance logging with additional info
  • Update Visualizer (preview hook) to save RGB images instead of BGR
  • Restore TensorBoard Hook

📖 ModelRegistry

  • model registry now support automatic loading json configs from registry folder instead of declare model configs manually

🏞️ Processor

  • add image_size into init instead of preprocess methods
  • improve image loader performance
  • add non-blocking image transfer
  • optimize preprocessor speed
  • add focoos palette to annotators

📖 Docs

  • add RTMO docs
  • update Readme, Docs and notebook with from focoos import x for all exported classes and functions instead of absolute path

What's Changed

Full Changelog: v0.18.1...v0.19.0