Commercial Adoption¶
MedAugmentX is built for teams that need medical-image augmentation to be simple, inspectable, and easy to validate. The core package stays lightweight, while integrations for common training stacks remain optional.
This guide is a practical checklist for adopting MedAugmentX in research, commercial model training, and internal ML platforms.
Intended use¶
MedAugmentX provides data augmentation utilities for medical imaging AI training and evaluation workflows. It is not a diagnostic device, clinical decision-support system, image acquisition system, PACS, or regulated medical device on its own.
Before using augmented data in a regulated or customer-facing product, teams should document:
the model task and modality,
the source data and inclusion/exclusion criteria,
the augmentation policy and rationale,
the validation protocol for original and augmented data,
known limitations and failure modes.
Adoption checklist¶
Area |
What to verify |
|---|---|
Installation |
Core install pulls only |
Reproducibility |
Pipelines use explicit seeds for experiments and are saved with JSON or YAML serialisation. |
Clinical plausibility |
Transform ranges are reviewed by imaging, clinical, or modality experts for the target use case. |
Labels and masks |
Spatial transforms preserve mask alignment and use nearest-neighbour mask interpolation. |
Data privacy |
Patient identifiers are removed or controlled before data enters training or examples. |
Auditability |
Pipeline configs, package version, dataset version, and training code commit are recorded together. |
Framework fit |
Use |
Release control |
Pin |
Dependency policy¶
The default package is intentionally small:
pip install medaugmentx
Required dependencies:
numpyscipy
Optional extras:
Extra |
Use |
|---|---|
|
DICOM and NIfTI loading/writing through |
|
YAML pipeline serialisation |
|
PyTorch tensor samples |
|
MONAI-style dictionary samples |
|
TorchIO |
|
PyTorch, MONAI, and TorchIO integrations together |
Interop modules are import-lazy. Importing medaugmentx.interop does not
import PyTorch, MONAI, or TorchIO until framework objects are passed at
runtime.
Reproducibility and audit trail¶
For production-grade experiments, save the augmentation pipeline next to model and dataset metadata:
from medaugmentx.presets import mri_pipeline
from medaugmentx.serialization import to_json
pipeline = mri_pipeline(seed=42)
pipeline_json = to_json(pipeline)
Record at least:
medaugmentx.__version__,pipeline JSON or YAML,
random seed policy,
dataset version or manifest,
model training code commit,
optional dependency versions for framework integrations.
For per-epoch reproducibility, create a fresh seeded pipeline per epoch rather than reusing one pipeline instance forever, because RNG state advances with each sample.
Clinical validation guidance¶
MedAugmentX provides clinically-aware primitives, but safe transform ranges are task-specific. A CT lung nodule classifier, MRI segmentation model, and DBT screening model may require very different augmentation policies.
Recommended validation steps:
Review transform ranges with modality experts.
Visualize augmented samples across edge cases and scanner/site subgroups.
Confirm segmentation masks remain aligned after spatial transforms.
Compare model performance on unaugmented holdout data and clinically relevant subgroups.
Track whether augmentation changes calibration, sensitivity, specificity, or clinically meaningful operating points.
Avoid using augmentation to simulate pathology, device behavior, scanner vendors, or reconstruction algorithms unless the simulation has been validated for that use case.
Privacy and security¶
MedAugmentX does not require network access at runtime and does not send image data anywhere. The library operates on arrays and metadata supplied by the caller.
Teams remain responsible for:
de-identifying protected health information before sharing data or examples,
controlling patient identifiers in
MedVolume.metadata,securing local training environments and artifact storage,
reviewing optional dependency licenses and security posture.
See SECURITY.md for vulnerability reporting and supported security expectations.
Recommended production pattern¶
from medaugmentx.io import load_nifti
from medaugmentx.presets import mri_pipeline
from medaugmentx.serialization import to_json
pipeline = mri_pipeline(seed=42)
pipeline_config = to_json(pipeline)
volume = load_nifti("case_001.nii.gz")
augmented = pipeline(volume)
Keep pipeline_config with training metadata so any model run can be
reconstructed later.
Geometry and supported integration scope¶
Version 1 propagates array-index-to-RAS-mm affine geometry through crop, pad, resize and NIfTI image/mask export. Synthetic tests include oblique/sheared grids, spatial units, world landmarks and actual MONAI/TorchIO objects. Active anatomy warps retain the sampling grid. See migration contracts.
Use ResampleToSpacing to standardize declared voxel spacing across scans
before augmentation. It keeps the physical centre and grid directions;
rounding output dimensions can change the field of view slightly. Set its
optional max_voxels to reject unexpectedly large outputs before resampling.
It does not perform registration or anatomical reorientation. Use
MedVolume.world_to_index for external RAS-mm landmarks; off-plane points on
2D images are rejected. See geometry semantics.
This support is deliberately bounded: classic monochrome single-frame DICOM, registered single-channel images/labels, explicit unsupported-object rejection, and no MONAI inverse-transform implementation. Vendor scanner fixtures and patient-cohort/model-benefit validation remain external work. Synthetic tests are not substitutes for those studies. Consult release evidence.