--- license: cc-by-4.0 task_categories: - image-classification source_datasets: - tcia-duke-breast-cancer tags: - medical - mri - radiology - breast-cancer - mri - pytorch - green-ai pretty_name: microCube Duke Breast MRI Tensors --- # microCube (Bio-Lattice) Tensors: Duke Breast Cancer MRI This repository contains precomputed **microCube / Bio-Lattice** tensors derived from the Duke Breast Cancer MRI cohort. The goal is to provide compact, training-ready MRI representations without requiring downstream users to download or process the original DICOM volumes. These files are intended for research and method-development use only. They are not intended for clinical diagnosis or treatment decisions. ## Repository Structure - `micro_cubos/`: PyTorch `.pt` microCube tensors. - `extraction_audits/`: JSONL extraction audit logs used to determine whether each patient is suitable for training. - Each tensor follows the naming convention `{PatientID}_lattice.pt`. The current project snapshot contains: - `922` patient microCube tensors. - Latest audit status summary: `876 OK`, `13 WARNING`, `33 REVIEW`. - Training-eligible policy used by the reference pipeline: `OK + WARNING = 889` patients. `REVIEW` cases are kept in the dataset for transparency and future method development, but the reference training pipeline excludes them through the extraction audit filter. ## Source Data and Attribution This dataset is a processed derivative of the **Duke Breast Cancer MRI** cohort, originally hosted on **The Cancer Imaging Archive (TCIA)**. - Original dataset: [Breast-Cancer-MRI-minus-DICOM](https://wiki.cancerimagingarchive.net/pages/viewpage.action?pageId=70226903) - Original citation: Saha, A., Harowicz, M. R., Grimm, L. J., Kim, C. E., Mazurowski, M. A. (2018). *A machine learning approach to radiogenomics of breast cancer: a study of 922 patients and a comparison with 110 gene signatures.* JCO Precision Oncology. Please cite the original TCIA/Duke dataset and this processed representation dataset when using these tensors. ## Processing Summary The conversion from raw DICOM to compact tensors was performed with the **microCube / Bio-Lattice** pipeline. The pipeline selects PRE/POST DCE-MRI series, registers the selected volumes, crops around the lesion ROI, and resamples the representation into a fixed-size 3D tensor. Current tensor specification: - Shape: `[4, 64, 64, 64]` as `(C, D, H, W)`. - Format: PyTorch `.pt`. - Each `.pt` file stores at least a `tensor` entry and metadata used by the reference pipeline. Channels: - `C1`: post-contrast anatomical signal. - `C2`: local heterogeneity / variance. - `C3`: enhancement kinetics. - `C4`: focal peak / vascularity-oriented signal. ## Extraction Audits The `extraction_audits/` folder contains JSONL audit records generated during data extraction. The reference training code resolves the latest status per patient and trains only on statuses configured as eligible: ```python TRAIN_FILTER_BY_AUDIT = True TRAIN_ALLOWED_AUDIT_STATUSES = ("OK", "WARNING") ``` The `REVIEW` status is used for cases with higher technical risk, such as high compression risk, low registration correlation, high PRE zero fraction, or missing required series. These cases are retained to support future robustness work, but they should not be mixed into baseline training unless intentionally studied. ## Usage With the GitHub Pipeline The tensors are designed to be used with the microCube GitHub repository: ```bash git clone https://github.com/msancheza/biolattice.git cd biolattice ``` Expected local layout after downloading this dataset: ```text datasets/micro_cubes/ dashboard/extraction_audits/ datasets/Clinical_and_Other_Features.xlsx ``` The clinical spreadsheet is maintained in the GitHub repository. The Hugging Face dataset provides the derived tensors and extraction audits. ## Quick Load Example ```python import torch path = "micro_cubos/Breast_MRI_001_lattice.pt" obj = torch.load(path, map_location="cpu", weights_only=True) cube = obj["tensor"] if isinstance(obj, dict) else obj print(cube.shape) # expected: torch.Size([4, 64, 64, 64]) ``` ## Training Notes The current reference training flow uses: - Audit-based filtering of `OK` and `WARNING` patients. - Patient-level stratified train/validation split. - A 3D ResNet-style classifier over the 4-channel microCube plus metadata features. - Optional experiment tracking with Weights & Biases. The project is actively evaluating input normalization policies. Recent experiments compare training with and without an additional per-channel Z-score normalization at model input time. Check the GitHub repository configuration and training logs for the exact preprocessing policy used in a given run. ## Limitations - These tensors are derived representations, not raw DICOM studies. - Fixed-size ROI resampling may compress very large lesions or surrounding tissue context. - `REVIEW` cases require manual or methodological follow-up before baseline training use. - Metrics should be interpreted as research benchmarks, not clinical performance claims. - Downstream results depend on audit filtering, preprocessing policy, split seed, and model configuration.