Skip to content
Back to skills

Torchvision

ASecurity

"Use this skill when working with TorchVision models, weights,

  • 247 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 9, 2026
datapythonrustbashapiperformance

Works with

  • api

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill torchvision --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Torchvision?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Torchvision
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-torchvision/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-torchvision)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: torchvision
description: "Use this skill when working with TorchVision models, weights,
  transforms, TVTensors, datasets, image IO, visualization utilities, vision
  ops, detection helpers, or official reference training workflows."
disable-model-invocation: true
metadata:
  disco-role: operating
license: BSD 3-Clause
---

# TorchVision Repo Skill

Use this skill for practical TorchVision work: choosing models and pretrained weights, building transform pipelines, preparing datasets and image IO checks, using detection/box operators, and planning official reference training commands safely.

TorchVision is a PyTorch computer-vision library. It provides public Python APIs for model architectures, pretrained weight metadata, datasets, transforms, TVTensor metadata types, image IO, visualization helpers, and vision-specific operators.

## Start Here

1. Confirm installation and compatibility with `python scripts/check_torchvision_install.py`.
2. Use `references/package-overview.md` for the module map, supported surfaces, and install/runtime assumptions.
3. Use `references/troubleshooting.md` when imports, compiled ops, downloads, codecs, datasets, or version matching fail.
4. Route to the focused sub-skill below instead of treating this root file as a manual.

## Route by Task

- Model selection, pretrained weights, weight transforms, output interpretation, PyTorch Hub, or feature extraction: use `sub-skills/models-and-weights/`.
- Transform pipelines, v2 migration, TVTensor metadata, boxes/masks/keypoints, random transform behavior, or transform performance: use `sub-skills/transforms-and-tv-tensors/`.
- Built-in/custom datasets, data roots, `ImageFolder`, `FakeData`, image decode/encode, visualization utilities, or no-network fixtures: use `sub-skills/datasets-io-utils/`.
- Box utilities, NMS, ROI Align/Pool, FPN helpers, detection postprocessing, losses/layers, or custom operator errors: use `sub-skills/ops-and-detection/`.
- Official reference training/evaluation scripts, distributed command planning, dataset layout requirements, and safe dry-run training plans: use `sub-skills/training-references/`.

## Minimal Import Check

```bash
python - <<'PY'
import torch
import torchvision
print('torch', torch.__version__)
print('torchvision', torchvision.__version__)
print('ops loaded', torchvision.extension._has_ops())
PY
```

If `ops loaded` is false, pure-Python surfaces may still import, but detection ops such as `torchvision.ops.nms` and many detection models can fail. Use `references/troubleshooting.md` and `sub-skills/ops-and-detection/references/troubleshooting.md`.

## Common Safe Defaults

- Use `weights=None` when tests or examples must avoid network downloads.
- Use weight enums and `weights.transforms()` for real pretrained inference; do not recreate preprocessing by hand unless the task requires it.
- Prefer `torchvision.transforms.v2` for new transform pipelines, especially when samples include boxes, masks, videos, or keypoints.
- Use tiny fixtures, `FakeData`, and bundled smoke scripts before touching real dataset roots or network downloads.
- Treat reference training scripts as command plans by default; they can require datasets, GPUs, distributed launch, and latest-source compatibility.

## Bundled Checks

- `scripts/check_torchvision_install.py`: verifies import, versions, extension availability, important submodules, and no-download smoke surfaces.
- `sub-skills/models-and-weights/scripts/inspect_models.py`: lists models/weights and inspects safe model metadata.
- `sub-skills/transforms-and-tv-tensors/scripts/smoke_transform_pipeline.py`: checks v2 transforms and TVTensor metadata on tiny tensors.
- `sub-skills/datasets-io-utils/scripts/check_dataset_io.py`: creates a tiny no-network dataset/IO fixture.
- `sub-skills/ops-and-detection/scripts/smoke_ops.py`: checks small CPU box/NMS/ROI operator behavior.
- `sub-skills/training-references/scripts/inspect_reference_args.py`: summarizes safe reference-training command families without importing source scripts.

## Evidence and Staleness

Read `references/repo-provenance.md` before trusting this skill for a modified checkout or a new TorchVision release. Refresh the skill if the source commit, public APIs, docs, model catalog, transform semantics, dataset list, compiled ops behavior, or reference scripts changed substantially.

Files in this skill

  • SKILL.md4.3 KB
  • references/package-overview.md2.6 KB
  • references/repo-provenance.md1.7 KB
  • references/repo-routing-metadata.json490 B
  • references/troubleshooting.md2.6 KB
  • scripts/check_torchvision_install.py3.2 KB
  • sub-skills/datasets-io-utils/SKILL.md3 KB
  • sub-skills/datasets-io-utils/references/datasets-and-data-roots.md6.3 KB
  • sub-skills/datasets-io-utils/references/io-and-visualization.md4.8 KB
  • sub-skills/datasets-io-utils/references/troubleshooting.md5.9 KB
  • sub-skills/datasets-io-utils/scripts/check_dataset_io.py4.6 KB
  • sub-skills/models-and-weights/SKILL.md2.7 KB
  • sub-skills/models-and-weights/references/feature-extraction.md4.9 KB
  • sub-skills/models-and-weights/references/model-selection.md4.8 KB
  • sub-skills/models-and-weights/references/troubleshooting.md4.7 KB
  • sub-skills/models-and-weights/references/weights-and-inference.md5.4 KB
  • sub-skills/models-and-weights/scripts/inspect_models.py8.2 KB
  • sub-skills/ops-and-detection/SKILL.md2.7 KB
  • sub-skills/ops-and-detection/references/box-and-roi-ops.md5.5 KB
  • sub-skills/ops-and-detection/references/detection-helpers.md4.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.