ocx2025 commited on
Commit
dded051
·
verified ·
1 Parent(s): bd65773

Updates configs

Browse files
Files changed (1) hide show
  1. README.md +92 -25
README.md CHANGED
@@ -17,41 +17,108 @@ pretty_name: microCube Duke Breast MRI Tensors
17
 
18
  # microCube (Bio-Lattice) Tensors: Duke Breast Cancer MRI
19
 
20
- ## Project Structure
21
- The tensors in this repository are organized to match the `microCube` pipeline:
22
- - `micro_cubos/`: Directory containing `.pt` (PyTorch) files.
23
- - Each file follows the naming convention: `{PatientID}_lattice.pt`.
24
 
25
- ## Source Data & Attribution
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
 
27
  This dataset is a processed derivative of the **Duke Breast Cancer MRI** cohort, originally hosted on **The Cancer Imaging Archive (TCIA)**.
28
 
29
- * **Original Dataset:** [Breast-Cancer-MRI-minus-DICOM](https://wiki.cancerimagingarchive.net/pages/viewpage.action?pageId=70226903)
30
- * **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.
 
 
 
 
31
 
32
- ### Processing (microCube)
33
- The conversion from raw DICOM to these 3D tensors was performed using the **microCube (Bio-Lattice)** pipeline. This process reduces the original gigabyte-scale data into compact $32 \times 32 \times 32$ tensors focused on:
34
- 1. **Morphology** (Post-contrast)
35
- 2. **Texture** (Variance)
36
- 3. **Kinetics** (Enhancement)
37
 
38
- ## Technical Specifications
39
- - **Input Dimension:** [3, 32, 32, 32] (C, D, H, W).
40
- - **Channels:** 1. Post-contrast structure (Max Pool).
41
- 2. Local heterogeneity (Variance).
42
- 3. Kinetics (Post - Pre contrast difference).
43
- - **Format:** PyTorch Tensors (`.pt`).
44
 
45
- ## Usage
46
- To maintain compatibility with the [microCube GitHub repository](https://github.com/msancheza/biolattice), you should download this folder into your local `datasets/` directory.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
 
48
- ### Quick Load Example:
49
  ```python
50
  import torch
51
- import os
52
 
53
- # Loading a specific patient tensor
54
  path = "micro_cubos/Breast_MRI_001_lattice.pt"
55
- tensor = torch.load(path)
56
- print(f"Tensor Shape: {tensor.shape}")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
 
 
17
 
18
  # microCube (Bio-Lattice) Tensors: Duke Breast Cancer MRI
19
 
20
+ 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.
 
 
 
21
 
22
+ These files are intended for research and method-development use only. They are not intended for clinical diagnosis or treatment decisions.
23
+
24
+ ## Repository Structure
25
+
26
+ - `micro_cubos/`: PyTorch `.pt` microCube tensors.
27
+ - `extraction_audits/`: JSONL extraction audit logs used to determine whether each patient is suitable for training.
28
+ - Each tensor follows the naming convention `{PatientID}_lattice.pt`.
29
+
30
+ The current project snapshot contains:
31
+
32
+ - `922` patient microCube tensors.
33
+ - Latest audit status summary: `876 OK`, `13 WARNING`, `33 REVIEW`.
34
+ - Training-eligible policy used by the reference pipeline: `OK + WARNING = 889` patients.
35
+
36
+ `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.
37
+
38
+ ## Source Data and Attribution
39
 
40
  This dataset is a processed derivative of the **Duke Breast Cancer MRI** cohort, originally hosted on **The Cancer Imaging Archive (TCIA)**.
41
 
42
+ - Original dataset: [Breast-Cancer-MRI-minus-DICOM](https://wiki.cancerimagingarchive.net/pages/viewpage.action?pageId=70226903)
43
+ - 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.
44
+
45
+ Please cite the original TCIA/Duke dataset and this processed representation dataset when using these tensors.
46
+
47
+ ## Processing Summary
48
 
49
+ 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.
 
 
 
 
50
 
51
+ Current tensor specification:
 
 
 
 
 
52
 
53
+ - Shape: `[4, 64, 64, 64]` as `(C, D, H, W)`.
54
+ - Format: PyTorch `.pt`.
55
+ - Each `.pt` file stores at least a `tensor` entry and metadata used by the reference pipeline.
56
+
57
+ Channels:
58
+
59
+ - `C1`: post-contrast anatomical signal.
60
+ - `C2`: local heterogeneity / variance.
61
+ - `C3`: enhancement kinetics.
62
+ - `C4`: focal peak / vascularity-oriented signal.
63
+
64
+ ## Extraction Audits
65
+
66
+ 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:
67
+
68
+ ```python
69
+ TRAIN_FILTER_BY_AUDIT = True
70
+ TRAIN_ALLOWED_AUDIT_STATUSES = ("OK", "WARNING")
71
+ ```
72
+
73
+ 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.
74
+
75
+ ## Usage With the GitHub Pipeline
76
+
77
+ The tensors are designed to be used with the microCube GitHub repository:
78
+
79
+ ```bash
80
+ git clone https://github.com/msancheza/biolattice.git
81
+ cd biolattice
82
+ ```
83
+
84
+ Expected local layout after downloading this dataset:
85
+
86
+ ```text
87
+ datasets/micro_cubes/
88
+ dashboard/extraction_audits/
89
+ datasets/Clinical_and_Other_Features.xlsx
90
+ ```
91
+
92
+ The clinical spreadsheet is maintained in the GitHub repository. The Hugging Face dataset provides the derived tensors and extraction audits.
93
+
94
+ ## Quick Load Example
95
 
 
96
  ```python
97
  import torch
 
98
 
 
99
  path = "micro_cubos/Breast_MRI_001_lattice.pt"
100
+ obj = torch.load(path, map_location="cpu", weights_only=True)
101
+
102
+ cube = obj["tensor"] if isinstance(obj, dict) else obj
103
+ print(cube.shape) # expected: torch.Size([4, 64, 64, 64])
104
+ ```
105
+
106
+ ## Training Notes
107
+
108
+ The current reference training flow uses:
109
+
110
+ - Audit-based filtering of `OK` and `WARNING` patients.
111
+ - Patient-level stratified train/validation split.
112
+ - A 3D ResNet-style classifier over the 4-channel microCube plus metadata features.
113
+ - Optional experiment tracking with Weights & Biases.
114
+
115
+ 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.
116
+
117
+ ## Limitations
118
+
119
+ - These tensors are derived representations, not raw DICOM studies.
120
+ - Fixed-size ROI resampling may compress very large lesions or surrounding tissue context.
121
+ - `REVIEW` cases require manual or methodological follow-up before baseline training use.
122
+ - Metrics should be interpreted as research benchmarks, not clinical performance claims.
123
+ - Downstream results depend on audit filtering, preprocessing policy, split seed, and model configuration.
124