.github/skills/vision-utilities/SKILL.md
Guide for using vision utilities in speedy_utils, including fast GPU image loading, memory-mapped datasets, and notebook visualization.
npx skillsauth add anhvth/speedy_utils vision-utilitiesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill provides comprehensive guidance for using the vision utilities in speedy_utils.
Use this skill when you need to:
ImageMmap) for extremely fast random access training loops.speedy_utils installed.Pillow and numpy (required).matplotlib (for plotting).nvidia-dali-cuda110 or similar (optional, for GPU loading).torch (optional, for tensor support).read_images)ImageMmap, ImageMmapDynamic)ImageMmap: For fixed-size images. Pre-processes and resizes images once, then stores them in a single binary file for zero-copy access.ImageMmapDynamic: For variable-size images. Stores flattened images and metadata.plot_images_notebook)Load a batch of images, resizing them to 224x224.
from vision_utils.io_utils import read_images
paths = ["img1.jpg", "img2.jpg", "img3.jpg"]
# Returns dict: {path: np.ndarray}
images = read_images(paths, hw=(224, 224))
Create a dataset that loads instantly on subsequent runs.
from vision_utils.io_utils import ImageMmap
# First run: reads files, resizes, writes .cache/mmap_dataset_...
# Next runs: maps file directly
dataset = ImageMmap(paths, size=(224, 224))
# Access like a list/array
img = dataset[0] # np.ndarray (224, 224, 3)
Plot a mix of tensors and paths in a notebook.
from vision_utils.plot import plot_images_notebook
import torch
import numpy as np
images = [
"img1.jpg", # Path
np.random.rand(100, 100, 3), # Numpy
torch.rand(3, 64, 64) # Tensor (C, H, W)
]
plot_images_notebook(images, ncols=3, titles=["File", "Random", "Tensor"])
GPU Loading:
read_images is most effective for large batches. For single images, CPU overhead is lower.Mmap Datasets:
ImageMmap for training pipelines where fixed size is required (e.g., ResNet).ImageMmapDynamic if you need original resolutions (e.g., for object detection with variable size inputs)..cache/ by default. Clear it if your source images change content but keep the same filenames (hashing is based on paths).Plotting:
plot_images_notebook is designed for notebooks. It uses plt.show().development
Guide for creating new Agent Skills with proper structure, frontmatter, bundled assets, and validation. Includes templates, best practices, and examples for building reusable skill resources.
documentation
Comprehensive guide to using Ray for scalable distributed computing, including Ray Core, Data, Train, Tune, Serve, and RLlib with practical examples
development
Comprehensive guide for using multi-threading and multi-processing in Python, including when to choose each approach, best practices, and practical examples using the speedy_utils library.
tools
Reduce VS Code Python red squiggles to zero in this repository. Use when Pylance or pyright reports errors, when tools/check_syntax.py fails, or when a change should leave VS Code diagnostics clean.