MammoMix runs on Python 3.8 or later and depends on PyTorch, HuggingFace Transformers, and a handful of supporting libraries for dataset loading, augmentation, metrics, and experiment tracking. All required packages are pinned inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/tommyngx/MammoMix/llms.txt
Use this file to discover all available pages before exploring further.
requirements.txt and install with a single pip command. A CUDA-capable GPU is not strictly required, but training on CPU is impractical for mammography-scale datasets.
System requirements
| Requirement | Minimum | Recommended |
|---|---|---|
| Python | 3.8 | 3.10+ |
| GPU | — | CUDA-capable (8 GB VRAM for YOLOS, 16 GB for Deformable DETR) |
| CUDA | — | 11.8 or 12.1 |
| RAM | 8 GB | 16 GB+ |
| Disk | 5 GB | 20 GB+ (datasets not included) |
Install from source
Clone the repository and install all Python dependencies:Dependencies
requirements.txt contains six packages. The table below explains what each one does in MammoMix:
| Package | Version spec | Role in MammoMix |
|---|---|---|
torch | latest | Core deep learning framework. Powers model training, GPU tensor operations, and the DataLoader pipeline in loader.py. |
transformers[torch] | latest | HuggingFace Transformers. Provides AutoModelForObjectDetection, AutoImageProcessor, and Trainer — the backbone of train.py for both YOLOS and Deformable DETR. |
timm | latest | PyTorch Image Models. Supplies pretrained image model components used internally by YOLOS and as a dependency of Transformers’ vision backends. |
datasets | latest | HuggingFace Datasets library. Used for dataset management utilities and compatibility with the Transformers training pipeline. |
wandb | latest | Weights & Biases experiment tracking. Receives logs automatically via report_to="all" in TrainingArguments. Configured through logging.wandb_project in the YAML config. |
torchmetrics[detection] | latest | Detection metrics. Provides MeanAveragePrecision, which computes mAP, mAP@50, mAP@75, and size-stratified mAP in evaluation.py and mocae.py. |
Data augmentation dependency
loader.py uses Albumentations for training-time data augmentation, including elastic deformation, perspective distortion, horizontal flips, rotation, random scaling, affine transforms, brightness/contrast jitter, Gaussian noise, and Gaussian blur. Albumentations is not listed in requirements.txt, so install it separately:
loader.py will fail with an ImportError when train.py starts.