TorchIO
PyTorch library for loading, preprocessing, augmenting, and patch-sampling 3D medical images (MRI/CT) for deep learning.
TorchIO
TorchIO is a Python library for efficient loading, preprocessing, augmentation, and patch-based sampling of 3D medical images such as MRI and CT volumes, designed to integrate cleanly with PyTorch deep-learning workflows. It provides medical-imaging-specific transforms that model realistic scanner artifacts, which general computer-vision augmentation libraries lack.
Key features
- Medical-specific augmentations: random motion, ghosting, bias field, spikes, and anisotropy artifacts
- Standard spatial and intensity transforms with reproducible, invertible pipelines
- Queue-based patch sampling for training on large volumes with limited memory
- GridSampler and aggregator for dense patch-wise inference
- SimpleITK and NiBabel I/O supporting NIfTI, DICOM, and more
- Native PyTorch Dataset/DataLoader integration
Wrap your volumes in a Subject, compose a transforms pipeline, and feed patches through a Queue into a standard DataLoader. Widely adopted for segmentation and classification of neuroimaging and radiology data, and a strong complement to frameworks like MONAI and nnU-Net.
Curated mirror of the open-source TorchIO (Apache-2.0). Get it from the source.
Compromise signals — malicious or tampered code (leaked secrets, backdoors, a dropped executable) — reduce the score, and known dependency CVEs carry a bounded penalty (they warrant review but never QUARANTINE — update the dependency to clear). Other dangerous-by-capability traits are risk surface, expected for some capabilities. Every finding is mapped to its OWASP control below.
Findings mapped to the OWASP Top 10 for LLM Applications (2025) and the OWASP Machine Learning Security Top 10. Expand any flagged control for the exact findings — compromise reduces the score; expected/risk-surface do not, except a known CVE, which carries a small bounded penalty (high/critical → Review).
The same gate an agent runs before installing (POST /api/v1/trust/torchio-medical-image-augmentation/check). Click a policy:
Consume TorchIO programmatically. Authenticate with an API key or session — see Authorize an agent.
# Agents: CHECK BEFORE YOU INSTALL (no auth) — score, grade, level, capability manifest
curl https://ai-supply.store/api/v1/trust/torchio-medical-image-augmentation
# Gate against your org policy (returns { pass, violations })
curl -X POST https://ai-supply.store/api/v1/trust/torchio-medical-image-augmentation/check \
-H "Content-Type: application/json" \
-d '{"minGrade":"B","denyPermissions":["shell"],"denyUnknownEgress":true}'
# CLI
npx ai-supply add torchio-medical-image-augmentation
# REST (install → download)
curl -X POST https://ai-supply.store/api/v1/listings/torchio-medical-image-augmentation/install \
-H "Authorization: Bearer $AIM_KEY"
# MCP tool
install_listing({ "slug": "torchio-medical-image-augmentation" })OpenAPI spec →Curated mirror — latest upstream source. See the repository for tagged releases.