Framework integration

From VectorSpaceLab/AREX-Skill · View interactive version

Framework integration is an AI agent skill from the GitHub repository VectorSpaceLab/AREX-Skill. Integrate Albumentations with PyTorch-style datasets, tensor conversion, optional extras, and DataLoader reproducibility.

How to use this skill

Skill file

Framework Integration

Use this sub-skill when a task involves PyTorch dataset integration, tensor outputs, optional framework extras, or errors importing ToTensorV2 / ToTensor3D.

Route Here For

Start With These References

Boundaries

Minimal Pattern

import albumentations as A
from albumentations.pytorch import ToTensorV2

train_transform = A.Compose(
    [
        A.Resize(256, 256),
        A.HorizontalFlip(p=0.5),
        A.Normalize(mean=(0.485, 0.456, 0.406), std=(0.229, 0.224, 0.225)),
        ToTensorV2(),
    ],
    strict=True,
)

sample = train_transform(image=image_np, mask=mask_np)
image_tensor = sample["image"]  # C,H,W torch.Tensor
mask_tensor = sample["mask"]    # H,W torch.Tensor unless transpose_mask=True

Checklist

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.