Mikecode123 commited on
Commit
eb8fab4
·
verified ·
1 Parent(s): b723696

v2 multimodal DenseNet121 (verified reload, LOSO results, report)

Browse files
v2_multimodal/README.md ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: pytorch
3
+ ---
4
+ # v2_multimodal
5
+
6
+ DenseNet121 multimodal (H&E + p63 + 34bE12 + AMACR) trained on 8 specimens. **Research prototype only. Not clinically validated; no independent test set.** The files in the repo root are earlier, superseded versions (image encoders were not transferred into the old fusion model, and p63 only was used).
7
+
8
+ Reload with `load_checkpoint()` from the pipeline script; the checkpoint stores config, class map, seed and preprocessing.
9
+
10
+ # Multimodal DenseNet121 run report
11
+
12
+ Dataset: 8 specimens (Normal 3, Partial_Restoration 4, Induced_Neoplastic 1); 8 H&E + 24 IHC plates (p63, 34bE12, AMACR).
13
+ Augmentation: 100 augmented views per specimen per epoch (each view augments all 4 images).
14
+ Training: staged (stage 1 6 epochs frozen backbones, stage 2 6 epochs last dense block); seed 42; molecular branch in fusion: False.
15
+
16
+ ## Image model - leave-one-specimen-out
17
+ ```
18
+ Image model (LOSO): 0/8 specimens correct (accuracy 0.000; 95% Wilson CI 0.00-0.32)
19
+ Majority-class baseline under the same LOSO: 0/8
20
+ Confusion matrix (rows=true, cols=pred; order Normal, Partial_Restoration, Induced_Neoplastic):
21
+ [[0 3 0]
22
+ [4 0 0]
23
+ [0 1 0]]
24
+ Interpretation: n=8 specimens, Induced_Neoplastic has ONE specimen (no training example when it is held out). This is a pipeline sanity check, NOT evidence of generalisation.
25
+ ```
26
+ ## Molecular MLP - leave-one-specimen-out
27
+ ```
28
+ Molecular MLP: 0/8 specimens correct (accuracy 0.000; 95% Wilson CI 0.00-0.32)
29
+ Majority-class baseline under the same LOSO: 0/8
30
+ Confusion matrix (rows=true, cols=pred; order Normal, Partial_Restoration, Induced_Neoplastic):
31
+ [[0 0 3]
32
+ [0 0 4]
33
+ [0 1 0]]
34
+ Interpretation: n=8 specimens, Induced_Neoplastic has ONE specimen (no training example when it is held out). This is a pipeline sanity check, NOT evidence of generalisation.
35
+ *** All 5 features are identical for every specimen: this result reflects only the class prior, NOT molecular signal. Do not report it as a modality result. ***
36
+ ```
37
+ ## Final model
38
+ Trained on all 8 specimens. Checkpoint reload test passed. Training-set predictions are not a performance estimate.
39
+
40
+ ## Limitations
41
+ - Only 8 specimens; one Induced_Neoplastic specimen. No independent test set exists.
42
+ - Augmented views of one image are not independent samples; 'train-view accuracy' is not performance.
43
+ - Molecular features are constant across specimens (no information); that branch is off.
44
+ - Images were cropped from PDF figures; image source/format differences may be learnable shortcuts.
45
+ - Not a diagnostic tool; no clinical validity claimed.
v2_multimodal/config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "img_size": 224,
3
+ "aug_per_image": 100,
4
+ "batch_size": 16,
5
+ "embed_dim": 512,
6
+ "mol_embed_dim": 128,
7
+ "use_molecular": false,
8
+ "pretrained": true,
9
+ "modality_dropout": 0.15,
10
+ "stage1_epochs": 6,
11
+ "stage2_epochs": 6,
12
+ "lr_head": 0.0003,
13
+ "lr_backbone": 1e-05,
14
+ "weight_decay": 0.01,
15
+ "label_smoothing": 0.1,
16
+ "grad_clip": 1.0,
17
+ "seed": 42,
18
+ "num_workers": 2,
19
+ "run_loso": true,
20
+ "loso_epochs": [
21
+ 3,
22
+ 3
23
+ ],
24
+ "loso_eval_views": 20,
25
+ "run_mlp": true,
26
+ "push_to_hf": true,
27
+ "hf_repo": "Mikecode123/walnut",
28
+ "hf_subdir": "v2_multimodal",
29
+ "hf_secret_name": "kaggle",
30
+ "push_mlp_checkpoint": false,
31
+ "out_dir": "/kaggle/working"
32
+ }
v2_multimodal/densenet121_multimodal.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7281d4b566a328c9a11a3283a68bfe6880f2a66b09bea71a9f48755f6f2403b1
3
+ size 62734085
v2_multimodal/feature_audit.csv ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ feature,n_unique,mean,std,missing,informative
2
+ flavonoid,1,14.3,1.7763568394002505e-15,0,False
3
+ alkaloid,1,4.07,0.0,0,False
4
+ terpenoid,1,2.57,0.0,0,False
5
+ phenol,1,1.8,2.220446049250313e-16,0,False
6
+ steroid,1,0.22,0.0,0,False
v2_multimodal/final_report.md ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Multimodal DenseNet121 run report
2
+
3
+ Dataset: 8 specimens (Normal 3, Partial_Restoration 4, Induced_Neoplastic 1); 8 H&E + 24 IHC plates (p63, 34bE12, AMACR).
4
+ Augmentation: 100 augmented views per specimen per epoch (each view augments all 4 images).
5
+ Training: staged (stage 1 6 epochs frozen backbones, stage 2 6 epochs last dense block); seed 42; molecular branch in fusion: False.
6
+
7
+ ## Image model - leave-one-specimen-out
8
+ ```
9
+ Image model (LOSO): 0/8 specimens correct (accuracy 0.000; 95% Wilson CI 0.00-0.32)
10
+ Majority-class baseline under the same LOSO: 0/8
11
+ Confusion matrix (rows=true, cols=pred; order Normal, Partial_Restoration, Induced_Neoplastic):
12
+ [[0 3 0]
13
+ [4 0 0]
14
+ [0 1 0]]
15
+ Interpretation: n=8 specimens, Induced_Neoplastic has ONE specimen (no training example when it is held out). This is a pipeline sanity check, NOT evidence of generalisation.
16
+ ```
17
+ ## Molecular MLP - leave-one-specimen-out
18
+ ```
19
+ Molecular MLP: 0/8 specimens correct (accuracy 0.000; 95% Wilson CI 0.00-0.32)
20
+ Majority-class baseline under the same LOSO: 0/8
21
+ Confusion matrix (rows=true, cols=pred; order Normal, Partial_Restoration, Induced_Neoplastic):
22
+ [[0 0 3]
23
+ [0 0 4]
24
+ [0 1 0]]
25
+ Interpretation: n=8 specimens, Induced_Neoplastic has ONE specimen (no training example when it is held out). This is a pipeline sanity check, NOT evidence of generalisation.
26
+ *** All 5 features are identical for every specimen: this result reflects only the class prior, NOT molecular signal. Do not report it as a modality result. ***
27
+ ```
28
+ ## Final model
29
+ Trained on all 8 specimens. Checkpoint reload test passed. Training-set predictions are not a performance estimate.
30
+
31
+ ## Limitations
32
+ - Only 8 specimens; one Induced_Neoplastic specimen. No independent test set exists.
33
+ - Augmented views of one image are not independent samples; 'train-view accuracy' is not performance.
34
+ - Molecular features are constant across specimens (no information); that branch is off.
35
+ - Images were cropped from PDF figures; image source/format differences may be learnable shortcuts.
36
+ - Not a diagnostic tool; no clinical validity claimed.
v2_multimodal/image_index.csv ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ sample_id,state_id,modality,marker,plate,file,width,height,mode,pixel_sha1
2
+ NC,0,H&E,H&E,1,/kaggle/input/datasets/femiogunmola/project-training-data-final-with-image-manifests/Project_Training_Data_Final_with_Image_Manifests/Project_Training_Data_Final/01_Histopathology/1.png,874,784,RGBA,6727848e009490dd5404374de3cb652337aa2a37
3
+ NC,0,IHC,p63,9,/kaggle/input/datasets/femiogunmola/project-training-data-final-with-image-manifests/Project_Training_Data_Final_with_Image_Manifests/Project_Training_Data_Final/02_IHC/9.png,679,483,RGB,d83ffcaccae0b70c2c4fbf351cd7c2aa43b1c0ff
4
+ NC,0,IHC,34βE12,10,/kaggle/input/datasets/femiogunmola/project-training-data-final-with-image-manifests/Project_Training_Data_Final_with_Image_Manifests/Project_Training_Data_Final/02_IHC/10.png,836,479,RGB,3971a884e03a638608dfde4798794d3a59bad4dd
5
+ NC,0,IHC,AMACR,11,/kaggle/input/datasets/femiogunmola/project-training-data-final-with-image-manifests/Project_Training_Data_Final_with_Image_Manifests/Project_Training_Data_Final/02_IHC/11.png,737,529,RGB,7ca512fe8f5cc21bdc321c60826f4ed0cf694150
6
+ AWSO_only,0,H&E,H&E,3,/kaggle/input/datasets/femiogunmola/project-training-data-final-with-image-manifests/Project_Training_Data_Final_with_Image_Manifests/Project_Training_Data_Final/01_Histopathology/3.png,665,531,RGBA,1e3a18c8b152d19f54dd8f2b7ccd979af3e30e2c
7
+ AWSO_only,0,IHC,p63,12,/kaggle/input/datasets/femiogunmola/project-training-data-final-with-image-manifests/Project_Training_Data_Final_with_Image_Manifests/Project_Training_Data_Final/02_IHC/12.png,750,488,RGB,3bd93c48014a46eeebb712cf0209ddda78a2c24a
8
+ AWSO_only,0,IHC,34βE12,13,/kaggle/input/datasets/femiogunmola/project-training-data-final-with-image-manifests/Project_Training_Data_Final_with_Image_Manifests/Project_Training_Data_Final/02_IHC/13.png,711,497,RGB,b7f324b0a465e00ed2d1c018df06f139ba46da3e
9
+ AWSO_only,0,IHC,AMACR,14,/kaggle/input/datasets/femiogunmola/project-training-data-final-with-image-manifests/Project_Training_Data_Final_with_Image_Manifests/Project_Training_Data_Final/02_IHC/14.png,802,539,RGB,92b1bdf270df2bb08f22fd2283b4e20baed16223
10
+ CI,2,H&E,H&E,2,/kaggle/input/datasets/femiogunmola/project-training-data-final-with-image-manifests/Project_Training_Data_Final_with_Image_Manifests/Project_Training_Data_Final/01_Histopathology/2.png,741,416,RGB,76d7e0d0bb3e786637fd7e94eb6d6cfe9389a5af
11
+ CI,2,IHC,p63,15,/kaggle/input/datasets/femiogunmola/project-training-data-final-with-image-manifests/Project_Training_Data_Final_with_Image_Manifests/Project_Training_Data_Final/02_IHC/15.png,767,539,RGBA,44ecd1ed1c2cf83fceb7a4aa768aab76f92decca
12
+ CI,2,IHC,34βE12,16,/kaggle/input/datasets/femiogunmola/project-training-data-final-with-image-manifests/Project_Training_Data_Final_with_Image_Manifests/Project_Training_Data_Final/02_IHC/16.png,747,513,RGB,e6866ff9272195d9b7a280a9cb2596274a89bb8f
13
+ CI,2,IHC,AMACR,17,/kaggle/input/datasets/femiogunmola/project-training-data-final-with-image-manifests/Project_Training_Data_Final_with_Image_Manifests/Project_Training_Data_Final/02_IHC/17.png,320,298,RGBA,93778ed2030298d7dc4dfb69a4d39b35e11df764
14
+ CI_Low,1,H&E,H&E,4,/kaggle/input/datasets/femiogunmola/project-training-data-final-with-image-manifests/Project_Training_Data_Final_with_Image_Manifests/Project_Training_Data_Final/01_Histopathology/4.png,802,552,RGB,4adce1791e910a1a63e0b504ee645672e243942d
15
+ CI_Low,1,IHC,p63,21,/kaggle/input/datasets/femiogunmola/project-training-data-final-with-image-manifests/Project_Training_Data_Final_with_Image_Manifests/Project_Training_Data_Final/02_IHC/21.png,717,573,RGB,51de3a3b5b76310ecdc98abe374d1cfe4991bded
16
+ CI_Low,1,IHC,34βE12,22,/kaggle/input/datasets/femiogunmola/project-training-data-final-with-image-manifests/Project_Training_Data_Final_with_Image_Manifests/Project_Training_Data_Final/02_IHC/22.png,758,579,RGB,3d2613a330b61e3d36b9438c1cac1a97848f1500
17
+ CI_Low,1,IHC,AMACR,23,/kaggle/input/datasets/femiogunmola/project-training-data-final-with-image-manifests/Project_Training_Data_Final_with_Image_Manifests/Project_Training_Data_Final/02_IHC/23.png,892,714,RGBA,1f27ac77ecd99995fd5dac6ddfe0b897d19753ea
18
+ CI_Med,1,H&E,H&E,5,/kaggle/input/datasets/femiogunmola/project-training-data-final-with-image-manifests/Project_Training_Data_Final_with_Image_Manifests/Project_Training_Data_Final/01_Histopathology/5.png,693,569,RGB,3222019f993f142be46f3b1ccc61e59bb116bad7
19
+ CI_Med,1,IHC,p63,24,/kaggle/input/datasets/femiogunmola/project-training-data-final-with-image-manifests/Project_Training_Data_Final_with_Image_Manifests/Project_Training_Data_Final/02_IHC/24.png,780,555,RGB,9bcc41d40f6963134b5bd3222c648def0410ab1b
20
+ CI_Med,1,IHC,34βE12,25,/kaggle/input/datasets/femiogunmola/project-training-data-final-with-image-manifests/Project_Training_Data_Final_with_Image_Manifests/Project_Training_Data_Final/02_IHC/25.png,802,556,RGB,598884ab5e1e3b90eefef0357b3181fb403ed589
21
+ CI_Med,1,IHC,AMACR,26,/kaggle/input/datasets/femiogunmola/project-training-data-final-with-image-manifests/Project_Training_Data_Final_with_Image_Manifests/Project_Training_Data_Final/02_IHC/26.png,880,531,RGB,40e757d365cc3882c4e8c65b1b51a88301c37340
22
+ CI_High,1,H&E,H&E,6,/kaggle/input/datasets/femiogunmola/project-training-data-final-with-image-manifests/Project_Training_Data_Final_with_Image_Manifests/Project_Training_Data_Final/01_Histopathology/6.png,811,548,RGB,f7d688d804a86ef2b4535895d63055b250b87f99
23
+ CI_High,1,IHC,p63,27,/kaggle/input/datasets/femiogunmola/project-training-data-final-with-image-manifests/Project_Training_Data_Final_with_Image_Manifests/Project_Training_Data_Final/02_IHC/27.png,824,539,RGB,43f59de150620eabe461b47adf229fd3f60b9b23
24
+ CI_High,1,IHC,34βE12,28,/kaggle/input/datasets/femiogunmola/project-training-data-final-with-image-manifests/Project_Training_Data_Final_with_Image_Manifests/Project_Training_Data_Final/02_IHC/28.png,708,533,RGB,71cb531c1066c1846f39562262baa7356ad13067
25
+ CI_High,1,IHC,AMACR,29,/kaggle/input/datasets/femiogunmola/project-training-data-final-with-image-manifests/Project_Training_Data_Final_with_Image_Manifests/Project_Training_Data_Final/02_IHC/29.png,872,516,RGB,e348315536aadc13e5de9be5ea493667b8ce873b
26
+ DUO,1,H&E,H&E,7,/kaggle/input/datasets/femiogunmola/project-training-data-final-with-image-manifests/Project_Training_Data_Final_with_Image_Manifests/Project_Training_Data_Final/01_Histopathology/7.png,1280,1024,RGB,77e861c91e8a5a57116a65ed312e976ab4216588
27
+ DUO,1,IHC,p63,18,/kaggle/input/datasets/femiogunmola/project-training-data-final-with-image-manifests/Project_Training_Data_Final_with_Image_Manifests/Project_Training_Data_Final/02_IHC/18.png,711,540,RGB,bc7400dfd323d99d85afe32ea79b288613b540ee
28
+ DUO,1,IHC,34βE12,19,/kaggle/input/datasets/femiogunmola/project-training-data-final-with-image-manifests/Project_Training_Data_Final_with_Image_Manifests/Project_Training_Data_Final/02_IHC/19.png,718,536,RGB,53f74b9e909fa47aee337d1da6c824d20c48a680
29
+ DUO,1,IHC,AMACR,20,/kaggle/input/datasets/femiogunmola/project-training-data-final-with-image-manifests/Project_Training_Data_Final_with_Image_Manifests/Project_Training_Data_Final/02_IHC/20.png,823,504,RGB,4ae2d4db35482dccd45dd2155d5b998bbadeb9d0
30
+ DUO_Med,0,H&E,H&E,8,/kaggle/input/datasets/femiogunmola/project-training-data-final-with-image-manifests/Project_Training_Data_Final_with_Image_Manifests/Project_Training_Data_Final/01_Histopathology/8.png,833,492,RGB,2287ee0b7eb38f0953873055f3fb33fa62efdf4c
31
+ DUO_Med,0,IHC,p63,30,/kaggle/input/datasets/femiogunmola/project-training-data-final-with-image-manifests/Project_Training_Data_Final_with_Image_Manifests/Project_Training_Data_Final/02_IHC/30.png,687,525,RGB,46a253d1a15f909025a827a4be5bdabfd3e4348f
32
+ DUO_Med,0,IHC,34βE12,31,/kaggle/input/datasets/femiogunmola/project-training-data-final-with-image-manifests/Project_Training_Data_Final_with_Image_Manifests/Project_Training_Data_Final/02_IHC/31.png,802,518,RGB,7de184e22373b4d76f9303c8ccab6be4cb31b30b
33
+ DUO_Med,0,IHC,AMACR,32,/kaggle/input/datasets/femiogunmola/project-training-data-final-with-image-manifests/Project_Training_Data_Final_with_Image_Manifests/Project_Training_Data_Final/02_IHC/32.png,861,559,RGB,03684ba56cd8045e88649f3e3be79395e93db8ef
v2_multimodal/loso_results.csv ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ sample_id,y_true,p0,p1,p2,pred,class_in_train,correct
2
+ NC,0,0.15461291,0.6786764,0.16671067,1,2,False
3
+ AWSO_only,0,0.16498965,0.65203077,0.18297958,1,2,False
4
+ CI,2,0.24344115,0.75654423,1.4671401e-05,1,0,False
5
+ CI_Low,1,0.5678189,0.21976605,0.2124151,0,3,False
6
+ CI_Med,1,0.5606321,0.27190298,0.16746488,0,3,False
7
+ CI_High,1,0.46382204,0.32902628,0.2071517,0,3,False
8
+ DUO,1,0.74825907,0.09025737,0.16148357,0,3,False
9
+ DUO_Med,0,0.12657037,0.7194682,0.1539615,1,2,False
v2_multimodal/run_log.txt ADDED
@@ -0,0 +1,241 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 21:06:25 | INFO | ==============================================================================
2
+ 21:06:25 | INFO | PIPELINE START
3
+ 21:06:25 | INFO | ==============================================================================
4
+ 21:06:25 | INFO | Device: cuda (Tesla T4) | torch 2.11.0+cu130 | RAM 0.9GB proc / 5% sys | GPU mem 0.0GB alloc / 0.0GB peak
5
+ 21:06:25 | INFO | Config:
6
+ {
7
+ "img_size": 224,
8
+ "aug_per_image": 100,
9
+ "batch_size": 16,
10
+ "embed_dim": 512,
11
+ "mol_embed_dim": 128,
12
+ "use_molecular": false,
13
+ "pretrained": true,
14
+ "modality_dropout": 0.15,
15
+ "stage1_epochs": 6,
16
+ "stage2_epochs": 6,
17
+ "lr_head": 0.0003,
18
+ "lr_backbone": 1e-05,
19
+ "weight_decay": 0.01,
20
+ "label_smoothing": 0.1,
21
+ "grad_clip": 1.0,
22
+ "seed": 42,
23
+ "num_workers": 2,
24
+ "run_loso": true,
25
+ "loso_epochs": [
26
+ 3,
27
+ 3
28
+ ],
29
+ "loso_eval_views": 20,
30
+ "run_mlp": true,
31
+ "push_to_hf": true,
32
+ "hf_repo": "Mikecode123/walnut",
33
+ "hf_subdir": "v2_multimodal",
34
+ "hf_secret_name": "kaggle",
35
+ "push_mlp_checkpoint": false,
36
+ "out_dir": "/kaggle/working"
37
+ }
38
+ 21:06:25 | INFO | ==============================================================================
39
+ 21:06:25 | INFO | STEP 1 | Building and validating data tables
40
+ 21:06:25 | INFO | ==============================================================================
41
+ 21:06:25 | INFO | DATA_ROOT = /kaggle/input/datasets/femiogunmola/project-training-data-final-with-image-manifests/Project_Training_Data_Final_with_Image_Manifests/Project_Training_Data_Final
42
+ 21:06:26 | INFO | Plate mapping check: master table agrees with both manifests (8 H&E + 24 IHC plates).
43
+ 21:06:28 | INFO | Plate 27: both .png and .jpg exist -> loader uses .png (JPEG differs only by compression)
44
+ 21:06:28 | INFO | Image modes: {'RGB': 27, 'RGBA': 5} (RGBA composited onto WHITE)
45
+ 21:06:28 | INFO | Class counts (specimens): {'Partial_Restoration': 4, 'Normal': 3, 'Induced_Neoplastic': 1}
46
+ 21:06:28 | INFO | Molecular feature audit:
47
+ feature n_unique mean std missing informative
48
+ flavonoid 1 14.30 0.0 0 False
49
+ alkaloid 1 4.07 0.0 0 False
50
+ terpenoid 1 2.57 0.0 0 False
51
+ phenol 1 1.80 0.0 0 False
52
+ steroid 1 0.22 0.0 0 False
53
+ 21:06:28 | INFO | *** ALL 5 molecular features are constant across specimens -> no between-group information. Molecular branch is OFF in the fusion model and the MLP result is NOT a modality result. ***
54
+ 21:06:35 | INFO | Smoke test OK | logits (2, 3) | missing-marker token gets gradient | RAM 1.7GB proc / 7% sys | GPU mem 0.1GB alloc / 0.2GB peak
55
+ 21:06:35 | INFO | ==============================================================================
56
+ 21:06:35 | INFO | STEP 2a | Image model: leave-one-specimen-out validation
57
+ 21:06:35 | INFO | ==============================================================================
58
+ 21:06:35 | INFO | --- LOSO fold 1/8: hold out NC (true class Normal) ---
59
+ 21:06:36 | INFO | [LOSO NC] train specimens=['AWSO_only', 'CI', 'CI_Low', 'CI_Med', 'CI_High', 'DUO', 'DUO_Med'] | class weights=[0.8600000143051147, 0.4300000071525574, 1.7100000381469727] | 700 augmented samples/epoch (100 per specimen, 100 per image)
60
+ 21:06:36 | INFO | [LOSO NC] stage 1: backbones frozen, heads only | trainable params 1.46M
61
+ 21:06:50 | INFO | [LOSO NC] stage 1 ep 1/3 (total 1/6) | loss 0.5955 | train-view acc 0.864 (TRAINING views, not a performance estimate) | 14s | RAM 2.3GB proc / 10% sys | GPU mem 0.1GB alloc / 0.5GB peak
62
+ 21:07:04 | INFO | [LOSO NC] stage 1 ep 2/3 (total 2/6) | loss 0.4087 | train-view acc 0.997 (TRAINING views, not a performance estimate) | 13s | RAM 2.3GB proc / 10% sys | GPU mem 0.1GB alloc / 0.5GB peak
63
+ 21:07:17 | INFO | [LOSO NC] stage 1 ep 3/3 (total 3/6) | loss 0.4070 | train-view acc 0.997 (TRAINING views, not a performance estimate) | 13s | RAM 2.3GB proc / 10% sys | GPU mem 0.1GB alloc / 0.5GB peak
64
+ 21:07:17 | INFO | [LOSO NC] stage 2: last dense block + heads | trainable params 5.78M
65
+ 21:07:31 | INFO | [LOSO NC] stage 2 ep 1/3 (total 4/6) | loss 0.4060 | train-view acc 1.000 (TRAINING views, not a performance estimate) | 14s | RAM 2.4GB proc / 10% sys | GPU mem 0.2GB alloc / 0.6GB peak
66
+ 21:07:45 | INFO | [LOSO NC] stage 2 ep 2/3 (total 5/6) | loss 0.4011 | train-view acc 0.999 (TRAINING views, not a performance estimate) | 14s | RAM 2.4GB proc / 10% sys | GPU mem 0.2GB alloc / 0.6GB peak
67
+ 21:07:58 | INFO | [LOSO NC] stage 2 ep 3/3 (total 6/6) | loss 0.3949 | train-view acc 1.000 (TRAINING views, not a performance estimate) | 14s | RAM 2.4GB proc / 10% sys | GPU mem 0.2GB alloc / 0.6GB peak
68
+ 21:07:58 | INFO | [LOSO NC] finished in 1.4 min
69
+ 21:08:00 | INFO | [LOSO NC] true=Normal pred=Partial_Restoration probs=(0.15,0.68,0.17) | class examples left in training: 2
70
+ 21:08:00 | INFO | Fold saved. 1/8 done | elapsed 1.4 min | RAM 2.4GB proc / 10% sys | GPU mem 0.0GB alloc / 0.7GB peak
71
+ 21:08:00 | INFO | --- LOSO fold 2/8: hold out AWSO_only (true class Normal) ---
72
+ 21:08:01 | INFO | [LOSO AWSO_only] train specimens=['NC', 'CI', 'CI_Low', 'CI_Med', 'CI_High', 'DUO', 'DUO_Med'] | class weights=[0.8600000143051147, 0.4300000071525574, 1.7100000381469727] | 700 augmented samples/epoch (100 per specimen, 100 per image)
73
+ 21:08:01 | INFO | [LOSO AWSO_only] stage 1: backbones frozen, heads only | trainable params 1.46M
74
+ 21:08:14 | INFO | [LOSO AWSO_only] stage 1 ep 1/3 (total 1/6) | loss 0.5879 | train-view acc 0.873 (TRAINING views, not a performance estimate) | 13s | RAM 2.4GB proc / 11% sys | GPU mem 0.1GB alloc / 0.7GB peak
75
+ 21:08:27 | INFO | [LOSO AWSO_only] stage 1 ep 2/3 (total 2/6) | loss 0.4094 | train-view acc 0.999 (TRAINING views, not a performance estimate) | 13s | RAM 2.4GB proc / 11% sys | GPU mem 0.1GB alloc / 0.7GB peak
76
+ 21:08:40 | INFO | [LOSO AWSO_only] stage 1 ep 3/3 (total 3/6) | loss 0.4063 | train-view acc 0.996 (TRAINING views, not a performance estimate) | 13s | RAM 2.4GB proc / 11% sys | GPU mem 0.1GB alloc / 0.7GB peak
77
+ 21:08:40 | INFO | [LOSO AWSO_only] stage 2: last dense block + heads | trainable params 5.78M
78
+ 21:08:54 | INFO | [LOSO AWSO_only] stage 2 ep 1/3 (total 4/6) | loss 0.4054 | train-view acc 1.000 (TRAINING views, not a performance estimate) | 14s | RAM 2.4GB proc / 11% sys | GPU mem 0.2GB alloc / 0.7GB peak
79
+ 21:09:08 | INFO | [LOSO AWSO_only] stage 2 ep 2/3 (total 5/6) | loss 0.4020 | train-view acc 0.997 (TRAINING views, not a performance estimate) | 14s | RAM 2.4GB proc / 10% sys | GPU mem 0.2GB alloc / 0.7GB peak
80
+ 21:09:21 | INFO | [LOSO AWSO_only] stage 2 ep 3/3 (total 6/6) | loss 0.3939 | train-view acc 1.000 (TRAINING views, not a performance estimate) | 13s | RAM 2.4GB proc / 10% sys | GPU mem 0.2GB alloc / 0.7GB peak
81
+ 21:09:21 | INFO | [LOSO AWSO_only] finished in 1.3 min
82
+ 21:09:22 | INFO | [LOSO AWSO_only] true=Normal pred=Partial_Restoration probs=(0.16,0.65,0.18) | class examples left in training: 2
83
+ 21:09:22 | INFO | Fold saved. 2/8 done | elapsed 2.8 min | RAM 2.4GB proc / 10% sys | GPU mem 0.0GB alloc / 0.7GB peak
84
+ 21:09:22 | INFO | --- LOSO fold 3/8: hold out CI (true class Induced_Neoplastic) ---
85
+ 21:09:23 | INFO | [LOSO CI] train specimens=['NC', 'AWSO_only', 'CI_Low', 'CI_Med', 'CI_High', 'DUO', 'DUO_Med'] | class weights=[1.1399999856948853, 0.8600000143051147, 0.0] | 700 augmented samples/epoch (100 per specimen, 100 per image)
86
+ 21:09:23 | INFO | [LOSO CI] stage 1: backbones frozen, heads only | trainable params 1.46M
87
+ 21:09:36 | INFO | [LOSO CI] stage 1 ep 1/3 (total 1/6) | loss 0.3136 | train-view acc 0.910 (TRAINING views, not a performance estimate) | 13s | RAM 2.4GB proc / 11% sys | GPU mem 0.1GB alloc / 0.7GB peak
88
+ 21:09:50 | INFO | [LOSO CI] stage 1 ep 2/3 (total 2/6) | loss 0.1808 | train-view acc 0.990 (TRAINING views, not a performance estimate) | 14s | RAM 2.4GB proc / 11% sys | GPU mem 0.1GB alloc / 0.7GB peak
89
+ 21:10:04 | INFO | [LOSO CI] stage 1 ep 3/3 (total 3/6) | loss 0.1664 | train-view acc 0.997 (TRAINING views, not a performance estimate) | 14s | RAM 2.4GB proc / 10% sys | GPU mem 0.1GB alloc / 0.7GB peak
90
+ 21:10:04 | INFO | [LOSO CI] stage 2: last dense block + heads | trainable params 5.78M
91
+ 21:10:18 | INFO | [LOSO CI] stage 2 ep 1/3 (total 4/6) | loss 0.1668 | train-view acc 0.999 (TRAINING views, not a performance estimate) | 14s | RAM 2.4GB proc / 10% sys | GPU mem 0.2GB alloc / 0.7GB peak
92
+ 21:10:32 | INFO | [LOSO CI] stage 2 ep 2/3 (total 5/6) | loss 0.1606 | train-view acc 0.999 (TRAINING views, not a performance estimate) | 14s | RAM 2.4GB proc / 10% sys | GPU mem 0.2GB alloc / 0.7GB peak
93
+ 21:10:46 | INFO | [LOSO CI] stage 2 ep 3/3 (total 6/6) | loss 0.1575 | train-view acc 0.999 (TRAINING views, not a performance estimate) | 14s | RAM 2.4GB proc / 10% sys | GPU mem 0.2GB alloc / 0.7GB peak
94
+ 21:10:46 | INFO | [LOSO CI] finished in 1.4 min
95
+ 21:10:47 | INFO | [LOSO CI] true=Induced_Neoplastic pred=Partial_Restoration probs=(0.24,0.76,0.00) | class examples left in training: 0 <-- this class had NO training examples
96
+ 21:10:48 | INFO | Fold saved. 3/8 done | elapsed 4.2 min | RAM 2.4GB proc / 10% sys | GPU mem 0.0GB alloc / 0.7GB peak
97
+ 21:10:48 | INFO | --- LOSO fold 4/8: hold out CI_Low (true class Partial_Restoration) ---
98
+ 21:10:48 | INFO | [LOSO CI_Low] train specimens=['NC', 'AWSO_only', 'CI', 'CI_Med', 'CI_High', 'DUO', 'DUO_Med'] | class weights=[0.6000000238418579, 0.6000000238418579, 1.7999999523162842] | 700 augmented samples/epoch (100 per specimen, 100 per image)
99
+ 21:10:48 | INFO | [LOSO CI_Low] stage 1: backbones frozen, heads only | trainable params 1.46M
100
+ 21:11:02 | INFO | [LOSO CI_Low] stage 1 ep 1/3 (total 1/6) | loss 0.5904 | train-view acc 0.886 (TRAINING views, not a performance estimate) | 13s | RAM 2.4GB proc / 10% sys | GPU mem 0.1GB alloc / 0.7GB peak
101
+ 21:11:15 | INFO | [LOSO CI_Low] stage 1 ep 2/3 (total 2/6) | loss 0.3981 | train-view acc 0.996 (TRAINING views, not a performance estimate) | 13s | RAM 2.4GB proc / 10% sys | GPU mem 0.1GB alloc / 0.7GB peak
102
+ 21:11:28 | INFO | [LOSO CI_Low] stage 1 ep 3/3 (total 3/6) | loss 0.3855 | train-view acc 0.999 (TRAINING views, not a performance estimate) | 13s | RAM 2.4GB proc / 10% sys | GPU mem 0.1GB alloc / 0.7GB peak
103
+ 21:11:28 | INFO | [LOSO CI_Low] stage 2: last dense block + heads | trainable params 5.78M
104
+ 21:11:42 | INFO | [LOSO CI_Low] stage 2 ep 1/3 (total 4/6) | loss 0.3875 | train-view acc 1.000 (TRAINING views, not a performance estimate) | 14s | RAM 2.4GB proc / 10% sys | GPU mem 0.2GB alloc / 0.7GB peak
105
+ 21:11:55 | INFO | [LOSO CI_Low] stage 2 ep 2/3 (total 5/6) | loss 0.3831 | train-view acc 0.997 (TRAINING views, not a performance estimate) | 13s | RAM 2.4GB proc / 10% sys | GPU mem 0.2GB alloc / 0.7GB peak
106
+ 21:12:08 | INFO | [LOSO CI_Low] stage 2 ep 3/3 (total 6/6) | loss 0.3782 | train-view acc 0.999 (TRAINING views, not a performance estimate) | 13s | RAM 2.4GB proc / 10% sys | GPU mem 0.2GB alloc / 0.7GB peak
107
+ 21:12:08 | INFO | [LOSO CI_Low] finished in 1.3 min
108
+ 21:12:09 | INFO | [LOSO CI_Low] true=Partial_Restoration pred=Normal probs=(0.57,0.22,0.21) | class examples left in training: 3
109
+ 21:12:10 | INFO | Fold saved. 4/8 done | elapsed 5.6 min | RAM 2.4GB proc / 10% sys | GPU mem 0.0GB alloc / 0.7GB peak
110
+ 21:12:10 | INFO | --- LOSO fold 5/8: hold out CI_Med (true class Partial_Restoration) ---
111
+ 21:12:10 | INFO | [LOSO CI_Med] train specimens=['NC', 'AWSO_only', 'CI', 'CI_Low', 'CI_High', 'DUO', 'DUO_Med'] | class weights=[0.6000000238418579, 0.6000000238418579, 1.7999999523162842] | 700 augmented samples/epoch (100 per specimen, 100 per image)
112
+ 21:12:10 | INFO | [LOSO CI_Med] stage 1: backbones frozen, heads only | trainable params 1.46M
113
+ 21:12:24 | INFO | [LOSO CI_Med] stage 1 ep 1/3 (total 1/6) | loss 0.5942 | train-view acc 0.884 (TRAINING views, not a performance estimate) | 13s | RAM 2.4GB proc / 10% sys | GPU mem 0.1GB alloc / 0.7GB peak
114
+ 21:12:37 | INFO | [LOSO CI_Med] stage 1 ep 2/3 (total 2/6) | loss 0.3994 | train-view acc 0.996 (TRAINING views, not a performance estimate) | 13s | RAM 2.4GB proc / 11% sys | GPU mem 0.1GB alloc / 0.7GB peak
115
+ 21:12:50 | INFO | [LOSO CI_Med] stage 1 ep 3/3 (total 3/6) | loss 0.3863 | train-view acc 1.000 (TRAINING views, not a performance estimate) | 13s | RAM 2.4GB proc / 10% sys | GPU mem 0.1GB alloc / 0.7GB peak
116
+ 21:12:50 | INFO | [LOSO CI_Med] stage 2: last dense block + heads | trainable params 5.78M
117
+ 21:13:04 | INFO | [LOSO CI_Med] stage 2 ep 1/3 (total 4/6) | loss 0.3916 | train-view acc 0.999 (TRAINING views, not a performance estimate) | 14s | RAM 2.4GB proc / 10% sys | GPU mem 0.2GB alloc / 0.7GB peak
118
+ 21:13:17 | INFO | [LOSO CI_Med] stage 2 ep 2/3 (total 5/6) | loss 0.3832 | train-view acc 1.000 (TRAINING views, not a performance estimate) | 14s | RAM 2.4GB proc / 11% sys | GPU mem 0.2GB alloc / 0.7GB peak
119
+ 21:13:31 | INFO | [LOSO CI_Med] stage 2 ep 3/3 (total 6/6) | loss 0.3784 | train-view acc 1.000 (TRAINING views, not a performance estimate) | 14s | RAM 2.4GB proc / 10% sys | GPU mem 0.2GB alloc / 0.7GB peak
120
+ 21:13:31 | INFO | [LOSO CI_Med] finished in 1.4 min
121
+ 21:13:32 | INFO | [LOSO CI_Med] true=Partial_Restoration pred=Normal probs=(0.56,0.27,0.17) | class examples left in training: 3
122
+ 21:13:32 | INFO | Fold saved. 5/8 done | elapsed 7.0 min | RAM 2.4GB proc / 10% sys | GPU mem 0.0GB alloc / 0.7GB peak
123
+ 21:13:32 | INFO | --- LOSO fold 6/8: hold out CI_High (true class Partial_Restoration) ---
124
+ 21:13:33 | INFO | [LOSO CI_High] train specimens=['NC', 'AWSO_only', 'CI', 'CI_Low', 'CI_Med', 'DUO', 'DUO_Med'] | class weights=[0.6000000238418579, 0.6000000238418579, 1.7999999523162842] | 700 augmented samples/epoch (100 per specimen, 100 per image)
125
+ 21:13:33 | INFO | [LOSO CI_High] stage 1: backbones frozen, heads only | trainable params 1.46M
126
+ 21:13:46 | INFO | [LOSO CI_High] stage 1 ep 1/3 (total 1/6) | loss 0.5850 | train-view acc 0.886 (TRAINING views, not a performance estimate) | 13s | RAM 2.4GB proc / 11% sys | GPU mem 0.1GB alloc / 0.7GB peak
127
+ 21:13:59 | INFO | [LOSO CI_High] stage 1 ep 2/3 (total 2/6) | loss 0.4029 | train-view acc 0.996 (TRAINING views, not a performance estimate) | 13s | RAM 2.4GB proc / 10% sys | GPU mem 0.1GB alloc / 0.7GB peak
128
+ 21:14:12 | INFO | [LOSO CI_High] stage 1 ep 3/3 (total 3/6) | loss 0.3841 | train-view acc 0.999 (TRAINING views, not a performance estimate) | 13s | RAM 2.4GB proc / 10% sys | GPU mem 0.1GB alloc / 0.7GB peak
129
+ 21:14:12 | INFO | [LOSO CI_High] stage 2: last dense block + heads | trainable params 5.78M
130
+ 21:14:26 | INFO | [LOSO CI_High] stage 2 ep 1/3 (total 4/6) | loss 0.3926 | train-view acc 0.999 (TRAINING views, not a performance estimate) | 14s | RAM 2.4GB proc / 10% sys | GPU mem 0.2GB alloc / 0.7GB peak
131
+ 21:14:39 | INFO | [LOSO CI_High] stage 2 ep 2/3 (total 5/6) | loss 0.3839 | train-view acc 1.000 (TRAINING views, not a performance estimate) | 13s | RAM 2.4GB proc / 10% sys | GPU mem 0.2GB alloc / 0.7GB peak
132
+ 21:14:53 | INFO | [LOSO CI_High] stage 2 ep 3/3 (total 6/6) | loss 0.3777 | train-view acc 1.000 (TRAINING views, not a performance estimate) | 13s | RAM 2.4GB proc / 10% sys | GPU mem 0.2GB alloc / 0.7GB peak
133
+ 21:14:53 | INFO | [LOSO CI_High] finished in 1.3 min
134
+ 21:14:54 | INFO | [LOSO CI_High] true=Partial_Restoration pred=Normal probs=(0.46,0.33,0.21) | class examples left in training: 3
135
+ 21:14:54 | INFO | Fold saved. 6/8 done | elapsed 8.3 min | RAM 2.4GB proc / 10% sys | GPU mem 0.0GB alloc / 0.7GB peak
136
+ 21:14:54 | INFO | --- LOSO fold 7/8: hold out DUO (true class Partial_Restoration) ---
137
+ 21:14:55 | INFO | [LOSO DUO] train specimens=['NC', 'AWSO_only', 'CI', 'CI_Low', 'CI_Med', 'CI_High', 'DUO_Med'] | class weights=[0.6000000238418579, 0.6000000238418579, 1.7999999523162842] | 700 augmented samples/epoch (100 per specimen, 100 per image)
138
+ 21:14:55 | INFO | [LOSO DUO] stage 1: backbones frozen, heads only | trainable params 1.46M
139
+ 21:15:08 | INFO | [LOSO DUO] stage 1 ep 1/3 (total 1/6) | loss 0.5865 | train-view acc 0.887 (TRAINING views, not a performance estimate) | 13s | RAM 2.4GB proc / 10% sys | GPU mem 0.1GB alloc / 0.7GB peak
140
+ 21:15:21 | INFO | [LOSO DUO] stage 1 ep 2/3 (total 2/6) | loss 0.3967 | train-view acc 0.999 (TRAINING views, not a performance estimate) | 13s | RAM 2.4GB proc / 11% sys | GPU mem 0.1GB alloc / 0.7GB peak
141
+ 21:15:34 | INFO | [LOSO DUO] stage 1 ep 3/3 (total 3/6) | loss 0.3847 | train-view acc 1.000 (TRAINING views, not a performance estimate) | 13s | RAM 2.4GB proc / 10% sys | GPU mem 0.1GB alloc / 0.7GB peak
142
+ 21:15:34 | INFO | [LOSO DUO] stage 2: last dense block + heads | trainable params 5.78M
143
+ 21:15:47 | INFO | [LOSO DUO] stage 2 ep 1/3 (total 4/6) | loss 0.3900 | train-view acc 1.000 (TRAINING views, not a performance estimate) | 13s | RAM 2.4GB proc / 10% sys | GPU mem 0.2GB alloc / 0.7GB peak
144
+ 21:16:00 | INFO | [LOSO DUO] stage 2 ep 2/3 (total 5/6) | loss 0.3803 | train-view acc 1.000 (TRAINING views, not a performance estimate) | 13s | RAM 2.4GB proc / 10% sys | GPU mem 0.2GB alloc / 0.7GB peak
145
+ 21:16:14 | INFO | [LOSO DUO] stage 2 ep 3/3 (total 6/6) | loss 0.3778 | train-view acc 1.000 (TRAINING views, not a performance estimate) | 13s | RAM 2.4GB proc / 11% sys | GPU mem 0.2GB alloc / 0.7GB peak
146
+ 21:16:14 | INFO | [LOSO DUO] finished in 1.3 min
147
+ 21:16:15 | INFO | [LOSO DUO] true=Partial_Restoration pred=Normal probs=(0.75,0.09,0.16) | class examples left in training: 3
148
+ 21:16:15 | INFO | Fold saved. 7/8 done | elapsed 9.7 min | RAM 2.4GB proc / 10% sys | GPU mem 0.0GB alloc / 0.7GB peak
149
+ 21:16:15 | INFO | --- LOSO fold 8/8: hold out DUO_Med (true class Normal) ---
150
+ 21:16:16 | INFO | [LOSO DUO_Med] train specimens=['NC', 'AWSO_only', 'CI', 'CI_Low', 'CI_Med', 'CI_High', 'DUO'] | class weights=[0.8600000143051147, 0.4300000071525574, 1.7100000381469727] | 700 augmented samples/epoch (100 per specimen, 100 per image)
151
+ 21:16:16 | INFO | [LOSO DUO_Med] stage 1: backbones frozen, heads only | trainable params 1.46M
152
+ 21:16:29 | INFO | [LOSO DUO_Med] stage 1 ep 1/3 (total 1/6) | loss 0.5992 | train-view acc 0.870 (TRAINING views, not a performance estimate) | 13s | RAM 2.4GB proc / 10% sys | GPU mem 0.1GB alloc / 0.7GB peak
153
+ 21:16:43 | INFO | [LOSO DUO_Med] stage 1 ep 2/3 (total 2/6) | loss 0.4107 | train-view acc 0.999 (TRAINING views, not a performance estimate) | 13s | RAM 2.4GB proc / 10% sys | GPU mem 0.1GB alloc / 0.7GB peak
154
+ 21:16:56 | INFO | [LOSO DUO_Med] stage 1 ep 3/3 (total 3/6) | loss 0.3989 | train-view acc 1.000 (TRAINING views, not a performance estimate) | 13s | RAM 2.4GB proc / 11% sys | GPU mem 0.1GB alloc / 0.7GB peak
155
+ 21:16:56 | INFO | [LOSO DUO_Med] stage 2: last dense block + heads | trainable params 5.78M
156
+ 21:17:09 | INFO | [LOSO DUO_Med] stage 2 ep 1/3 (total 4/6) | loss 0.4033 | train-view acc 1.000 (TRAINING views, not a performance estimate) | 14s | RAM 2.4GB proc / 10% sys | GPU mem 0.2GB alloc / 0.7GB peak
157
+ 21:17:23 | INFO | [LOSO DUO_Med] stage 2 ep 2/3 (total 5/6) | loss 0.3965 | train-view acc 1.000 (TRAINING views, not a performance estimate) | 14s | RAM 2.4GB proc / 10% sys | GPU mem 0.2GB alloc / 0.7GB peak
158
+ 21:17:37 | INFO | [LOSO DUO_Med] stage 2 ep 3/3 (total 6/6) | loss 0.3932 | train-view acc 1.000 (TRAINING views, not a performance estimate) | 13s | RAM 2.4GB proc / 10% sys | GPU mem 0.2GB alloc / 0.7GB peak
159
+ 21:17:37 | INFO | [LOSO DUO_Med] finished in 1.4 min
160
+ 21:17:38 | INFO | [LOSO DUO_Med] true=Normal pred=Partial_Restoration probs=(0.13,0.72,0.15) | class examples left in training: 2
161
+ 21:17:38 | INFO | Fold saved. 8/8 done | elapsed 11.0 min | RAM 2.4GB proc / 10% sys | GPU mem 0.0GB alloc / 0.7GB peak
162
+ 21:17:38 | INFO |
163
+ sample_id y_true pred p0 p1 p2 class_in_train correct
164
+ NC 0 1 0.155 0.679 0.167 2 False
165
+ AWSO_only 0 1 0.165 0.652 0.183 2 False
166
+ CI 2 1 0.243 0.757 0.000 0 False
167
+ CI_Low 1 0 0.568 0.220 0.212 3 False
168
+ CI_Med 1 0 0.561 0.272 0.167 3 False
169
+ CI_High 1 0 0.464 0.329 0.207 3 False
170
+ DUO 1 0 0.748 0.090 0.161 3 False
171
+ DUO_Med 0 1 0.127 0.719 0.154 2 False
172
+ 21:17:38 | INFO | Image model (LOSO): 0/8 specimens correct (accuracy 0.000; 95% Wilson CI 0.00-0.32)
173
+ Majority-class baseline under the same LOSO: 0/8
174
+ Confusion matrix (rows=true, cols=pred; order Normal, Partial_Restoration, Induced_Neoplastic):
175
+ [[0 3 0]
176
+ [4 0 0]
177
+ [0 1 0]]
178
+ Interpretation: n=8 specimens, Induced_Neoplastic has ONE specimen (no training example when it is held out). This is a pipeline sanity check, NOT evidence of generalisation.
179
+ 21:17:38 | INFO | ==============================================================================
180
+ 21:17:38 | INFO | STEP 2b | Molecular MLP (leave-one-specimen-out)
181
+ 21:17:38 | INFO | ==============================================================================
182
+ 21:17:43 | INFO | MLP LOSO predictions:
183
+ sample_id y_true pred p0 p1 p2 correct
184
+ NC 0 2 0.306 0.316 0.378 False
185
+ AWSO_only 0 2 0.306 0.316 0.378 False
186
+ CI 2 1 0.466 0.534 0.000 False
187
+ CI_Low 1 2 0.296 0.323 0.380 False
188
+ CI_Med 1 2 0.296 0.323 0.380 False
189
+ CI_High 1 2 0.296 0.323 0.380 False
190
+ DUO 1 2 0.296 0.323 0.380 False
191
+ DUO_Med 0 2 0.309 0.314 0.377 False
192
+ 21:17:43 | INFO | Molecular MLP: 0/8 specimens correct (accuracy 0.000; 95% Wilson CI 0.00-0.32)
193
+ Majority-class baseline under the same LOSO: 0/8
194
+ Confusion matrix (rows=true, cols=pred; order Normal, Partial_Restoration, Induced_Neoplastic):
195
+ [[0 0 3]
196
+ [0 0 4]
197
+ [0 1 0]]
198
+ Interpretation: n=8 specimens, Induced_Neoplastic has ONE specimen (no training example when it is held out). This is a pipeline sanity check, NOT evidence of generalisation.
199
+ *** All 5 features are identical for every specimen: this result reflects only the class prior, NOT molecular signal. Do not report it as a modality result. ***
200
+ 21:17:43 | INFO | ==============================================================================
201
+ 21:17:43 | INFO | STEP 3 | Final image model on all 8 specimens
202
+ 21:17:43 | INFO | ==============================================================================
203
+ 21:17:44 | INFO | [FINAL] train specimens=['NC', 'AWSO_only', 'CI', 'CI_Low', 'CI_Med', 'CI_High', 'DUO', 'DUO_Med'] | class weights=[0.6299999952316284, 0.4699999988079071, 1.8899999856948853] | 800 augmented samples/epoch (100 per specimen, 100 per image)
204
+ 21:17:44 | INFO | [FINAL] stage 1: backbones frozen, heads only | trainable params 1.46M
205
+ 21:17:59 | INFO | [FINAL] stage 1 ep 1/6 (total 1/12) | loss 0.6181 | train-view acc 0.846 (TRAINING views, not a performance estimate) | 15s | RAM 2.5GB proc / 10% sys | GPU mem 0.1GB alloc / 0.7GB peak
206
+ 21:18:14 | INFO | [FINAL] stage 1 ep 2/6 (total 2/12) | loss 0.4212 | train-view acc 0.999 (TRAINING views, not a performance estimate) | 15s | RAM 2.5GB proc / 11% sys | GPU mem 0.1GB alloc / 0.7GB peak
207
+ 21:18:29 | INFO | [FINAL] stage 1 ep 3/6 (total 3/12) | loss 0.4113 | train-view acc 1.000 (TRAINING views, not a performance estimate) | 15s | RAM 2.5GB proc / 10% sys | GPU mem 0.1GB alloc / 0.7GB peak
208
+ 21:18:44 | INFO | [FINAL] stage 1 ep 4/6 (total 4/12) | loss 0.4031 | train-view acc 1.000 (TRAINING views, not a performance estimate) | 15s | RAM 2.5GB proc / 11% sys | GPU mem 0.1GB alloc / 0.7GB peak
209
+ 21:18:59 | INFO | [FINAL] stage 1 ep 5/6 (total 5/12) | loss 0.4056 | train-view acc 1.000 (TRAINING views, not a performance estimate) | 15s | RAM 2.5GB proc / 11% sys | GPU mem 0.1GB alloc / 0.7GB peak
210
+ 21:19:14 | INFO | [FINAL] stage 1 ep 6/6 (total 6/12) | loss 0.4069 | train-view acc 1.000 (TRAINING views, not a performance estimate) | 15s | RAM 2.5GB proc / 10% sys | GPU mem 0.1GB alloc / 0.7GB peak
211
+ 21:19:14 | INFO | [FINAL] stage 2: last dense block + heads | trainable params 5.78M
212
+ 21:19:29 | INFO | [FINAL] stage 2 ep 1/6 (total 7/12) | loss 0.4091 | train-view acc 1.000 (TRAINING views, not a performance estimate) | 16s | RAM 2.5GB proc / 10% sys | GPU mem 0.2GB alloc / 0.7GB peak
213
+ 21:19:45 | INFO | [FINAL] stage 2 ep 2/6 (total 8/12) | loss 0.4052 | train-view acc 0.996 (TRAINING views, not a performance estimate) | 16s | RAM 2.5GB proc / 10% sys | GPU mem 0.2GB alloc / 0.7GB peak
214
+ 21:20:01 | INFO | [FINAL] stage 2 ep 3/6 (total 9/12) | loss 0.4037 | train-view acc 0.999 (TRAINING views, not a performance estimate) | 16s | RAM 2.5GB proc / 10% sys | GPU mem 0.2GB alloc / 0.7GB peak
215
+ 21:20:16 | INFO | [FINAL] stage 2 ep 4/6 (total 10/12) | loss 0.4036 | train-view acc 0.998 (TRAINING views, not a performance estimate) | 15s | RAM 2.5GB proc / 10% sys | GPU mem 0.2GB alloc / 0.7GB peak
216
+ 21:20:32 | INFO | [FINAL] stage 2 ep 5/6 (total 11/12) | loss 0.4003 | train-view acc 0.999 (TRAINING views, not a performance estimate) | 15s | RAM 2.5GB proc / 11% sys | GPU mem 0.2GB alloc / 0.7GB peak
217
+ 21:20:47 | INFO | [FINAL] stage 2 ep 6/6 (total 12/12) | loss 0.3993 | train-view acc 1.000 (TRAINING views, not a performance estimate) | 15s | RAM 2.5GB proc / 10% sys | GPU mem 0.2GB alloc / 0.7GB peak
218
+ 21:20:47 | INFO | [FINAL] finished in 3.1 min
219
+ 21:20:48 | INFO | Checkpoint saved: /kaggle/working/densenet121_multimodal.pt (63 MB)
220
+ 21:20:48 | INFO | Checkpoint load: missing keys=0 | unexpected keys=0
221
+ 21:20:50 | INFO | CHECKPOINT RELOAD TEST PASSED (identical predictions after reconstructing from file)
222
+ 21:20:50 | INFO | Resubstitution on TRAINING specimens (NOT a performance estimate):
223
+ sample_id y_true p0 p1 p2 pred
224
+ NC 0 0.865 0.025 0.110 0
225
+ AWSO_only 0 0.878 0.021 0.101 0
226
+ CI 2 0.009 0.006 0.985 2
227
+ CI_Low 1 0.047 0.811 0.142 1
228
+ CI_Med 1 0.045 0.814 0.142 1
229
+ CI_High 1 0.047 0.814 0.139 1
230
+ DUO 1 0.046 0.816 0.138 1
231
+ DUO_Med 0 0.866 0.029 0.105 0
232
+ 21:20:50 | INFO | ==============================================================================
233
+ 21:20:50 | INFO | STEP 4 | Hugging Face upload
234
+ 21:20:50 | INFO | ==============================================================================
235
+ 21:20:51 | INFO | staged densenet121_multimodal.pt (62.7 MB)
236
+ 21:20:51 | INFO | staged loso_results.csv (0.0 MB)
237
+ 21:20:51 | INFO | staged config.json (0.0 MB)
238
+ 21:20:51 | INFO | staged specimen_table.csv (0.0 MB)
239
+ 21:20:51 | INFO | staged image_index.csv (0.0 MB)
240
+ 21:20:51 | INFO | staged feature_audit.csv (0.0 MB)
241
+ 21:20:51 | INFO | staged final_report.md (0.0 MB)
v2_multimodal/specimen_table.csv ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ sample_id,experimental_group,dose,biological_state,state_id,h_and_e_plate,p63_plate,hmwck_plate,amacr_plate,state_name
2
+ NC,Normal Control,,Normal,0,1,9,10,11,Normal
3
+ AWSO_only,High-dose AWSO only,10.0 ml/kg,Normal,0,3,12,13,14,Normal
4
+ CI,Cancer-Induced (CdCl2+TP),1+5 mg/kg,Induced_Neoplastic,2,2,15,16,17,Induced_Neoplastic
5
+ CI_Low,CI + Low AWSO,2.5 ml/kg,Partial_Restoration,1,4,21,22,23,Partial_Restoration
6
+ CI_Med,CI + Medium AWSO,5.0 ml/kg,Partial_Restoration,1,5,24,25,26,Partial_Restoration
7
+ CI_High,CI + High AWSO,10.0 ml/kg,Partial_Restoration,1,6,27,28,29,Partial_Restoration
8
+ DUO,CI + Duodart,9.8 mg/kg,Partial_Restoration,1,7,18,19,20,Partial_Restoration
9
+ DUO_Med,CI + Duodart + Medium AWSO,9.8+5.0,Near_Normal,0,8,30,31,32,Normal