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.5.tar.gz (15.5 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.5-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: yaac-0.1.5.tar.gz
  • Upload date:
  • Size: 15.5 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.5.tar.gz
Algorithm Hash digest
SHA256 f3d1bca2c5d4b385c978dc32aeaaa7ab5ed995f6f81238810205d24517ee1d3d
MD5 80bb716cc40976d8ae0037ec2f5ac261
BLAKE2b-256 b5bb6f41faaa6280da9f62efffc7b448724f1405a0fa2e195feb6b9fefaf01fe

See more details on using hashes here.

File details

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

File metadata

  • Download URL: yaac-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 18.9 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3d8ca141749f7f194b1213a7ac6a1bc73587c6b512f3d50be7dbeb1fac235ec3
MD5 108710e179ef7b77ef2129d02518e737
BLAKE2b-256 9fe1c479e32c15a751a1e29ee6105fd8ec6b9c0ca7116cc3fce91bf86bca871d

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