Skip to main content

YAAC - Python package for loading and using trained AI models

Project description

yaac

PyPI version Python 3.10+ License

YAAC - Python package for loading and train AI models.

Installation

Install from PyPI:

pip install yaac

Requirements

HuggingFace Token (for DINOv3 ConvNeXt-Tiny backbone)

If you're loading models that use the DINOv3 ConvNeXt-Tiny backbone (convnext_tiny_dinov3), you'll need a HuggingFace token because the model repository is gated.

  1. Request access: Visit https://huggingface.co/facebook/dinov3-convnext-tiny-pretrain-lvd1689m and request access to the repository
  2. Generate a token: Create a token at https://huggingface.co/settings/tokens
  3. Set environment variable: Export the token as an environment variable:
    export HUGGINGFACE_TOKEN=your_token_here
    

The token is only required when loading models with the ConvNeXt-Tiny backbone. Models using ResNet18 or other backbones don't require a token.

Quick Start

Load a trained model and run inference:

from yaac.common.model_loader import load_model_from_checkpoint
import torch

# Load your trained model
model, config = load_model_from_checkpoint("path/to/checkpoint", device="cuda")

# Run inference
image = torch.randn(1, 3, 224, 224)  # Your image tensor
with torch.no_grad():
    predictions = model(image)
    processed = model.postprocess(predictions)

print(f"Predictions: {processed}")

What is yaac?

yaac is a Python package that provides:

  • Model Loading: Load trained image classification models from exported checkpoints (safetensors + config.json)
  • Model Interface: Standardized TrainableModel interface for consistent model usage
  • SIC Models: Support for Simple Image Classifier (SIC) models with configurable backbones and heads

Models are trained using YAAC's infrastructure and exported in a format compatible with this package.

Documentation

License

Apache 2.0 - See LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yaac-0.1.4.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yaac-0.1.4-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file yaac-0.1.4.tar.gz.

File metadata

  • Download URL: yaac-0.1.4.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for yaac-0.1.4.tar.gz
Algorithm Hash digest
SHA256 2239bab3464673e3d4799691d8cd1651ee3df5040a9443a007c185ea7b9a5fff
MD5 8560d6e35f74ce32765f3c6ef5526e65
BLAKE2b-256 3314a12458b9f51f382506a02292fdc6a1c870dca2deb9d2e312a4b7f9982d77

See more details on using hashes here.

File details

Details for the file yaac-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: yaac-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for yaac-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f4dd946fce12d6d7b6370e34b9b0ef9e4f13815c2a1a9f87aa9c8464e454547d
MD5 9f0eb8ff5828d71984e664d2826d0f79
BLAKE2b-256 8a32096b18dd220462640ea68aa06619a39c85ae73b181b0fbe615d08971f968

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page