YAAC - Python package for loading and using trained AI models
Project description
yaac
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.
- Request access: Visit https://huggingface.co/facebook/dinov3-convnext-tiny-pretrain-lvd1689m and request access to the repository
- Generate a token: Create a token at https://huggingface.co/settings/tokens
- 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
TrainableModelinterface 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
- Contributing Guide - For developers who want to contribute
- Publishing Guide - For maintainers publishing new versions
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2239bab3464673e3d4799691d8cd1651ee3df5040a9443a007c185ea7b9a5fff
|
|
| MD5 |
8560d6e35f74ce32765f3c6ef5526e65
|
|
| BLAKE2b-256 |
3314a12458b9f51f382506a02292fdc6a1c870dca2deb9d2e312a4b7f9982d77
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4dd946fce12d6d7b6370e34b9b0ef9e4f13815c2a1a9f87aa9c8464e454547d
|
|
| MD5 |
9f0eb8ff5828d71984e664d2826d0f79
|
|
| BLAKE2b-256 |
8a32096b18dd220462640ea68aa06619a39c85ae73b181b0fbe615d08971f968
|