Spaces:
Sleeping
Sleeping
Anirudh Balaraman commited on
Fix typos and enhance clarity in pipeline.md
Browse filesCorrect typos and improve clarity in the pipeline documentation.
- docs/pipeline.md +7 -8
docs/pipeline.md
CHANGED
|
@@ -11,11 +11,11 @@ flowchart TD
|
|
| 11 |
end
|
| 12 |
|
| 13 |
subgraph Stage 1
|
| 14 |
-
P[PI-RADS Training\
|
| 15 |
end
|
| 16 |
|
| 17 |
subgraph Stage 2
|
| 18 |
-
C[csPCa Training\
|
| 19 |
end
|
| 20 |
|
| 21 |
G --> P
|
|
@@ -23,18 +23,17 @@ flowchart TD
|
|
| 23 |
```
|
| 24 |
|
| 25 |
## Preprocessing
|
| 26 |
-
|
| 27 |
-
Run all four steps in sequence:
|
| 28 |
-
|
| 29 |
```bash
|
| 30 |
python preprocess_main.py \
|
| 31 |
--config config/config_preprocess.yaml \
|
| 32 |
--steps register_and_crop get_segmentation_mask histogram_match get_heatmap
|
| 33 |
```
|
| 34 |
|
|
|
|
|
|
|
| 35 |
### Step 1: Register and Crop
|
| 36 |
|
| 37 |
-
Resamples
|
| 38 |
|
| 39 |
### Step 2: Prostate Segmentation
|
| 40 |
|
|
@@ -42,11 +41,11 @@ Runs a pre-trained segmentation model on T2W images to generate binary prostate
|
|
| 42 |
|
| 43 |
### Step 3: Histogram Matching
|
| 44 |
|
| 45 |
-
Matches the
|
| 46 |
|
| 47 |
### Step 4: Heatmap Generation
|
| 48 |
|
| 49 |
-
Creates attention heatmaps from DWI and ADC:
|
| 50 |
|
| 51 |
- **DWI heatmap**: `(dwi - min) / (max - min)` — higher DWI signal = higher attention
|
| 52 |
- **ADC heatmap**: `(max - adc) / (max - min)` — lower ADC = higher attention (inverted)
|
|
|
|
| 11 |
end
|
| 12 |
|
| 13 |
subgraph Stage 1
|
| 14 |
+
P[PI-RADS Training \n CrossEntropy + Attention Loss]
|
| 15 |
end
|
| 16 |
|
| 17 |
subgraph Stage 2
|
| 18 |
+
C[csPCa Training \n Frozen Backbone + BCE Loss]
|
| 19 |
end
|
| 20 |
|
| 21 |
G --> P
|
|
|
|
| 23 |
```
|
| 24 |
|
| 25 |
## Preprocessing
|
|
|
|
|
|
|
|
|
|
| 26 |
```bash
|
| 27 |
python preprocess_main.py \
|
| 28 |
--config config/config_preprocess.yaml \
|
| 29 |
--steps register_and_crop get_segmentation_mask histogram_match get_heatmap
|
| 30 |
```
|
| 31 |
|
| 32 |
+
Run the following steps in sequnce:
|
| 33 |
+
|
| 34 |
### Step 1: Register and Crop
|
| 35 |
|
| 36 |
+
Resamples T2W, DWI, and ADC to a common spacing of `(0.4, 0.4, 3.0)` mm using `picai_prep`, then center-crops with a configurable margin (default 20%).
|
| 37 |
|
| 38 |
### Step 2: Prostate Segmentation
|
| 39 |
|
|
|
|
| 41 |
|
| 42 |
### Step 3: Histogram Matching
|
| 43 |
|
| 44 |
+
Matches the histogram intensity of each sequnce to a reference image within masked (prostate) regions using `skimage.exposure.match_histograms`.
|
| 45 |
|
| 46 |
### Step 4: Heatmap Generation
|
| 47 |
|
| 48 |
+
Creates weak-attention heatmaps from DWI and ADC:
|
| 49 |
|
| 50 |
- **DWI heatmap**: `(dwi - min) / (max - min)` — higher DWI signal = higher attention
|
| 51 |
- **ADC heatmap**: `(max - adc) / (max - min)` — lower ADC = higher attention (inverted)
|