Upload folder using huggingface_hub (part 3)
Browse filesThis view is limited to 50 files because it contains too many changes. Β See raw diff
Files changed (50)
- .gitattributes+7
- stage1_final/results/resized/resnet/seg_resnet_fold3_val.jsonAdded+261
- stage1_final/results/resized/resnet/seg_resnet_fold4_val.jsonAdded+231
- stage1_final/results/resized/resnet/target3_resnet_cv_summary.jsonAdded+374
- stage1_final/results/resized/resnet/target3_resnet_final.jsonAdded+4512
- stage1_final/results/resized/resnet/target3_resnet_fold0_val.jsonAdded+172
- stage1_final/results/resized/resnet/target3_resnet_fold1_val.jsonAdded+202
- stage1_final/results/resized/resnet/target3_resnet_fold2_val.jsonAdded+132
- stage1_final/results/resized/resnet/target3_resnet_fold3_val.jsonAdded+147
- stage1_final/results/resized/resnet/target3_resnet_fold4_val.jsonAdded+152
- stage1_final/results/resized/swin/crt_swin_cv_summary.jsonAdded+351
- stage1_final/results/resized/swin/crt_swin_final.jsonAdded+70
- stage1_final/results/resized/swin/emit_crt_swin_oof.jsonAdded+351
- stage1_final/results/resized/swin/emit_crt_swin_test.jsonAdded+70
- stage1_final/results/resized/swin/emit_plain_swin_oof.jsonAdded+352
- stage1_final/results/resized/swin/emit_plain_swin_test.jsonAdded+71
- stage1_final/results/resized/swin/seg_swin_cv_summary.jsonAdded+33
- stage1_final/results/resized/swin/seg_swin_final.jsonAdded+133
- stage1_final/results/resized/swin/seg_swin_fold0_val.jsonAdded+141
- stage1_final/results/resized/swin/seg_swin_fold1_val.jsonAdded+165
- stage1_final/results/resized/swin/seg_swin_fold2_val.jsonAdded+237
- stage1_final/results/resized/swin/seg_swin_fold3_val.jsonAdded+189
- stage1_final/results/resized/swin/seg_swin_fold4_val.jsonAdded+183
- stage1_final/results/resized/swin/target3_swin_cv_summary.jsonAdded+349
- stage1_final/results/resized/swin/target3_swin_final.jsonAdded+4517
- stage1_final/results/resized/swin/target3_swin_fold0_val.jsonAdded+112
- stage1_final/results/resized/swin/target3_swin_fold1_val.jsonAdded+147
- stage1_final/results/resized/swin/target3_swin_fold2_val.jsonAdded+142
- stage1_final/results/resized/swin/target3_swin_fold3_val.jsonAdded+162
- stage1_final/results/resized/swin/target3_swin_fold4_val.jsonAdded+112
- stage1_final/train_cls.pyAdded+352
- stage1_final/train_crt.pyAdded+347
- stage1_final/train_seg.pyAdded+340
- stage1_final/verify_all.pyAdded+566
- stage1v2_final/check_progress.shAdded+21
- stage1v2_final/dataset_f.pyAdded+202
- stage1v2_final/dataset_f_squeeze.pyAdded+175
- stage1v2_final/ensemble.pyAdded+295
- stage1v2_final/f_reference_metrics.jsonAdded+1336
- stage1v2_final/gpu_wait.logAdded+325
- stage1v2_final/gpu_wait_and_run.shAdded+54
- stage1v2_final/logits/letterbox/convnext/convnext_oof.npzAdded+3
- stage1v2_final/logits/letterbox/convnext/convnext_test.npzAdded+3
- stage1v2_final/logits/letterbox/convnext/plain_convnext_oof.npzAdded+3
- stage1v2_final/logits/letterbox/convnext/plain_convnext_test.npzAdded+3
- stage1v2_final/logits/letterbox/mamba/mamba_oof.npzAdded+3
- stage1v2_final/logits/letterbox/mamba/mamba_test.npzAdded+3
- stage1v2_final/logits/letterbox/mamba/plain_mamba_oof.npzAdded+3
- stage1v2_final/logits/letterbox/mamba/plain_mamba_test.npzAdded+3
- stage1v2_final/logits/letterbox/resnet/plain_resnet_oof.npzAdded+3
32 unmodified lines33343532 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text32 unmodified lines3334353637383940414232 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -textstage2/MLLM_baseline/results/checkpoint_medgemma_27b_it_api_json.json filter=lfs diff=lfs merge=lfs -textstage2/MLLM_baseline/results/results_gemma4_26b_a4b_nvfp4.json filter=lfs diff=lfs merge=lfs -textstage2/MLLM_baseline/results/results_medgemma_27b_it_api.json filter=lfs diff=lfs merge=lfs -textstage2/MLLM_baseline/sample_856.png filter=lfs diff=lfs merge=lfs -textstage2/MLLM_baseline/sample_951.png filter=lfs diff=lfs merge=lfs -textstage2/MLLM_expert/results/results_gemma4_26b_a4b_nvfp4_expert.json filter=lfs diff=lfs merge=lfs -textstage2/MLLM_expert/results/results_gemma4_26b_debate_v2_trial.json filter=lfs diff=lfs merge=lfs -text
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261{ "fold": 3, "metrics": { "dice": 0.7222013572851816, "iou": 0.580032487710317 }, "logs": [ { "epoch": 0, "train_loss": 0.6138421297073364, "val_dice": 0.1943561447163423, "val_iou": 0.13547549691672126 }, { "epoch": 1, "train_loss": 0.4611867715915044, "val_dice": 0.4915980746348699, "val_iou": 0.35104868064324063 }, { "epoch": 2, "train_loss": 0.3875955541928609, "val_dice": 0.5247488568226496, "val_iou": 0.3859521374106407 }, { "epoch": 3, "train_loss": 0.3460153142611186, "val_dice": 0.6443256934483846, "val_iou": 0.49631616473197937 }, { "epoch": 4, "train_loss": 0.30555541813373566, "val_dice": 0.6433913509051005, "val_iou": 0.4980693111817042 }, { "epoch": 5, "train_loss": 0.27872474243243534, "val_dice": 0.666735033194224, "val_iou": 0.5198122809330622 }, { "epoch": 6, "train_loss": 0.2527073497573535, "val_dice": 0.6600219309329987, "val_iou": 0.5157498965660731 }, { "epoch": 7, "train_loss": 0.24121235807736716, "val_dice": 0.6940376063187917, "val_iou": 0.546457419792811 }, { "epoch": 8, "train_loss": 0.2559986797471841, "val_dice": 0.6985281407833099, "val_iou": 0.5501155654589335 }, { "epoch": 9, "train_loss": 0.222637248535951, "val_dice": 0.6989514728387197, "val_iou": 0.5535771598418554 }, { "epoch": 10, "train_loss": 0.20273545136054358, "val_dice": 0.6896438300609589, "val_iou": 0.5430713991324106 }, { "epoch": 11, "train_loss": 0.19927928472558656, "val_dice": 0.6999373634656271, "val_iou": 0.5523287753264109 }, { "epoch": 12, "train_loss": 0.19412269443273544, "val_dice": 0.7057852943738302, "val_iou": 0.5589255591233572 }, { "epoch": 13, "train_loss": 0.20388895645737648, "val_dice": 0.7165862222512563, "val_iou": 0.5714631279309591 }, { "epoch": 14, "train_loss": 0.19036027416586876, "val_dice": 0.6734209656715393, "val_iou": 0.5242603818575541 }, { "epoch": 15, "train_loss": 0.1751129391292731, "val_dice": 0.7183696230252584, "val_iou": 0.5735695958137512 }, { "epoch": 16, "train_loss": 0.17120813205838203, "val_dice": 0.7154511710007986, "val_iou": 0.5700819492340088 }, { "epoch": 17, "train_loss": 0.1604445514579614, "val_dice": 0.7024017373720804, "val_iou": 0.5581655701001486 }, { "epoch": 18, "train_loss": 0.15446667869885763, "val_dice": 0.7086004813512167, "val_iou": 0.5647621154785156 }, { "epoch": 19, "train_loss": 0.15453882018725076, "val_dice": 0.7170421183109283, "val_iou": 0.5741201341152191 }, { "epoch": 20, "train_loss": 0.15354910617073378, "val_dice": 0.7040923436482748, "val_iou": 0.5604528784751892 }, { "epoch": 21, "train_loss": 0.13769513430694738, "val_dice": 0.7161827186743418, "val_iou": 0.5737987955411276 }, { "epoch": 22, "train_loss": 0.14193391924103102, "val_dice": 0.7020967503388723, "val_iou": 0.5577251513799032 }, { "epoch": 23, "train_loss": 0.14972687885165215, "val_dice": 0.7158457736174265, "val_iou": 0.5726696451505026 }, { "epoch": 24, "train_loss": 0.13911753023664156, "val_dice": 0.7197486261526743, "val_iou": 0.5781121154626211 }, { "epoch": 25, "train_loss": 0.13098876923322678, "val_dice": 0.7117838561534882, "val_iou": 0.5690360367298126 }, { "epoch": 26, "train_loss": 0.13466908037662506, "val_dice": 0.7204330960909525, "val_iou": 0.5784643093744913 }, { "epoch": 27, "train_loss": 0.12691590810815492, "val_dice": 0.7112344602743784, "val_iou": 0.5680197179317474 }, { "epoch": 28, "train_loss": 0.1287830757598082, "val_dice": 0.7162580788135529, "val_iou": 0.5735205312569936 }, { "epoch": 29, "train_loss": 0.12389301943282287, "val_dice": 0.7219171524047852, "val_iou": 0.5800592104593912 }, { "epoch": 30, "train_loss": 0.13415121845901012, "val_dice": 0.7139295240243276, "val_iou": 0.5703325172265371 }, { "epoch": 31, "train_loss": 0.12585854406158128, "val_dice": 0.7222013572851816, "val_iou": 0.580032487710317 }, { "epoch": 32, "train_loss": 0.12343788892030716, "val_dice": 0.720237523317337, "val_iou": 0.5778035720189413 }, { "epoch": 33, "train_loss": 0.11954182386398315, "val_dice": 0.7064505318800608, "val_iou": 0.562528133392334 }, { "epoch": 34, "train_loss": 0.11967955467601617, "val_dice": 0.7162209153175354, "val_iou": 0.573644757270813 }, { "epoch": 35, "train_loss": 0.11718433101971944, "val_dice": 0.7062295575936636, "val_iou": 0.5626954038937887 }, { "epoch": 36, "train_loss": 0.11980386823415756, "val_dice": 0.7176325619220734, "val_iou": 0.5755725900332133 }, { "epoch": 37, "train_loss": 0.11400729107360046, "val_dice": 0.7148962418238322, "val_iou": 0.5722392698129019 }, { "epoch": 38, "train_loss": 0.1147527943054835, "val_dice": 0.7107170422871908, "val_iou": 0.5681535005569458 }, { "epoch": 39, "train_loss": 0.12165401441355546, "val_dice": 0.71102507909139, "val_iou": 0.5684216618537903 }, { "epoch": 40, "train_loss": 0.1181034396092097, "val_dice": 0.7152372002601624, "val_iou": 0.5730333824952444 }, { "epoch": 41, "train_loss": 0.11934215575456619, "val_dice": 0.7083025276660919, "val_iou": 0.5651046335697174 } ]}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231{ "fold": 4, "metrics": { "dice": 0.6626530170440674, "iou": 0.5249902665615082 }, "logs": [ { "epoch": 0, "train_loss": 0.6040730705628028, "val_dice": 0.08611477240920067, "val_iou": 0.05037770885974169 }, { "epoch": 1, "train_loss": 0.44077492218751174, "val_dice": 0.343757626414299, "val_iou": 0.23606418073177338 }, { "epoch": 2, "train_loss": 0.3635135017908536, "val_dice": 0.5002379417419434, "val_iou": 0.35592806339263916 }, { "epoch": 3, "train_loss": 0.31181351038125843, "val_dice": 0.5272990465164185, "val_iou": 0.37853812575340273 }, { "epoch": 4, "train_loss": 0.27802517780890834, "val_dice": 0.5338006973266601, "val_iou": 0.39327751994133 }, { "epoch": 5, "train_loss": 0.2662290334701538, "val_dice": 0.5231241226196289, "val_iou": 0.3868346750736237 }, { "epoch": 6, "train_loss": 0.24610144816912138, "val_dice": 0.5733832120895386, "val_iou": 0.4220519125461578 }, { "epoch": 7, "train_loss": 0.24438801063941076, "val_dice": 0.5351975083351135, "val_iou": 0.38684133887290956 }, { "epoch": 8, "train_loss": 0.24092424832857573, "val_dice": 0.5678065180778503, "val_iou": 0.4315794944763184 }, { "epoch": 9, "train_loss": 0.21222549562270826, "val_dice": 0.6003095746040344, "val_iou": 0.45297125577926634 }, { "epoch": 10, "train_loss": 0.19979401162037483, "val_dice": 0.6091084241867065, "val_iou": 0.46777879595756533 }, { "epoch": 11, "train_loss": 0.1895719480056029, "val_dice": 0.6199497103691101, "val_iou": 0.4802316606044769 }, { "epoch": 12, "train_loss": 0.1758307390488111, "val_dice": 0.6362187981605529, "val_iou": 0.49515390396118164 }, { "epoch": 13, "train_loss": 0.18556680129124567, "val_dice": 0.6331044793128967, "val_iou": 0.4869541168212891 }, { "epoch": 14, "train_loss": 0.1789223551750183, "val_dice": 0.6223224997520447, "val_iou": 0.4894650101661682 }, { "epoch": 15, "train_loss": 0.16978265688969538, "val_dice": 0.6207321286201477, "val_iou": 0.48570563793182375 }, { "epoch": 16, "train_loss": 0.16802145426089948, "val_dice": 0.6523342132568359, "val_iou": 0.5095111727714539 }, { "epoch": 17, "train_loss": 0.1564413899412522, "val_dice": 0.6516639590263367, "val_iou": 0.5107141315937043 }, { "epoch": 18, "train_loss": 0.16280463739083365, "val_dice": 0.6303826212882996, "val_iou": 0.4970108330249786 }, { "epoch": 19, "train_loss": 0.1626661362556311, "val_dice": 0.6222506403923035, "val_iou": 0.49072423577308655 }, { "epoch": 20, "train_loss": 0.15174455768786943, "val_dice": 0.6480942249298096, "val_iou": 0.5121436834335327 }, { "epoch": 21, "train_loss": 0.14207227528095245, "val_dice": 0.6539187073707581, "val_iou": 0.5164022505283355 }, { "epoch": 22, "train_loss": 0.14468535838218835, "val_dice": 0.6540932655334473, "val_iou": 0.5188485503196716 }, { "epoch": 23, "train_loss": 0.13115018606185913, "val_dice": 0.6478811740875244, "val_iou": 0.5138100147247314 }, { "epoch": 24, "train_loss": 0.14252719626976892, "val_dice": 0.6458236694335937, "val_iou": 0.5129028975963592 }, { "epoch": 25, "train_loss": 0.12749625169313872, "val_dice": 0.6526506900787353, "val_iou": 0.517010623216629 }, { "epoch": 26, "train_loss": 0.1366780583675091, "val_dice": 0.6626530170440674, "val_iou": 0.5249902665615082 }, { "epoch": 27, "train_loss": 0.12716724150455916, "val_dice": 0.6465119838714599, "val_iou": 0.5124463438987732 }, { "epoch": 28, "train_loss": 0.1254961255651254, "val_dice": 0.6618073105812072, "val_iou": 0.5281198024749756 }, { "epoch": 29, "train_loss": 0.12263606488704681, "val_dice": 0.643485939502716, "val_iou": 0.5121323466300964 }, { "epoch": 30, "train_loss": 0.13843052375775117, "val_dice": 0.6488198280334473, "val_iou": 0.517106431722641 }, { "epoch": 31, "train_loss": 0.12184500006529, "val_dice": 0.6512809157371521, "val_iou": 0.5181406140327454 }, { "epoch": 32, "train_loss": 0.12715217471122742, "val_dice": 0.6488866090774537, "val_iou": 0.5170250177383423 }, { "epoch": 33, "train_loss": 0.12302361772610591, "val_dice": 0.6596784234046936, "val_iou": 0.5265290856361389 }, { "epoch": 34, "train_loss": 0.12177298046075381, "val_dice": 0.6553865790367126, "val_iou": 0.5238692283630371 }, { "epoch": 35, "train_loss": 0.12020318783246554, "val_dice": 0.6599848985671997, "val_iou": 0.5274998307228088 }, { "epoch": 36, "train_loss": 0.11910688475920604, "val_dice": 0.6577977538108826, "val_iou": 0.526485550403595 } ]}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374{ "backbone": "resnet", "folds": [ { "fold": 0, "macro_f1": 0.7669097256604953, "accuracy": 0.9596613545816733, "balanced_acc": 0.7458459304900263, "per_class_recall": { "malignant": 0.9671052631578947, "non_malignant": 0.2857142857142857, "non_roi": 0.9847182425978988 }, "per_class_precision": { "malignant": 0.9545454545454546, "non_malignant": 0.4827586206896552, "non_roi": 0.9772511848341232 }, "confusion_matrix": [ [ 882, 10, 20 ], [ 31, 14, 4 ], [ 11, 5, 1031 ] ], "classification_report": { "malignant": { "precision": 0.9545454545454546, "recall": 0.9671052631578947, "f1-score": 0.9607843137254902, "support": 912.0 }, "non_malignant": { "precision": 0.4827586206896552, "recall": 0.2857142857142857, "f1-score": 0.358974358974359, "support": 49.0 }, "non_roi": { "precision": 0.9772511848341232, "recall": 0.9847182425978988, "f1-score": 0.9809705042816366, "support": 1047.0 }, "accuracy": 0.9596613545816733, "macro avg": { "precision": 0.8048517533564109, "recall": 0.7458459304900263, "f1-score": 0.7669097256604953, "support": 2008.0 }, "weighted avg": { "precision": 0.9548718214544695, "recall": 0.9596613545816733, "f1-score": 0.9566240815190559, "support": 2008.0 } }, "n": 2008, "src_B_acc": 0.9880597014925373, "src_B_n": 670, "src_C_acc": 0.9435351882160393, "src_C_n": 1222, "src_D_acc": 0.9655172413793104, "src_D_n": 116 }, { "fold": 1, "macro_f1": 0.7695141113129838, "accuracy": 0.8963807635101636, "balanced_acc": 0.7773867132285691, "per_class_recall": { "malignant": 0.9078947368421053, "non_malignant": 0.52, "non_roi": 0.9042654028436019 }, "per_class_precision": { "malignant": 0.891280947255113, "non_malignant": 0.4727272727272727, "non_roi": 0.9235237173281704 }, "confusion_matrix": [ [ 828, 13, 71 ], [ 16, 26, 8 ], [ 85, 16, 954 ] ], "classification_report": { "malignant": { "precision": 0.891280947255113, "recall": 0.9078947368421053, "f1-score": 0.8995111352525801, "support": 912.0 }, "non_malignant": { "precision": 0.4727272727272727, "recall": 0.52, "f1-score": 0.49523809523809526, "support": 50.0 }, "non_roi": { "precision": 0.9235237173281704, "recall": 0.9042654028436019, "f1-score": 0.9137931034482759, "support": 1055.0 }, "accuracy": 0.8963807635101636, "macro avg": { "precision": 0.7625106457701855, "recall": 0.7773867132285691, "f1-score": 0.7695141113129838, "support": 2017.0 }, "weighted avg": { "precision": 0.8977700095757296, "recall": 0.8963807635101636, "f1-score": 0.8969597343828404, "support": 2017.0 } }, "n": 2017, "src_B_acc": 0.9024725274725275, "src_B_n": 728, "src_C_acc": 0.9, "src_C_n": 1090, "src_D_acc": 0.8542713567839196, "src_D_n": 199 }, { "fold": 2, "macro_f1": 0.6957840963889788, "accuracy": 0.9300804828973843, "balanced_acc": 0.6805923645530574, "per_class_recall": { "malignant": 0.9407894736842105, "non_malignant": 0.14285714285714285, "non_roi": 0.9581304771178188 }, "per_class_precision": { "malignant": 0.9186295503211992, "non_malignant": 0.35, "non_roi": 0.9516441005802708 }, "confusion_matrix": [ [ 858, 13, 41 ], [ 33, 7, 9 ], [ 43, 0, 984 ] ], "classification_report": { "malignant": { "precision": 0.9186295503211992, "recall": 0.9407894736842105, "f1-score": 0.9295774647887324, "support": 912.0 }, "non_malignant": { "precision": 0.35, "recall": 0.14285714285714285, "f1-score": 0.2028985507246377, "support": 49.0 }, "non_roi": { "precision": 0.9516441005802708, "recall": 0.9581304771178188, "f1-score": 0.9548762736535662, "support": 1027.0 }, "accuracy": 0.9300804828973843, "macro avg": { "precision": 0.7400912169671566, "recall": 0.6805923645530574, "f1-score": 0.6957840963889788, "support": 1988.0 }, "weighted avg": { "precision": 0.9216693366141206, "recall": 0.9300804828973843, "f1-score": 0.9247357192731607, "support": 1988.0 } }, "n": 1988, "src_B_acc": 0.9372496662216289, "src_B_n": 749, "src_C_acc": 0.9491525423728814, "src_C_n": 1062, "src_D_acc": 0.7853107344632768, "src_D_n": 177 }, { "fold": 3, "macro_f1": 0.7079227203005706, "accuracy": 0.8948905109489051, "balanced_acc": 0.7567419728865512, "per_class_recall": { "malignant": 0.8981380065717415, "non_malignant": 0.46, "non_roi": 0.9120879120879121 }, "per_class_precision": { "malignant": 0.9244644870349493, "non_malignant": 0.2072072072072072, "non_roi": 0.9422894985808893 }, "confusion_matrix": [ [ 820, 36, 57 ], [ 23, 23, 4 ], [ 44, 52, 996 ] ], "classification_report": { "malignant": { "precision": 0.9244644870349493, "recall": 0.8981380065717415, "f1-score": 0.9111111111111111, "support": 913.0 }, "non_malignant": { "precision": 0.2072072072072072, "recall": 0.46, "f1-score": 0.2857142857142857, "support": 50.0 }, "non_roi": { "precision": 0.9422894985808893, "recall": 0.9120879120879121, "f1-score": 0.9269427640763146, "support": 1092.0 }, "accuracy": 0.8948905109489051, "macro avg": { "precision": 0.6913203976076819, "recall": 0.7567419728865512, "f1-score": 0.7079227203005706, "support": 2055.0 }, "weighted avg": { "precision": 0.9164849486489539, "recall": 0.8948905109489051, "f1-score": 0.9043073757184887, "support": 2055.0 } }, "n": 2055, "src_B_acc": 0.9451327433628318, "src_B_n": 565, "src_C_acc": 0.8691507798960139, "src_C_n": 1154, "src_D_acc": 0.8988095238095238, "src_D_n": 336 }, { "fold": 4, "macro_f1": 0.6687781793339193, "accuracy": 0.9109554777388694, "balanced_acc": 0.6718610005393971, "per_class_recall": { "malignant": 0.9079956188389924, "non_malignant": 0.1568627450980392, "non_roi": 0.9507246376811594 }, "per_class_precision": { "malignant": 0.911991199119912, "non_malignant": 0.13114754098360656, "non_roi": 0.956268221574344 }, "confusion_matrix": [ [ 829, 43, 41 ], [ 39, 8, 4 ], [ 41, 10, 984 ] ], "classification_report": { "malignant": { "precision": 0.911991199119912, "recall": 0.9079956188389924, "f1-score": 0.9099890230515917, "support": 913.0 }, "non_malignant": { "precision": 0.13114754098360656, "recall": 0.1568627450980392, "f1-score": 0.14285714285714285, "support": 51.0 }, "non_roi": { "precision": 0.956268221574344, "recall": 0.9507246376811594, "f1-score": 0.9534883720930233, "support": 1035.0 }, "accuracy": 0.9109554777388694, "macro avg": { "precision": 0.6664689872259543, "recall": 0.6718610005393971, "f1-score": 0.6687781793339193, "support": 1999.0 }, "weighted avg": { "precision": 0.9149945466313606, "recall": 0.9109554777388694, "f1-score": 0.9129395484982974, "support": 1999.0 } }, "n": 1999, "src_B_acc": 0.9550724637681159, "src_B_n": 690, "src_C_acc": 0.9076376554174067, "src_C_n": 1126, "src_D_acc": 0.7650273224043715, "src_D_n": 183 } ], "cv_macro_f1_mean": 0.7217817665993895, "cv_macro_f1_std": 0.03998059955670659, "cv_non_malignant_recall_mean": 0.3130868347338936, "cv_non_malignant_recall_std": 0.15396746845212542}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512{ "backbone": "resnet", "val_metrics": { "macro_f1": 0.7193665327851014, "accuracy": 0.9100602688919796, "balanced_acc": 0.7049432611014911, "per_class_recall": { "malignant": 0.9117948717948718, "non_malignant": 0.2641509433962264, "non_roi": 0.9388839681133747 }, "per_class_precision": { "malignant": 0.908997955010225, "non_malignant": 0.3888888888888889, "non_roi": 0.9273840769903762 }, "confusion_matrix": [ [ 889, 21, 65 ], [ 21, 14, 18 ], [ 68, 1, 1060 ] ], "classification_report": { "malignant": { "precision": 0.908997955010225, "recall": 0.9117948717948718, "f1-score": 0.910394265232975, "support": 975.0 }, "non_malignant": { "precision": 0.3888888888888889, "recall": 0.2641509433962264, "f1-score": 0.3146067415730337, "support": 53.0 }, "non_roi": { "precision": 0.9273840769903762, "recall": 0.9388839681133747, "f1-score": 0.9330985915492958, "support": 1129.0 }, "accuracy": 0.9100602688919796, "macro avg": { "precision": 0.7417569736298301, "recall": 0.7049432611014911, "f1-score": 0.7193665327851014, "support": 2157.0 }, "weighted avg": { "precision": 0.9058417896004707, "recall": 0.9100602688919796, "f1-score": 0.9076387926586353, "support": 2157.0 } }, "n": 2157, "src_B_acc": 0.9776286353467561, "src_B_n": 447, "src_C_acc": 0.8725490196078431, "src_C_n": 1224, "src_D_acc": 0.9423868312757202, "src_D_n": 486 }, "test_metrics": { "macro_f1": 0.7119245671187143, "accuracy": 0.9395910780669146, "balanced_acc": 0.6959589116293166, "per_class_recall": { "malignant": 0.9591002044989775, "non_malignant": 0.16981132075471697, "non_roi": 0.9589652096342551 }, "per_class_precision": { "malignant": 0.9408224674022067, "non_malignant": 0.36, "non_roi": 0.9513274336283186 }, "confusion_matrix": [ [ 938, 12, 28 ], [ 17, 9, 27 ], [ 42, 4, 1075 ] ], "classification_report": { "malignant": { "precision": 0.9408224674022067, "recall": 0.9591002044989775, "f1-score": 0.949873417721519, "support": 978.0 }, "non_malignant": { "precision": 0.36, "recall": 0.16981132075471697, "f1-score": 0.23076923076923078, "support": 53.0 }, "non_roi": { "precision": 0.9513274336283186, "recall": 0.9589652096342551, "f1-score": 0.9551310528653931, "support": 1121.0 }, "accuracy": 0.9395910780669146, "macro avg": { "precision": 0.7507166336768417, "recall": 0.6959589116293166, "f1-score": 0.7119245671187143, "support": 2152.0 }, "weighted avg": { "precision": 0.9319899750077618, "recall": 0.9395910780669146, "f1-score": 0.934901896851543, "support": 2152.0 } }, "n": 2152, "src_B_acc": 0.9773371104815864, "src_B_n": 706, "src_C_acc": 0.9276703111858705, "src_C_n": 1189, "src_D_acc": 0.8910505836575876, "src_D_n": 257 }, "test_predictions": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 2 ], "logs": [ { "epoch": 0, "train_loss": 0.5677797354900154, "val_macro_f1": 0.592232633089784 }, { "epoch": 1, "train_loss": 0.4545698167791792, "val_macro_f1": 0.604437698177766 }, { "epoch": 2, "train_loss": 0.4273961460704257, "val_macro_f1": 0.6090933641564936 }, { "epoch": 3, "train_loss": 0.40763816768956035, "val_macro_f1": 0.610777865958665 }, { "epoch": 4, "train_loss": 0.3948697293070471, "val_macro_f1": 0.6355935637826163 }, { "epoch": 5, "train_loss": 0.38202083196229997, "val_macro_f1": 0.7193665327851014 }, { "epoch": 6, "train_loss": 0.37681593902551447, "val_macro_f1": 0.7046550710595891 }, { "epoch": 7, "train_loss": 0.3684334899209867, "val_macro_f1": 0.7040061253703519 }, { "epoch": 8, "train_loss": 0.36200026218678544, "val_macro_f1": 0.6820087370257072 }, { "epoch": 9, "train_loss": 0.3574927460615802, "val_macro_f1": 0.6991856086384466 }, { "epoch": 10, "train_loss": 0.34856044183111495, "val_macro_f1": 0.6832906568276146 } ]}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172{ "fold": 0, "metrics": { "macro_f1": 0.7669097256604953, "accuracy": 0.9596613545816733, "balanced_acc": 0.7458459304900263, "per_class_recall": { "malignant": 0.9671052631578947, "non_malignant": 0.2857142857142857, "non_roi": 0.9847182425978988 }, "per_class_precision": { "malignant": 0.9545454545454546, "non_malignant": 0.4827586206896552, "non_roi": 0.9772511848341232 }, "confusion_matrix": [ [ 882, 10, 20 ], [ 31, 14, 4 ], [ 11, 5, 1031 ] ], "classification_report": { "malignant": { "precision": 0.9545454545454546, "recall": 0.9671052631578947, "f1-score": 0.9607843137254902, "support": 912.0 }, "non_malignant": { "precision": 0.4827586206896552, "recall": 0.2857142857142857, "f1-score": 0.358974358974359, "support": 49.0 }, "non_roi": { "precision": 0.9772511848341232, "recall": 0.9847182425978988, "f1-score": 0.9809705042816366, "support": 1047.0 }, "accuracy": 0.9596613545816733, "macro avg": { "precision": 0.8048517533564109, "recall": 0.7458459304900263, "f1-score": 0.7669097256604953, "support": 2008.0 }, "weighted avg": { "precision": 0.9548718214544695, "recall": 0.9596613545816733, "f1-score": 0.9566240815190559, "support": 2008.0 } }, "n": 2008, "src_B_acc": 0.9880597014925373, "src_B_n": 670, "src_C_acc": 0.9435351882160393, "src_C_n": 1222, "src_D_acc": 0.9655172413793104, "src_D_n": 116 }, "logs": [ { "epoch": 0, "train_loss": 0.6050805728511507, "val_macro_f1": 0.6313669416249618 }, { "epoch": 1, "train_loss": 0.4691683718882709, "val_macro_f1": 0.6391362154941193 }, { "epoch": 2, "train_loss": 0.4380907803417677, "val_macro_f1": 0.6349674478966452 }, { "epoch": 3, "train_loss": 0.4171715313457398, "val_macro_f1": 0.6412973341427826 }, { "epoch": 4, "train_loss": 0.40251701405323836, "val_macro_f1": 0.6427553517132649 }, { "epoch": 5, "train_loss": 0.39060967115766976, "val_macro_f1": 0.7011805263583774 }, { "epoch": 6, "train_loss": 0.38212327688813685, "val_macro_f1": 0.6519419773403696 }, { "epoch": 7, "train_loss": 0.37417113199177016, "val_macro_f1": 0.7054602717350882 }, { "epoch": 8, "train_loss": 0.36605466801331815, "val_macro_f1": 0.7064377891399604 }, { "epoch": 9, "train_loss": 0.36623483813141444, "val_macro_f1": 0.7023099110211101 }, { "epoch": 10, "train_loss": 0.35619951244369447, "val_macro_f1": 0.7164318675792903 }, { "epoch": 11, "train_loss": 0.35203937182863393, "val_macro_f1": 0.6979816727799437 }, { "epoch": 12, "train_loss": 0.34607618999671175, "val_macro_f1": 0.6973895721863203 }, { "epoch": 13, "train_loss": 0.3474459091268213, "val_macro_f1": 0.7669097256604953 }, { "epoch": 14, "train_loss": 0.340821238390478, "val_macro_f1": 0.7266668393022071 }, { "epoch": 15, "train_loss": 0.33871670631298506, "val_macro_f1": 0.7486194607955093 }, { "epoch": 16, "train_loss": 0.33838437028615126, "val_macro_f1": 0.7351403165632654 }, { "epoch": 17, "train_loss": 0.3343004012012862, "val_macro_f1": 0.738138756627643 }, { "epoch": 18, "train_loss": 0.3341703215443281, "val_macro_f1": 0.7374761573037435 } ]}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202{ "fold": 1, "metrics": { "macro_f1": 0.7695141113129838, "accuracy": 0.8963807635101636, "balanced_acc": 0.7773867132285691, "per_class_recall": { "malignant": 0.9078947368421053, "non_malignant": 0.52, "non_roi": 0.9042654028436019 }, "per_class_precision": { "malignant": 0.891280947255113, "non_malignant": 0.4727272727272727, "non_roi": 0.9235237173281704 }, "confusion_matrix": [ [ 828, 13, 71 ], [ 16, 26, 8 ], [ 85, 16, 954 ] ], "classification_report": { "malignant": { "precision": 0.891280947255113, "recall": 0.9078947368421053, "f1-score": 0.8995111352525801, "support": 912.0 }, "non_malignant": { "precision": 0.4727272727272727, "recall": 0.52, "f1-score": 0.49523809523809526, "support": 50.0 }, "non_roi": { "precision": 0.9235237173281704, "recall": 0.9042654028436019, "f1-score": 0.9137931034482759, "support": 1055.0 }, "accuracy": 0.8963807635101636, "macro avg": { "precision": 0.7625106457701855, "recall": 0.7773867132285691, "f1-score": 0.7695141113129838, "support": 2017.0 }, "weighted avg": { "precision": 0.8977700095757296, "recall": 0.8963807635101636, "f1-score": 0.8969597343828404, "support": 2017.0 } }, "n": 2017, "src_B_acc": 0.9024725274725275, "src_B_n": 728, "src_C_acc": 0.9, "src_C_n": 1090, "src_D_acc": 0.8542713567839196, "src_D_n": 199 }, "logs": [ { "epoch": 0, "train_loss": 0.5862791400506677, "val_macro_f1": 0.5755450631329523 }, { "epoch": 1, "train_loss": 0.4544045711418547, "val_macro_f1": 0.5713652143056487 }, { "epoch": 2, "train_loss": 0.42114763300257374, "val_macro_f1": 0.5954653250218861 }, { "epoch": 3, "train_loss": 0.40235607320094013, "val_macro_f1": 0.6007487710750304 }, { "epoch": 4, "train_loss": 0.39150939412800917, "val_macro_f1": 0.5769832403360954 }, { "epoch": 5, "train_loss": 0.3808657033035005, "val_macro_f1": 0.6036042429230637 }, { "epoch": 6, "train_loss": 0.3696990492809341, "val_macro_f1": 0.6248364813435859 }, { "epoch": 7, "train_loss": 0.36666548252105713, "val_macro_f1": 0.6668540381895748 }, { "epoch": 8, "train_loss": 0.3611885702230066, "val_macro_f1": 0.6902881369239225 }, { "epoch": 9, "train_loss": 0.35643412618048165, "val_macro_f1": 0.6992416997135407 }, { "epoch": 10, "train_loss": 0.35112619055694794, "val_macro_f1": 0.6875010103798656 }, { "epoch": 11, "train_loss": 0.3442631365056057, "val_macro_f1": 0.727497245564409 }, { "epoch": 12, "train_loss": 0.34078379432518646, "val_macro_f1": 0.7472320111548997 }, { "epoch": 13, "train_loss": 0.3370276197969201, "val_macro_f1": 0.7121640775213388 }, { "epoch": 14, "train_loss": 0.3344917253431571, "val_macro_f1": 0.7411823330799567 }, { "epoch": 15, "train_loss": 0.33370923117337475, "val_macro_f1": 0.7357283607309165 }, { "epoch": 16, "train_loss": 0.33070088584584545, "val_macro_f1": 0.7581841925508507 }, { "epoch": 17, "train_loss": 0.3309394530803559, "val_macro_f1": 0.7379255692674273 }, { "epoch": 18, "train_loss": 0.3275098101313846, "val_macro_f1": 0.7521121189582995 }, { "epoch": 19, "train_loss": 0.32701652505958223, "val_macro_f1": 0.751110037134488 }, { "epoch": 20, "train_loss": 0.3248174125217347, "val_macro_f1": 0.7695141113129838 }, { "epoch": 21, "train_loss": 0.324052482487196, "val_macro_f1": 0.7411399841324112 }, { "epoch": 22, "train_loss": 0.32497002973974465, "val_macro_f1": 0.7332669142568652 }, { "epoch": 23, "train_loss": 0.32566232332195416, "val_macro_f1": 0.7649247320535896 }, { "epoch": 24, "train_loss": 0.3248545466903671, "val_macro_f1": 0.7485859760034078 } ]}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132{ "fold": 2, "metrics": { "macro_f1": 0.6957840963889788, "accuracy": 0.9300804828973843, "balanced_acc": 0.6805923645530574, "per_class_recall": { "malignant": 0.9407894736842105, "non_malignant": 0.14285714285714285, "non_roi": 0.9581304771178188 }, "per_class_precision": { "malignant": 0.9186295503211992, "non_malignant": 0.35, "non_roi": 0.9516441005802708 }, "confusion_matrix": [ [ 858, 13, 41 ], [ 33, 7, 9 ], [ 43, 0, 984 ] ], "classification_report": { "malignant": { "precision": 0.9186295503211992, "recall": 0.9407894736842105, "f1-score": 0.9295774647887324, "support": 912.0 }, "non_malignant": { "precision": 0.35, "recall": 0.14285714285714285, "f1-score": 0.2028985507246377, "support": 49.0 }, "non_roi": { "precision": 0.9516441005802708, "recall": 0.9581304771178188, "f1-score": 0.9548762736535662, "support": 1027.0 }, "accuracy": 0.9300804828973843, "macro avg": { "precision": 0.7400912169671566, "recall": 0.6805923645530574, "f1-score": 0.6957840963889788, "support": 1988.0 }, "weighted avg": { "precision": 0.9216693366141206, "recall": 0.9300804828973843, "f1-score": 0.9247357192731607, "support": 1988.0 } }, "n": 1988, "src_B_acc": 0.9372496662216289, "src_B_n": 749, "src_C_acc": 0.9491525423728814, "src_C_n": 1062, "src_D_acc": 0.7853107344632768, "src_D_n": 177 }, "logs": [ { "epoch": 0, "train_loss": 0.5996393859386444, "val_macro_f1": 0.6168862009731272 }, { "epoch": 1, "train_loss": 0.4565472359222079, "val_macro_f1": 0.6178196104563186 }, { "epoch": 2, "train_loss": 0.4275396502916775, "val_macro_f1": 0.6248186330660558 }, { "epoch": 3, "train_loss": 0.40960738121990176, "val_macro_f1": 0.6249745683158534 }, { "epoch": 4, "train_loss": 0.3959436754858683, "val_macro_f1": 0.6494977310563619 }, { "epoch": 5, "train_loss": 0.38486289138358737, "val_macro_f1": 0.6957840963889788 }, { "epoch": 6, "train_loss": 0.37389940437343383, "val_macro_f1": 0.678817239829529 }, { "epoch": 7, "train_loss": 0.3681201468857508, "val_macro_f1": 0.6567043012927218 }, { "epoch": 8, "train_loss": 0.3602101288381077, "val_macro_f1": 0.6592877140336414 }, { "epoch": 9, "train_loss": 0.35944106548078475, "val_macro_f1": 0.6518638964167419 }, { "epoch": 10, "train_loss": 0.35268214782552115, "val_macro_f1": 0.648521002542589 } ]}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147{ "fold": 3, "metrics": { "macro_f1": 0.7079227203005706, "accuracy": 0.8948905109489051, "balanced_acc": 0.7567419728865512, "per_class_recall": { "malignant": 0.8981380065717415, "non_malignant": 0.46, "non_roi": 0.9120879120879121 }, "per_class_precision": { "malignant": 0.9244644870349493, "non_malignant": 0.2072072072072072, "non_roi": 0.9422894985808893 }, "confusion_matrix": [ [ 820, 36, 57 ], [ 23, 23, 4 ], [ 44, 52, 996 ] ], "classification_report": { "malignant": { "precision": 0.9244644870349493, "recall": 0.8981380065717415, "f1-score": 0.9111111111111111, "support": 913.0 }, "non_malignant": { "precision": 0.2072072072072072, "recall": 0.46, "f1-score": 0.2857142857142857, "support": 50.0 }, "non_roi": { "precision": 0.9422894985808893, "recall": 0.9120879120879121, "f1-score": 0.9269427640763146, "support": 1092.0 }, "accuracy": 0.8948905109489051, "macro avg": { "precision": 0.6913203976076819, "recall": 0.7567419728865512, "f1-score": 0.7079227203005706, "support": 2055.0 }, "weighted avg": { "precision": 0.9164849486489539, "recall": 0.8948905109489051, "f1-score": 0.9043073757184887, "support": 2055.0 } }, "n": 2055, "src_B_acc": 0.9451327433628318, "src_B_n": 565, "src_C_acc": 0.8691507798960139, "src_C_n": 1154, "src_D_acc": 0.8988095238095238, "src_D_n": 336 }, "logs": [ { "epoch": 0, "train_loss": 0.5900231055021286, "val_macro_f1": 0.6036015909458324 }, { "epoch": 1, "train_loss": 0.4523381717205048, "val_macro_f1": 0.5951500769302872 }, { "epoch": 2, "train_loss": 0.42416903913021087, "val_macro_f1": 0.6055980862452174 }, { "epoch": 3, "train_loss": 0.4073605946302414, "val_macro_f1": 0.5989113112293961 }, { "epoch": 4, "train_loss": 0.3907556425333023, "val_macro_f1": 0.6289632425897458 }, { "epoch": 5, "train_loss": 0.38582120859622954, "val_macro_f1": 0.6662972117930456 }, { "epoch": 6, "train_loss": 0.3755620759725571, "val_macro_f1": 0.6664676396874539 }, { "epoch": 7, "train_loss": 0.36996381974220277, "val_macro_f1": 0.6939644912691444 }, { "epoch": 8, "train_loss": 0.36474189126491546, "val_macro_f1": 0.7079227203005706 }, { "epoch": 9, "train_loss": 0.35668133544921876, "val_macro_f1": 0.6683267933320051 }, { "epoch": 10, "train_loss": 0.3536795753240585, "val_macro_f1": 0.6831144762405307 }, { "epoch": 11, "train_loss": 0.34778629159927366, "val_macro_f1": 0.6698354417011821 }, { "epoch": 12, "train_loss": 0.3454807804822922, "val_macro_f1": 0.6734959027186332 }, { "epoch": 13, "train_loss": 0.3423498936891556, "val_macro_f1": 0.6685731837436523 } ]}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152{ "fold": 4, "metrics": { "macro_f1": 0.6687781793339193, "accuracy": 0.9109554777388694, "balanced_acc": 0.6718610005393971, "per_class_recall": { "malignant": 0.9079956188389924, "non_malignant": 0.1568627450980392, "non_roi": 0.9507246376811594 }, "per_class_precision": { "malignant": 0.911991199119912, "non_malignant": 0.13114754098360656, "non_roi": 0.956268221574344 }, "confusion_matrix": [ [ 829, 43, 41 ], [ 39, 8, 4 ], [ 41, 10, 984 ] ], "classification_report": { "malignant": { "precision": 0.911991199119912, "recall": 0.9079956188389924, "f1-score": 0.9099890230515917, "support": 913.0 }, "non_malignant": { "precision": 0.13114754098360656, "recall": 0.1568627450980392, "f1-score": 0.14285714285714285, "support": 51.0 }, "non_roi": { "precision": 0.956268221574344, "recall": 0.9507246376811594, "f1-score": 0.9534883720930233, "support": 1035.0 }, "accuracy": 0.9109554777388694, "macro avg": { "precision": 0.6664689872259543, "recall": 0.6718610005393971, "f1-score": 0.6687781793339193, "support": 1999.0 }, "weighted avg": { "precision": 0.9149945466313606, "recall": 0.9109554777388694, "f1-score": 0.9129395484982974, "support": 1999.0 } }, "n": 1999, "src_B_acc": 0.9550724637681159, "src_B_n": 690, "src_C_acc": 0.9076376554174067, "src_C_n": 1126, "src_D_acc": 0.7650273224043715, "src_D_n": 183 }, "logs": [ { "epoch": 0, "train_loss": 0.5923536739179066, "val_macro_f1": 0.6018129443850064 }, { "epoch": 1, "train_loss": 0.45125278357475523, "val_macro_f1": 0.6111214021762593 }, { "epoch": 2, "train_loss": 0.4290022871323994, "val_macro_f1": 0.618591138362458 }, { "epoch": 3, "train_loss": 0.4083874915090818, "val_macro_f1": 0.6203184970876795 }, { "epoch": 4, "train_loss": 0.39386624689140015, "val_macro_f1": 0.6141627751425929 }, { "epoch": 5, "train_loss": 0.3832538424739762, "val_macro_f1": 0.644181115303455 }, { "epoch": 6, "train_loss": 0.37560216183700257, "val_macro_f1": 0.6345993836622051 }, { "epoch": 7, "train_loss": 0.3700622676147355, "val_macro_f1": 0.6333246095807131 }, { "epoch": 8, "train_loss": 0.36172997963333886, "val_macro_f1": 0.6575796225353324 }, { "epoch": 9, "train_loss": 0.35636535346034975, "val_macro_f1": 0.6687781793339193 }, { "epoch": 10, "train_loss": 0.3533143174080622, "val_macro_f1": 0.6504909310551195 }, { "epoch": 11, "train_loss": 0.3467717588184372, "val_macro_f1": 0.6406098683026856 }, { "epoch": 12, "train_loss": 0.3425122916934982, "val_macro_f1": 0.6569967659752955 }, { "epoch": 13, "train_loss": 0.34202422934865195, "val_macro_f1": 0.6415643637555548 }, { "epoch": 14, "train_loss": 0.3363454665929552, "val_macro_f1": 0.6639683704649714 } ]}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351{ "backbone": "swin", "folds": [ { "fold": 0, "macro_f1": 0.7660181830579172, "accuracy": 0.9407370517928287, "balanced_acc": 0.8225023219462217, "per_class_recall": { "malignant": 0.9199561403508771, "non_malignant": 0.5714285714285714, "non_roi": 0.9761222540592168 }, "confusion_matrix": [ [ 839, 57, 16 ], [ 17, 28, 4 ], [ 10, 15, 1022 ] ], "classification_report": { "malignant": { "precision": 0.9688221709006929, "recall": 0.9199561403508771, "f1-score": 0.9437570303712036, "support": 912.0 }, "non_malignant": { "precision": 0.28, "recall": 0.5714285714285714, "f1-score": 0.37583892617449666, "support": 49.0 }, "non_roi": { "precision": 0.980806142034549, "recall": 0.9761222540592168, "f1-score": 0.9784585926280517, "support": 1047.0 }, "accuracy": 0.9407370517928287, "macro avg": { "precision": 0.7432094376450805, "recall": 0.8225023219462217, "f1-score": 0.7660181830579172, "support": 2008.0 }, "weighted avg": { "precision": 0.9582618777747035, "recall": 0.9407370517928287, "f1-score": 0.9479923633280171, "support": 2008.0 } }, "n": 2008, "src_B_acc": 0.9835820895522388, "src_B_n": 670, "src_C_acc": 0.9279869067103109, "src_C_n": 1222, "src_D_acc": 0.8275862068965517, "src_D_n": 116 }, { "fold": 1, "macro_f1": 0.7950040721460113, "accuracy": 0.9236489836390679, "balanced_acc": 0.8397642110806242, "per_class_recall": { "malignant": 0.9199561403508771, "non_malignant": 0.66, "non_roi": 0.9393364928909953 }, "confusion_matrix": [ [ 839, 25, 48 ], [ 12, 33, 5 ], [ 43, 21, 991 ] ], "classification_report": { "malignant": { "precision": 0.9384787472035794, "recall": 0.9199561403508771, "f1-score": 0.929125138427464, "support": 912.0 }, "non_malignant": { "precision": 0.4177215189873418, "recall": 0.66, "f1-score": 0.5116279069767442, "support": 50.0 }, "non_roi": { "precision": 0.9492337164750958, "recall": 0.9393364928909953, "f1-score": 0.9442591710338256, "support": 1055.0 }, "accuracy": 0.9236489836390679, "macro avg": { "precision": 0.7684779942220056, "recall": 0.8397642110806242, "f1-score": 0.7950040721460113, "support": 2017.0 }, "weighted avg": { "precision": 0.9311949748538709, "recall": 0.9236489836390679, "f1-score": 0.9266915949605208, "support": 2017.0 } }, "n": 2017, "src_B_acc": 0.929945054945055, "src_B_n": 728, "src_C_acc": 0.9339449541284404, "src_C_n": 1090, "src_D_acc": 0.8442211055276382, "src_D_n": 199 }, { "fold": 2, "macro_f1": 0.69226916519116, "accuracy": 0.9049295774647887, "balanced_acc": 0.694544557945148, "per_class_recall": { "malignant": 0.881578947368421, "non_malignant": 0.24489795918367346, "non_roi": 0.9571567672833495 }, "confusion_matrix": [ [ 804, 38, 70 ], [ 37, 12, 0 ], [ 41, 3, 983 ] ], "classification_report": { "malignant": { "precision": 0.9115646258503401, "recall": 0.881578947368421, "f1-score": 0.8963210702341137, "support": 912.0 }, "non_malignant": { "precision": 0.22641509433962265, "recall": 0.24489795918367346, "f1-score": 0.23529411764705882, "support": 49.0 }, "non_roi": { "precision": 0.9335232668566001, "recall": 0.9571567672833495, "f1-score": 0.9451923076923077, "support": 1027.0 }, "accuracy": 0.9049295774647887, "macro avg": { "precision": 0.6905009956821876, "recall": 0.694544557945148, "f1-score": 0.69226916519116, "support": 1988.0 }, "weighted avg": { "precision": 0.9060209625049698, "recall": 0.9049295774647887, "f1-score": 0.9052750139930672, "support": 1988.0 } }, "n": 1988, "src_B_acc": 0.8811748998664887, "src_B_n": 749, "src_C_acc": 0.963276836158192, "src_C_n": 1062, "src_D_acc": 0.655367231638418, "src_D_n": 177 }, { "fold": 3, "macro_f1": 0.7202694646002583, "accuracy": 0.8763990267639903, "balanced_acc": 0.8063627670856586, "per_class_recall": { "malignant": 0.8543263964950711, "non_malignant": 0.66, "non_roi": 0.9047619047619048 }, "confusion_matrix": [ [ 780, 61, 72 ], [ 16, 33, 1 ], [ 67, 37, 988 ] ], "classification_report": { "malignant": { "precision": 0.9038238702201622, "recall": 0.8543263964950711, "f1-score": 0.8783783783783784, "support": 913.0 }, "non_malignant": { "precision": 0.25190839694656486, "recall": 0.66, "f1-score": 0.36464088397790057, "support": 50.0 }, "non_roi": { "precision": 0.9311969839773798, "recall": 0.9047619047619048, "f1-score": 0.917789131444496, "support": 1092.0 }, "accuracy": 0.8763990267639903, "macro avg": { "precision": 0.6956430837147023, "recall": 0.8063627670856586, "f1-score": 0.7202694646002583, "support": 2055.0 }, "weighted avg": { "precision": 0.9025078928767081, "recall": 0.8763990267639903, "f1-score": 0.886821039024693, "support": 2055.0 } }, "n": 2055, "src_B_acc": 0.904424778761062, "src_B_n": 565, "src_C_acc": 0.8648180242634316, "src_C_n": 1154, "src_D_acc": 0.8690476190476191, "src_D_n": 336 }, { "fold": 4, "macro_f1": 0.6522278118412633, "accuracy": 0.8779389694847424, "balanced_acc": 0.6741694412048463, "per_class_recall": { "malignant": 0.8751369112814896, "non_malignant": 0.23529411764705882, "non_roi": 0.9120772946859903 }, "confusion_matrix": [ [ 799, 71, 43 ], [ 36, 12, 3 ], [ 44, 47, 944 ] ], "classification_report": { "malignant": { "precision": 0.9089874857792947, "recall": 0.8751369112814896, "f1-score": 0.8917410714285714, "support": 913.0 }, "non_malignant": { "precision": 0.09230769230769231, "recall": 0.23529411764705882, "f1-score": 0.13259668508287292, "support": 51.0 }, "non_roi": { "precision": 0.9535353535353536, "recall": 0.9120772946859903, "f1-score": 0.9323456790123457, "support": 1035.0 }, "accuracy": 0.8779389694847424, "macro avg": { "precision": 0.6516101772074469, "recall": 0.6741694412048463, "f1-score": 0.6522278118412633, "support": 1999.0 }, "weighted avg": { "precision": 0.9112167872602699, "recall": 0.8779389694847424, "f1-score": 0.8933966017665282, "support": 1999.0 } }, "n": 1999, "src_B_acc": 0.9420289855072463, "src_B_n": 690, "src_C_acc": 0.8685612788632326, "src_C_n": 1126, "src_D_acc": 0.6939890710382514, "src_D_n": 183 } ], "cv_macro_f1_mean": 0.7251577393673221, "cv_macro_f1_std": 0.05093606567397821, "cv_non_malignant_recall_mean": 0.4743241296518607, "cv_non_malignant_recall_std": 0.19398558946816546, "cv_balanced_acc_mean": 0.7674686598524998, "cv_balanced_acc_std": 0.06897937533429141}12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970{ "backbone": "swin", "test_metrics": { "macro_f1": 0.77633574568816, "accuracy": 0.9354089219330854, "balanced_acc": 0.8063037840405253, "per_class_recall": { "malignant": 0.9396728016359919, "non_malignant": 0.5283018867924528, "non_roi": 0.9509366636931311 }, "confusion_matrix": [ [ 919, 35, 24 ], [ 15, 28, 10 ], [ 40, 15, 1066 ] ], "classification_report": { "malignant": { "precision": 0.9435318275154004, "recall": 0.9396728016359919, "f1-score": 0.9415983606557377, "support": 978.0 }, "non_malignant": { "precision": 0.358974358974359, "recall": 0.5283018867924528, "f1-score": 0.42748091603053434, "support": 53.0 }, "non_roi": { "precision": 0.9690909090909091, "recall": 0.9509366636931311, "f1-score": 0.959927960378208, "support": 1121.0 }, "accuracy": 0.9354089219330854, "macro avg": { "precision": 0.7571990318602229, "recall": 0.8063037840405253, "f1-score": 0.77633574568816, "support": 2152.0 }, "weighted avg": { "precision": 0.942449199547682, "recall": 0.9354089219330854, "f1-score": 0.938484632367519, "support": 2152.0 } }, "n": 2152, "src_B_acc": 0.9759206798866855, "src_B_n": 706, "src_C_acc": 0.9276703111858705, "src_C_n": 1189, "src_D_acc": 0.8599221789883269, "src_D_n": 257 }}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351{ "backbone": "swin", "folds": [ { "fold": 0, "macro_f1": 0.7660181830579172, "accuracy": 0.9407370517928287, "balanced_acc": 0.8225023219462217, "per_class_recall": { "malignant": 0.9199561403508771, "non_malignant": 0.5714285714285714, "non_roi": 0.9761222540592168 }, "confusion_matrix": [ [ 839, 57, 16 ], [ 17, 28, 4 ], [ 10, 15, 1022 ] ], "classification_report": { "malignant": { "precision": 0.9688221709006929, "recall": 0.9199561403508771, "f1-score": 0.9437570303712036, "support": 912.0 }, "non_malignant": { "precision": 0.28, "recall": 0.5714285714285714, "f1-score": 0.37583892617449666, "support": 49.0 }, "non_roi": { "precision": 0.980806142034549, "recall": 0.9761222540592168, "f1-score": 0.9784585926280517, "support": 1047.0 }, "accuracy": 0.9407370517928287, "macro avg": { "precision": 0.7432094376450805, "recall": 0.8225023219462217, "f1-score": 0.7660181830579172, "support": 2008.0 }, "weighted avg": { "precision": 0.9582618777747035, "recall": 0.9407370517928287, "f1-score": 0.9479923633280171, "support": 2008.0 } }, "n": 2008, "src_B_acc": 0.9835820895522388, "src_B_n": 670, "src_C_acc": 0.9279869067103109, "src_C_n": 1222, "src_D_acc": 0.8275862068965517, "src_D_n": 116 }, { "fold": 1, "macro_f1": 0.7950040721460113, "accuracy": 0.9236489836390679, "balanced_acc": 0.8397642110806242, "per_class_recall": { "malignant": 0.9199561403508771, "non_malignant": 0.66, "non_roi": 0.9393364928909953 }, "confusion_matrix": [ [ 839, 25, 48 ], [ 12, 33, 5 ], [ 43, 21, 991 ] ], "classification_report": { "malignant": { "precision": 0.9384787472035794, "recall": 0.9199561403508771, "f1-score": 0.929125138427464, "support": 912.0 }, "non_malignant": { "precision": 0.4177215189873418, "recall": 0.66, "f1-score": 0.5116279069767442, "support": 50.0 }, "non_roi": { "precision": 0.9492337164750958, "recall": 0.9393364928909953, "f1-score": 0.9442591710338256, "support": 1055.0 }, "accuracy": 0.9236489836390679, "macro avg": { "precision": 0.7684779942220056, "recall": 0.8397642110806242, "f1-score": 0.7950040721460113, "support": 2017.0 }, "weighted avg": { "precision": 0.9311949748538709, "recall": 0.9236489836390679, "f1-score": 0.9266915949605208, "support": 2017.0 } }, "n": 2017, "src_B_acc": 0.929945054945055, "src_B_n": 728, "src_C_acc": 0.9339449541284404, "src_C_n": 1090, "src_D_acc": 0.8442211055276382, "src_D_n": 199 }, { "fold": 2, "macro_f1": 0.69226916519116, "accuracy": 0.9049295774647887, "balanced_acc": 0.694544557945148, "per_class_recall": { "malignant": 0.881578947368421, "non_malignant": 0.24489795918367346, "non_roi": 0.9571567672833495 }, "confusion_matrix": [ [ 804, 38, 70 ], [ 37, 12, 0 ], [ 41, 3, 983 ] ], "classification_report": { "malignant": { "precision": 0.9115646258503401, "recall": 0.881578947368421, "f1-score": 0.8963210702341137, "support": 912.0 }, "non_malignant": { "precision": 0.22641509433962265, "recall": 0.24489795918367346, "f1-score": 0.23529411764705882, "support": 49.0 }, "non_roi": { "precision": 0.9335232668566001, "recall": 0.9571567672833495, "f1-score": 0.9451923076923077, "support": 1027.0 }, "accuracy": 0.9049295774647887, "macro avg": { "precision": 0.6905009956821876, "recall": 0.694544557945148, "f1-score": 0.69226916519116, "support": 1988.0 }, "weighted avg": { "precision": 0.9060209625049698, "recall": 0.9049295774647887, "f1-score": 0.9052750139930672, "support": 1988.0 } }, "n": 1988, "src_B_acc": 0.8811748998664887, "src_B_n": 749, "src_C_acc": 0.963276836158192, "src_C_n": 1062, "src_D_acc": 0.655367231638418, "src_D_n": 177 }, { "fold": 3, "macro_f1": 0.7202694646002583, "accuracy": 0.8763990267639903, "balanced_acc": 0.8063627670856586, "per_class_recall": { "malignant": 0.8543263964950711, "non_malignant": 0.66, "non_roi": 0.9047619047619048 }, "confusion_matrix": [ [ 780, 61, 72 ], [ 16, 33, 1 ], [ 67, 37, 988 ] ], "classification_report": { "malignant": { "precision": 0.9038238702201622, "recall": 0.8543263964950711, "f1-score": 0.8783783783783784, "support": 913.0 }, "non_malignant": { "precision": 0.25190839694656486, "recall": 0.66, "f1-score": 0.36464088397790057, "support": 50.0 }, "non_roi": { "precision": 0.9311969839773798, "recall": 0.9047619047619048, "f1-score": 0.917789131444496, "support": 1092.0 }, "accuracy": 0.8763990267639903, "macro avg": { "precision": 0.6956430837147023, "recall": 0.8063627670856586, "f1-score": 0.7202694646002583, "support": 2055.0 }, "weighted avg": { "precision": 0.9025078928767081, "recall": 0.8763990267639903, "f1-score": 0.886821039024693, "support": 2055.0 } }, "n": 2055, "src_B_acc": 0.904424778761062, "src_B_n": 565, "src_C_acc": 0.8648180242634316, "src_C_n": 1154, "src_D_acc": 0.8690476190476191, "src_D_n": 336 }, { "fold": 4, "macro_f1": 0.6522278118412633, "accuracy": 0.8779389694847424, "balanced_acc": 0.6741694412048463, "per_class_recall": { "malignant": 0.8751369112814896, "non_malignant": 0.23529411764705882, "non_roi": 0.9120772946859903 }, "confusion_matrix": [ [ 799, 71, 43 ], [ 36, 12, 3 ], [ 44, 47, 944 ] ], "classification_report": { "malignant": { "precision": 0.9089874857792947, "recall": 0.8751369112814896, "f1-score": 0.8917410714285714, "support": 913.0 }, "non_malignant": { "precision": 0.09230769230769231, "recall": 0.23529411764705882, "f1-score": 0.13259668508287292, "support": 51.0 }, "non_roi": { "precision": 0.9535353535353536, "recall": 0.9120772946859903, "f1-score": 0.9323456790123457, "support": 1035.0 }, "accuracy": 0.8779389694847424, "macro avg": { "precision": 0.6516101772074469, "recall": 0.6741694412048463, "f1-score": 0.6522278118412633, "support": 1999.0 }, "weighted avg": { "precision": 0.9112167872602699, "recall": 0.8779389694847424, "f1-score": 0.8933966017665282, "support": 1999.0 } }, "n": 1999, "src_B_acc": 0.9420289855072463, "src_B_n": 690, "src_C_acc": 0.8685612788632326, "src_C_n": 1126, "src_D_acc": 0.6939890710382514, "src_D_n": 183 } ], "cv_macro_f1_mean": 0.7251577393673221, "cv_macro_f1_std": 0.05093606567397821, "cv_non_malignant_recall_mean": 0.4743241296518607, "cv_non_malignant_recall_std": 0.19398558946816546, "cv_balanced_acc_mean": 0.7674686598524998, "cv_balanced_acc_std": 0.06897937533429141}12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970{ "backbone": "swin", "test_metrics": { "macro_f1": 0.77633574568816, "accuracy": 0.9354089219330854, "balanced_acc": 0.8063037840405253, "per_class_recall": { "malignant": 0.9396728016359919, "non_malignant": 0.5283018867924528, "non_roi": 0.9509366636931311 }, "confusion_matrix": [ [ 919, 35, 24 ], [ 15, 28, 10 ], [ 40, 15, 1066 ] ], "classification_report": { "malignant": { "precision": 0.9435318275154004, "recall": 0.9396728016359919, "f1-score": 0.9415983606557377, "support": 978.0 }, "non_malignant": { "precision": 0.358974358974359, "recall": 0.5283018867924528, "f1-score": 0.42748091603053434, "support": 53.0 }, "non_roi": { "precision": 0.9690909090909091, "recall": 0.9509366636931311, "f1-score": 0.959927960378208, "support": 1121.0 }, "accuracy": 0.9354089219330854, "macro avg": { "precision": 0.7571990318602229, "recall": 0.8063037840405253, "f1-score": 0.77633574568816, "support": 2152.0 }, "weighted avg": { "precision": 0.942449199547682, "recall": 0.9354089219330854, "f1-score": 0.938484632367519, "support": 2152.0 } }, "n": 2152, "src_B_acc": 0.9759206798866855, "src_B_n": 706, "src_C_acc": 0.9276703111858705, "src_C_n": 1189, "src_D_acc": 0.8599221789883269, "src_D_n": 257 }}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352{ "backbone": "swin", "method": "plain", "folds": [ { "fold": 0, "macro_f1": 0.7636328470380195, "accuracy": 0.9586653386454184, "balanced_acc": 0.7456333347695887, "per_class_recall": { "malignant": 0.9769736842105263, "non_malignant": 0.2857142857142857, "non_roi": 0.9742120343839542 }, "confusion_matrix": [ [ 891, 13, 8 ], [ 30, 14, 5 ], [ 23, 4, 1020 ] ], "classification_report": { "malignant": { "precision": 0.9438559322033898, "recall": 0.9769736842105263, "f1-score": 0.9601293103448276, "support": 912.0 }, "non_malignant": { "precision": 0.45161290322580644, "recall": 0.2857142857142857, "f1-score": 0.35, "support": 49.0 }, "non_roi": { "precision": 0.9874152952565344, "recall": 0.9742120343839542, "f1-score": 0.9807692307692307, "support": 1047.0 }, "accuracy": 0.9586653386454184, "macro avg": { "precision": 0.7942947102285768, "recall": 0.7456333347695887, "f1-score": 0.7636328470380195, "support": 2008.0 }, "weighted avg": { "precision": 0.9545565022714877, "recall": 0.9586653386454184, "f1-score": 0.9560026472359896, "support": 2008.0 } }, "n": 2008, "src_B_acc": 0.991044776119403, "src_B_n": 670, "src_C_acc": 0.9435351882160393, "src_C_n": 1222, "src_D_acc": 0.9310344827586207, "src_D_n": 116 }, { "fold": 1, "macro_f1": 0.7857336829802138, "accuracy": 0.9201784828953892, "balanced_acc": 0.7932461683434494, "per_class_recall": { "malignant": 0.9232456140350878, "non_malignant": 0.52, "non_roi": 0.9364928909952607 }, "confusion_matrix": [ [ 842, 17, 53 ], [ 15, 26, 9 ], [ 55, 12, 988 ] ], "classification_report": { "malignant": { "precision": 0.9232456140350878, "recall": 0.9232456140350878, "f1-score": 0.9232456140350878, "support": 912.0 }, "non_malignant": { "precision": 0.4727272727272727, "recall": 0.52, "f1-score": 0.49523809523809526, "support": 50.0 }, "non_roi": { "precision": 0.940952380952381, "recall": 0.9364928909952607, "f1-score": 0.9387173396674584, "support": 1055.0 }, "accuracy": 0.9201784828953892, "macro avg": { "precision": 0.7789750892382471, "recall": 0.7932461683434494, "f1-score": 0.7857336829802138, "support": 2017.0 }, "weighted avg": { "precision": 0.9213391797427495, "recall": 0.9201784828953892, "f1-score": 0.9207281596981028, "support": 2017.0 } }, "n": 2017, "src_B_acc": 0.9162087912087912, "src_B_n": 728, "src_C_acc": 0.9293577981651376, "src_C_n": 1090, "src_D_acc": 0.8844221105527639, "src_D_n": 199 }, { "fold": 2, "macro_f1": 0.7068246241742177, "accuracy": 0.9215291750503019, "balanced_acc": 0.7139435823527381, "per_class_recall": { "malignant": 0.9407894736842105, "non_malignant": 0.2653061224489796, "non_roi": 0.9357351509250244 }, "confusion_matrix": [ [ 858, 40, 14 ], [ 31, 13, 5 ], [ 60, 6, 961 ] ], "classification_report": { "malignant": { "precision": 0.9041095890410958, "recall": 0.9407894736842105, "f1-score": 0.9220849005910801, "support": 912.0 }, "non_malignant": { "precision": 0.22033898305084745, "recall": 0.2653061224489796, "f1-score": 0.24074074074074073, "support": 49.0 }, "non_roi": { "precision": 0.9806122448979592, "recall": 0.9357351509250244, "f1-score": 0.9576482311908321, "support": 1027.0 }, "accuracy": 0.9215291750503019, "macro avg": { "precision": 0.7016869389966341, "recall": 0.7139435823527381, "f1-score": 0.7068246241742177, "support": 1988.0 }, "weighted avg": { "precision": 0.9267773294191022, "recall": 0.9215291750503019, "f1-score": 0.9236632087868943, "support": 1988.0 } }, "n": 1988, "src_B_acc": 0.9372496662216289, "src_B_n": 749, "src_C_acc": 0.948210922787194, "src_C_n": 1062, "src_D_acc": 0.6949152542372882, "src_D_n": 177 }, { "fold": 3, "macro_f1": 0.7313823143068534, "accuracy": 0.9012165450121654, "balanced_acc": 0.7527928029132848, "per_class_recall": { "malignant": 0.8696604600219058, "non_malignant": 0.44, "non_roi": 0.9487179487179487 }, "confusion_matrix": [ [ 794, 34, 85 ], [ 27, 22, 1 ], [ 41, 15, 1036 ] ], "classification_report": { "malignant": { "precision": 0.9211136890951276, "recall": 0.8696604600219058, "f1-score": 0.8946478873239436, "support": 913.0 }, "non_malignant": { "precision": 0.30985915492957744, "recall": 0.44, "f1-score": 0.36363636363636365, "support": 50.0 }, "non_roi": { "precision": 0.9233511586452763, "recall": 0.9487179487179487, "f1-score": 0.935862691960253, "support": 1092.0 }, "accuracy": 0.9012165450121654, "macro avg": { "precision": 0.7181080008899938, "recall": 0.7527928029132848, "f1-score": 0.7313823143068534, "support": 2055.0 }, "weighted avg": { "precision": 0.9074302779226141, "recall": 0.9012165450121654, "f1-score": 0.9036289045884063, "support": 2055.0 } }, "n": 2055, "src_B_acc": 0.9026548672566371, "src_B_n": 565, "src_C_acc": 0.9003466204506065, "src_C_n": 1154, "src_D_acc": 0.9017857142857143, "src_D_n": 336 }, { "fold": 4, "macro_f1": 0.6521586763136252, "accuracy": 0.9229614807403702, "balanced_acc": 0.6498121033048466, "per_class_recall": { "malignant": 0.940854326396495, "non_malignant": 0.058823529411764705, "non_roi": 0.9497584541062802 }, "confusion_matrix": [ [ 859, 18, 36 ], [ 44, 3, 4 ], [ 49, 3, 983 ] ], "classification_report": { "malignant": { "precision": 0.9023109243697479, "recall": 0.940854326396495, "f1-score": 0.9211796246648793, "support": 913.0 }, "non_malignant": { "precision": 0.125, "recall": 0.058823529411764705, "f1-score": 0.08, "support": 51.0 }, "non_roi": { "precision": 0.9608993157380255, "recall": 0.9497584541062802, "f1-score": 0.9552964042759962, "support": 1035.0 }, "accuracy": 0.9229614807403702, "macro avg": { "precision": 0.6627367467025911, "recall": 0.6498121033048466, "f1-score": 0.6521586763136252, "support": 1999.0 }, "weighted avg": { "precision": 0.9128142399892127, "recall": 0.9229614807403702, "f1-score": 0.9173830794120515, "support": 1999.0 } }, "n": 1999, "src_B_acc": 0.9550724637681159, "src_B_n": 690, "src_C_acc": 0.9227353463587922, "src_C_n": 1126, "src_D_acc": 0.8032786885245902, "src_D_n": 183 } ], "cv_macro_f1_mean": 0.7279464289625859, "cv_macro_f1_std": 0.046507217846586825, "cv_non_malignant_recall_mean": 0.313968787515006, "cv_non_malignant_recall_std": 0.15912146405458896, "cv_balanced_acc_mean": 0.7310855983367814, "cv_balanced_acc_std": 0.04784559652904662}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071{ "backbone": "swin", "method": "plain", "test_metrics": { "macro_f1": 0.7703857191557216, "accuracy": 0.9409851301115242, "balanced_acc": 0.7393163915581238, "per_class_recall": { "malignant": 0.9713701431492843, "non_malignant": 0.3018867924528302, "non_roi": 0.944692239072257 }, "confusion_matrix": [ [ 950, 4, 24 ], [ 29, 16, 8 ], [ 57, 5, 1059 ] ], "classification_report": { "malignant": { "precision": 0.916988416988417, "recall": 0.9713701431492843, "f1-score": 0.9433962264150944, "support": 978.0 }, "non_malignant": { "precision": 0.64, "recall": 0.3018867924528302, "f1-score": 0.41025641025641024, "support": 53.0 }, "non_roi": { "precision": 0.9706691109074244, "recall": 0.944692239072257, "f1-score": 0.9575045207956601, "support": 1121.0 }, "accuracy": 0.9409851301115242, "macro avg": { "precision": 0.8425525092986138, "recall": 0.7393163915581238, "f1-score": 0.7703857191557216, "support": 2152.0 }, "weighted avg": { "precision": 0.938129528411661, "recall": 0.9409851301115242, "f1-score": 0.9376150868910255, "support": 2152.0 } }, "n": 2152, "src_B_acc": 0.9759206798866855, "src_B_n": 706, "src_C_acc": 0.928511354079058, "src_C_n": 1189, "src_D_acc": 0.9027237354085603, "src_D_n": 257 }}123456789101112131415161718192021222324252627282930313233{ "backbone": "swin", "folds": [ { "fold": 0, "dice": 0.8497834205627441, "iou": 0.750920573870341 }, { "fold": 1, "dice": 0.8143344720204672, "iou": 0.7145377000172933 }, { "fold": 2, "dice": 0.870364228884379, "iou": 0.7861392299334208 }, { "fold": 3, "dice": 0.7840816279252371, "iou": 0.6590562065442404 }, { "fold": 4, "dice": 0.7999862551689148, "iou": 0.6861057996749877 } ], "cv_dice_mean": 0.8237100009123484, "cv_dice_std": 0.03186711408219781, "cv_iou_mean": 0.7193519020080567}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133{ "backbone": "swin", "val_metrics": { "dice": 0.8232711468424115, "iou": 0.719168884413583 }, "test_metrics": { "dice": 0.7576003968715668, "iou": 0.6430930495262146 }, "logs": [ { "epoch": 0, "train_loss": 0.5041272011068132, "val_dice": 0.5733120015689305, "val_iou": 0.42451895986284527 }, { "epoch": 1, "train_loss": 0.2929604666100608, "val_dice": 0.48717818941388813, "val_iou": 0.34948329840387615 }, { "epoch": 2, "train_loss": 0.2137722223997116, "val_dice": 0.7287290096282959, "val_iou": 0.5987959802150726 }, { "epoch": 3, "train_loss": 0.17334166169166565, "val_dice": 0.6785597630909511, "val_iou": 0.5466463736125401 }, { "epoch": 4, "train_loss": 0.16093644665347207, "val_dice": 0.7864872472626823, "val_iou": 0.6677127991403852 }, { "epoch": 5, "train_loss": 0.1485552622212304, "val_dice": 0.6647315791675023, "val_iou": 0.5335111149719783 }, { "epoch": 6, "train_loss": 0.13685336626238293, "val_dice": 0.7837061882019043, "val_iou": 0.667777955532074 }, { "epoch": 7, "train_loss": 0.13799234728018442, "val_dice": 0.8011538812092373, "val_iou": 0.6887794818196978 }, { "epoch": 8, "train_loss": 0.12846837358342278, "val_dice": 0.8157168626785278, "val_iou": 0.7084443143435887 }, { "epoch": 9, "train_loss": 0.11154297573698892, "val_dice": 0.8232711468424115, "val_iou": 0.719168884413583 }, { "epoch": 10, "train_loss": 0.10250899609592226, "val_dice": 0.7914002111979893, "val_iou": 0.6771222608430045 }, { "epoch": 11, "train_loss": 0.10175954964425829, "val_dice": 0.7936619945934841, "val_iou": 0.6799217547689166 }, { "epoch": 12, "train_loss": 0.0938145625922415, "val_dice": 0.8060890351022992, "val_iou": 0.6975072026252747 }, { "epoch": 13, "train_loss": 0.0874451638923751, "val_dice": 0.7825919389724731, "val_iou": 0.6678258436066764 }, { "epoch": 14, "train_loss": 0.08898295130994585, "val_dice": 0.7922060574804034, "val_iou": 0.679090142250061 }, { "epoch": 15, "train_loss": 0.08026469416088527, "val_dice": 0.817523181438446, "val_iou": 0.7122742278235299 }, { "epoch": 16, "train_loss": 0.08151406877570683, "val_dice": 0.8044465780258179, "val_iou": 0.6966900910649981 }, { "epoch": 17, "train_loss": 0.08078785157865948, "val_dice": 0.8112387146268573, "val_iou": 0.7043212354183197 }, { "epoch": 18, "train_loss": 0.07656831045945485, "val_dice": 0.7927517209734235, "val_iou": 0.6836007918630328 }, { "epoch": 19, "train_loss": 0.07466021759642495, "val_dice": 0.7776960560253688, "val_iou": 0.6658918602125985 } ]}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141{ "fold": 0, "metrics": { "dice": 0.8497834205627441, "iou": 0.750920573870341 }, "logs": [ { "epoch": 0, "train_loss": 0.5446222594806126, "val_dice": 0.7206581830978394, "val_iou": 0.5787230928738912 }, { "epoch": 1, "train_loss": 0.37816611358097624, "val_dice": 0.7209781010945638, "val_iou": 0.5784826676050822 }, { "epoch": 2, "train_loss": 0.26935599957193646, "val_dice": 0.7732507189114889, "val_iou": 0.6599312225977579 }, { "epoch": 3, "train_loss": 0.22567540832928248, "val_dice": 0.7967789173126221, "val_iou": 0.6868872245152792 }, { "epoch": 4, "train_loss": 0.17818944369043624, "val_dice": 0.772668202718099, "val_iou": 0.6466610034306844 }, { "epoch": 5, "train_loss": 0.15530299714633397, "val_dice": 0.7801168958346049, "val_iou": 0.6557818452517191 }, { "epoch": 6, "train_loss": 0.142147638968059, "val_dice": 0.82286270459493, "val_iou": 0.7108900944391886 }, { "epoch": 7, "train_loss": 0.12273618685347694, "val_dice": 0.796131432056427, "val_iou": 0.6686402161916097 }, { "epoch": 8, "train_loss": 0.12490585659231458, "val_dice": 0.8006837566693624, "val_iou": 0.6782253583272299 }, { "epoch": 9, "train_loss": 0.13513559103012085, "val_dice": 0.7948429981867472, "val_iou": 0.669242262840271 }, { "epoch": 10, "train_loss": 0.10497683073793139, "val_dice": 0.8245085875193278, "val_iou": 0.7092998027801514 }, { "epoch": 11, "train_loss": 0.10102036276033946, "val_dice": 0.8497834205627441, "val_iou": 0.750920573870341 }, { "epoch": 12, "train_loss": 0.09532852896622249, "val_dice": 0.8399245142936707, "val_iou": 0.7346445719401041 }, { "epoch": 13, "train_loss": 0.1055756009050778, "val_dice": 0.8378974000612894, "val_iou": 0.7356659770011902 }, { "epoch": 14, "train_loss": 0.09359907784632274, "val_dice": 0.8153773744901022, "val_iou": 0.6967307527860006 }, { "epoch": 15, "train_loss": 0.08557715586253575, "val_dice": 0.8385222355524699, "val_iou": 0.7273297707239786 }, { "epoch": 16, "train_loss": 0.0905990291919027, "val_dice": 0.8476954102516174, "val_iou": 0.7416049639383951 }, { "epoch": 17, "train_loss": 0.08136174721377236, "val_dice": 0.8452925483385721, "val_iou": 0.7386023004849752 }, { "epoch": 18, "train_loss": 0.08534181118011475, "val_dice": 0.8435579538345337, "val_iou": 0.7369007269541422 }, { "epoch": 19, "train_loss": 0.08582359392728124, "val_dice": 0.8428200880686442, "val_iou": 0.7359472711881002 }, { "epoch": 20, "train_loss": 0.0721271490412099, "val_dice": 0.8309236168861389, "val_iou": 0.7175435225168864 }, { "epoch": 21, "train_loss": 0.07851969450712204, "val_dice": 0.8389408191045126, "val_iou": 0.732126514116923 } ]}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165{ "fold": 1, "metrics": { "dice": 0.8143344720204672, "iou": 0.7145377000172933 }, "logs": [ { "epoch": 0, "train_loss": 0.535276540688106, "val_dice": 0.29060043891270954, "val_iou": 0.20033406962951025 }, { "epoch": 1, "train_loss": 0.37387113911764963, "val_dice": 0.6118379433949789, "val_iou": 0.49527523914972943 }, { "epoch": 2, "train_loss": 0.2482566088438034, "val_dice": 0.6941904028256735, "val_iou": 0.5593467156092325 }, { "epoch": 3, "train_loss": 0.20266000713620866, "val_dice": 0.682613730430603, "val_iou": 0.5549735128879547 }, { "epoch": 4, "train_loss": 0.17257224236215865, "val_dice": 0.7515011032422384, "val_iou": 0.6303549806276957 }, { "epoch": 5, "train_loss": 0.15749466632093703, "val_dice": 0.7897831400235494, "val_iou": 0.6777675747871399 }, { "epoch": 6, "train_loss": 0.14117851214749472, "val_dice": 0.7954723437627157, "val_iou": 0.6840346654256185 }, { "epoch": 7, "train_loss": 0.1374025589653424, "val_dice": 0.7931330601374308, "val_iou": 0.6834543347358704 }, { "epoch": 8, "train_loss": 0.12672439217567444, "val_dice": 0.7929296890894572, "val_iou": 0.6838778853416443 }, { "epoch": 9, "train_loss": 0.12151699300323214, "val_dice": 0.7405277490615845, "val_iou": 0.6267356077829996 }, { "epoch": 10, "train_loss": 0.11313744527953011, "val_dice": 0.752645472685496, "val_iou": 0.6389036575953165 }, { "epoch": 11, "train_loss": 0.10320863127708435, "val_dice": 0.7658820549647013, "val_iou": 0.6512094736099243 }, { "epoch": 12, "train_loss": 0.10260657008205142, "val_dice": 0.6982779105504354, "val_iou": 0.5825079878171285 }, { "epoch": 13, "train_loss": 0.10528536140918732, "val_dice": 0.743449330329895, "val_iou": 0.6305932998657227 }, { "epoch": 14, "train_loss": 0.10527797256197248, "val_dice": 0.7981343070665995, "val_iou": 0.6960783004760742 }, { "epoch": 15, "train_loss": 0.09031947276421956, "val_dice": 0.8143344720204672, "val_iou": 0.7145377000172933 }, { "epoch": 16, "train_loss": 0.08666814650808062, "val_dice": 0.7869327863057455, "val_iou": 0.6815213362375895 }, { "epoch": 17, "train_loss": 0.08073316514492035, "val_dice": 0.793034295241038, "val_iou": 0.6853775580724081 }, { "epoch": 18, "train_loss": 0.07688464330775398, "val_dice": 0.7858634193738302, "val_iou": 0.6822575132052103 }, { "epoch": 19, "train_loss": 0.08044026898486274, "val_dice": 0.7575587431589762, "val_iou": 0.648397167523702 }, { "epoch": 20, "train_loss": 0.07632634895188468, "val_dice": 0.7679100235303243, "val_iou": 0.6613891323407491 }, { "epoch": 21, "train_loss": 0.07183206028171948, "val_dice": 0.7846653064092001, "val_iou": 0.6825363834698995 }, { "epoch": 22, "train_loss": 0.08173616230487823, "val_dice": 0.7929137150446574, "val_iou": 0.6903482675552368 }, { "epoch": 23, "train_loss": 0.08034277175154005, "val_dice": 0.7910922368367513, "val_iou": 0.6874399383862814 }, { "epoch": 24, "train_loss": 0.0718587977545602, "val_dice": 0.7958235740661621, "val_iou": 0.6935882369677225 }, { "epoch": 25, "train_loss": 0.07105837443045207, "val_dice": 0.7958802580833435, "val_iou": 0.6947604815165201 } ]}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237{ "fold": 2, "metrics": { "dice": 0.870364228884379, "iou": 0.7861392299334208 }, "logs": [ { "epoch": 0, "train_loss": 0.53319223012243, "val_dice": 0.519702305396398, "val_iou": 0.3928756018479665 }, { "epoch": 1, "train_loss": 0.3800590378897531, "val_dice": 0.47135504086812335, "val_iou": 0.34356869260470074 }, { "epoch": 2, "train_loss": 0.2604604959487915, "val_dice": 0.6210690339406332, "val_iou": 0.4804910520712535 }, { "epoch": 3, "train_loss": 0.19222563292298997, "val_dice": 0.7420301834742228, "val_iou": 0.6080972154935201 }, { "epoch": 4, "train_loss": 0.16777987565313066, "val_dice": 0.7563832799593607, "val_iou": 0.631482720375061 }, { "epoch": 5, "train_loss": 0.15371495272432054, "val_dice": 0.7738933563232422, "val_iou": 0.6555328369140625 }, { "epoch": 6, "train_loss": 0.15673209726810455, "val_dice": 0.792340616385142, "val_iou": 0.6745807528495789 }, { "epoch": 7, "train_loss": 0.13151479193142482, "val_dice": 0.77471790711085, "val_iou": 0.656468669573466 }, { "epoch": 8, "train_loss": 0.13548390567302704, "val_dice": 0.7774608333905538, "val_iou": 0.6597265601158142 }, { "epoch": 9, "train_loss": 0.12735326055969512, "val_dice": 0.8119258483250936, "val_iou": 0.7031693855921427 }, { "epoch": 10, "train_loss": 0.11096934548446111, "val_dice": 0.8318393429120382, "val_iou": 0.7345219453175863 }, { "epoch": 11, "train_loss": 0.10046488578830447, "val_dice": 0.8118160565694174, "val_iou": 0.7067838907241821 }, { "epoch": 12, "train_loss": 0.09609509472336088, "val_dice": 0.8457108736038208, "val_iou": 0.7523373166720072 }, { "epoch": 13, "train_loss": 0.10163260783467974, "val_dice": 0.8250532547632853, "val_iou": 0.7260107199350992 }, { "epoch": 14, "train_loss": 0.10233733377286366, "val_dice": 0.8178443908691406, "val_iou": 0.7140642404556274 }, { "epoch": 15, "train_loss": 0.09752363818032402, "val_dice": 0.807724674542745, "val_iou": 0.6998606324195862 }, { "epoch": 16, "train_loss": 0.09503490264926638, "val_dice": 0.8519294659296671, "val_iou": 0.7595157623291016 }, { "epoch": 17, "train_loss": 0.09380674575056348, "val_dice": 0.8439086675643921, "val_iou": 0.7489290634791056 }, { "epoch": 18, "train_loss": 0.08262731347765241, "val_dice": 0.8531518777211508, "val_iou": 0.7592015663782755 }, { "epoch": 19, "train_loss": 0.0771312979715211, "val_dice": 0.8449994921684265, "val_iou": 0.754411538441976 }, { "epoch": 20, "train_loss": 0.07806175415005003, "val_dice": 0.850978155930837, "val_iou": 0.7582797805468241 }, { "epoch": 21, "train_loss": 0.07763289500560079, "val_dice": 0.8605126341183981, "val_iou": 0.7719221909840902 }, { "epoch": 22, "train_loss": 0.08082778538976397, "val_dice": 0.8595162431399027, "val_iou": 0.772172212600708 }, { "epoch": 23, "train_loss": 0.07791782543063164, "val_dice": 0.857081929842631, "val_iou": 0.7683384815851847 }, { "epoch": 24, "train_loss": 0.07477812894753047, "val_dice": 0.8592477242151896, "val_iou": 0.7725915114084879 }, { "epoch": 25, "train_loss": 0.07309406037841525, "val_dice": 0.8607770999272665, "val_iou": 0.7726543148358663 }, { "epoch": 26, "train_loss": 0.07613320755107063, "val_dice": 0.8577540715535482, "val_iou": 0.7680959105491638 }, { "epoch": 27, "train_loss": 0.06654731929302216, "val_dice": 0.870364228884379, "val_iou": 0.7861392299334208 }, { "epoch": 28, "train_loss": 0.06811949397836413, "val_dice": 0.8636316855748495, "val_iou": 0.7788914640744528 }, { "epoch": 29, "train_loss": 0.07041303919894355, "val_dice": 0.8642295996348063, "val_iou": 0.7798237601915995 }, { "epoch": 30, "train_loss": 0.06776665044682366, "val_dice": 0.8670064210891724, "val_iou": 0.7810513973236084 }, { "epoch": 31, "train_loss": 0.06373958183186394, "val_dice": 0.8679453134536743, "val_iou": 0.7817506790161133 }, { "epoch": 32, "train_loss": 0.07210531192166465, "val_dice": 0.8679536779721578, "val_iou": 0.781925638516744 }, { "epoch": 33, "train_loss": 0.06882151748452868, "val_dice": 0.8639173706372579, "val_iou": 0.7780290444691976 }, { "epoch": 34, "train_loss": 0.06686396790402276, "val_dice": 0.8677294452985128, "val_iou": 0.783530573050181 }, { "epoch": 35, "train_loss": 0.06399784077491079, "val_dice": 0.8680197795232137, "val_iou": 0.7845798134803772 }, { "epoch": 36, "train_loss": 0.0634835809469223, "val_dice": 0.8655549883842468, "val_iou": 0.7809713284174601 }, { "epoch": 37, "train_loss": 0.06508150537099157, "val_dice": 0.8679866592089335, "val_iou": 0.7832340796788534 } ]}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189{ "fold": 3, "metrics": { "dice": 0.7840816279252371, "iou": 0.6590562065442404 }, "logs": [ { "epoch": 0, "train_loss": 0.5644943316777548, "val_dice": 0.5566210548082987, "val_iou": 0.4075055966774623 }, { "epoch": 1, "train_loss": 0.3536250591278076, "val_dice": 0.6980775396029154, "val_iou": 0.5499440828959147 }, { "epoch": 2, "train_loss": 0.26847007622321445, "val_dice": 0.7076854805151621, "val_iou": 0.5615279873212179 }, { "epoch": 3, "train_loss": 0.23729953418175379, "val_dice": 0.7343017260233561, "val_iou": 0.5934970676898956 }, { "epoch": 4, "train_loss": 0.1935630589723587, "val_dice": 0.6923068364461263, "val_iou": 0.5507424126068751 }, { "epoch": 5, "train_loss": 0.1675262525677681, "val_dice": 0.697974423567454, "val_iou": 0.5549695442120234 }, { "epoch": 6, "train_loss": 0.156974991162618, "val_dice": 0.7563099761803945, "val_iou": 0.6220822830994924 }, { "epoch": 7, "train_loss": 0.1494820031026999, "val_dice": 0.7565544247627258, "val_iou": 0.6235723694165548 }, { "epoch": 8, "train_loss": 0.1440793884297212, "val_dice": 0.7245964507261912, "val_iou": 0.5822750926017761 }, { "epoch": 9, "train_loss": 0.11159508923689525, "val_dice": 0.7540792326132456, "val_iou": 0.6187540143728256 }, { "epoch": 10, "train_loss": 0.10060851400097211, "val_dice": 0.759496142466863, "val_iou": 0.6260019739468893 }, { "epoch": 11, "train_loss": 0.10757989684740703, "val_dice": 0.7685292263825735, "val_iou": 0.6376429001490275 }, { "epoch": 12, "train_loss": 0.11214115470647812, "val_dice": 0.7541829248269399, "val_iou": 0.6189784159262975 }, { "epoch": 13, "train_loss": 0.09366800139347713, "val_dice": 0.7661648492018381, "val_iou": 0.6341928243637085 }, { "epoch": 14, "train_loss": 0.09134461854894955, "val_dice": 0.7717945476373037, "val_iou": 0.6431201895078024 }, { "epoch": 15, "train_loss": 0.08385386814673741, "val_dice": 0.7678973774115244, "val_iou": 0.6365595062573751 }, { "epoch": 16, "train_loss": 0.07986822972695033, "val_dice": 0.771437386671702, "val_iou": 0.6408586800098419 }, { "epoch": 17, "train_loss": 0.08193644384543101, "val_dice": 0.7825932502746582, "val_iou": 0.6567094226678213 }, { "epoch": 18, "train_loss": 0.0809371384481589, "val_dice": 0.7778016626834869, "val_iou": 0.6486816704273224 }, { "epoch": 19, "train_loss": 0.08391191065311432, "val_dice": 0.7840816279252371, "val_iou": 0.6590562065442404 }, { "epoch": 20, "train_loss": 0.07560893148183823, "val_dice": 0.7670804262161255, "val_iou": 0.6369365453720093 }, { "epoch": 21, "train_loss": 0.06714590142170589, "val_dice": 0.7829350034395853, "val_iou": 0.6581146319707235 }, { "epoch": 22, "train_loss": 0.07043128584822018, "val_dice": 0.7667618989944458, "val_iou": 0.6370510856310526 }, { "epoch": 23, "train_loss": 0.07188508162895839, "val_dice": 0.7699766357739767, "val_iou": 0.6399556398391724 }, { "epoch": 24, "train_loss": 0.06978859628240268, "val_dice": 0.7827901442845663, "val_iou": 0.6584077080090841 }, { "epoch": 25, "train_loss": 0.06804146369298299, "val_dice": 0.7609393199284872, "val_iou": 0.6303514738877615 }, { "epoch": 26, "train_loss": 0.06350756188233693, "val_dice": 0.7756331861019135, "val_iou": 0.6493221521377563 }, { "epoch": 27, "train_loss": 0.06875551616152127, "val_dice": 0.7680461506048838, "val_iou": 0.6379187901814779 }, { "epoch": 28, "train_loss": 0.060310092444221176, "val_dice": 0.7805092136065165, "val_iou": 0.6552097996075948 }, { "epoch": 29, "train_loss": 0.06423936411738396, "val_dice": 0.7775281270345052, "val_iou": 0.6491693357626597 } ]}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183{ "fold": 4, "metrics": { "dice": 0.7999862551689148, "iou": 0.6861057996749877 }, "logs": [ { "epoch": 0, "train_loss": 0.5524809261163076, "val_dice": 0.5453098535537719, "val_iou": 0.40681121349334715 }, { "epoch": 1, "train_loss": 0.3338383138179779, "val_dice": 0.5516802728176117, "val_iou": 0.4054519832134247 }, { "epoch": 2, "train_loss": 0.28559809923171997, "val_dice": 0.6782130837440491, "val_iou": 0.5418269336223602 }, { "epoch": 3, "train_loss": 0.1975168983141581, "val_dice": 0.7255425453186035, "val_iou": 0.5953320026397705 }, { "epoch": 4, "train_loss": 0.17140237738688788, "val_dice": 0.7415789842605591, "val_iou": 0.6130733847618103 }, { "epoch": 5, "train_loss": 0.1679044415553411, "val_dice": 0.7423642992973327, "val_iou": 0.6120051264762878 }, { "epoch": 6, "train_loss": 0.14681103080511093, "val_dice": 0.7062652826309204, "val_iou": 0.5742332339286804 }, { "epoch": 7, "train_loss": 0.14608486741781235, "val_dice": 0.7175218343734742, "val_iou": 0.5849982023239135 }, { "epoch": 8, "train_loss": 0.12946644922097525, "val_dice": 0.7795461416244507, "val_iou": 0.6575414896011352 }, { "epoch": 9, "train_loss": 0.13823421547810236, "val_dice": 0.731498634815216, "val_iou": 0.5991742253303528 }, { "epoch": 10, "train_loss": 0.1273034488161405, "val_dice": 0.7890825629234314, "val_iou": 0.6713623523712158 }, { "epoch": 11, "train_loss": 0.10279356688261032, "val_dice": 0.7564040422439575, "val_iou": 0.6317517638206482 }, { "epoch": 12, "train_loss": 0.10121280575791995, "val_dice": 0.7652543067932129, "val_iou": 0.6448354601860047 }, { "epoch": 13, "train_loss": 0.09717905148863792, "val_dice": 0.7860966563224793, "val_iou": 0.6720147967338562 }, { "epoch": 14, "train_loss": 0.08978632961710294, "val_dice": 0.7725675821304321, "val_iou": 0.6541133642196655 }, { "epoch": 15, "train_loss": 0.09365986163417499, "val_dice": 0.7926210999488831, "val_iou": 0.6750026941299438 }, { "epoch": 16, "train_loss": 0.08689056957761447, "val_dice": 0.7841871857643128, "val_iou": 0.6643844962120056 }, { "epoch": 17, "train_loss": 0.08391456430157025, "val_dice": 0.7878318190574646, "val_iou": 0.6712075352668763 }, { "epoch": 18, "train_loss": 0.08205627277493477, "val_dice": 0.7999862551689148, "val_iou": 0.6861057996749877 }, { "epoch": 19, "train_loss": 0.07828355456391971, "val_dice": 0.7857508063316345, "val_iou": 0.6690579652786255 }, { "epoch": 20, "train_loss": 0.07488626365860303, "val_dice": 0.7917183995246887, "val_iou": 0.6778489828109742 }, { "epoch": 21, "train_loss": 0.07460324217875798, "val_dice": 0.7858131170272827, "val_iou": 0.6699602246284485 }, { "epoch": 22, "train_loss": 0.07993476837873459, "val_dice": 0.7686075568199158, "val_iou": 0.6466731190681457 }, { "epoch": 23, "train_loss": 0.0696497509876887, "val_dice": 0.7871398091316223, "val_iou": 0.6704781413078308 }, { "epoch": 24, "train_loss": 0.07370993494987488, "val_dice": 0.7812661409378052, "val_iou": 0.6637521266937256 }, { "epoch": 25, "train_loss": 0.06288281579812367, "val_dice": 0.7807499289512634, "val_iou": 0.6636662960052491 }, { "epoch": 26, "train_loss": 0.07129944860935211, "val_dice": 0.780695641040802, "val_iou": 0.6638973116874695 }, { "epoch": 27, "train_loss": 0.07376938437422116, "val_dice": 0.7922195315361023, "val_iou": 0.6767239928245544 }, { "epoch": 28, "train_loss": 0.06869624803463618, "val_dice": 0.7866302132606506, "val_iou": 0.6683720469474792 } ]}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349{ "backbone": "swin", "folds": [ { "fold": 0, "macro_f1": 0.7636328470380195, "accuracy": 0.9586653386454184, "balanced_acc": 0.7456333347695887, "per_class_recall": { "malignant": 0.9769736842105263, "non_malignant": 0.2857142857142857, "non_roi": 0.9742120343839542 }, "confusion_matrix": [ [ 891, 13, 8 ], [ 30, 14, 5 ], [ 23, 4, 1020 ] ], "classification_report": { "malignant": { "precision": 0.9438559322033898, "recall": 0.9769736842105263, "f1-score": 0.9601293103448276, "support": 912.0 }, "non_malignant": { "precision": 0.45161290322580644, "recall": 0.2857142857142857, "f1-score": 0.35, "support": 49.0 }, "non_roi": { "precision": 0.9874152952565344, "recall": 0.9742120343839542, "f1-score": 0.9807692307692307, "support": 1047.0 }, "accuracy": 0.9586653386454184, "macro avg": { "precision": 0.7942947102285768, "recall": 0.7456333347695887, "f1-score": 0.7636328470380195, "support": 2008.0 }, "weighted avg": { "precision": 0.9545565022714877, "recall": 0.9586653386454184, "f1-score": 0.9560026472359896, "support": 2008.0 } }, "n": 2008, "src_B_acc": 0.991044776119403, "src_B_n": 670, "src_C_acc": 0.9435351882160393, "src_C_n": 1222, "src_D_acc": 0.9310344827586207, "src_D_n": 116 }, { "fold": 1, "macro_f1": 0.7857336829802138, "accuracy": 0.9201784828953892, "balanced_acc": 0.7932461683434494, "per_class_recall": { "malignant": 0.9232456140350878, "non_malignant": 0.52, "non_roi": 0.9364928909952607 }, "confusion_matrix": [ [ 842, 17, 53 ], [ 15, 26, 9 ], [ 55, 12, 988 ] ], "classification_report": { "malignant": { "precision": 0.9232456140350878, "recall": 0.9232456140350878, "f1-score": 0.9232456140350878, "support": 912.0 }, "non_malignant": { "precision": 0.4727272727272727, "recall": 0.52, "f1-score": 0.49523809523809526, "support": 50.0 }, "non_roi": { "precision": 0.940952380952381, "recall": 0.9364928909952607, "f1-score": 0.9387173396674584, "support": 1055.0 }, "accuracy": 0.9201784828953892, "macro avg": { "precision": 0.7789750892382471, "recall": 0.7932461683434494, "f1-score": 0.7857336829802138, "support": 2017.0 }, "weighted avg": { "precision": 0.9213391797427495, "recall": 0.9201784828953892, "f1-score": 0.9207281596981028, "support": 2017.0 } }, "n": 2017, "src_B_acc": 0.9162087912087912, "src_B_n": 728, "src_C_acc": 0.9293577981651376, "src_C_n": 1090, "src_D_acc": 0.8844221105527639, "src_D_n": 199 }, { "fold": 2, "macro_f1": 0.7068246241742177, "accuracy": 0.9215291750503019, "balanced_acc": 0.7139435823527381, "per_class_recall": { "malignant": 0.9407894736842105, "non_malignant": 0.2653061224489796, "non_roi": 0.9357351509250244 }, "confusion_matrix": [ [ 858, 40, 14 ], [ 31, 13, 5 ], [ 60, 6, 961 ] ], "classification_report": { "malignant": { "precision": 0.9041095890410958, "recall": 0.9407894736842105, "f1-score": 0.9220849005910801, "support": 912.0 }, "non_malignant": { "precision": 0.22033898305084745, "recall": 0.2653061224489796, "f1-score": 0.24074074074074073, "support": 49.0 }, "non_roi": { "precision": 0.9806122448979592, "recall": 0.9357351509250244, "f1-score": 0.9576482311908321, "support": 1027.0 }, "accuracy": 0.9215291750503019, "macro avg": { "precision": 0.7016869389966341, "recall": 0.7139435823527381, "f1-score": 0.7068246241742177, "support": 1988.0 }, "weighted avg": { "precision": 0.9267773294191022, "recall": 0.9215291750503019, "f1-score": 0.9236632087868943, "support": 1988.0 } }, "n": 1988, "src_B_acc": 0.9372496662216289, "src_B_n": 749, "src_C_acc": 0.948210922787194, "src_C_n": 1062, "src_D_acc": 0.6949152542372882, "src_D_n": 177 }, { "fold": 3, "macro_f1": 0.7313823143068534, "accuracy": 0.9012165450121654, "balanced_acc": 0.7527928029132848, "per_class_recall": { "malignant": 0.8696604600219058, "non_malignant": 0.44, "non_roi": 0.9487179487179487 }, "confusion_matrix": [ [ 794, 34, 85 ], [ 27, 22, 1 ], [ 41, 15, 1036 ] ], "classification_report": { "malignant": { "precision": 0.9211136890951276, "recall": 0.8696604600219058, "f1-score": 0.8946478873239436, "support": 913.0 }, "non_malignant": { "precision": 0.30985915492957744, "recall": 0.44, "f1-score": 0.36363636363636365, "support": 50.0 }, "non_roi": { "precision": 0.9233511586452763, "recall": 0.9487179487179487, "f1-score": 0.935862691960253, "support": 1092.0 }, "accuracy": 0.9012165450121654, "macro avg": { "precision": 0.7181080008899938, "recall": 0.7527928029132848, "f1-score": 0.7313823143068534, "support": 2055.0 }, "weighted avg": { "precision": 0.9074302779226141, "recall": 0.9012165450121654, "f1-score": 0.9036289045884063, "support": 2055.0 } }, "n": 2055, "src_B_acc": 0.9026548672566371, "src_B_n": 565, "src_C_acc": 0.9003466204506065, "src_C_n": 1154, "src_D_acc": 0.9017857142857143, "src_D_n": 336 }, { "fold": 4, "macro_f1": 0.6521586763136252, "accuracy": 0.9229614807403702, "balanced_acc": 0.6498121033048466, "per_class_recall": { "malignant": 0.940854326396495, "non_malignant": 0.058823529411764705, "non_roi": 0.9497584541062802 }, "confusion_matrix": [ [ 859, 18, 36 ], [ 44, 3, 4 ], [ 49, 3, 983 ] ], "classification_report": { "malignant": { "precision": 0.9023109243697479, "recall": 0.940854326396495, "f1-score": 0.9211796246648793, "support": 913.0 }, "non_malignant": { "precision": 0.125, "recall": 0.058823529411764705, "f1-score": 0.08, "support": 51.0 }, "non_roi": { "precision": 0.9608993157380255, "recall": 0.9497584541062802, "f1-score": 0.9552964042759962, "support": 1035.0 }, "accuracy": 0.9229614807403702, "macro avg": { "precision": 0.6627367467025911, "recall": 0.6498121033048466, "f1-score": 0.6521586763136252, "support": 1999.0 }, "weighted avg": { "precision": 0.9128142399892127, "recall": 0.9229614807403702, "f1-score": 0.9173830794120515, "support": 1999.0 } }, "n": 1999, "src_B_acc": 0.9550724637681159, "src_B_n": 690, "src_C_acc": 0.9227353463587922, "src_C_n": 1126, "src_D_acc": 0.8032786885245902, "src_D_n": 183 } ], "cv_macro_f1_mean": 0.7279464289625859, "cv_macro_f1_std": 0.046507217846586825, "cv_non_malignant_recall_mean": 0.313968787515006, "cv_non_malignant_recall_std": 0.15912146405458896}12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517{ "backbone": "swin", "val_metrics": { "macro_f1": 0.7502886506230896, "accuracy": 0.9197960129809921, "balanced_acc": 0.7604949457422009, "per_class_recall": { "malignant": 0.9425641025641026, "non_malignant": 0.41509433962264153, "non_roi": 0.9238263950398583 }, "confusion_matrix": [ [ 919, 17, 39 ], [ 25, 22, 6 ], [ 63, 23, 1043 ] ], "classification_report": { "malignant": { "precision": 0.9126117179741807, "recall": 0.9425641025641026, "f1-score": 0.9273461150353178, "support": 975.0 }, "non_malignant": { "precision": 0.3548387096774194, "recall": 0.41509433962264153, "f1-score": 0.3826086956521739, "support": 53.0 }, "non_roi": { "precision": 0.9586397058823529, "recall": 0.9238263950398583, "f1-score": 0.9409111411817772, "support": 1129.0 }, "accuracy": 0.9197960129809921, "macro avg": { "precision": 0.7420300445113176, "recall": 0.7604949457422009, "f1-score": 0.7502886506230896, "support": 2157.0 }, "weighted avg": { "precision": 0.9229981940560528, "recall": 0.9197960129809921, "f1-score": 0.9210613822082645, "support": 2157.0 } }, "n": 2157, "src_B_acc": 0.970917225950783, "src_B_n": 447, "src_C_acc": 0.8880718954248366, "src_C_n": 1224, "src_D_acc": 0.9526748971193416, "src_D_n": 486 }, "test_metrics": { "macro_f1": 0.7703857191557216, "accuracy": 0.9409851301115242, "balanced_acc": 0.7393163915581238, "per_class_recall": { "malignant": 0.9713701431492843, "non_malignant": 0.3018867924528302, "non_roi": 0.944692239072257 }, "confusion_matrix": [ [ 950, 4, 24 ], [ 29, 16, 8 ], [ 57, 5, 1059 ] ], "classification_report": { "malignant": { "precision": 0.916988416988417, "recall": 0.9713701431492843, "f1-score": 0.9433962264150944, "support": 978.0 }, "non_malignant": { "precision": 0.64, "recall": 0.3018867924528302, "f1-score": 0.41025641025641024, "support": 53.0 }, "non_roi": { "precision": 0.9706691109074244, "recall": 0.944692239072257, "f1-score": 0.9575045207956601, "support": 1121.0 }, "accuracy": 0.9409851301115242, "macro avg": { "precision": 0.8425525092986138, "recall": 0.7393163915581238, "f1-score": 0.7703857191557216, "support": 2152.0 }, "weighted avg": { "precision": 0.938129528411661, "recall": 0.9409851301115242, "f1-score": 0.9376150868910255, "support": 2152.0 } }, "n": 2152, "src_B_acc": 0.9759206798866855, "src_B_n": 706, "src_C_acc": 0.928511354079058, "src_C_n": 1189, "src_D_acc": 0.9027237354085603, "src_D_n": 257 }, "test_predictions": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 2, 0, 0, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 0, 0, 2, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2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2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 0, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 2 ], "logs": [ { "epoch": 0, "train_loss": 0.4570459028717819, "val_macro_f1": 0.6337642132654476 }, { "epoch": 1, "train_loss": 0.394895793526036, "val_macro_f1": 0.7020904660503801 }, { "epoch": 2, "train_loss": 0.38058333943603906, "val_macro_f1": 0.7249753884750095 }, { "epoch": 3, "train_loss": 0.3687762923681053, "val_macro_f1": 0.7494575587517662 }, { "epoch": 4, "train_loss": 0.3539580987517241, "val_macro_f1": 0.6797495442880495 }, { "epoch": 5, "train_loss": 0.3458636137330608, "val_macro_f1": 0.726350601133813 }, { "epoch": 6, "train_loss": 0.33684928383037543, "val_macro_f1": 0.7273006201719072 }, { "epoch": 7, "train_loss": 0.33266169781897476, "val_macro_f1": 0.7317964748355741 }, { "epoch": 8, "train_loss": 0.32801037552250417, "val_macro_f1": 0.7502886506230896 }, { "epoch": 9, "train_loss": 0.3233905104315205, "val_macro_f1": 0.6926381806745477 }, { "epoch": 10, "train_loss": 0.3195636650179602, "val_macro_f1": 0.6759914796162486 }, { "epoch": 11, "train_loss": 0.3156510266908415, "val_macro_f1": 0.7273068699516476 }, { "epoch": 12, "train_loss": 0.31479699064971534, "val_macro_f1": 0.724267219270521 }, { "epoch": 13, "train_loss": 0.3067380816313871, "val_macro_f1": 0.7105670236473708 } ]}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112{ "fold": 0, "metrics": { "macro_f1": 0.7636328470380195, "accuracy": 0.9586653386454184, "balanced_acc": 0.7456333347695887, "per_class_recall": { "malignant": 0.9769736842105263, "non_malignant": 0.2857142857142857, "non_roi": 0.9742120343839542 }, "confusion_matrix": [ [ 891, 13, 8 ], [ 30, 14, 5 ], [ 23, 4, 1020 ] ], "classification_report": { "malignant": { "precision": 0.9438559322033898, "recall": 0.9769736842105263, "f1-score": 0.9601293103448276, "support": 912.0 }, "non_malignant": { "precision": 0.45161290322580644, "recall": 0.2857142857142857, "f1-score": 0.35, "support": 49.0 }, "non_roi": { "precision": 0.9874152952565344, "recall": 0.9742120343839542, "f1-score": 0.9807692307692307, "support": 1047.0 }, "accuracy": 0.9586653386454184, "macro avg": { "precision": 0.7942947102285768, "recall": 0.7456333347695887, "f1-score": 0.7636328470380195, "support": 2008.0 }, "weighted avg": { "precision": 0.9545565022714877, "recall": 0.9586653386454184, "f1-score": 0.9560026472359896, "support": 2008.0 } }, "n": 2008, "src_B_acc": 0.991044776119403, "src_B_n": 670, "src_C_acc": 0.9435351882160393, "src_C_n": 1222, "src_D_acc": 0.9310344827586207, "src_D_n": 116 }, "logs": [ { "epoch": 0, "train_loss": 0.4929635787010193, "val_macro_f1": 0.6471185247514092 }, { "epoch": 1, "train_loss": 0.4068743224143982, "val_macro_f1": 0.672029039895627 }, { "epoch": 2, "train_loss": 0.38642153549194336, "val_macro_f1": 0.7636328470380195 }, { "epoch": 3, "train_loss": 0.37608554458618165, "val_macro_f1": 0.6929870535811765 }, { "epoch": 4, "train_loss": 0.3536324541568756, "val_macro_f1": 0.681863020478044 }, { "epoch": 5, "train_loss": 0.3438236377239227, "val_macro_f1": 0.7297394494154753 }, { "epoch": 6, "train_loss": 0.346241375207901, "val_macro_f1": 0.7207562981488446 }, { "epoch": 7, "train_loss": 0.3320102198123932, "val_macro_f1": 0.7377554222541036 } ]}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147{ "fold": 1, "metrics": { "macro_f1": 0.7857336829802138, "accuracy": 0.9201784828953892, "balanced_acc": 0.7932461683434494, "per_class_recall": { "malignant": 0.9232456140350878, "non_malignant": 0.52, "non_roi": 0.9364928909952607 }, "confusion_matrix": [ [ 842, 17, 53 ], [ 15, 26, 9 ], [ 55, 12, 988 ] ], "classification_report": { "malignant": { "precision": 0.9232456140350878, "recall": 0.9232456140350878, "f1-score": 0.9232456140350878, "support": 912.0 }, "non_malignant": { "precision": 0.4727272727272727, "recall": 0.52, "f1-score": 0.49523809523809526, "support": 50.0 }, "non_roi": { "precision": 0.940952380952381, "recall": 0.9364928909952607, "f1-score": 0.9387173396674584, "support": 1055.0 }, "accuracy": 0.9201784828953892, "macro avg": { "precision": 0.7789750892382471, "recall": 0.7932461683434494, "f1-score": 0.7857336829802138, "support": 2017.0 }, "weighted avg": { "precision": 0.9213391797427495, "recall": 0.9201784828953892, "f1-score": 0.9207281596981028, "support": 2017.0 } }, "n": 2017, "src_B_acc": 0.9162087912087912, "src_B_n": 728, "src_C_acc": 0.9293577981651376, "src_C_n": 1090, "src_D_acc": 0.8844221105527639, "src_D_n": 199 }, "logs": [ { "epoch": 0, "train_loss": 0.4599347586631775, "val_macro_f1": 0.7110064216144951 }, { "epoch": 1, "train_loss": 0.3820734360218048, "val_macro_f1": 0.7088128237128926 }, { "epoch": 2, "train_loss": 0.3764275577068329, "val_macro_f1": 0.7158825082060302 }, { "epoch": 3, "train_loss": 0.35431050968170164, "val_macro_f1": 0.7225737057990355 }, { "epoch": 4, "train_loss": 0.34666806292533875, "val_macro_f1": 0.7318496707986267 }, { "epoch": 5, "train_loss": 0.3432994258403778, "val_macro_f1": 0.6782823865881005 }, { "epoch": 6, "train_loss": 0.34389158844947815, "val_macro_f1": 0.7565811238670507 }, { "epoch": 7, "train_loss": 0.33427645421028135, "val_macro_f1": 0.7391608629733692 }, { "epoch": 8, "train_loss": 0.3203038873672485, "val_macro_f1": 0.7376647871032472 }, { "epoch": 9, "train_loss": 0.3243390636444092, "val_macro_f1": 0.7857336829802138 }, { "epoch": 10, "train_loss": 0.3185851831436157, "val_macro_f1": 0.7278906575939734 }, { "epoch": 11, "train_loss": 0.3140652894973755, "val_macro_f1": 0.731804225656243 }, { "epoch": 12, "train_loss": 0.3110732009410858, "val_macro_f1": 0.7269125678826401 }, { "epoch": 13, "train_loss": 0.3060138030052185, "val_macro_f1": 0.7376388638792327 }, { "epoch": 14, "train_loss": 0.3060260980129242, "val_macro_f1": 0.7353778145439502 } ]}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142{ "fold": 2, "metrics": { "macro_f1": 0.7068246241742177, "accuracy": 0.9215291750503019, "balanced_acc": 0.7139435823527381, "per_class_recall": { "malignant": 0.9407894736842105, "non_malignant": 0.2653061224489796, "non_roi": 0.9357351509250244 }, "confusion_matrix": [ [ 858, 40, 14 ], [ 31, 13, 5 ], [ 60, 6, 961 ] ], "classification_report": { "malignant": { "precision": 0.9041095890410958, "recall": 0.9407894736842105, "f1-score": 0.9220849005910801, "support": 912.0 }, "non_malignant": { "precision": 0.22033898305084745, "recall": 0.2653061224489796, "f1-score": 0.24074074074074073, "support": 49.0 }, "non_roi": { "precision": 0.9806122448979592, "recall": 0.9357351509250244, "f1-score": 0.9576482311908321, "support": 1027.0 }, "accuracy": 0.9215291750503019, "macro avg": { "precision": 0.7016869389966341, "recall": 0.7139435823527381, "f1-score": 0.7068246241742177, "support": 1988.0 }, "weighted avg": { "precision": 0.9267773294191022, "recall": 0.9215291750503019, "f1-score": 0.9236632087868943, "support": 1988.0 } }, "n": 1988, "src_B_acc": 0.9372496662216289, "src_B_n": 749, "src_C_acc": 0.948210922787194, "src_C_n": 1062, "src_D_acc": 0.6949152542372882, "src_D_n": 177 }, "logs": [ { "epoch": 0, "train_loss": 0.46994291009410977, "val_macro_f1": 0.6314293197042745 }, { "epoch": 1, "train_loss": 0.3910994425652519, "val_macro_f1": 0.6841595848508654 }, { "epoch": 2, "train_loss": 0.3862752379879119, "val_macro_f1": 0.621349098191264 }, { "epoch": 3, "train_loss": 0.3657947563462787, "val_macro_f1": 0.6576472530433962 }, { "epoch": 4, "train_loss": 0.359451976560411, "val_macro_f1": 0.6537840140736347 }, { "epoch": 5, "train_loss": 0.3537936532308185, "val_macro_f1": 0.6984524412070402 }, { "epoch": 6, "train_loss": 0.3429102547585018, "val_macro_f1": 0.6601593141358699 }, { "epoch": 7, "train_loss": 0.33430976645340993, "val_macro_f1": 0.6451248477023631 }, { "epoch": 8, "train_loss": 0.325911442202235, "val_macro_f1": 0.7068246241742177 }, { "epoch": 9, "train_loss": 0.32440197183972314, "val_macro_f1": 0.6751451607275314 }, { "epoch": 10, "train_loss": 0.31577868877895293, "val_macro_f1": 0.669800264990573 }, { "epoch": 11, "train_loss": 0.3193944316534769, "val_macro_f1": 0.6657873112379983 }, { "epoch": 12, "train_loss": 0.3109848373939121, "val_macro_f1": 0.6569176332103991 }, { "epoch": 13, "train_loss": 0.30700282918082344, "val_macro_f1": 0.6765540139186316 } ]}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162{ "fold": 3, "metrics": { "macro_f1": 0.7313823143068534, "accuracy": 0.9012165450121654, "balanced_acc": 0.7527928029132848, "per_class_recall": { "malignant": 0.8696604600219058, "non_malignant": 0.44, "non_roi": 0.9487179487179487 }, "confusion_matrix": [ [ 794, 34, 85 ], [ 27, 22, 1 ], [ 41, 15, 1036 ] ], "classification_report": { "malignant": { "precision": 0.9211136890951276, "recall": 0.8696604600219058, "f1-score": 0.8946478873239436, "support": 913.0 }, "non_malignant": { "precision": 0.30985915492957744, "recall": 0.44, "f1-score": 0.36363636363636365, "support": 50.0 }, "non_roi": { "precision": 0.9233511586452763, "recall": 0.9487179487179487, "f1-score": 0.935862691960253, "support": 1092.0 }, "accuracy": 0.9012165450121654, "macro avg": { "precision": 0.7181080008899938, "recall": 0.7527928029132848, "f1-score": 0.7313823143068534, "support": 2055.0 }, "weighted avg": { "precision": 0.9074302779226141, "recall": 0.9012165450121654, "f1-score": 0.9036289045884063, "support": 2055.0 } }, "n": 2055, "src_B_acc": 0.9026548672566371, "src_B_n": 565, "src_C_acc": 0.9003466204506065, "src_C_n": 1154, "src_D_acc": 0.9017857142857143, "src_D_n": 336 }, "logs": [ { "epoch": 0, "train_loss": 0.48113818287849425, "val_macro_f1": 0.6260072999482632 }, { "epoch": 1, "train_loss": 0.40316140627861025, "val_macro_f1": 0.6329441530355094 }, { "epoch": 2, "train_loss": 0.37140513253211976, "val_macro_f1": 0.7056012674662702 }, { "epoch": 3, "train_loss": 0.3690969798564911, "val_macro_f1": 0.6552105309775969 }, { "epoch": 4, "train_loss": 0.35558233880996704, "val_macro_f1": 0.6888972169946185 }, { "epoch": 5, "train_loss": 0.34434335327148435, "val_macro_f1": 0.6623008593179436 }, { "epoch": 6, "train_loss": 0.3437868695259094, "val_macro_f1": 0.7038207214812054 }, { "epoch": 7, "train_loss": 0.33506329679489133, "val_macro_f1": 0.7056847142939514 }, { "epoch": 8, "train_loss": 0.3252559950351715, "val_macro_f1": 0.7097718416321409 }, { "epoch": 9, "train_loss": 0.31754529213905336, "val_macro_f1": 0.6875777031522615 }, { "epoch": 10, "train_loss": 0.32203039598464966, "val_macro_f1": 0.7036444004988875 }, { "epoch": 11, "train_loss": 0.31389994311332703, "val_macro_f1": 0.7163713379998212 }, { "epoch": 12, "train_loss": 0.3123688974380493, "val_macro_f1": 0.7313823143068534 }, { "epoch": 13, "train_loss": 0.3086388671398163, "val_macro_f1": 0.7252164752717541 }, { "epoch": 14, "train_loss": 0.30900491547584535, "val_macro_f1": 0.717928530342249 }, { "epoch": 15, "train_loss": 0.30402742671966554, "val_macro_f1": 0.725063806682733 }, { "epoch": 16, "train_loss": 0.30102282428741456, "val_macro_f1": 0.7260007752335208 }, { "epoch": 17, "train_loss": 0.2985672166347504, "val_macro_f1": 0.7106382134820762 } ]}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112{ "fold": 4, "metrics": { "macro_f1": 0.6521586763136252, "accuracy": 0.9229614807403702, "balanced_acc": 0.6498121033048466, "per_class_recall": { "malignant": 0.940854326396495, "non_malignant": 0.058823529411764705, "non_roi": 0.9497584541062802 }, "confusion_matrix": [ [ 859, 18, 36 ], [ 44, 3, 4 ], [ 49, 3, 983 ] ], "classification_report": { "malignant": { "precision": 0.9023109243697479, "recall": 0.940854326396495, "f1-score": 0.9211796246648793, "support": 913.0 }, "non_malignant": { "precision": 0.125, "recall": 0.058823529411764705, "f1-score": 0.08, "support": 51.0 }, "non_roi": { "precision": 0.9608993157380255, "recall": 0.9497584541062802, "f1-score": 0.9552964042759962, "support": 1035.0 }, "accuracy": 0.9229614807403702, "macro avg": { "precision": 0.6627367467025911, "recall": 0.6498121033048466, "f1-score": 0.6521586763136252, "support": 1999.0 }, "weighted avg": { "precision": 0.9128142399892127, "recall": 0.9229614807403702, "f1-score": 0.9173830794120515, "support": 1999.0 } }, "n": 1999, "src_B_acc": 0.9550724637681159, "src_B_n": 690, "src_C_acc": 0.9227353463587922, "src_C_n": 1126, "src_D_acc": 0.8032786885245902, "src_D_n": 183 }, "logs": [ { "epoch": 0, "train_loss": 0.47153146446697297, "val_macro_f1": 0.6253741106462252 }, { "epoch": 1, "train_loss": 0.38950383521261667, "val_macro_f1": 0.634759710371065 }, { "epoch": 2, "train_loss": 0.3723510449367856, "val_macro_f1": 0.6521586763136252 }, { "epoch": 3, "train_loss": 0.3708163516388999, "val_macro_f1": 0.6315619357093144 }, { "epoch": 4, "train_loss": 0.3565000023633715, "val_macro_f1": 0.6374541959303275 }, { "epoch": 5, "train_loss": 0.34137669631413053, "val_macro_f1": 0.6353387008099238 }, { "epoch": 6, "train_loss": 0.3367314050121913, "val_macro_f1": 0.623599383782519 }, { "epoch": 7, "train_loss": 0.32387049472521223, "val_macro_f1": 0.6165799728004868 } ]}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352"""Stage 1 v1 final: Plain classification (5-fold CV + final) with inline logits emission.
Backbones: convnext (ConvNeXt-Tiny), swin (Swin-Tiny), mamba (MambaVision-T), resnet (ResNet-50).Resize: letterbox (aspect-ratio preserved) or squeeze (T.Resize((384,384))).
Pipeline per backbone: 1. 5-fold CV: train plain model on 4 folds, eval on held-out fold β save fold checkpoint 2. Final: train plain model on all train data, eval on test β save final checkpoint 3. Emit plain OOF logits (all 5 folds' val predictions) β save plain_{bb}_oof.npz 4. Emit plain test logits β save plain_{bb}_test.npz
All in one pass. No separate emit step needed.
Usage (DDP): torchrun --nproc_per_node=2 train_cls.py --backbone mamba --resize letterbox python train_cls.py --backbone mamba --resize letterbox # single GPU"""import argparseimport datetimeimport jsonimport osimport pathlibimport numpy as npimport torchimport torch.distributed as distimport torch.nn as nnfrom torch.nn.parallel import DistributedDataParallel as DDPfrom torch.utils.data import DataLoader, Subset, DistributedSamplerfrom sklearn.metrics import (f1_score, accuracy_score, balanced_accuracy_score, confusion_matrix, classification_report)import timm
ROOT = pathlib.Path(__file__).parentNUM_CLASSES = 3SIZE = 384BATCH = 32EPOCHS = 25LR = 1e-4WD = 0.05PATIENCE = 5SEED = 42LABEL_SMOOTH = 0.1BACKBONES = ["convnext", "swin", "mamba", "resnet"]
def get_dataset_module(resize): if resize == "letterbox": import dataset_f as D elif resize == "squeeze": import dataset_f_squeeze as D else: raise ValueError(resize) return D
def get_paths(backbone, resize): """Return (models_dir, results_dir, logits_dir) for a backboneΓresize combo.""" return (ROOT / "models" / resize / backbone, ROOT / "results" / resize / backbone, ROOT / "logits" / resize / backbone)
def setup(): if "RANK" not in os.environ: return 0, 1, 0 # single-GPU fallback rank = int(os.environ["RANK"]); world = int(os.environ["WORLD_SIZE"]) local = int(os.environ["LOCAL_RANK"]) torch.cuda.set_device(local) dist.init_process_group(backend="nccl", timeout=datetime.timedelta(seconds=1800), device_id=torch.device("cuda", local)) return rank, world, local
def cleanup(): if dist.is_initialized(): dist.destroy_process_group()
def is_main(): return (not dist.is_initialized()) or dist.get_rank() == 0
def log(*a): if is_main(): print(*a, flush=True)
def set_seed(s): torch.manual_seed(s); np.random.seed(s) import random; random.seed(s)
def build_model(backbone): if backbone == "convnext": return timm.create_model("convnext_tiny", pretrained=True, num_classes=NUM_CLASSES, drop_rate=0.1) if backbone == "swin": return timm.create_model("swin_tiny_patch4_window7_224", pretrained=True, img_size=SIZE, num_classes=NUM_CLASSES, drop_rate=0.1) if backbone == "resnet": return timm.create_model("resnet50", pretrained=True, num_classes=NUM_CLASSES, drop_rate=0.1) if backbone == "mamba": from mambavision.models.mamba_vision import mamba_vision_T return mamba_vision_T(pretrained=True, num_classes=NUM_CLASSES, drop_rate=0.1) raise ValueError(backbone)
def compute_per_class_precision(true, pred, names): true = np.asarray(true); pred = np.asarray(pred) result = {} for i, name in enumerate(names): tp = ((pred == i) & (true == i)).sum() fp = ((pred == i) & (true != i)).sum() result[name] = float(tp / max(tp + fp, 1)) return result
@torch.no_grad()def evaluate(model, loader, device, names): model.eval() all_pred, all_true, all_src = [], [], [] for x, y, src, img in loader: x = x.to(device, non_blocking=True) logits = model(x) pred = logits.argmax(1).cpu().numpy() all_pred.extend(pred.tolist()) all_true.extend((y.numpy() if torch.is_tensor(y) else np.array(y)).tolist()) all_src.extend(list(src)) all_pred = np.array(all_pred); all_true = np.array(all_true); all_src = np.array(all_src) metrics = { "macro_f1": float(f1_score(all_true, all_pred, average="macro", labels=list(range(NUM_CLASSES)), zero_division=0)), "accuracy": float(accuracy_score(all_true, all_pred)), "balanced_acc": float(balanced_accuracy_score(all_true, all_pred)), "per_class_recall": {names[i]: float(((all_true == i) & (all_pred == i)).sum() / max((all_true == i).sum(), 1)) for i in range(NUM_CLASSES)}, "per_class_precision": compute_per_class_precision(all_true, all_pred, names), "confusion_matrix": confusion_matrix(all_true, all_pred, labels=list(range(NUM_CLASSES))).tolist(), "classification_report": classification_report(all_true, all_pred, labels=list(range(NUM_CLASSES)), target_names=names, output_dict=True, zero_division=0), "n": len(all_pred), } for s in ["B", "C", "D"]: m = all_src == s if m.sum() > 0: metrics[f"src_{s}_acc"] = float(accuracy_score(all_true[m], all_pred[m])) metrics[f"src_{s}_n"] = int(m.sum()) return metrics, all_pred, all_true
@torch.no_grad()def collect_logits(model, loader, device): """Collect raw logits, labels, and sources from a dataloader.""" model.eval() L, Y, S = [], [], [] for x, y, src, _img in loader: x = x.to(device, non_blocking=True) logits = model(x).float().cpu().numpy() L.append(logits) Y.append(y.numpy() if torch.is_tensor(y) else np.asarray(y)) S.append(np.asarray(src)) return (np.concatenate(L), np.concatenate(Y).astype(np.int64), np.concatenate(S).astype("<U8"))
def train_one(backbone, train_ds, val_ds, ckpt_path, device, rank, world, local_rank): sampler = DistributedSampler(train_ds, num_replicas=world, rank=rank, shuffle=True, drop_last=True) if world > 1 \ else None loader_kwargs = dict(batch_size=BATCH, num_workers=4, pin_memory=True, persistent_workers=True, drop_last=True) if world > 1: loader_kwargs["sampler"] = sampler else: loader_kwargs["shuffle"] = True loader = DataLoader(train_ds, **loader_kwargs) val_loader = DataLoader(val_ds, batch_size=BATCH, shuffle=False, num_workers=4, pin_memory=True, persistent_workers=True) if is_main() else None
model = build_model(backbone).to(device) if world > 1: model = DDP(model, device_ids=[local_rank], output_device=local_rank, gradient_as_bucket_view=True, bucket_cap_mb=25, find_unused_parameters=(backbone == "mamba")) opt = torch.optim.AdamW(model.parameters(), lr=LR, weight_decay=WD) sched = torch.optim.lr_scheduler.CosineAnnealingLR(opt, T_max=EPOCHS) criterion = nn.CrossEntropyLoss(label_smoothing=LABEL_SMOOTH)
best_f1 = -1.0; best_metrics = None; best_state = None; no_improve = 0; logs = [] for ep in range(EPOCHS): if sampler is not None: sampler.set_epoch(ep) model.train(); tot = 0.0; nb = 0 for x, y, _, _ in loader: x = x.to(device, non_blocking=True); y = y.to(device, non_blocking=True) opt.zero_grad(set_to_none=True) with torch.amp.autocast("cuda", dtype=torch.bfloat16): loss = criterion(model(x), y) loss.backward(); opt.step() tot += loss.item(); nb += 1 sched.step() if is_main(): m = model.module if world > 1 else model vm, _, _ = evaluate(m, val_loader, device, D.TARGET3_NAMES) lg = {"epoch": ep, "train_loss": tot / max(nb, 1), "val_macro_f1": vm["macro_f1"]} logs.append(lg) log(f" ep{ep}: loss={lg['train_loss']:.4f} val_f1={vm['macro_f1']:.4f}") if vm["macro_f1"] > best_f1: best_f1 = vm["macro_f1"]; best_metrics = vm best_state = {k: v.cpu() for k, v in m.state_dict().items()}; no_improve = 0 else: no_improve += 1 if world > 1: flag = torch.tensor([no_improve if is_main() else 0, best_f1 if is_main() else 0.0], device=device) dist.all_reduce(flag, op=dist.ReduceOp.MAX) no_improve = int(flag[0].item()); best_f1 = float(flag[1].item()) if no_improve >= PATIENCE: log(f" early stop at ep{ep}"); break if is_main() and best_state is not None: torch.save(best_state, ckpt_path) if world > 1: dist.barrier() return best_metrics, logs
def load_plain_model(backbone, ckpt_path, device): model = build_model(backbone).to(device) state = torch.load(ckpt_path, map_location=device, weights_only=False) model.load_state_dict(state) model.eval() return model
def run_cv(backbone, resize, device, rank, world, local_rank): D = get_dataset_module(resize) models_dir, results_dir, logits_dir = get_paths(backbone, resize) for p in (models_dir, results_dir, logits_dir): p.mkdir(parents=True, exist_ok=True)
log(f"\n=== target3 CV ({resize}): {backbone} ===") fold_metrics = [] base_train = D.FTarget3Dataset("train", fold=None, train=True, size=SIZE) base_val = D.FTarget3Dataset("train", fold=None, train=False, size=SIZE) all_cv = base_train.ds["cv_fold"] oof_logits = np.zeros((len(base_train), NUM_CLASSES), dtype=np.float32)
for fold in range(5): log(f"-- fold {fold} --") set_seed(SEED) tr_idx = [i for i, c in enumerate(all_cv) if c != fold] va_idx = [i for i, c in enumerate(all_cv) if c == fold] tr_sub = Subset(base_train, tr_idx) va_sub = Subset(base_val, va_idx) ckpt = models_dir / f"target3_{backbone}_fold{fold}.pt" m, logs = train_one(backbone, tr_sub, va_sub, ckpt, device, rank, world, local_rank) if is_main(): fold_metrics.append({"fold": fold, **m}) (results_dir / f"target3_{backbone}_fold{fold}_val.json").write_text( json.dumps({"fold": fold, "metrics": m, "logs": logs}, indent=2)) log(f" fold{fold} macro_f1={m['macro_f1']:.4f}")
# Emit OOF logits for this fold inline model = load_plain_model(backbone, ckpt, device) va_loader = DataLoader(va_sub, batch_size=BATCH, shuffle=False, num_workers=4, pin_memory=True) logits, labels, srcs = collect_logits(model, va_loader, device) oof_logits[va_idx] = logits del model; torch.cuda.empty_cache()
if is_main(): f1s = [fm["macro_f1"] for fm in fold_metrics] nm = [fm["per_class_recall"]["non_malignant"] for fm in fold_metrics] summ = {"backbone": backbone, "resize": resize, "folds": fold_metrics, "cv_macro_f1_mean": float(np.mean(f1s)), "cv_macro_f1_std": float(np.std(f1s)), "cv_non_malignant_recall_mean": float(np.mean(nm)), "cv_non_malignant_recall_std": float(np.std(nm))} (results_dir / f"target3_{backbone}_cv_summary.json").write_text(json.dumps(summ, indent=2)) log(f"CV: f1={summ['cv_macro_f1_mean']:.4f}Β±{summ['cv_macro_f1_std']:.4f} nm_rec={summ['cv_non_malignant_recall_mean']:.4f}") return summ, oof_logits return None, None
def run_final(backbone, resize, device, rank, world, local_rank): D = get_dataset_module(resize) models_dir, results_dir, logits_dir = get_paths(backbone, resize)
log(f"\n=== target3 FINAL ({resize}): {backbone} ===") set_seed(SEED) tr = D.FTarget3Dataset("train", fold=None, train=True, size=SIZE) va = D.FTarget3Dataset("validation", fold=None, train=False, size=SIZE) te = D.FTarget3Dataset("test", fold=None, train=False, size=SIZE) ckpt = models_dir / f"target3_{backbone}_final.pt" m, logs = train_one(backbone, tr, va, ckpt, device, rank, world, local_rank) if is_main(): model = load_plain_model(backbone, ckpt, device) tl = DataLoader(te, batch_size=BATCH, shuffle=False, num_workers=4, pin_memory=True) tm, tp, tt = evaluate(model, tl, device, D.TARGET3_NAMES) res = {"backbone": backbone, "resize": resize, "val_metrics": m, "test_metrics": tm, "test_predictions": tp.tolist(), "test_true": tt.tolist(), "logs": logs} (results_dir / f"target3_{backbone}_final.json").write_text(json.dumps(res, indent=2)) log(f"FINAL: val_f1={m['macro_f1']:.4f} test_f1={tm['macro_f1']:.4f} test_nm_rec={tm['per_class_recall']['non_malignant']:.4f}")
# Emit test logits inline te_loader = DataLoader(te, batch_size=BATCH, shuffle=False, num_workers=4, pin_memory=True) test_logits, test_labels, test_srcs = collect_logits(model, te_loader, device) del model; torch.cuda.empty_cache() return res, test_logits, test_labels, test_srcs return None, None, None, None
def save_oof_logits(backbone, resize, oof_logits): D = get_dataset_module(resize) _, _, logits_dir = get_paths(backbone, resize) ds = D.load_from_disk(str(D.F_HF))["train"] labels = np.asarray(ds["target3"], dtype=np.int64) cvf = np.asarray(ds["cv_fold"], dtype=np.int64) srcs = np.asarray(ds["source_dataset"], dtype="<U8") fns = np.asarray(ds["original_filename"], dtype="<U64") np.savez(logits_dir / f"plain_{backbone}_oof.npz", logits=oof_logits, labels=labels, cv_fold=cvf, source=srcs, filename=fns) log(f" saved plain_{backbone}_oof.npz ({oof_logits.shape})")
def save_test_logits(backbone, resize, test_logits, test_labels, test_srcs): D = get_dataset_module(resize) _, _, logits_dir = get_paths(backbone, resize) ds = D.load_from_disk(str(D.F_HF))["test"] fns = np.asarray(ds["original_filename"], dtype="<U64") np.savez(logits_dir / f"plain_{backbone}_test.npz", logits=test_logits, labels=test_labels, source=test_srcs, filename=fns) log(f" saved plain_{backbone}_test.npz ({test_logits.shape})")
def main(): ap = argparse.ArgumentParser() ap.add_argument("--backbone", choices=BACKBONES, required=True) ap.add_argument("--resize", choices=["letterbox", "squeeze"], required=True) ap.add_argument("--mode", choices=["cv", "final", "both"], default="both") args = ap.parse_args()
global D D = get_dataset_module(args.resize)
rank, world, local = setup() dev = torch.device("cuda", local) if torch.cuda.is_available() else torch.device("cpu") log(f"world={world} backbone={args.backbone} resize={args.resize}") try: if args.mode in ("cv", "both"): summ, oof_logits = run_cv(args.backbone, args.resize, dev, rank, world, local) if is_main() and oof_logits is not None: save_oof_logits(args.backbone, args.resize, oof_logits) if args.mode in ("final", "both"): res, test_logits, test_labels, test_srcs = run_final(args.backbone, args.resize, dev, rank, world, local) if is_main() and test_logits is not None: save_test_logits(args.backbone, args.resize, test_logits, test_labels, test_srcs) finally: cleanup()
if __name__ == "__main__": main()123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347"""Stage 1 v1 final: cRT (classifier-retraining) with inline logits emission.
Loads frozen backbone checkpoints from train_cls.py, retrains classifier headwith class-balanced sampling (ClassAwareSampler + SGD), saves cRT checkpoints,and emits cRT OOF + test logits β all in one pass.
cRT (Kang et al., ICLR 2020): - Freeze backbone, retrain classifier from RANDOM init - SGD (lr=0.2, momentum=0.9, weight_decay=5e-4), cosine LR - ClassAwareSampler: cyclic round-robin, 4 samples/class/batch - CrossEntropyLoss (no label smoothing) - 10 epochs
Usage: python train_crt.py --backbone mamba --resize letterbox"""import argparseimport jsonimport pathlibimport sysimport numpy as npimport torchimport torch.nn as nnfrom torch.utils.data import DataLoader, Sampler, Subsetimport timmfrom sklearn.metrics import (f1_score, accuracy_score, balanced_accuracy_score, confusion_matrix, classification_report)
ROOT = pathlib.Path(__file__).parentsys.path.insert(0, str(ROOT))
SIZE = 384BATCH = 32CRT_BATCH = 256NUM_CLASSES = 3CRT_EPOCHS = 10CRT_LR = 0.2CRT_MOMENTUM = 0.9CRT_WD = 5e-4SEED = 17BACKBONES = ["convnext", "swin", "mamba", "resnet"]
def get_dataset_module(resize): if resize == "letterbox": import dataset_f as D elif resize == "squeeze": import dataset_f_squeeze as D else: raise ValueError(resize) return D
def get_paths(backbone, resize): return (ROOT / "models" / resize / backbone, ROOT / "results" / resize / backbone, ROOT / "logits" / resize / backbone)
def build_model(backbone): if backbone == "convnext": return timm.create_model("convnext_tiny", pretrained=False, num_classes=NUM_CLASSES, drop_rate=0.1) if backbone == "swin": return timm.create_model("swin_tiny_patch4_window7_224", pretrained=False, img_size=SIZE, num_classes=NUM_CLASSES, drop_rate=0.1) if backbone == "resnet": return timm.create_model("resnet50", pretrained=False, num_classes=NUM_CLASSES, drop_rate=0.1) if backbone == "mamba": from mambavision.models.mamba_vision import mamba_vision_T return mamba_vision_T(pretrained=False, num_classes=NUM_CLASSES, drop_rate=0.1) raise ValueError(backbone)
def load_frozen_backbone(backbone, ckpt_path, device): model = build_model(backbone).to(device) state = torch.load(ckpt_path, map_location=device, weights_only=False) model.load_state_dict(state) model.eval() for p in model.parameters(): p.requires_grad = False return model
def get_classifier_linear(model): if hasattr(model, "head") and hasattr(model.head, "fc") and isinstance(model.head.fc, nn.Linear): return model.head.fc if hasattr(model, "classifier") and isinstance(model.classifier, nn.Linear): return model.classifier if hasattr(model, "head") and isinstance(model.head, nn.Linear): return model.head if hasattr(model, "fc") and isinstance(model.fc, nn.Linear): return model.fc raise RuntimeError("classifier linear layer not found")
def compute_per_class_precision(true, pred, names): true = np.asarray(true); pred = np.asarray(pred) result = {} for i, name in enumerate(names): tp = ((pred == i) & (true == i)).sum() fp = ((pred == i) & (true != i)).sum() result[name] = float(tp / max(tp + fp, 1)) return result
def eval_predictions(all_pred, all_true, all_src, names): all_pred = np.array(all_pred); all_true = np.array(all_true); all_src = np.array(all_src) m = { "macro_f1": float(f1_score(all_true, all_pred, average="macro", labels=list(range(NUM_CLASSES)), zero_division=0)), "accuracy": float(accuracy_score(all_true, all_pred)), "balanced_acc": float(balanced_accuracy_score(all_true, all_pred)), "per_class_recall": {names[i]: float(((all_true == i) & (all_pred == i)).sum() / max((all_true == i).sum(), 1)) for i in range(NUM_CLASSES)}, "per_class_precision": compute_per_class_precision(all_true, all_pred, names), "confusion_matrix": confusion_matrix(all_true, all_pred, labels=list(range(NUM_CLASSES))).tolist(), "classification_report": classification_report(all_true, all_pred, labels=list(range(NUM_CLASSES)), target_names=names, output_dict=True, zero_division=0), "n": len(all_pred), } for s in ["B", "C", "D"]: mk = all_src == s if mk.sum() > 0: m[f"src_{s}_acc"] = float(accuracy_score(all_true[mk], all_pred[mk])) m[f"src_{s}_n"] = int(mk.sum()) return m
class ClassAwareSampler(Sampler): """ClassAwareSampler: cycles through classes, samples num_samples_cls per class.""" def __init__(self, labels, num_samples_cls=4): self.labels = np.array(labels) self.num_classes = NUM_CLASSES self.num_samples_cls = num_samples_cls self.cls_indices = {} for c in range(self.num_classes): self.cls_indices[c] = np.where(self.labels == c)[0].tolist() max_cls_size = max(len(v) for v in self.cls_indices.values()) self.num_samples = self.num_classes * max_cls_size
def __iter__(self): cls_iters = {c: 0 for c in range(self.num_classes)} cls_orders = {c: np.random.permutation(len(self.cls_indices[c])) for c in range(self.num_classes)} for _ in range(self.num_samples // (self.num_classes * self.num_samples_cls)): for c in range(self.num_classes): for _ in range(self.num_samples_cls): if cls_iters[c] >= len(self.cls_indices[c]): cls_orders[c] = np.random.permutation(len(self.cls_indices[c])) cls_iters[c] = 0 idx = self.cls_indices[c][cls_orders[c][cls_iters[c]]] cls_iters[c] += 1 yield idx
def __len__(self): return self.num_samples
def crt_train(model, train_ds, device): """cRT: freeze backbone, retrain classifier from RANDOM init with class-balanced sampling.""" clf = get_classifier_linear(model) nn.init.kaiming_normal_(clf.weight, mode='fan_out', nonlinearity='linear') if clf.bias is not None: nn.init.zeros_(clf.bias) for p in clf.parameters(): p.requires_grad = True
labels = np.array(train_ds.all_labels()) if hasattr(train_ds, 'all_labels') else np.array([train_ds[i][1] for i in range(len(train_ds))]) sampler = ClassAwareSampler(labels, num_samples_cls=4) loader = DataLoader(train_ds, batch_size=CRT_BATCH, sampler=sampler, num_workers=4, pin_memory=True)
opt = torch.optim.SGD(clf.parameters(), lr=CRT_LR, momentum=CRT_MOMENTUM, weight_decay=CRT_WD) sched = torch.optim.lr_scheduler.CosineAnnealingLR(opt, T_max=CRT_EPOCHS, eta_min=0.0) crit = nn.CrossEntropyLoss()
for ep in range(CRT_EPOCHS): sched.step() model.train() tot = 0.0; nb = 0 for x, y, _, _ in loader: x = x.to(device, non_blocking=True) y = y.to(device, non_blocking=True) opt.zero_grad(set_to_none=True) with torch.amp.autocast("cuda", dtype=torch.bfloat16): loss = crit(model(x), y) loss.backward() opt.step() tot += loss.item(); nb += 1 print(f" cRT ep{ep}: loss={tot/max(nb,1):.4f} lr={sched.get_last_lr()[0]:.6f}")
for p in clf.parameters(): p.requires_grad = False return model
@torch.no_grad()def evaluate(model, loader, device, names): model.eval() all_pred, all_true, all_src = [], [], [] for x, y, src, img in loader: x = x.to(device, non_blocking=True) logits = model(x) pred = logits.argmax(1).cpu().numpy() all_pred.extend(pred.tolist()) all_true.extend((y.numpy() if torch.is_tensor(y) else np.array(y)).tolist()) all_src.extend(list(src)) all_pred = np.array(all_pred); all_true = np.array(all_true); all_src = np.array(all_src) return eval_predictions(all_pred, all_true, all_src, names)
@torch.no_grad()def collect_logits(model, loader, device): model.eval() L, Y, S = [], [], [] for x, y, src, _img in loader: x = x.to(device, non_blocking=True) logits = model(x).float().cpu().numpy() L.append(logits) Y.append(y.numpy() if torch.is_tensor(y) else np.asarray(y)) S.append(np.asarray(src)) return (np.concatenate(L), np.concatenate(Y).astype(np.int64), np.concatenate(S).astype("<U8"))
def save_crt_head(model, backbone, tag, models_dir): path = models_dir / f"crt_{backbone}_{tag}.pt" torch.save({"full_state_dict": model.state_dict(), "backbone": backbone, "tag": tag}, path) print(f" saved cRT checkpoint -> {path}")
def load_crt_checkpoint(backbone, ckpt_path, device): model = build_model(backbone).to(device) state = torch.load(ckpt_path, map_location=device, weights_only=False) model.load_state_dict(state["full_state_dict"]) model.eval() for p in model.parameters(): p.requires_grad_(False) return model
def run_cv(backbone, resize, device): D = get_dataset_module(resize) models_dir, results_dir, logits_dir = get_paths(backbone, resize) names = D.TARGET3_NAMES
print(f"\n=== cRT CV ({resize}): {backbone} ===") base_train = D.FTarget3Dataset("train", fold=None, train=True, size=SIZE) base_val = D.FTarget3Dataset("train", fold=None, train=False, size=SIZE) all_cv = base_train.ds["cv_fold"] fold_metrics = [] oof_logits = np.zeros((len(base_train), NUM_CLASSES), dtype=np.float32)
for fold in range(5): print(f"-- fold {fold} --") torch.manual_seed(SEED); np.random.seed(SEED) plain_ckpt = models_dir / f"target3_{backbone}_fold{fold}.pt" model = load_frozen_backbone(backbone, plain_ckpt, device)
tr_idx = [i for i, c in enumerate(all_cv) if c != fold] va_idx = [i for i, c in enumerate(all_cv) if c == fold] tr_sub = Subset(base_train, tr_idx) va_sub = Subset(base_val, va_idx)
model = crt_train(model, tr_sub, device) save_crt_head(model, backbone, f"fold{fold}", models_dir) va_loader = DataLoader(va_sub, batch_size=BATCH, shuffle=False, num_workers=4, pin_memory=True) m = evaluate(model, va_loader, device, names) print(f" fold{fold} f1={m['macro_f1']:.4f} nm_rec={m['per_class_recall']['non_malignant']:.4f}") fold_metrics.append({"fold": fold, **m})
# Collect OOF logits inline logits, _, _ = collect_logits(model, va_loader, device) oof_logits[va_idx] = logits del model; torch.cuda.empty_cache()
f1s = [fm["macro_f1"] for fm in fold_metrics] nms = [fm["per_class_recall"]["non_malignant"] for fm in fold_metrics] baccs = [fm["balanced_acc"] for fm in fold_metrics] summ = { "backbone": backbone, "resize": resize, "folds": fold_metrics, "cv_macro_f1_mean": float(np.mean(f1s)), "cv_macro_f1_std": float(np.std(f1s)), "cv_non_malignant_recall_mean": float(np.mean(nms)), "cv_non_malignant_recall_std": float(np.std(nms)), "cv_balanced_acc_mean": float(np.mean(baccs)), "cv_balanced_acc_std": float(np.std(baccs)), } (results_dir / f"crt_{backbone}_cv_summary.json").write_text(json.dumps(summ, indent=2)) print(f"CV: f1={summ['cv_macro_f1_mean']:.4f}Β±{summ['cv_macro_f1_std']:.4f} nm_rec={summ['cv_non_malignant_recall_mean']:.4f}Β±{summ['cv_non_malignant_recall_std']:.4f}")
# Save OOF logits ds = D.load_from_disk(str(D.F_HF))["train"] labels = np.asarray(ds["target3"], dtype=np.int64) cvf = np.asarray(ds["cv_fold"], dtype=np.int64) srcs = np.asarray(ds["source_dataset"], dtype="<U8") fns = np.asarray(ds["original_filename"], dtype="<U64") np.savez(logits_dir / f"{backbone}_oof.npz", logits=oof_logits, labels=labels, cv_fold=cvf, source=srcs, filename=fns) print(f" saved {backbone}_oof.npz ({oof_logits.shape})") return summ
def run_final(backbone, resize, device): D = get_dataset_module(resize) models_dir, results_dir, logits_dir = get_paths(backbone, resize) names = D.TARGET3_NAMES
print(f"\n=== cRT FINAL ({resize}): {backbone} ===") torch.manual_seed(SEED); np.random.seed(SEED) plain_ckpt = models_dir / f"target3_{backbone}_final.pt" model = load_frozen_backbone(backbone, plain_ckpt, device)
tr = D.FTarget3Dataset("train", fold=None, train=True, size=SIZE) te = D.FTarget3Dataset("test", fold=None, train=False, size=SIZE)
model = crt_train(model, tr, device) save_crt_head(model, backbone, "final", models_dir) te_loader = DataLoader(te, batch_size=BATCH, shuffle=False, num_workers=4, pin_memory=True) tm = evaluate(model, te_loader, device, names) print(f"FINAL: test_f1={tm['macro_f1']:.4f} test_nm_rec={tm['per_class_recall']['non_malignant']:.4f} test_bal_acc={tm['balanced_acc']:.4f}")
res = {"backbone": backbone, "resize": resize, "test_metrics": tm} (results_dir / f"crt_{backbone}_final.json").write_text(json.dumps(res, indent=2))
# Save test logits inline test_logits, test_labels, test_srcs = collect_logits(model, te_loader, device) ds = D.load_from_disk(str(D.F_HF))["test"] fns = np.asarray(ds["original_filename"], dtype="<U64") np.savez(logits_dir / f"{backbone}_test.npz", logits=test_logits, labels=test_labels, source=test_srcs, filename=fns) print(f" saved {backbone}_test.npz ({test_logits.shape})")
del model; torch.cuda.empty_cache() return res
def main(): ap = argparse.ArgumentParser() ap.add_argument("--backbone", choices=BACKBONES, required=True) ap.add_argument("--resize", choices=["letterbox", "squeeze"], required=True) ap.add_argument("--mode", choices=["cv", "final", "both"], default="both") args = ap.parse_args() device = torch.device("cuda") bb = args.backbone print(f"=== cRT classifier-balancing ({args.resize}) β {bb} ===") try: if args.mode in ("cv", "both"): run_cv(bb, args.resize, device) if args.mode in ("final", "both"): run_final(bb, args.resize, device) finally: torch.cuda.empty_cache()
if __name__ == "__main__": main()123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340"""Stage 1 v1 final: Binary tumor segmentation (5-fold CV + final).
Backbones: convnext, swin, mamba, resnet (all via timm features_only + FPN,except mamba which uses hook-based feature extraction).Resize: letterbox or squeeze.
Usage (DDP): torchrun --nproc_per_node=2 train_seg.py --backbone mamba --resize letterbox python train_seg.py --backbone mamba --resize letterbox # single GPU"""import argparseimport datetimeimport jsonimport osimport pathlibimport sysimport numpy as npimport torchimport torch.distributed as distimport torch.nn as nnimport torch.nn.functional as Ffrom torch.nn.parallel import DistributedDataParallel as DDPfrom torch.utils.data import DataLoader, Subset, DistributedSamplerimport timm
ROOT = pathlib.Path(__file__).parentsys.path.insert(0, str(ROOT))
SIZE = 384BATCH = 16EPOCHS = 50LR = 1e-4WD = 0.05PATIENCE = 10SEED = 42BACKBONES = ["convnext", "swin", "mamba", "resnet"]
def get_dataset_module(resize): if resize == "letterbox": import dataset_f as D elif resize == "squeeze": import dataset_f_squeeze as D else: raise ValueError(resize) return D
def get_paths(backbone, resize): return (ROOT / "models" / resize / backbone, ROOT / "results" / resize / backbone, ROOT / "logits" / resize / backbone)
def setup(): if "RANK" not in os.environ: return 0, 1, 0 rank = int(os.environ["RANK"]); world = int(os.environ["WORLD_SIZE"]) local = int(os.environ["LOCAL_RANK"]) torch.cuda.set_device(local) dist.init_process_group(backend="nccl", timeout=datetime.timedelta(seconds=1800), device_id=torch.device("cuda", local)) return rank, world, local
def cleanup(): if dist.is_initialized(): dist.destroy_process_group()
def is_main(): return (not dist.is_initialized()) or dist.get_rank() == 0
def log(*a): if is_main(): print(*a, flush=True)
def set_seed(s): torch.manual_seed(s); np.random.seed(s) import random; random.seed(s)
class FPNDecoder(nn.Module): def __init__(self, in_channels, hidden=128): super().__init__() self.laterals = nn.ModuleList([nn.Conv2d(c, hidden, 1) for c in in_channels]) self.smooths = nn.ModuleList([nn.Conv2d(hidden, hidden, 3, padding=1) for _ in in_channels]) self.head = nn.Sequential(nn.Conv2d(hidden, hidden, 3, padding=1), nn.ReLU(inplace=True), nn.Conv2d(hidden, 1, 1))
def forward(self, feats): lat = [l(f) for l, f in zip(self.laterals, feats)] for i in range(len(lat) - 1, 0, -1): lat[i - 1] = lat[i - 1] + F.interpolate(lat[i], size=lat[i - 1].shape[-2:], mode="nearest") return self.head(self.smooths[0](lat[0]))
class TimmSegModel(nn.Module): """Generic timm backbone + FPN decoder. Works for ConvNeXt, Swin, ResNet.""" def __init__(self, backbone_name): super().__init__() self.backbone_name = backbone_name if backbone_name == "convnext": self.backbone = timm.create_model("convnext_tiny", pretrained=True, features_only=True, out_indices=(1, 2, 3)) elif backbone_name == "swin": self.backbone = timm.create_model("swin_tiny_patch4_window7_224", pretrained=True, img_size=SIZE, features_only=True, out_indices=(1, 2, 3)) elif backbone_name == "resnet": self.backbone = timm.create_model("resnet50", pretrained=True, features_only=True, out_indices=(1, 2, 3)) else: raise ValueError(backbone_name)
with torch.no_grad(): outs = self.backbone(torch.randn(1, 3, SIZE, SIZE)) self._is_nhwc = [] chs = [] for o in outs: if o.dim() == 4 and o.shape[1] != o.shape[-1]: is_nhwc = o.shape[-1] > o.shape[1] self._is_nhwc.append(is_nhwc) chs.append(o.shape[-1] if is_nhwc else o.shape[1]) else: self._is_nhwc.append(False) chs.append(o.shape[1] if o.dim() == 4 else o.shape[-1]) self.decoder = FPNDecoder(chs)
def forward(self, x): feats = self.backbone(x) feats = [f.permute(0, 3, 1, 2) if (f.dim() == 4 and self._is_nhwc[i]) else f for i, f in enumerate(feats)] out = self.decoder(feats) return F.interpolate(out, size=x.shape[-2:], mode="bilinear", align_corners=False)
class MambaSegModel(nn.Module): """MambaVision-T backbone with FPN decoder. Captures stage outputs via hooks.""" def __init__(self): super().__init__() from mambavision.models.mamba_vision import mamba_vision_T self.net = mamba_vision_T(pretrained=True, num_classes=0, global_pool='') self._feats = {} self._hooks = [] levels = self.net.levels self._idxs = [1, 2, 3] for i in self._idxs: hk = levels[i].register_forward_hook(self._mk_hook(i)) self._hooks.append(hk) self.net.eval() dev = torch.cuda.current_device() if torch.cuda.is_available() else "cpu" self.net.to(dev) with torch.no_grad(): self.net(torch.randn(1, 3, SIZE, SIZE, device=dev)) chs = [] for i in self._idxs: f = self._feats[i] chs.append(f.shape[1] if f.dim() == 4 else f.shape[-1]) self.decoder = FPNDecoder(chs)
def _mk_hook(self, i): def hook(mod, inp, out): self._feats[i] = out return hook
def forward(self, x): self._feats = {} self.net(x) feats = [self._feats[i] for i in self._idxs] feats = [f if f.dim() == 4 else f.permute(0, 3, 1, 2) for f in feats] out = self.decoder(feats) return F.interpolate(out, size=x.shape[-2:], mode="bilinear", align_corners=False)
def build_seg_model(backbone): if backbone == "mamba": return MambaSegModel() return TimmSegModel(backbone)
def dice_loss(pred, target, eps=1e-7): pred = torch.sigmoid(pred) inter = (pred * target).sum(dim=(2, 3)) union = pred.sum(dim=(2, 3)) + target.sum(dim=(2, 3)) return 1 - (2 * inter + eps) / (union + eps)
def combined_loss(pred, target): return 0.5 * F.binary_cross_entropy_with_logits(pred, target) + 0.5 * dice_loss(pred, target).mean()
@torch.no_grad()def evaluate(model, loader, device): model.eval() all_dice = 0.0; all_iou = 0.0; n = 0 for x, m in loader: x = x.to(device, non_blocking=True); m = m.to(device, non_blocking=True) with torch.amp.autocast("cuda", dtype=torch.bfloat16): logits = model(x) pred = (torch.sigmoid(logits) > 0.5).float() inter = (pred * m).sum(dim=(2, 3)) union = pred.sum(dim=(2, 3)) + m.sum(dim=(2, 3)) - inter all_dice += ((2 * inter + 1e-7) / (union + inter + 1e-7)).mean().item() all_iou += ((inter + 1e-7) / (union + 1e-7)).mean().item() n += 1 return {"dice": all_dice / max(n, 1), "iou": all_iou / max(n, 1)}
def train_one(backbone, train_ds, val_ds, ckpt_path, device, rank, world, local_rank): sampler = DistributedSampler(train_ds, num_replicas=world, rank=rank, shuffle=True, drop_last=True) if world > 1 \ else None loader_kwargs = dict(batch_size=BATCH, num_workers=4, pin_memory=True, persistent_workers=True, drop_last=True) if world > 1: loader_kwargs["sampler"] = sampler else: loader_kwargs["shuffle"] = True loader = DataLoader(train_ds, **loader_kwargs) val_loader = DataLoader(val_ds, batch_size=BATCH, shuffle=False, num_workers=4, pin_memory=True, persistent_workers=True) if is_main() else None
model = build_seg_model(backbone).to(device) if world > 1: model = DDP(model, device_ids=[local_rank], output_device=local_rank, gradient_as_bucket_view=True, bucket_cap_mb=25, find_unused_parameters=True) opt = torch.optim.AdamW(model.parameters(), lr=LR, weight_decay=WD) sched = torch.optim.lr_scheduler.CosineAnnealingLR(opt, T_max=EPOCHS) best = -1.0; best_m = None; best_state = None; no_imp = 0; logs = [] for ep in range(EPOCHS): if sampler is not None: sampler.set_epoch(ep) model.train(); tot = 0.0; nb = 0 for x, m in loader: x = x.to(device, non_blocking=True); m = m.to(device, non_blocking=True) opt.zero_grad(set_to_none=True) with torch.amp.autocast("cuda", dtype=torch.bfloat16): loss = combined_loss(model(x), m) loss.backward(); opt.step() tot += loss.item(); nb += 1 sched.step() if is_main(): m = model.module if world > 1 else model vm = evaluate(m, val_loader, device) lg = {"epoch": ep, "train_loss": tot / max(nb, 1), "val_dice": vm["dice"], "val_iou": vm["iou"]} logs.append(lg) log(f" ep{ep}: loss={lg['train_loss']:.4f} dice={vm['dice']:.4f} iou={vm['iou']:.4f}") if vm["dice"] > best: best = vm["dice"]; best_m = vm best_state = {k: v.cpu() for k, v in m.state_dict().items()}; no_imp = 0 else: no_imp += 1 if world > 1: flag = torch.tensor([no_imp if is_main() else 0, best if is_main() else 0.0], device=device) dist.all_reduce(flag, op=dist.ReduceOp.MAX) no_imp = int(flag[0].item()); best = float(flag[1].item()) if no_imp >= PATIENCE: log(f" early stop ep{ep}"); break if is_main() and best_state is not None: torch.save(best_state, ckpt_path) if world > 1: dist.barrier() return best_m, logs
def run_cv(backbone, resize, device, rank, world, local_rank): D = get_dataset_module(resize) models_dir, results_dir, logits_dir = get_paths(backbone, resize)
log(f"\n=== seg CV ({resize}): {backbone} ===") splits = D.build_seg_splits() train_rows = splits["train"] full_tr = D.SegDataset(train_rows, train=True, size=SIZE) full_va = D.SegDataset(train_rows, train=False, size=SIZE) cvs = [r["f_cv"] for r in train_rows] fold_metrics = [] for fold in range(5): log(f"-- fold {fold} --") set_seed(SEED) tr_idx = [i for i, c in enumerate(cvs) if c != fold] va_idx = [i for i, c in enumerate(cvs) if c == fold] tr_ds = Subset(full_tr, tr_idx); va_ds = Subset(full_va, va_idx) ckpt = models_dir / f"seg_{backbone}_fold{fold}.pt" m, logs = train_one(backbone, tr_ds, va_ds, ckpt, device, rank, world, local_rank) if is_main(): fold_metrics.append({"fold": fold, **m}) (results_dir / f"seg_{backbone}_fold{fold}_val.json").write_text( json.dumps({"fold": fold, "metrics": m, "logs": logs}, indent=2)) log(f" fold{fold} dice={m['dice']:.4f}") if is_main(): ds = [fm["dice"] for fm in fold_metrics] summ = {"backbone": backbone, "resize": resize, "folds": fold_metrics, "cv_dice_mean": float(np.mean(ds)), "cv_dice_std": float(np.std(ds)), "cv_iou_mean": float(np.mean([fm["iou"] for fm in fold_metrics])), "cv_iou_std": float(np.std([fm["iou"] for fm in fold_metrics]))} (results_dir / f"seg_{backbone}_cv_summary.json").write_text(json.dumps(summ, indent=2)) log(f"CV: dice={summ['cv_dice_mean']:.4f}Β±{summ['cv_dice_std']:.4f}") return summ if is_main() else None
def run_final(backbone, resize, device, rank, world, local_rank): D = get_dataset_module(resize) models_dir, results_dir, logits_dir = get_paths(backbone, resize)
log(f"\n=== seg FINAL ({resize}): {backbone} ===") set_seed(SEED) splits = D.build_seg_splits() tr = D.SegDataset(splits["train"], train=True, size=SIZE) va = D.SegDataset(splits["validation"], train=False, size=SIZE) te = D.SegDataset(splits["test"], train=False, size=SIZE) ckpt = models_dir / f"seg_{backbone}_final.pt" m, logs = train_one(backbone, tr, va, ckpt, device, rank, world, local_rank) if is_main(): model = build_seg_model(backbone).to(device) model.load_state_dict(torch.load(ckpt, map_location=device)) tl = DataLoader(te, batch_size=BATCH, shuffle=False, num_workers=4, pin_memory=True) tm = evaluate(model, tl, device) res = {"backbone": backbone, "resize": resize, "val_metrics": m, "test_metrics": tm, "logs": logs} (results_dir / f"seg_{backbone}_final.json").write_text(json.dumps(res, indent=2)) log(f"FINAL: val_dice={m['dice']:.4f} test_dice={tm['dice']:.4f} test_iou={tm['iou']:.4f}") return res return None
def main(): ap = argparse.ArgumentParser() ap.add_argument("--backbone", choices=BACKBONES, required=True) ap.add_argument("--resize", choices=["letterbox", "squeeze"], required=True) ap.add_argument("--mode", choices=["cv", "final", "both"], default="both") args = ap.parse_args() rank, world, local = setup() dev = torch.device("cuda", local) if torch.cuda.is_available() else torch.device("cpu") log(f"world={world} backbone={args.backbone} resize={args.resize}") try: if args.mode in ("cv", "both"): run_cv(args.backbone, args.resize, dev, rank, world, local) if args.mode in ("final", "both"): run_final(args.backbone, args.resize, dev, rank, world, local) finally: cleanup()
if __name__ == "__main__": main()123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566"""Comprehensive verification: load every checkpoint, run inference, comparelogits (.npz) and metrics (.json) with what the models actually produce.
Checks per (resize, backbone) combo: 1. Plain OOF: load fold models β inference on fold val β compare with plain_{bb}_oof.npz slices 2. Plain test: load final model β inference on test β compare logits + metrics with JSON 3. cRT OOF: load fold cRT models β inference on fold val β compare with {bb}_oof.npz slices 4. cRT test: load final cRT model β inference on test β compare logits + metrics with JSON 5. Seg test: load final seg model β inference on test β compare dice/iou with JSON
Usage: python verify_all.py"""import jsonimport pathlibimport sysimport numpy as npimport torchfrom torch.utils.data import DataLoader, Subsetfrom sklearn.metrics import (f1_score, accuracy_score, balanced_accuracy_score, confusion_matrix)import timm
ROOT = pathlib.Path(__file__).parentsys.path.insert(0, str(ROOT))
NUM_CLASSES = 3SIZE = 384BATCH = 32TOL = 1e-4 # float tolerance for logits comparison
BACKBONES = ["convnext", "swin", "mamba", "resnet"]RESIZES = [("resized", "squeeze"), ("letterbox", "letterbox")]NAMES = ["malignant", "non_malignant", "non_roi"]
def get_dataset_module(resize_dir): if resize_dir == "letterbox": import dataset_f as D else: import dataset_f_squeeze as D return D
def build_cls_model(backbone): if backbone == "convnext": return timm.create_model("convnext_tiny", pretrained=False, num_classes=NUM_CLASSES, drop_rate=0.1) if backbone == "swin": return timm.create_model("swin_tiny_patch4_window7_224", pretrained=False, img_size=SIZE, num_classes=NUM_CLASSES, drop_rate=0.1) if backbone == "resnet": return timm.create_model("resnet50", pretrained=False, num_classes=NUM_CLASSES, drop_rate=0.1) if backbone == "mamba": from mambavision.models.mamba_vision import mamba_vision_T return mamba_vision_T(pretrained=False, num_classes=NUM_CLASSES, drop_rate=0.1) raise ValueError(backbone)
def compute_per_class_precision(true, pred): true = np.asarray(true); pred = np.asarray(pred) result = {} for i, name in enumerate(NAMES): tp = ((pred == i) & (true == i)).sum() fp = ((pred == i) & (true != i)).sum() result[name] = float(tp / max(tp + fp, 1)) return result
def compute_metrics(pred, true, src=None): pred = np.asarray(pred); true = np.asarray(true) m = { "macro_f1": float(f1_score(true, pred, average="macro", labels=list(range(NUM_CLASSES)), zero_division=0)), "accuracy": float(accuracy_score(true, pred)), "balanced_acc": float(balanced_accuracy_score(true, pred)), "per_class_recall": {NAMES[i]: float(((true == i) & (pred == i)).sum() / max((true == i).sum(), 1)) for i in range(NUM_CLASSES)}, "per_class_precision": compute_per_class_precision(true, pred), } if src is not None: src = np.asarray(src) for s in ["B", "C", "D"]: mk = src == s if mk.sum() > 0: m[f"src_{s}_acc"] = float(accuracy_score(true[mk], pred[mk])) m[f"src_{s}_n"] = int(mk.sum()) return m
def check_metrics_close(computed, saved, label, tol=1e-4): """Compare computed metrics with saved JSON metrics. Returns list of mismatches.""" mismatches = [] for key in ["macro_f1", "accuracy", "balanced_acc"]: if key in saved and key in computed: if abs(computed[key] - saved[key]) > tol: mismatches.append(f" {label}.{key}: computed={computed[key]:.6f} saved={saved[key]:.6f} DIFF={abs(computed[key]-saved[key]):.6f}") for cls in NAMES: if "per_class_recall" in saved and cls in saved["per_class_recall"]: cv = computed["per_class_recall"][cls] sv = saved["per_class_recall"][cls] if abs(cv - sv) > tol: mismatches.append(f" {label}.recall.{cls}: computed={cv:.6f} saved={sv:.6f}") if "per_class_precision" in saved and cls in saved["per_class_precision"]: cv = computed["per_class_precision"][cls] sv = saved["per_class_precision"][cls] if abs(cv - sv) > tol: mismatches.append(f" {label}.precision.{cls}: computed={cv:.6f} saved={sv:.6f}") return mismatches
@torch.no_grad()def collect_logits(model, loader, device): model.eval() L, Y, S = [], [], [] for x, y, src, _img in loader: x = x.to(device, non_blocking=True) logits = model(x).float().cpu().numpy() L.append(logits) Y.append(y.numpy() if torch.is_tensor(y) else np.asarray(y)) S.append(np.asarray(src)) return (np.concatenate(L), np.concatenate(Y).astype(np.int64), np.concatenate(S).astype("<U8"))
# ---- Seg model building ----import torch.nn as nnimport torch.nn.functional as F
class FPNDecoder(nn.Module): def __init__(self, in_channels, hidden=128): super().__init__() self.laterals = nn.ModuleList([nn.Conv2d(c, hidden, 1) for c in in_channels]) self.smooths = nn.ModuleList([nn.Conv2d(hidden, hidden, 3, padding=1) for _ in in_channels]) self.head = nn.Sequential(nn.Conv2d(hidden, hidden, 3, padding=1), nn.ReLU(inplace=True), nn.Conv2d(hidden, 1, 1)) def forward(self, feats): lat = [l(f) for l, f in zip(self.laterals, feats)] for i in range(len(lat) - 1, 0, -1): lat[i - 1] = lat[i - 1] + F.interpolate(lat[i], size=lat[i - 1].shape[-2:], mode="nearest") return self.head(self.smooths[0](lat[0]))
class TimmSegModel(nn.Module): def __init__(self, backbone_name): super().__init__() if backbone_name == "convnext": self.backbone = timm.create_model("convnext_tiny", pretrained=False, features_only=True, out_indices=(1, 2, 3)) elif backbone_name == "swin": self.backbone = timm.create_model("swin_tiny_patch4_window7_224", pretrained=False, img_size=SIZE, features_only=True, out_indices=(1, 2, 3)) elif backbone_name == "resnet": self.backbone = timm.create_model("resnet50", pretrained=False, features_only=True, out_indices=(1, 2, 3)) else: raise ValueError(backbone_name) with torch.no_grad(): outs = self.backbone(torch.randn(1, 3, SIZE, SIZE)) self._is_nhwc = [] chs = [] for o in outs: if o.dim() == 4 and o.shape[1] != o.shape[-1]: is_nhwc = o.shape[-1] > o.shape[1] self._is_nhwc.append(is_nhwc) chs.append(o.shape[-1] if is_nhwc else o.shape[1]) else: self._is_nhwc.append(False) chs.append(o.shape[1] if o.dim() == 4 else o.shape[-1]) self.decoder = FPNDecoder(chs) def forward(self, x): feats = self.backbone(x) feats = [f.permute(0, 3, 1, 2) if (f.dim() == 4 and self._is_nhwc[i]) else f for i, f in enumerate(feats)] out = self.decoder(feats) return F.interpolate(out, size=x.shape[-2:], mode="bilinear", align_corners=False)
class MambaSegModel(nn.Module): def __init__(self): super().__init__() from mambavision.models.mamba_vision import mamba_vision_T self.net = mamba_vision_T(pretrained=False, num_classes=0, global_pool='') self._feats = {} self._hooks = [] levels = self.net.levels self._idxs = [1, 2, 3] for i in self._idxs: hk = levels[i].register_forward_hook(self._mk_hook(i)) self._hooks.append(hk) self.net.eval() dev = torch.cuda.current_device() if torch.cuda.is_available() else "cpu" self.net.to(dev) with torch.no_grad(): self.net(torch.randn(1, 3, SIZE, SIZE, device=dev)) chs = [] for i in self._idxs: f = self._feats[i] chs.append(f.shape[1] if f.dim() == 4 else f.shape[-1]) self.decoder = FPNDecoder(chs) def _mk_hook(self, i): def hook(mod, inp, out): self._feats[i] = out return hook def forward(self, x): self._feats = {} self.net(x) feats = [self._feats[i] for i in self._idxs] feats = [f if f.dim() == 4 else f.permute(0, 3, 1, 2) for f in feats] out = self.decoder(feats) return F.interpolate(out, size=x.shape[-2:], mode="bilinear", align_corners=False)
def build_seg_model(backbone): if backbone == "mamba": return MambaSegModel() return TimmSegModel(backbone)
@torch.no_grad()def eval_seg(model, loader, device): model.eval() all_dice = 0.0; all_iou = 0.0; n = 0 for x, m in loader: x = x.to(device, non_blocking=True); m = m.to(device, non_blocking=True) with torch.amp.autocast("cuda", dtype=torch.bfloat16): logits = model(x) pred = (torch.sigmoid(logits) > 0.5).float() inter = (pred * m).sum(dim=(2, 3)) union = pred.sum(dim=(2, 3)) + m.sum(dim=(2, 3)) - inter all_dice += ((2 * inter + 1e-7) / (union + inter + 1e-7)).mean().item() all_iou += ((inter + 1e-7) / (union + 1e-7)).mean().item() n += 1 return {"dice": all_dice / max(n, 1), "iou": all_iou / max(n, 1)}
def load_plain_model(backbone, ckpt_path, device): model = build_cls_model(backbone).to(device) state = torch.load(ckpt_path, map_location=device, weights_only=False) model.load_state_dict(state) model.eval() return model
def load_crt_model(backbone, ckpt_path, device): model = build_cls_model(backbone).to(device) state = torch.load(ckpt_path, map_location=device, weights_only=False) if isinstance(state, dict) and "full_state_dict" in state: model.load_state_dict(state["full_state_dict"]) else: model.load_state_dict(state) model.eval() return model
def verify_combo(resize_dir, resize_label, backbone, device, D): """Verify one (resize, backbone) combo. Returns dict of results.""" models_dir = ROOT / "models" / resize_dir / backbone results_dir = ROOT / "results" / resize_dir / backbone logits_dir = ROOT / "logits" / resize_dir / backbone tag = f"{resize_label}/{backbone}" results = {"tag": tag, "checks": [], "pass": True} # ---- 1. Plain OOF logits ---- print(f"\n[{tag}] Checking plain OOF logits...") oof_path = logits_dir / f"plain_{backbone}_oof.npz" if oof_path.exists(): z = np.load(oof_path, allow_pickle=True) saved_oof = z["logits"] cv_folds = z["cv_fold"] base_val = D.FTarget3Dataset("train", fold=None, train=False, size=SIZE) all_cv = base_val.ds["cv_fold"] all_match = True for fold in range(5): ckpt = models_dir / f"target3_{backbone}_fold{fold}.pt" if not ckpt.exists(): print(f" β οΈ fold{fold} checkpoint missing") results["checks"].append(("plain_oof_fold" + str(fold), "SKIP", "checkpoint missing")) all_match = False continue model = load_plain_model(backbone, ckpt, device) va_idx = [i for i, c in enumerate(all_cv) if c == fold] va_sub = Subset(base_val, va_idx) va_loader = DataLoader(va_sub, batch_size=BATCH, shuffle=False, num_workers=4, pin_memory=True) logits, _, _ = collect_logits(model, va_loader, device) saved_slice = saved_oof[va_idx] match = np.allclose(logits, saved_slice, rtol=TOL, atol=TOL) max_diff = np.max(np.abs(logits - saved_slice)) if not match else 0.0 status = "PASS" if match else "FAIL" if not match: all_match = False results["pass"] = False print(f" fold{fold}: {status}" + (f" (max_diff={max_diff:.6f})" if not match else "")) results["checks"].append((f"plain_oof_fold{fold}", status, f"max_diff={max_diff:.6f}" if not match else "")) del model; torch.cuda.empty_cache() # Also verify OOF metrics match cv_summary cv_summary_path = results_dir / f"target3_{backbone}_cv_summary.json" if cv_summary_path.exists(): cv_summ = json.loads(cv_summary_path.read_text()) oof_pred = saved_oof.argmax(1) oof_labels = z["labels"] oof_src = z["source"] # Compute pooled OOF metrics pooled_m = compute_metrics(oof_pred, oof_labels, oof_src) saved_pooled = None # The cv_summary has per-fold metrics, not pooled β check per-fold for fold_m in cv_summ.get("folds", []): fold = fold_m["fold"] va_idx = [i for i, c in enumerate(cv_folds) if c == fold] fold_pred = oof_pred[va_idx] fold_true = oof_labels[va_idx] fold_src = oof_src[va_idx] computed_m = compute_metrics(fold_pred, fold_true, fold_src) mismatches = check_metrics_close(computed_m, fold_m, f"plain_oof_fold{fold}") if mismatches: all_match = False results["pass"] = False for mm in mismatches: print(f" β {mm}") results["checks"].append((f"plain_oof_fold{fold}_metrics", "FAIL", "; ".join(mismatches))) else: results["checks"].append((f"plain_oof_fold{fold}_metrics", "PASS", "")) else: print(f" β οΈ plain OOF npz missing") results["checks"].append(("plain_oof", "SKIP", "npz missing")) all_match = False # ---- 2. Plain test logits + metrics ---- print(f"[{tag}] Checking plain test logits + metrics...") test_logits_path = logits_dir / f"plain_{backbone}_test.npz" final_ckpt = models_dir / f"target3_{backbone}_final.pt" if test_logits_path.exists() and final_ckpt.exists(): z = np.load(test_logits_path, allow_pickle=True) saved_logits = z["logits"] saved_labels = z["labels"] saved_src = z["source"] model = load_plain_model(backbone, final_ckpt, device) te = D.FTarget3Dataset("test", fold=None, train=False, size=SIZE) te_loader = DataLoader(te, batch_size=BATCH, shuffle=False, num_workers=4, pin_memory=True) logits, labels, srcs = collect_logits(model, te_loader, device) # Compare logits match = np.allclose(logits, saved_logits, rtol=TOL, atol=TOL) max_diff = np.max(np.abs(logits - saved_logits)) if not match else 0.0 status = "PASS" if match else "FAIL" if not match: results["pass"] = False print(f" logits: {status}" + (f" (max_diff={max_diff:.6f})" if not match else "")) results["checks"].append(("plain_test_logits", status, f"max_diff={max_diff:.6f}" if not match else "")) # Compare labels labels_match = np.array_equal(labels, saved_labels) if not labels_match: print(f" β labels mismatch!") results["pass"] = False results["checks"].append(("plain_test_labels", "PASS" if labels_match else "FAIL", "")) # Compare metrics with JSON final_json_path = results_dir / f"target3_{backbone}_final.json" if final_json_path.exists(): saved_final = json.loads(final_json_path.read_text()) test_metrics = saved_final.get("test_metrics", saved_final) computed_m = compute_metrics(logits.argmax(1), labels, srcs) mismatches = check_metrics_close(computed_m, test_metrics, "plain_test") if mismatches: results["pass"] = False for mm in mismatches: print(f" β {mm}") results["checks"].append(("plain_test_metrics", "FAIL", "; ".join(mismatches))) else: print(f" metrics: PASS") results["checks"].append(("plain_test_metrics", "PASS", "")) del model; torch.cuda.empty_cache() else: missing = "logits" if not test_logits_path.exists() else "checkpoint" print(f" β οΈ {missing} missing") results["checks"].append(("plain_test", "SKIP", f"{missing} missing")) # ---- 3. cRT OOF logits ---- print(f"[{tag}] Checking cRT OOF logits...") crt_oof_path = logits_dir / f"{backbone}_oof.npz" if crt_oof_path.exists(): z = np.load(crt_oof_path, allow_pickle=True) saved_oof = z["logits"] cv_folds = z["cv_fold"] base_val = D.FTarget3Dataset("train", fold=None, train=False, size=SIZE) all_cv = base_val.ds["cv_fold"] for fold in range(5): ckpt = models_dir / f"crt_{backbone}_fold{fold}.pt" if not ckpt.exists(): print(f" β οΈ cRT fold{fold} checkpoint missing") results["checks"].append((f"crt_oof_fold{fold}", "SKIP", "checkpoint missing")) continue model = load_crt_model(backbone, ckpt, device) va_idx = [i for i, c in enumerate(all_cv) if c == fold] va_sub = Subset(base_val, va_idx) va_loader = DataLoader(va_sub, batch_size=BATCH, shuffle=False, num_workers=4, pin_memory=True) logits, _, _ = collect_logits(model, va_loader, device) saved_slice = saved_oof[va_idx] match = np.allclose(logits, saved_slice, rtol=TOL, atol=TOL) max_diff = np.max(np.abs(logits - saved_slice)) if not match else 0.0 status = "PASS" if match else "FAIL" if not match: results["pass"] = False print(f" cRT fold{fold}: {status}" + (f" (max_diff={max_diff:.6f})" if not match else "")) results["checks"].append((f"crt_oof_fold{fold}", status, f"max_diff={max_diff:.6f}" if not match else "")) del model; torch.cuda.empty_cache() # Verify cRT CV summary metrics crt_cv_path = results_dir / f"crt_{backbone}_cv_summary.json" if crt_cv_path.exists(): cv_summ = json.loads(crt_cv_path.read_text()) oof_pred = saved_oof.argmax(1) oof_labels = z["labels"] oof_src = z["source"] for fold_m in cv_summ.get("folds", []): fold = fold_m["fold"] va_idx = [i for i, c in enumerate(cv_folds) if c == fold] fold_pred = oof_pred[va_idx] fold_true = oof_labels[va_idx] fold_src = oof_src[va_idx] computed_m = compute_metrics(fold_pred, fold_true, fold_src) mismatches = check_metrics_close(computed_m, fold_m, f"crt_oof_fold{fold}") if mismatches: results["pass"] = False for mm in mismatches: print(f" β {mm}") results["checks"].append((f"crt_oof_fold{fold}_metrics", "FAIL", "; ".join(mismatches))) else: results["checks"].append((f"crt_oof_fold{fold}_metrics", "PASS", "")) else: print(f" β οΈ cRT OOF npz missing") results["checks"].append(("crt_oof", "SKIP", "npz missing")) # ---- 4. cRT test logits + metrics ---- print(f"[{tag}] Checking cRT test logits + metrics...") crt_test_path = logits_dir / f"{backbone}_test.npz" crt_final_ckpt = models_dir / f"crt_{backbone}_final.pt" if crt_test_path.exists() and crt_final_ckpt.exists(): z = np.load(crt_test_path, allow_pickle=True) saved_logits = z["logits"] saved_labels = z["labels"] saved_src = z["source"] model = load_crt_model(backbone, crt_final_ckpt, device) te = D.FTarget3Dataset("test", fold=None, train=False, size=SIZE) te_loader = DataLoader(te, batch_size=BATCH, shuffle=False, num_workers=4, pin_memory=True) logits, labels, srcs = collect_logits(model, te_loader, device) # Compare logits match = np.allclose(logits, saved_logits, rtol=TOL, atol=TOL) max_diff = np.max(np.abs(logits - saved_logits)) if not match else 0.0 status = "PASS" if match else "FAIL" if not match: results["pass"] = False print(f" cRT logits: {status}" + (f" (max_diff={max_diff:.6f})" if not match else "")) results["checks"].append(("crt_test_logits", status, f"max_diff={max_diff:.6f}" if not match else "")) # Compare labels labels_match = np.array_equal(labels, saved_labels) if not labels_match: print(f" β cRT labels mismatch!") results["pass"] = False results["checks"].append(("crt_test_labels", "PASS" if labels_match else "FAIL", "")) # Compare metrics with JSON crt_final_json = results_dir / f"crt_{backbone}_final.json" if crt_final_json.exists(): saved_final = json.loads(crt_final_json.read_text()) test_metrics = saved_final.get("test_metrics", saved_final) computed_m = compute_metrics(logits.argmax(1), labels, srcs) mismatches = check_metrics_close(computed_m, test_metrics, "crt_test") if mismatches: results["pass"] = False for mm in mismatches: print(f" β {mm}") results["checks"].append(("crt_test_metrics", "FAIL", "; ".join(mismatches))) else: print(f" cRT metrics: PASS") results["checks"].append(("crt_test_metrics", "PASS", "")) del model; torch.cuda.empty_cache() else: missing = "logits" if not crt_test_path.exists() else "checkpoint" print(f" β οΈ cRT {missing} missing") results["checks"].append(("crt_test", "SKIP", f"{missing} missing")) # ---- 5. Seg test metrics ---- print(f"[{tag}] Checking seg test metrics...") seg_final_ckpt = models_dir / f"seg_{backbone}_final.pt" seg_final_json = results_dir / f"seg_{backbone}_final.json" if seg_final_ckpt.exists() and seg_final_json.exists(): saved_seg = json.loads(seg_final_json.read_text()) saved_test = saved_seg.get("test_metrics", {}) model = build_seg_model(backbone).to(device) state = torch.load(seg_final_ckpt, map_location=device, weights_only=False) model.load_state_dict(state) model.eval() splits = D.build_seg_splits() te = D.SegDataset(splits["test"], train=False, size=SIZE) te_loader = DataLoader(te, batch_size=16, shuffle=False, num_workers=4, pin_memory=True) computed_seg = eval_seg(model, te_loader, device) dice_match = abs(computed_seg["dice"] - saved_test.get("dice", 0)) < 1e-4 iou_match = abs(computed_seg["iou"] - saved_test.get("iou", 0)) < 1e-4 status = "PASS" if dice_match and iou_match else "FAIL" if not dice_match or not iou_match: results["pass"] = False print(f" dice: {status} (computed={computed_seg['dice']:.6f} saved={saved_test.get('dice',0):.6f} diff={abs(computed_seg['dice']-saved_test.get('dice',0)):.6f})") print(f" iou: {'PASS' if iou_match else 'FAIL'} (computed={computed_seg['iou']:.6f} saved={saved_test.get('iou',0):.6f} diff={abs(computed_seg['iou']-saved_test.get('iou',0)):.6f})") results["checks"].append(("seg_test", status, f"dice_diff={abs(computed_seg['dice']-saved_test.get('dice',0)):.6f} iou_diff={abs(computed_seg['iou']-saved_test.get('iou',0)):.6f}")) del model; torch.cuda.empty_cache() else: missing = "checkpoint" if not seg_final_ckpt.exists() else "json" print(f" β οΈ seg {missing} missing") results["checks"].append(("seg_test", "SKIP", f"{missing} missing")) return results
def main(): device = torch.device("cuda") all_results = [] for resize_dir, resize_label in RESIZES: D = get_dataset_module(resize_dir) for backbone in BACKBONES: print(f"\n{'='*60}") print(f"Verifying: {resize_label}/{backbone}") print(f"{'='*60}") r = verify_combo(resize_dir, resize_label, backbone, device, D) all_results.append(r) # Final summary print(f"\n{'='*60}") print(f"FINAL VERIFICATION SUMMARY") print(f"{'='*60}") total_pass = 0 total_fail = 0 total_skip = 0 for r in all_results: tag = r["tag"] passes = [c for c in r["checks"] if c[1] == "PASS"] fails = [c for c in r["checks"] if c[1] == "FAIL"] skips = [c for c in r["checks"] if c[1] == "SKIP"] total_pass += len(passes) total_fail += len(fails) total_skip += len(skips) status = "β
PASS" if r["pass"] else "β FAIL" print(f" {tag:25s}: {status} ({len(passes)} pass, {len(fails)} fail, {len(skips)} skip)") for c in r["checks"]: if c[1] == "FAIL": print(f" β {c[0]}: {c[2]}") print(f"\n Total: {total_pass} pass, {total_fail} fail, {total_skip} skip") overall = "β
ALL VERIFIED" if total_fail == 0 else f"β {total_fail} FAILURES" print(f" {overall}")
if __name__ == "__main__": main()123456789101112131415161718192021#!/bin/bash# Check if stage1v2_final training is still running and report progressRUN_PID=$(pgrep -f "run_all.sh" 2>/dev/null | head -1)TRAIN_PID=$(pgrep -f "stage1v2_final/train_cls\|stage1v2_final/train_crt\|stage1v2_final/ensemble" 2>/dev/null | head -1)
if [ -z "$RUN_PID" ] && [ -z "$TRAIN_PID" ]; then echo "TRAINING_COMPLETE" echo "Backbones with final results:" for bb in convnext swin mamba resnet; do f="/home/kccitadmin/jupyterlab/sandbox/stage1v2_final/results/letterbox/${bb}/target3_${bb}_final.json" if [ -f "$f" ]; then echo " β $bb plain"; else echo " β $bb plain"; fi f="/home/kccitadmin/jupyterlab/sandbox/stage1v2_final/results/letterbox/${bb}/crt_${bb}_final.json" if [ -f "$f" ]; then echo " β $bb cRT"; else echo " β $bb cRT"; fi done echo "Ensemble results:" ls /home/kccitadmin/jupyterlab/sandbox/stage1v2_final/results/letterbox/ensemble_*.json 2>/dev/null || echo " none"else echo "RUNNING" echo "run_all PID: ${RUN_PID:-none}, train PID: ${TRAIN_PID:-none}" tail -10 /home/kccitadmin/jupyterlab/sandbox/stage1v2_final/stage1v2_run.log 2>/dev/nullfi123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202"""Dataset F utilities β letterbox (aspect-ratio-preserving, zero-pad 384Γ384).
Images are letterboxed to (size, size) with zero-padding instead of squeezed.This preserves aspect ratio and avoids spatial distortion.
Supports: ConvNeXt-Tiny, Swin-Tiny, MambaVision-T, ResNet-50."""import pathlibimport numpy as npimport torchfrom torch.utils.data import Datasetfrom PIL import Image, ImageDrawfrom torchvision import transforms as Tfrom torchvision.transforms import InterpolationModefrom datasets import load_from_disk, load_dataset
ROOT = pathlib.Path(__file__).parentF_HF = pathlib.Path("/home/kccitadmin/jupyterlab/sandbox/datasets/F1_hf_dataset")F_PARQUET = pathlib.Path("/home/kccitadmin/jupyterlab/sandbox/datasets/reports/F_prepared.parquet")
TARGET3_NAMES = ["malignant", "non_malignant", "non_roi"]IMAGING_NAMES = ["WLI", "NBI", "BLC"]SOURCE_NAMES = ["B", "C", "D"]
IMAGENET_MEAN = [0.485, 0.456, 0.406]IMAGENET_STD = [0.229, 0.224, 0.225]
def letterbox(img, size=384): """Resize preserving aspect ratio, then pad to (size, size) with zeros.""" w, h = img.size scale = size / max(w, h) new_w, new_h = int(round(w * scale)), int(round(h * scale)) new_w = max(new_w, 1) new_h = max(new_h, 1) img = img.resize((new_w, new_h), Image.BICUBIC) padded = Image.new("RGB", (size, size), (0, 0, 0)) padded.paste(img, ((size - new_w) // 2, (size - new_h) // 2)) return padded
def letterbox_mask(mask_img, size=384): """Same letterbox for masks β uses NEAREST interpolation.""" w, h = mask_img.size scale = size / max(w, h) new_w, new_h = int(round(w * scale)), int(round(h * scale)) new_w = max(new_w, 1) new_h = max(new_h, 1) mask_img = mask_img.resize((new_w, new_h), Image.NEAREST) padded = Image.new("L", (size, size), 0) padded.paste(mask_img, ((size - new_w) // 2, (size - new_h) // 2)) return padded
def get_cls_train_transforms(size=384): return T.Compose([ T.Lambda(lambda img: letterbox(img, size)), T.RandomHorizontalFlip(p=0.5), T.RandomVerticalFlip(p=0.5), T.RandomRotation(degrees=10), T.ColorJitter(brightness=0.2, contrast=0.2, saturation=0.2, hue=0.05), T.ToTensor(), T.Normalize(mean=IMAGENET_MEAN, std=IMAGENET_STD), ])
def get_cls_val_transforms(size=384): return T.Compose([ T.Lambda(lambda img: letterbox(img, size)), T.ToTensor(), T.Normalize(mean=IMAGENET_MEAN, std=IMAGENET_STD), ])
class SegPairTransform: """Letterbox both image and mask, preserving aspect ratio.""" def __init__(self, size=384, train=True): self.size = size self.train = train
def __call__(self, image, mask): image = letterbox(image, self.size) mask = letterbox_mask(mask, self.size) if self.train: if np.random.rand() < 0.5: image = image.transpose(Image.FLIP_LEFT_RIGHT) mask = mask.transpose(Image.FLIP_LEFT_RIGHT) if np.random.rand() < 0.5: image = image.transpose(Image.FLIP_TOP_BOTTOM) mask = mask.transpose(Image.FLIP_TOP_BOTTOM) angle = np.random.uniform(-10, 10) image = image.rotate(angle, resample=Image.BICUBIC, fillcolor=0) mask = mask.rotate(angle, resample=Image.NEAREST, fillcolor=0) image = T.ToTensor()(image) image = T.Normalize(mean=IMAGENET_MEAN, std=IMAGENET_STD)(image) mask = torch.from_numpy(np.array(mask, dtype=np.float32)).unsqueeze(0) return image, mask
def rasterize_mask(seg_struct, w, h): mask = Image.new("L", (w, h), 0) draw = ImageDraw.Draw(mask) if seg_struct is not None: for lbl, pts in zip(seg_struct["label"], seg_struct["points"]): if lbl in ("Tumor", "Flat Tumor"): poly = [(float(p[0]), float(p[1])) for p in pts] if len(poly) >= 3: draw.polygon(poly, fill=1) return np.array(mask, dtype=np.float32)
class FTarget3Dataset(Dataset): """target3 classification on dataset F. Letterboxed, aspect-ratio-preserving.""" def __init__(self, split, fold=None, train=True, size=384): # F1 dataset uses "val" instead of "validation" _split = "val" if split == "validation" else split self.ds = load_from_disk(str(F_HF))[_split] self.fold = fold self.train = train self.size = size self.tf = get_cls_train_transforms(size) if train else get_cls_val_transforms(size) all_cv = self.ds["cv_fold"] all_t3 = self.ds["target3"] all_src = self.ds["source_dataset"] if fold is not None: assert split == "train" self.indices = [i for i, c in enumerate(all_cv) if c == fold] else: self.indices = list(range(len(self.ds))) self._labels = [all_t3[i] for i in self.indices] self._sources = [all_src[i] for i in self.indices]
def __len__(self): return len(self.indices)
def get_label(self, idx): return self._labels[idx]
def all_labels(self): return list(self._labels)
def __getitem__(self, idx): r = self.ds[self.indices[idx]] img = r["image"].convert("RGB") x = self.tf(img) return x, r["target3"], r.get("source_dataset", ""), r.get("imaging_type", -1)
# ---------- Segmentation (milkyroad/C malignant images, mapped to F split) ----------
def _build_fn_to_f_map(): import pandas as pd f = pd.read_parquet(F_PARQUET) return dict(zip(f["original_filename"], zip(f["split"], f["cv_fold"])))
def load_seg_rows(): """Return list of seg rows: {filename, pid, image, segmentation, f_split, f_cv}.""" c_ds = load_dataset("milkyroad/C", split="train") fn_map = _build_fn_to_f_map() rows = [] for r in c_ds: if r["has_segmentation"] == 1 and r["class"] == "Malignant": fn = r["filename"] if fn not in fn_map: continue split, cv = fn_map[fn] rows.append({ "filename": fn, "pid": r["pid"], "image": r["image"], "segmentation": r["segmentation"], "f_split": split, "f_cv": int(cv), }) return rows
class SegDataset(Dataset): def __init__(self, rows, train=True, size=384): self.rows = rows self.train = train self.tf = SegPairTransform(size=size, train=train)
def __len__(self): return len(self.rows)
def __getitem__(self, idx): r = self.rows[idx] img = r["image"].convert("RGB") w, h = img.size mask_arr = rasterize_mask(r["segmentation"], w, h) mask = Image.fromarray(mask_arr.astype(np.uint8), mode="L") x, m = self.tf(img, mask) return x, m
def build_seg_splits(): rows = load_seg_rows() splits = {"train": [], "validation": [], "test": []} for r in rows: s = r["f_split"] if s == "val": s = "validation" splits[s].append(r) return splits123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175"""Dataset F utilities β squeeze (T.Resize((384,384)), aspect-ratio distorted).
Images are squeezed to (size, size) directly, which distorts aspect ratio.This is the original v4 approach.
Supports: ConvNeXt-Tiny, Swin-Tiny, MambaVision-T, ResNet-50."""import pathlibimport numpy as npimport torchfrom torch.utils.data import Datasetfrom PIL import Image, ImageDrawfrom torchvision import transforms as Tfrom torchvision.transforms import InterpolationModefrom datasets import load_from_disk, load_dataset
ROOT = pathlib.Path(__file__).parentF_HF = pathlib.Path("/home/kccitadmin/jupyterlab/sandbox/datasets/F1_hf_dataset")F_PARQUET = pathlib.Path("/home/kccitadmin/jupyterlab/sandbox/datasets/reports/F_prepared.parquet")
TARGET3_NAMES = ["malignant", "non_malignant", "non_roi"]IMAGING_NAMES = ["WLI", "NBI", "BLC"]SOURCE_NAMES = ["B", "C", "D"]
IMAGENET_MEAN = [0.485, 0.456, 0.406]IMAGENET_STD = [0.229, 0.224, 0.225]
def get_cls_train_transforms(size=384): return T.Compose([ T.Resize((size, size), interpolation=InterpolationMode.BICUBIC), T.RandomHorizontalFlip(p=0.5), T.RandomVerticalFlip(p=0.5), T.RandomRotation(degrees=10), T.ColorJitter(brightness=0.2, contrast=0.2, saturation=0.2, hue=0.05), T.ToTensor(), T.Normalize(mean=IMAGENET_MEAN, std=IMAGENET_STD), ])
def get_cls_val_transforms(size=384): return T.Compose([ T.Resize((size, size), interpolation=InterpolationMode.BICUBIC), T.ToTensor(), T.Normalize(mean=IMAGENET_MEAN, std=IMAGENET_STD), ])
class SegPairTransform: def __init__(self, size=384, train=True): self.size = size self.train = train
def __call__(self, image, mask): image = image.resize((self.size, self.size), Image.BICUBIC) mask = mask.resize((self.size, self.size), Image.NEAREST) if self.train: if np.random.rand() < 0.5: image = image.transpose(Image.FLIP_LEFT_RIGHT) mask = mask.transpose(Image.FLIP_LEFT_RIGHT) if np.random.rand() < 0.5: image = image.transpose(Image.FLIP_TOP_BOTTOM) mask = mask.transpose(Image.FLIP_TOP_BOTTOM) angle = np.random.uniform(-10, 10) image = image.rotate(angle, resample=Image.BICUBIC, fillcolor=0) mask = mask.rotate(angle, resample=Image.NEAREST, fillcolor=0) image = T.ToTensor()(image) image = T.Normalize(mean=IMAGENET_MEAN, std=IMAGENET_STD)(image) mask = torch.from_numpy(np.array(mask, dtype=np.float32)).unsqueeze(0) return image, mask
def rasterize_mask(seg_struct, w, h): mask = Image.new("L", (w, h), 0) draw = ImageDraw.Draw(mask) if seg_struct is not None: for lbl, pts in zip(seg_struct["label"], seg_struct["points"]): if lbl in ("Tumor", "Flat Tumor"): poly = [(float(p[0]), float(p[1])) for p in pts] if len(poly) >= 3: draw.polygon(poly, fill=1) return np.array(mask, dtype=np.float32)
class FTarget3Dataset(Dataset): """target3 classification on dataset F. Squeezed to (size, size).""" def __init__(self, split, fold=None, train=True, size=384): # F1 dataset uses "val" instead of "validation" _split = "val" if split == "validation" else split self.ds = load_from_disk(str(F_HF))[_split] self.fold = fold self.train = train self.size = size self.tf = get_cls_train_transforms(size) if train else get_cls_val_transforms(size) all_cv = self.ds["cv_fold"] all_t3 = self.ds["target3"] all_src = self.ds["source_dataset"] if fold is not None: assert split == "train" self.indices = [i for i, c in enumerate(all_cv) if c == fold] else: self.indices = list(range(len(self.ds))) self._labels = [all_t3[i] for i in self.indices] self._sources = [all_src[i] for i in self.indices]
def __len__(self): return len(self.indices)
def get_label(self, idx): return self._labels[idx]
def all_labels(self): return list(self._labels)
def __getitem__(self, idx): r = self.ds[self.indices[idx]] img = r["image"].convert("RGB") x = self.tf(img) return x, r["target3"], r.get("source_dataset", ""), r.get("imaging_type", -1)
# ---------- Segmentation (milkyroad/C malignant, mapped to F split) ----------
def _build_fn_to_f_map(): import pandas as pd f = pd.read_parquet(F_PARQUET) return dict(zip(f["original_filename"], zip(f["split"], f["cv_fold"])))
def load_seg_rows(): """Return list of seg rows: {filename, pid, image, segmentation, f_split, f_cv}.""" c_ds = load_dataset("milkyroad/C", split="train") fn_map = _build_fn_to_f_map() rows = [] for r in c_ds: if r["has_segmentation"] == 1 and r["class"] == "Malignant": fn = r["filename"] if fn not in fn_map: continue split, cv = fn_map[fn] rows.append({ "filename": fn, "pid": r["pid"], "image": r["image"], "segmentation": r["segmentation"], "f_split": split, "f_cv": int(cv), }) return rows
class SegDataset(Dataset): def __init__(self, rows, train=True, size=384): self.rows = rows self.train = train self.tf = SegPairTransform(size=size, train=train)
def __len__(self): return len(self.rows)
def __getitem__(self, idx): r = self.rows[idx] img = r["image"].convert("RGB") w, h = img.size mask_arr = rasterize_mask(r["segmentation"], w, h) mask = Image.fromarray(mask_arr.astype(np.uint8), mode="L") x, m = self.tf(img, mask) return x, m
def build_seg_splits(): rows = load_seg_rows() splits = {"train": [], "validation": [], "test": []} for r in rows: s = r["f_split"] if s == "val": s = "validation" splits[s].append(r) return splits123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295"""Stage 1 v1 final: 4-model ensemble stacking (convnext, swin, mamba, resnet).
Both cRT and plain ensembles. 3 combiner methods: A. logreg_logits_balanced β LogReg on 12-dim raw logits (4 backbones Γ 3 classes) B. logreg_softmax_balanced β LogReg on 12-dim softmax probabilities C. avg_softmax β simple softmax-probability averaging
Best method selected by pooled OOF macro-F1, then applied to test.
Usage: python ensemble.py --resize letterbox python ensemble.py --resize squeeze"""import argparseimport jsonimport pathlibimport sysimport numpy as npfrom scipy.special import softmaxfrom sklearn.linear_model import LogisticRegressionfrom sklearn.preprocessing import StandardScalerfrom sklearn.metrics import (f1_score, accuracy_score, balanced_accuracy_score, confusion_matrix, classification_report)
ROOT = pathlib.Path(__file__).parentsys.path.insert(0, str(ROOT))
BACKBONES = ["convnext", "swin", "mamba", "resnet"]NUM_CLASSES = 3SEED = 17METHODS = ["logreg_logits_balanced", "logreg_softmax_balanced", "avg_softmax"]
def get_paths(resize): return ROOT / "logits" / resize, ROOT / "results" / resize
def load_split(logits_dir, kind, prefix=""): """kind = 'oof' or 'test'. prefix = '' for cRT, 'plain_' for plain. Logits are stored in per-backbone subdirectories: logits_dir/{bb}/{prefix}{bb}_{kind}.npz """ out = {} for bb in BACKBONES: f = logits_dir / bb / f"{prefix}{bb}_{kind}.npz" z = np.load(f, allow_pickle=True) out[bb] = {k: z[k] for k in z.files} return out
def stack_features(d, backbones=BACKBONES, use_softmax=False): arrs = [] for bb in backbones: lg = d[bb]["logits"].astype(np.float32) arrs.append(softmax(lg, axis=1) if use_softmax else lg) return np.concatenate(arrs, axis=1).astype(np.float32)
def compute_per_class_precision(true, pred, names): true = np.asarray(true); pred = np.asarray(pred) result = {} for i, name in enumerate(names): tp = ((pred == i) & (true == i)).sum() fp = ((pred == i) & (true != i)).sum() result[name] = float(tp / max(tp + fp, 1)) return result
def metrics_from_pred(pred, true, src=None, names=None): if names is None: names = ["malignant", "non_malignant", "non_roi"] pred = np.asarray(pred); true = np.asarray(true) m = { "macro_f1": float(f1_score(true, pred, average="macro", labels=list(range(NUM_CLASSES)), zero_division=0)), "accuracy": float(accuracy_score(true, pred)), "balanced_acc": float(balanced_accuracy_score(true, pred)), "per_class_recall": {names[i]: float(((true == i) & (pred == i)).sum() / max((true == i).sum(), 1)) for i in range(NUM_CLASSES)}, "per_class_precision": compute_per_class_precision(true, pred, names), "confusion_matrix": confusion_matrix(true, pred, labels=list(range(NUM_CLASSES))).tolist(), "classification_report": classification_report(true, pred, labels=list(range(NUM_CLASSES)), target_names=names, output_dict=True, zero_division=0), "n": len(pred), } if src is not None: src = np.asarray(src) for s in ["B", "C", "D"]: mk = src == s if mk.sum() > 0: m[f"src_{s}_acc"] = float(accuracy_score(true[mk], pred[mk])) m[f"src_{s}_n"] = int(mk.sum()) return m
def make_logreg(): return LogisticRegression(C=1.0, max_iter=2000, solver="lbfgs", class_weight="balanced", random_state=SEED)
def predict_method(method, X_tr, y_tr, X_va, n_backbones=len(BACKBONES)): if method == "avg_softmax": blocks = [X_va[:, i*NUM_CLASSES:(i+1)*NUM_CLASSES] for i in range(n_backbones)] avg = np.mean(blocks, axis=0) return avg.argmax(1) scaler = StandardScaler() Xtr = scaler.fit_transform(X_tr) Xva = scaler.transform(X_va) clf = make_logreg() clf.fit(Xtr, y_tr) return clf.predict(Xva)
def run_cv_method(method, X_oof, y_oof, cv_folds, src_oof): fold_metrics = [] for k in range(5): tr_mask = cv_folds != k va_mask = cv_folds == k pred_va = predict_method(method, X_oof[tr_mask], y_oof[tr_mask], X_oof[va_mask]) m = metrics_from_pred(pred_va, y_oof[va_mask], src_oof[va_mask]) m["fold"] = int(k) fold_metrics.append(m) f1s = [fm["macro_f1"] for fm in fold_metrics] nms = [fm["per_class_recall"]["non_malignant"] for fm in fold_metrics] baccs = [fm["balanced_acc"] for fm in fold_metrics] prec_mal = [fm["per_class_precision"]["malignant"] for fm in fold_metrics] prec_nm = [fm["per_class_precision"]["non_malignant"] for fm in fold_metrics] prec_nroi = [fm["per_class_precision"]["non_roi"] for fm in fold_metrics] rec_mal = [fm["per_class_recall"]["malignant"] for fm in fold_metrics] rec_nm = [fm["per_class_recall"]["non_malignant"] for fm in fold_metrics] rec_nroi = [fm["per_class_recall"]["non_roi"] for fm in fold_metrics] return { "folds": fold_metrics, "cv_macro_f1_mean": float(np.mean(f1s)), "cv_macro_f1_std": float(np.std(f1s)), "cv_non_malignant_recall_mean": float(np.mean(nms)), "cv_non_malignant_recall_std": float(np.std(nms)), "cv_balanced_acc_mean": float(np.mean(baccs)), "cv_balanced_acc_std": float(np.std(baccs)), "cv_malignant_precision_mean": float(np.mean(prec_mal)), "cv_malignant_precision_std": float(np.std(prec_mal)), "cv_non_malignant_precision_mean": float(np.mean(prec_nm)), "cv_non_malignant_precision_std": float(np.std(prec_nm)), "cv_non_roi_precision_mean": float(np.mean(prec_nroi)), "cv_non_roi_precision_std": float(np.std(prec_nroi)), "cv_malignant_recall_mean": float(np.mean(rec_mal)), "cv_malignant_recall_std": float(np.std(rec_mal)), "cv_non_malignant_recall_mean": float(np.mean(nms)), "cv_non_malignant_recall_std": float(np.std(nms)), "cv_non_roi_recall_mean": float(np.mean(rec_nroi)), "cv_non_roi_recall_std": float(np.std(rec_nroi)), }
def run_pooled_method(method, X_oof, y_oof, cv_folds, src_oof): oof_pred = np.zeros(len(y_oof), dtype=np.int64) for k in range(5): tr_mask = cv_folds != k va_mask = cv_folds == k oof_pred[va_mask] = predict_method(method, X_oof[tr_mask], y_oof[tr_mask], X_oof[va_mask]) return metrics_from_pred(oof_pred, y_oof, src_oof)
def fit_predict_test(method, X_oof, y_oof, X_test, n_backbones=len(BACKBONES)): if method == "avg_softmax": blocks = [X_test[:, i*NUM_CLASSES:(i+1)*NUM_CLASSES] for i in range(n_backbones)] avg = np.mean(blocks, axis=0) return avg.argmax(1), avg scaler = StandardScaler() Xtr = scaler.fit_transform(X_oof) Xte = scaler.transform(X_test) clf = make_logreg() clf.fit(Xtr, y_oof) pred = clf.predict(Xte) proba = clf.predict_proba(Xte) return pred, proba
def single_metrics(logits_dir, kind, prefix=""): d = load_split(logits_dir, kind, prefix=prefix) out = {} for bb in BACKBONES: pred = d[bb]["logits"].argmax(1) y = d[bb]["labels"]; src = d[bb].get("source", None) out[bb] = metrics_from_pred(pred, y, src) return out
def run_ensemble(label, prefix, logits_dir, results_dir): """label='cRT' or 'plain'. prefix='' for cRT, 'plain_' for plain.""" print(f"\n=== Ensemble stacking ({label}, 4 backbones: {BACKBONES}) ===") oof = load_split(logits_dir, "oof", prefix=prefix) test = load_split(logits_dir, "test", prefix=prefix)
for bb in BACKBONES: assert np.array_equal(oof[bb]["labels"], oof["convnext"]["labels"]), f"oof labels mismatch {bb}" assert np.array_equal(test[bb]["labels"], test["convnext"]["labels"]), f"test labels mismatch {bb}" print("alignment OK")
y_oof = oof["convnext"]["labels"].astype(np.int64) y_test = test["convnext"]["labels"].astype(np.int64) cv_folds = oof["convnext"]["cv_fold"].astype(np.int64) src_oof = oof["convnext"]["source"] src_test = test["convnext"]["source"]
X_oof_raw = stack_features(oof, use_softmax=False) X_oof_sm = stack_features(oof, use_softmax=True) X_test_raw = stack_features(test, use_softmax=False) X_test_sm = stack_features(test, use_softmax=True) print(f"X_oof_raw {X_oof_raw.shape} X_oof_sm {X_oof_sm.shape}")
method_features = { "logreg_logits_balanced": (X_oof_raw, X_test_raw), "logreg_softmax_balanced": (X_oof_sm, X_test_sm), "avg_softmax": (X_oof_sm, X_test_sm), }
all_cv = {} all_pooled = {} all_test = {} for method in METHODS: Xo, Xt = method_features[method] print(f"\n--- {method} CV per-fold ---") cv_res = run_cv_method(method, Xo, y_oof, cv_folds, src_oof) for fm in cv_res["folds"]: print(f" fold{fm['fold']}: f1={fm['macro_f1']:.4f} nm_rec={fm['per_class_recall']['non_malignant']:.4f}") print(f" CV: f1={cv_res['cv_macro_f1_mean']:.4f}+-{cv_res['cv_macro_f1_std']:.4f}")
print(f"--- {method} CV pooled ---") pooled = run_pooled_method(method, Xo, y_oof, cv_folds, src_oof) print(f" pooled: f1={pooled['macro_f1']:.4f} nm_rec={pooled['per_class_recall']['non_malignant']:.4f}")
print(f"--- {method} Test ---") pred_te, proba_te = fit_predict_test(method, Xo, y_oof, Xt) tm = metrics_from_pred(pred_te, y_test, src_test) print(f" test: f1={tm['macro_f1']:.4f} nm_rec={tm['per_class_recall']['non_malignant']:.4f} bacc={tm['balanced_acc']:.4f}")
all_cv[method] = cv_res all_pooled[method] = pooled all_test[method] = {"test_metrics": tm, "pred": pred_te.tolist(), "proba": proba_te.tolist()}
best_method = max(METHODS, key=lambda m: all_pooled[m]["macro_f1"]) print(f"\n=== Best method: {best_method} (pooled OOF macro-F1={all_pooled[best_method]['macro_f1']:.4f}) ===")
tag = label.lower() # 'crt' or 'plain' cv_summary = { "label": label, "methods": METHODS, "best_method": best_method, "backbones": BACKBONES, "per_method_cv": {m: all_cv[m] for m in METHODS}, "per_method_pooled": {m: all_pooled[m] for m in METHODS}, "best_cv": all_cv[best_method], "best_pooled": all_pooled[best_method], } (results_dir / f"ensemble_{tag}_cv_summary.json").write_text(json.dumps(cv_summary, indent=2))
best_test = all_test[best_method] test_summary = { "label": label, "best_method": best_method, "test_metrics": best_test["test_metrics"], "all_methods_test": {m: all_test[m]["test_metrics"] for m in METHODS}, } (results_dir / f"ensemble_{tag}_test.json").write_text(json.dumps(test_summary, indent=2))
# Single model metrics single_cv = single_metrics(logits_dir, "oof", prefix=prefix) single_te = single_metrics(logits_dir, "test", prefix=prefix) comp = { "cv_single": {bb: single_cv[bb] for bb in BACKBONES}, "cv_ensemble_best_per_fold": all_cv[best_method], "cv_ensemble_best_pooled": all_pooled[best_method], "test_single": {bb: single_te[bb] for bb in BACKBONES}, "test_ensemble_best": best_test["test_metrics"], "best_method": best_method, "all_methods_test": {m: all_test[m]["test_metrics"] for m in METHODS}, } (results_dir / f"ensemble_{tag}_single_vs_ensemble.json").write_text(json.dumps(comp, indent=2))
print(f"\nBest method: {best_method}") print(f"CV per-fold f1: {all_cv[best_method]['cv_macro_f1_mean']:.4f}+-{all_cv[best_method]['cv_macro_f1_std']:.4f}") print(f"CV pooled f1: {all_pooled[best_method]['macro_f1']:.4f}") print(f"Test f1: {best_test['test_metrics']['macro_f1']:.4f}") return cv_summary, test_summary, comp
def main(): ap = argparse.ArgumentParser() ap.add_argument("--resize", choices=["letterbox", "squeeze"], required=True) args = ap.parse_args()
# Map "squeeze" arg to "resized" directory name resize_dir = "resized" if args.resize == "squeeze" else args.resize logits_dir, results_dir = get_paths(resize_dir) results_dir.mkdir(parents=True, exist_ok=True)
crt_cv, crt_test, crt_comp = run_ensemble("cRT", "", logits_dir, results_dir) plain_cv, plain_test, plain_comp = run_ensemble("plain", "plain_", logits_dir, results_dir)
# Consolidated all_results = { "backbones": BACKBONES, "resize": args.resize, "crt": {"cv_summary": crt_cv, "test_summary": crt_test, "comparison": crt_comp}, "plain": {"cv_summary": plain_cv, "test_summary": plain_test, "comparison": plain_comp}, } (results_dir / "ensemble_all.json").write_text(json.dumps(all_results, indent=2)) print("\n=== All 4-model ensembles complete ===")
if __name__ == "__main__": main()1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336{ "convnext": { "plain_cv": { "label": "convnext_plain_cv", "folds": [ { "mcc": 0.9194120515046523, "macro_f1": 0.7549369857124005, "MT_recall": 0.9638157894736842, "MT_precision": 0.956474428726877, "NML_recall": 0.2857142857142857, "NML_precision": 0.3684210526315789, "NROI_recall": 0.9847182425978988, "NROI_precision": 0.9809705042816366, "fold": 0 }, { "mcc": 0.8549812264654902, "macro_f1": 0.7904883586467214, "MT_recall": 0.9462719298245614, "MT_precision": 0.9046121593291404, "NML_recall": 0.4, "NML_precision": 0.6896551724137931, "NROI_recall": 0.9308056872037914, "NROI_precision": 0.9497098646034816, "fold": 1 }, { "mcc": 0.872484283655017, "macro_f1": 0.7191863717346433, "MT_recall": 0.9484649122807017, "MT_precision": 0.9241452991452992, "NML_recall": 0.2653061224489796, "NML_precision": 0.25, "NROI_recall": 0.9513145082765336, "NROI_precision": 0.977, "fold": 2 }, { "mcc": 0.8605827674546662, "macro_f1": 0.7565141287721873, "MT_recall": 0.9222343921139102, "MT_precision": 0.9439461883408071, "NML_recall": 0.4, "NML_precision": 0.37735849056603776, "NROI_recall": 0.9560439560439561, "NROI_precision": 0.9405405405405406, "fold": 3 }, { "mcc": 0.8458089107559619, "macro_f1": 0.652147601979934, "MT_recall": 0.9452354874041621, "MT_precision": 0.8924508790072389, "NML_recall": 0.058823529411764705, "NML_precision": 0.1875, "NROI_recall": 0.9400966183574879, "NROI_precision": 0.9576771653543307, "fold": 4 } ], "cv_means": { "MCC": 0.8706538479671575, "MCC_std": 0.02586519491309903, "macro_f1": 0.7346546893691773, "MT_recall": 0.9452045022194039, "MT_precision": 0.9243257909098725, "NML_recall": 0.28196878751500604, "NML_precision": 0.374586943122282, "NROI_recall": 0.9525958024959337, "NROI_precision": 0.9611796149559979 } }, "plain_final": { "mcc": 0.9090384360223862, "macro_f1": 0.7867752685071485, "MT_recall": 0.9458077709611452, "MT_precision": 0.9809119830328739, "NML_recall": 0.32075471698113206, "NML_precision": 0.68, "NROI_recall": 0.9884032114183765, "NROI_precision": 0.9358108108108109, "label": "convnext_plain_test" }, "crt_cv": { "label": "convnext_crt_cv", "folds": [ { "mcc": 0.8962843598604839, "macro_f1": 0.7408092088815458, "MT_recall": 0.9429824561403509, "MT_precision": 0.9598214285714286, "NML_recall": 0.3673469387755102, "NML_precision": 0.24324324324324326, "NROI_recall": 0.9742120343839542, "NROI_precision": 0.9826589595375722, "fold": 0 }, { "mcc": 0.8428535107275467, "macro_f1": 0.7854925379619416, "MT_recall": 0.9013157894736842, "MT_precision": 0.9372862029646523, "NML_recall": 0.66, "NML_precision": 0.39759036144578314, "NROI_recall": 0.9421800947867298, "NROI_precision": 0.9403973509933775, "fold": 1 }, { "mcc": 0.8441916372913202, "macro_f1": 0.731610480037181, "MT_recall": 0.9122807017543859, "MT_precision": 0.9193370165745857, "NML_recall": 0.4897959183673469, "NML_precision": 0.23529411764705882, "NROI_recall": 0.9396299902629016, "NROI_precision": 0.9836901121304791, "fold": 2 }, { "mcc": 0.7735090950435417, "macro_f1": 0.7026481770827727, "MT_recall": 0.8904709748083242, "MT_precision": 0.9073660714285714, "NML_recall": 0.68, "NML_precision": 0.18994413407821228, "NROI_recall": 0.8653846153846154, "NROI_precision": 0.9642857142857143, "fold": 3 }, { "mcc": 0.7693347234033466, "macro_f1": 0.6388269960982316, "MT_recall": 0.8849945235487404, "MT_precision": 0.9017857142857143, "NML_recall": 0.17647058823529413, "NML_precision": 0.06428571428571428, "NROI_recall": 0.8966183574879227, "NROI_precision": 0.9636552440290758, "fold": 4 } ], "cv_means": { "MCC": 0.8252346652652477, "MCC_std": 0.04799622426987891, "macro_f1": 0.7198774800123345, "MT_recall": 0.9064088891450972, "MT_precision": 0.9251192867649906, "NML_recall": 0.4747226890756303, "NML_precision": 0.22607151414000234, "NROI_recall": 0.9236050184612248, "NROI_precision": 0.9669374761952436 } }, "crt_final": { "mcc": 0.8961001150661378, "macro_f1": 0.7851771594706953, "MT_recall": 0.9529652351738241, "MT_precision": 0.9718456725755996, "NML_recall": 0.5849056603773585, "NML_precision": 0.34065934065934067, "NROI_recall": 0.9545049063336307, "NROI_precision": 0.9709618874773139, "label": "convnext_crt_test" } }, "swin": { "plain_cv": { "label": "swin_plain_cv", "folds": [ { "mcc": 0.9290503864306585, "macro_f1": 0.7848429877450399, "MT_recall": 0.9616228070175439, "MT_precision": 0.9669239250275634, "NML_recall": 0.3673469387755102, "NML_precision": 0.45, "NROI_recall": 0.9923591212989494, "NROI_precision": 0.9792648444863337, "fold": 0 }, { "mcc": 0.8354408048926615, "macro_f1": 0.7926293935683866, "MT_recall": 0.9287280701754386, "MT_precision": 0.9058823529411765, "NML_recall": 0.5, "NML_precision": 0.5681818181818182, "NROI_recall": 0.9213270142180094, "NROI_precision": 0.9364161849710982, "fold": 1 }, { "mcc": 0.869398518490781, "macro_f1": 0.7215335981154607, "MT_recall": 0.930921052631579, "MT_precision": 0.9238302502720348, "NML_recall": 0.24489795918367346, "NML_precision": 0.3076923076923077, "NROI_recall": 0.9659201557935735, "NROI_precision": 0.9631067961165048, "fold": 2 }, { "mcc": 0.8392308784026812, "macro_f1": 0.7434488108023993, "MT_recall": 0.8882803943044907, "MT_precision": 0.9364896073903002, "NML_recall": 0.54, "NML_precision": 0.2755102040816326, "NROI_recall": 0.9532967032967034, "NROI_precision": 0.9541704857928506, "fold": 3 }, { "mcc": 0.8420546110373329, "macro_f1": 0.6836072581894488, "MT_recall": 0.8981380065717415, "MT_precision": 0.9371428571428572, "NML_recall": 0.19607843137254902, "NML_precision": 0.16129032258064516, "NROI_recall": 0.9690821256038648, "NROI_precision": 0.9444444444444444, "fold": 4 } ], "cv_means": { "MCC": 0.8630350398508229, "MCC_std": 0.035119163266884225, "macro_f1": 0.745212409684147, "MT_recall": 0.9215380661401588, "MT_precision": 0.9340537985547863, "NML_recall": 0.36966466586634655, "NML_precision": 0.3525349305072808, "NROI_recall": 0.9603970240422199, "NROI_precision": 0.9554805511622464 } }, "plain_final": { "mcc": 0.9105187847427771, "macro_f1": 0.8172548784070295, "MT_recall": 0.9550102249488752, "MT_precision": 0.9579487179487179, "NML_recall": 0.4716981132075472, "NML_precision": 0.5952380952380952, "NROI_recall": 0.9750223015165032, "NROI_precision": 0.9629955947136564, "label": "swin_plain_test" }, "crt_cv": { "label": "swin_crt_cv", "folds": [ { "mcc": 0.9193544888001476, "macro_f1": 0.796298046609862, "MT_recall": 0.9495614035087719, "MT_precision": 0.9622222222222222, "NML_recall": 0.5102040816326531, "NML_precision": 0.3968253968253968, "NROI_recall": 0.9856733524355301, "NROI_precision": 0.9875598086124402, "fold": 0 }, { "mcc": 0.8195057269796786, "macro_f1": 0.7853334523742818, "MT_recall": 0.9089912280701754, "MT_precision": 0.9070021881838074, "NML_recall": 0.68, "NML_precision": 0.425, "NROI_recall": 0.9109004739336493, "NROI_precision": 0.9393939393939394, "fold": 1 }, { "mcc": 0.8559996378789152, "macro_f1": 0.7431091212492773, "MT_recall": 0.9078947368421053, "MT_precision": 0.9282511210762332, "NML_recall": 0.32653061224489793, "NML_precision": 0.3902439024390244, "NROI_recall": 0.9688412852969815, "NROI_precision": 0.943127962085308, "fold": 2 }, { "mcc": 0.7831106139350331, "macro_f1": 0.7060042798394687, "MT_recall": 0.8619934282584885, "MT_precision": 0.9258823529411765, "NML_recall": 0.7, "NML_precision": 0.18716577540106952, "NROI_recall": 0.8983516483516484, "NROI_precision": 0.9636542239685658, "fold": 3 }, { "mcc": 0.7771847289348364, "macro_f1": 0.6691956327288544, "MT_recall": 0.8707557502738226, "MT_precision": 0.9330985915492958, "NML_recall": 0.39215686274509803, "NML_precision": 0.11428571428571428, "NROI_recall": 0.9014492753623189, "NROI_precision": 0.9598765432098766, "fold": 4 } ], "cv_means": { "MCC": 0.8310310393057222, "MCC_std": 0.052446330239173014, "macro_f1": 0.7399881065603489, "MT_recall": 0.8998393093906728, "MT_precision": 0.9312912951945471, "NML_recall": 0.5217783113245298, "NML_precision": 0.30270415779024107, "NROI_recall": 0.9330432070760256, "NROI_precision": 0.9587224954540261 } }, "crt_final": { "mcc": 0.8903622799040505, "macro_f1": 0.8024222443562965, "MT_recall": 0.934560327198364, "MT_precision": 0.961093585699264, "NML_recall": 0.6981132075471698, "NML_precision": 0.38144329896907214, "NROI_recall": 0.9589652096342551, "NROI_precision": 0.9737318840579711, "label": "swin_crt_test" } }, "mamba": { "plain_cv": { "label": "mamba_plain_cv", "folds": [ { "mcc": 0.9126781960556674, "macro_f1": 0.7622487991650223, "MT_recall": 0.9616228070175439, "MT_precision": 0.9481081081081081, "NML_recall": 0.30612244897959184, "NML_precision": 0.4166666666666667, "NROI_recall": 0.9789875835721108, "NROI_precision": 0.9789875835721108, "fold": 0 }, { "mcc": 0.8305638131967935, "macro_f1": 0.7762061365474086, "MT_recall": 0.9002192982456141, "MT_precision": 0.9266365688487584, "NML_recall": 0.4, "NML_precision": 0.625, "NROI_recall": 0.9469194312796209, "NROI_precision": 0.9090081892629663, "fold": 1 }, { "mcc": 0.8254502646971118, "macro_f1": 0.7283130543096893, "MT_recall": 0.9221491228070176, "MT_precision": 0.8937300743889479, "NML_recall": 0.3469387755102041, "NML_precision": 0.3333333333333333, "NROI_recall": 0.9230769230769231, "NROI_precision": 0.9518072289156626, "fold": 2 }, { "mcc": 0.8650734110074164, "macro_f1": 0.7329640527858814, "MT_recall": 0.9660460021905805, "MT_precision": 0.9055441478439425, "NML_recall": 0.3, "NML_precision": 0.32608695652173914, "NROI_recall": 0.9267399267399268, "NROI_precision": 0.9777777777777777, "fold": 3 }, { "mcc": 0.8536968685656782, "macro_f1": 0.6453354212756119, "MT_recall": 0.9299014238773274, "MT_precision": 0.9129032258064517, "NML_recall": 0.0392156862745098, "NML_precision": 0.125, "NROI_recall": 0.9632850241545894, "NROI_precision": 0.9468186134852802, "fold": 4 } ], "cv_means": { "MCC": 0.8574925107045335, "MCC_std": 0.031206400288999524, "macro_f1": 0.7290134928167227, "MT_recall": 0.9359877308276167, "MT_precision": 0.9173844249992417, "NML_recall": 0.27845538215286114, "NML_precision": 0.3652173913043478, "NROI_recall": 0.9478017777646341, "NROI_precision": 0.9528798786027595 } }, "plain_final": { "mcc": 0.8750689776791892, "macro_f1": 0.6878826698558232, "MT_recall": 0.9683026584867076, "MT_precision": 0.907088122605364, "NML_recall": 0.11320754716981132, "NML_precision": 0.3333333333333333, "NROI_recall": 0.944692239072257, "NROI_precision": 0.9715596330275229, "label": "mamba_plain_test" }, "crt_cv": { "label": "mamba_crt_cv", "folds": [ { "mcc": 0.8943879229677248, "macro_f1": 0.7703929883524615, "MT_recall": 0.930921052631579, "MT_precision": 0.9571589627959414, "NML_recall": 0.4897959183673469, "NML_precision": 0.32432432432432434, "NROI_recall": 0.9770773638968482, "NROI_precision": 0.9770773638968482, "fold": 0 }, { "mcc": 0.7849668120875456, "macro_f1": 0.7388394190601253, "MT_recall": 0.8739035087719298, "MT_precision": 0.9098173515981736, "NML_recall": 0.7, "NML_precision": 0.2892561983471074, "NROI_recall": 0.9004739336492891, "NROI_precision": 0.9313725490196079, "fold": 1 }, { "mcc": 0.8013597092447522, "macro_f1": 0.7233465535919801, "MT_recall": 0.9057017543859649, "MT_precision": 0.8872180451127819, "NML_recall": 0.4489795918367347, "NML_precision": 0.28205128205128205, "NROI_recall": 0.9055501460564752, "NROI_precision": 0.9499489274770173, "fold": 2 }, { "mcc": 0.773009281732149, "macro_f1": 0.7082230304388544, "MT_recall": 0.904709748083242, "MT_precision": 0.9027322404371585, "NML_recall": 0.78, "NML_precision": 0.19796954314720813, "NROI_recall": 0.8434065934065934, "NROI_precision": 0.9766702014846236, "fold": 3 }, { "mcc": 0.70299592439667, "macro_f1": 0.6144642398310995, "MT_recall": 0.8762322015334063, "MT_precision": 0.9009009009009009, "NML_recall": 0.21568627450980393, "NML_precision": 0.04680851063829787, "NROI_recall": 0.8106280193236715, "NROI_precision": 0.9577625570776256, "fold": 4 } ], "cv_means": { "MCC": 0.7913439300857682, "MCC_std": 0.061482643688561926, "macro_f1": 0.7110532462549042, "MT_recall": 0.8982936530812242, "MT_precision": 0.9115655001689913, "NML_recall": 0.5268923569427771, "NML_precision": 0.22808197170164393, "NROI_recall": 0.8874272112665755, "NROI_precision": 0.9585663197911444 } }, "crt_final": { "mcc": 0.8358210752297587, "macro_f1": 0.710723127977536, "MT_recall": 0.9294478527607362, "MT_precision": 0.9026812313803376, "NML_recall": 0.33962264150943394, "NML_precision": 0.21951219512195122, "NROI_recall": 0.9250669045495094, "NROI_precision": 0.9755409219190969, "label": "mamba_crt_test" } }, "resnet": { "plain_cv": { "label": "resnet_plain_cv", "folds": [ { "mcc": 0.8842115065276618, "macro_f1": 0.6888789981412877, "MT_recall": 0.9243421052631579, "MT_precision": 0.9514672686230248, "NML_recall": 0.14285714285714285, "NML_precision": 0.16666666666666666, "NROI_recall": 0.9904489016236867, "NROI_precision": 0.9601851851851851, "fold": 0 }, { "mcc": 0.7134671091024417, "macro_f1": 0.5749939773548542, "MT_recall": 0.8278508771929824, "MT_precision": 0.8708189158016147, "NML_recall": 0.0, "NML_precision": 0.0, "NROI_recall": 0.9156398104265403, "NROI_precision": 0.84, "fold": 1 }, { "mcc": 0.853620242936873, "macro_f1": 0.708771243093952, "MT_recall": 0.9484649122807017, "MT_precision": 0.8954451345755694, "NML_recall": 0.20408163265306123, "NML_precision": 0.3333333333333333, "NROI_recall": 0.9357351509250244, "NROI_precision": 0.96875, "fold": 2 }, { "mcc": 0.7764321797342358, "macro_f1": 0.6855263141708154, "MT_recall": 0.9266155531215772, "MT_precision": 0.8840125391849529, "NML_recall": 0.4, "NML_precision": 0.18018018018018017, "NROI_recall": 0.8598901098901099, "NROI_precision": 0.9513677811550152, "fold": 3 }, { "mcc": 0.8244729978595079, "macro_f1": 0.6814272127857329, "MT_recall": 0.91894852135816, "MT_precision": 0.894456289978678, "NML_recall": 0.17647058823529413, "NML_precision": 0.21951219512195122, "NROI_recall": 0.9352657004830918, "NROI_precision": 0.9490196078431372, "fold": 4 } ], "cv_means": { "MCC": 0.8104408072321441, "MCC_std": 0.060106517099850855, "macro_f1": 0.6679195491093284, "MT_recall": 0.9092443938433158, "MT_precision": 0.8992400296327681, "NML_recall": 0.18468187274909967, "NML_precision": 0.17993847506042626, "NROI_recall": 0.9273959346696905, "NROI_precision": 0.9338645148366675 } }, "plain_final": { "mcc": 0.8585527312407192, "macro_f1": 0.7583345419165192, "MT_recall": 0.9488752556237219, "MT_precision": 0.9160908193484699, "NML_recall": 0.41509433962264153, "NML_precision": 0.3793103448275862, "NROI_recall": 0.9295272078501338, "NROI_precision": 0.9639222941720629, "label": "resnet_plain_test" }, "crt_cv": { "label": "resnet_crt_cv", "folds": [ { "mcc": 0.8502617252481105, "macro_f1": 0.730679551560137, "MT_recall": 0.8695175438596491, "MT_precision": 0.9682539682539683, "NML_recall": 0.5918367346938775, "NML_precision": 0.20279720279720279, "NROI_recall": 0.9732569245463228, "NROI_precision": 0.9741873804971319, "fold": 0 }, { "mcc": 0.6720512628738716, "macro_f1": 0.6512420619279113, "MT_recall": 0.7916666666666666, "MT_precision": 0.8414918414918415, "NML_recall": 0.52, "NML_precision": 0.17333333333333334, "NROI_recall": 0.8587677725118483, "NROI_precision": 0.8979187314172448, "fold": 1 }, { "mcc": 0.8099841040138945, "macro_f1": 0.6975201299009214, "MT_recall": 0.8925438596491229, "MT_precision": 0.9044444444444445, "NML_recall": 0.32653061224489793, "NML_precision": 0.2077922077922078, "NROI_recall": 0.9328140214216164, "NROI_precision": 0.9475766567754699, "fold": 2 }, { "mcc": 0.6892112917940405, "macro_f1": 0.642297972725066, "MT_recall": 0.8685651697699891, "MT_precision": 0.8870246085011185, "NML_recall": 0.62, "NML_precision": 0.11524163568773234, "NROI_recall": 0.7765567765567766, "NROI_precision": 0.9506726457399103, "fold": 3 }, { "mcc": 0.7171930109780075, "macro_f1": 0.6252180782789704, "MT_recall": 0.836801752464403, "MT_precision": 0.9095238095238095, "NML_recall": 0.2549019607843137, "NML_precision": 0.06132075471698113, "NROI_recall": 0.8666666666666667, "NROI_precision": 0.9472016895459345, "fold": 4 } ], "cv_means": { "MCC": 0.7477402789815849, "MCC_std": 0.06996076869541769, "macro_f1": 0.6693915588786011, "MT_recall": 0.851818998481966, "MT_precision": 0.9021477344430366, "NML_recall": 0.46265386154461785, "NML_precision": 0.15209702686549148, "NROI_recall": 0.8816124323406462, "NROI_precision": 0.9435114207951383 } }, "crt_final": { "mcc": 0.8402691812418909, "macro_f1": 0.7435890103460675, "MT_recall": 0.9151329243353783, "MT_precision": 0.9381551362683438, "NML_recall": 0.5849056603773585, "NML_precision": 0.25833333333333336, "NROI_recall": 0.927743086529884, "NROI_precision": 0.9647495361781077, "label": "resnet_crt_test" } }, "ensemble_plain": { "methods_cv": { "logreg_logits_balanced": { "label": "ens_plain_logreg_logits_balanced_cv", "folds": [ { "mcc": 0.9186286053436367, "macro_f1": 0.7959915072634196, "MT_recall": 0.9342105263157895, "MT_precision": 0.9781859931113662, "NML_recall": 0.5918367346938775, "NML_precision": 0.35365853658536583, "NROI_recall": 0.9933142311365807, "NROI_precision": 0.985781990521327, "fold": 0 }, { "mcc": 0.8516274350901303, "macro_f1": 0.7890123604346321, "MT_recall": 0.930921052631579, "MT_precision": 0.9319429198682766, "NML_recall": 0.66, "NML_precision": 0.39759036144578314, "NROI_recall": 0.9251184834123223, "NROI_precision": 0.9540566959921799, "fold": 1 }, { "mcc": 0.8321775635157773, "macro_f1": 0.7147224666392457, "MT_recall": 0.8914473684210527, "MT_precision": 0.9259681093394078, "NML_recall": 0.5102040816326531, "NML_precision": 0.18382352941176472, "NROI_recall": 0.9406037000973709, "NROI_precision": 0.9917864476386037, "fold": 2 }, { "mcc": 0.728680816634543, "macro_f1": 0.6640203057111016, "MT_recall": 0.7108433734939759, "MT_precision": 0.9629080118694362, "NML_recall": 0.88, "NML_precision": 0.13095238095238096, "NROI_recall": 0.9258241758241759, "NROI_precision": 0.9674641148325359, "fold": 3 }, { "mcc": 0.7571738381171879, "macro_f1": 0.6907150723460873, "MT_recall": 0.7864184008762322, "MT_precision": 0.9598930481283422, "NML_recall": 0.8235294117647058, "NML_precision": 0.1640625, "NROI_recall": 0.9159420289855073, "NROI_precision": 0.9527638190954774, "fold": 4 } ], "cv_means": { "MCC": 0.817657651740255, "MCC_std": 0.0680221675429439, "macro_f1": 0.7308923424788972, "MT_recall": 0.8507681443477259, "MT_precision": 0.9517796164633658, "NML_recall": 0.6931140456182472, "NML_precision": 0.2460174616790589, "NROI_recall": 0.9401605238911914, "NROI_precision": 0.9703706136160248 } }, "logreg_softmax_balanced": { "label": "ens_plain_logreg_softmax_balanced_cv", "folds": [ { "mcc": 0.9146634218258007, "macro_f1": 0.7984977147390575, "MT_recall": 0.9254385964912281, "MT_precision": 0.9802555168408827, "NML_recall": 0.6530612244897959, "NML_precision": 0.34782608695652173, "NROI_recall": 0.9933142311365807, "NROI_precision": 0.985781990521327, "fold": 0 }, { "mcc": 0.8460073825010561, "macro_f1": 0.7836946407353276, "MT_recall": 0.9177631578947368, "MT_precision": 0.9372900335946248, "NML_recall": 0.66, "NML_precision": 0.38372093023255816, "NROI_recall": 0.9308056872037914, "NROI_precision": 0.9460500963391136, "fold": 1 }, { "mcc": 0.8422600108364161, "macro_f1": 0.7221573846990976, "MT_recall": 0.9013157894736842, "MT_precision": 0.927765237020316, "NML_recall": 0.5102040816326531, "NML_precision": 0.1968503937007874, "NROI_recall": 0.943524829600779, "NROI_precision": 0.9938461538461538, "fold": 2 }, { "mcc": 0.7818467734790953, "macro_f1": 0.7038866565186006, "MT_recall": 0.8214676889375685, "MT_precision": 0.9689922480620154, "NML_recall": 0.86, "NML_precision": 0.16996047430830039, "NROI_recall": 0.9111721611721612, "NROI_precision": 0.9678988326848249, "fold": 3 }, { "mcc": 0.7921101623535759, "macro_f1": 0.6999385071520852, "MT_recall": 0.8400876232201533, "MT_precision": 0.9376528117359413, "NML_recall": 0.5686274509803921, "NML_precision": 0.1746987951807229, "NROI_recall": 0.9371980676328503, "NROI_precision": 0.9556650246305419, "fold": 4 } ], "cv_means": { "MCC": 0.8353775501991889, "MCC_std": 0.04729528929189374, "macro_f1": 0.7416349807688337, "MT_recall": 0.8812145712034741, "MT_precision": 0.9503911694507561, "NML_recall": 0.6503785514205681, "NML_precision": 0.2546113360757781, "NROI_recall": 0.9432029953492325, "NROI_precision": 0.9698484196043923 } }, "avg_softmax": { "label": "ens_plain_avg_softmax_cv", "folds": [ { "mcc": 0.940383641133645, "macro_f1": 0.7705245324742672, "MT_recall": 0.9780701754385965, "MT_precision": 0.9643243243243244, "NML_recall": 0.2653061224489796, "NML_precision": 0.52, "NROI_recall": 0.994269340974212, "NROI_precision": 0.9839319470699432, "fold": 0 }, { "mcc": 0.8715931091518556, "macro_f1": 0.8127654158427232, "MT_recall": 0.9418859649122807, "MT_precision": 0.927645788336933, "NML_recall": 0.44, "NML_precision": 0.7586206896551724, "NROI_recall": 0.9497630331753555, "NROI_precision": 0.943502824858757, "fold": 1 }, { "mcc": 0.88447561481716, "macro_f1": 0.7248604169294769, "MT_recall": 0.9605263157894737, "MT_precision": 0.9153605015673981, "NML_recall": 0.22448979591836735, "NML_precision": 0.3333333333333333, "NROI_recall": 0.9552093476144109, "NROI_precision": 0.9829659318637275, "fold": 2 }, { "mcc": 0.8744098876128987, "macro_f1": 0.7678741479976162, "MT_recall": 0.9364731653888281, "MT_precision": 0.9385290889132821, "NML_recall": 0.46, "NML_precision": 0.36507936507936506, "NROI_recall": 0.9542124542124543, "NROI_precision": 0.9639222941720629, "fold": 3 }, { "mcc": 0.8596809641633102, "macro_f1": 0.6561893987635757, "MT_recall": 0.9342825848849945, "MT_precision": 0.9142550911039657, "NML_recall": 0.058823529411764705, "NML_precision": 0.15789473684210525, "NROI_recall": 0.9642512077294686, "NROI_precision": 0.9531996179560649, "fold": 4 } ], "cv_means": { "MCC": 0.8861086433757739, "MCC_std": 0.028264557355996926, "macro_f1": 0.7464427824015318, "MT_recall": 0.9502476412828347, "MT_precision": 0.9320229588491806, "NML_recall": 0.28972388955582234, "NML_precision": 0.4269856249819952, "NROI_recall": 0.9635410767411802, "NROI_precision": 0.9655045231841111 } } }, "best_cv": { "label": "ens_plain_best_cv", "folds": [ { "mcc": 0.940383641133645, "macro_f1": 0.7705245324742672, "MT_recall": 0.9780701754385965, "MT_precision": 0.9643243243243244, "NML_recall": 0.2653061224489796, "NML_precision": 0.52, "NROI_recall": 0.994269340974212, "NROI_precision": 0.9839319470699432, "fold": 0 }, { "mcc": 0.8715931091518556, "macro_f1": 0.8127654158427232, "MT_recall": 0.9418859649122807, "MT_precision": 0.927645788336933, "NML_recall": 0.44, "NML_precision": 0.7586206896551724, "NROI_recall": 0.9497630331753555, "NROI_precision": 0.943502824858757, "fold": 1 }, { "mcc": 0.88447561481716, "macro_f1": 0.7248604169294769, "MT_recall": 0.9605263157894737, "MT_precision": 0.9153605015673981, "NML_recall": 0.22448979591836735, "NML_precision": 0.3333333333333333, "NROI_recall": 0.9552093476144109, "NROI_precision": 0.9829659318637275, "fold": 2 }, { "mcc": 0.8744098876128987, "macro_f1": 0.7678741479976162, "MT_recall": 0.9364731653888281, "MT_precision": 0.9385290889132821, "NML_recall": 0.46, "NML_precision": 0.36507936507936506, "NROI_recall": 0.9542124542124543, "NROI_precision": 0.9639222941720629, "fold": 3 }, { "mcc": 0.8596809641633102, "macro_f1": 0.6561893987635757, "MT_recall": 0.9342825848849945, "MT_precision": 0.9142550911039657, "NML_recall": 0.058823529411764705, "NML_precision": 0.15789473684210525, "NROI_recall": 0.9642512077294686, "NROI_precision": 0.9531996179560649, "fold": 4 } ], "cv_means": { "MCC": 0.8861086433757739, "MCC_std": 0.028264557355996926, "macro_f1": 0.7464427824015318, "MT_recall": 0.9502476412828347, "MT_precision": 0.9320229588491806, "NML_recall": 0.28972388955582234, "NML_precision": 0.4269856249819952, "NROI_recall": 0.9635410767411802, "NROI_precision": 0.9655045231841111 } }, "best_method": "avg_softmax", "best_final": { "mcc": 0.9075512462454951, "macro_f1": 0.7615222630862176, "MT_recall": 0.9642126789366053, "MT_precision": 0.955420466058764, "NML_recall": 0.2830188679245283, "NML_precision": 0.4838709677419355, "NROI_recall": 0.9732381801962533, "NROI_precision": 0.9620811287477954, "label": "ens_plain_best_test" }, "methods_final": { "logreg_logits_balanced": { "mcc": 0.884517905204319, "macro_f1": 0.7915522517961128, "MT_recall": 0.9079754601226994, "MT_precision": 0.9790518191841234, "NML_recall": 0.7924528301886793, "NML_precision": 0.32558139534883723, "NROI_recall": 0.9687778768956289, "NROI_precision": 0.9731182795698925, "label": "ens_plain_logreg_logits_balanced_test" }, "logreg_softmax_balanced": { "mcc": 0.9053484772466982, "macro_f1": 0.8209345218510951, "MT_recall": 0.9274028629856851, "MT_precision": 0.9869423286180631, "NML_recall": 0.8113207547169812, "NML_precision": 0.39814814814814814, "NROI_recall": 0.9741302408563782, "NROI_precision": 0.9706666666666667, "label": "ens_plain_logreg_softmax_balanced_test" }, "avg_softmax": { "mcc": 0.9075512462454951, "macro_f1": 0.7615222630862176, "MT_recall": 0.9642126789366053, "MT_precision": 0.955420466058764, "NML_recall": 0.2830188679245283, "NML_precision": 0.4838709677419355, "NROI_recall": 0.9732381801962533, "NROI_precision": 0.9620811287477954, "label": "ens_plain_avg_softmax_test" } } }, "ensemble_crt": { "methods_cv": { "logreg_logits_balanced": { "label": "ens_crt_logreg_logits_balanced_cv", "folds": [ { "mcc": 0.8709933056770047, "macro_f1": 0.7501083498178573, "MT_recall": 0.8640350877192983, "MT_precision": 0.9837702871410736, "NML_recall": 0.6938775510204082, "NML_precision": 0.22666666666666666, "NROI_recall": 0.9933142311365807, "NROI_precision": 0.9839167455061495, "fold": 0 }, { "mcc": 0.5722950416531528, "macro_f1": 0.5558070728141032, "MT_recall": 0.44627192982456143, "MT_precision": 0.8984547461368654, "NML_recall": 0.9, "NML_precision": 0.08050089445438283, "NROI_recall": 0.9014218009478673, "NROI_precision": 0.9462686567164179, "fold": 1 }, { "mcc": 0.8320541275421974, "macro_f1": 0.7274388020691958, "MT_recall": 0.8826754385964912, "MT_precision": 0.9231651376146789, "NML_recall": 0.5714285714285714, "NML_precision": 0.21705426356589147, "NROI_recall": 0.9464459591041869, "NROI_precision": 0.9848024316109423, "fold": 2 }, { "mcc": 0.7158310711251602, "macro_f1": 0.658809286850686, "MT_recall": 0.7185104052573932, "MT_precision": 0.9576642335766423, "NML_recall": 0.92, "NML_precision": 0.12602739726027398, "NROI_recall": 0.8965201465201466, "NROI_precision": 0.9741293532338309, "fold": 3 }, { "mcc": 0.7225753047899428, "macro_f1": 0.6298225224086198, "MT_recall": 0.8214676889375685, "MT_precision": 0.9168704156479217, "NML_recall": 0.29411764705882354, "NML_precision": 0.06302521008403361, "NROI_recall": 0.8782608695652174, "NROI_precision": 0.9639448568398727, "fold": 4 } ], "cv_means": { "MCC": 0.7427497701574917, "MCC_std": 0.10450656680839478, "macro_f1": 0.6643972067920925, "MT_recall": 0.7465921100670625, "MT_precision": 0.9359849640234363, "NML_recall": 0.6758847539015606, "NML_precision": 0.14265488640624974, "NROI_recall": 0.9231926014547998, "NROI_precision": 0.9706124087814427 } }, "logreg_softmax_balanced": { "label": "ens_crt_logreg_softmax_balanced_cv", "folds": [ { "mcc": 0.9003580888226094, "macro_f1": 0.7820422615472552, "MT_recall": 0.9067982456140351, "MT_precision": 0.9810201660735468, "NML_recall": 0.673469387755102, "NML_precision": 0.3, "NROI_recall": 0.9923591212989494, "NROI_precision": 0.9848341232227488, "fold": 0 }, { "mcc": 0.7884422129090666, "macro_f1": 0.715683631503666, "MT_recall": 0.8475877192982456, "MT_precision": 0.9473039215686274, "NML_recall": 0.74, "NML_precision": 0.20555555555555555, "NROI_recall": 0.9156398104265403, "NROI_precision": 0.9461312438785504, "fold": 1 }, { "mcc": 0.8572479648324871, "macro_f1": 0.7419248003814283, "MT_recall": 0.9133771929824561, "MT_precision": 0.9245283018867925, "NML_recall": 0.4897959183673469, "NML_precision": 0.25806451612903225, "NROI_recall": 0.9532619279454723, "NROI_precision": 0.9849094567404426, "fold": 2 }, { "mcc": 0.7736344444415194, "macro_f1": 0.700954522409364, "MT_recall": 0.8389923329682366, "MT_precision": 0.964735516372796, "NML_recall": 0.92, "NML_precision": 0.16487455197132617, "NROI_recall": 0.8791208791208791, "NROI_precision": 0.9775967413441955, "fold": 3 }, { "mcc": 0.7445040911785757, "macro_f1": 0.6429495992807898, "MT_recall": 0.8433734939759037, "MT_precision": 0.9299516908212561, "NML_recall": 0.3333333333333333, "NML_precision": 0.07234042553191489, "NROI_recall": 0.881159420289855, "NROI_precision": 0.9743589743589743, "fold": 4 } ], "cv_means": { "MCC": 0.8128373604368516, "MCC_std": 0.05732993496058185, "macro_f1": 0.7167109630245007, "MT_recall": 0.8700257969677756, "MT_precision": 0.9495079193446039, "NML_recall": 0.6313197278911564, "NML_precision": 0.20016700983756577, "NROI_recall": 0.9243082318163391, "NROI_precision": 0.9735661079089823 } }, "avg_softmax": { "label": "ens_crt_avg_softmax_cv", "folds": [ { "mcc": 0.9242729722844191, "macro_f1": 0.789111485874154, "MT_recall": 0.9473684210526315, "MT_precision": 0.9718785151856018, "NML_recall": 0.4897959183673469, "NML_precision": 0.36363636363636365, "NROI_recall": 0.9933142311365807, "NROI_precision": 0.9876543209876543, "fold": 0 }, { "mcc": 0.8385585928078274, "macro_f1": 0.7803452587993434, "MT_recall": 0.9111842105263158, "MT_precision": 0.9284916201117318, "NML_recall": 0.7, "NML_precision": 0.3684210526315789, "NROI_recall": 0.9260663507109005, "NROI_precision": 0.9513145082765336, "fold": 1 }, { "mcc": 0.8726117618357568, "macro_f1": 0.7641383950709629, "MT_recall": 0.9407894736842105, "MT_precision": 0.9206008583690987, "NML_recall": 0.46938775510204084, "NML_precision": 0.34328358208955223, "NROI_recall": 0.9474196689386563, "NROI_precision": 0.9838220424671386, "fold": 2 }, { "mcc": 0.817983570090549, "macro_f1": 0.7285785632292758, "MT_recall": 0.9058050383351588, "MT_precision": 0.9462242562929062, "NML_recall": 0.76, "NML_precision": 0.20652173913043478, "NROI_recall": 0.8946886446886447, "NROI_precision": 0.9799398194583752, "fold": 3 }, { "mcc": 0.7511652108597198, "macro_f1": 0.6301362729576805, "MT_recall": 0.8718510405257394, "MT_precision": 0.9149425287356322, "NML_recall": 0.17647058823529413, "NML_precision": 0.047619047619047616, "NROI_recall": 0.8801932367149758, "NROI_precision": 0.9691489361702128, "fold": 4 } ], "cv_means": { "MCC": 0.8409184215756543, "MCC_std": 0.05751463114543797, "macro_f1": 0.7384619951862833, "MT_recall": 0.9153996368248112, "MT_precision": 0.9364275557389942, "NML_recall": 0.5191308523409364, "NML_precision": 0.2658963570213954, "NROI_recall": 0.9283364264379514, "NROI_precision": 0.974375925471983 } } }, "best_cv": { "label": "ens_crt_best_cv", "folds": [ { "mcc": 0.9242729722844191, "macro_f1": 0.789111485874154, "MT_recall": 0.9473684210526315, "MT_precision": 0.9718785151856018, "NML_recall": 0.4897959183673469, "NML_precision": 0.36363636363636365, "NROI_recall": 0.9933142311365807, "NROI_precision": 0.9876543209876543, "fold": 0 }, { "mcc": 0.8385585928078274, "macro_f1": 0.7803452587993434, "MT_recall": 0.9111842105263158, "MT_precision": 0.9284916201117318, "NML_recall": 0.7, "NML_precision": 0.3684210526315789, "NROI_recall": 0.9260663507109005, "NROI_precision": 0.9513145082765336, "fold": 1 }, { "mcc": 0.8726117618357568, "macro_f1": 0.7641383950709629, "MT_recall": 0.9407894736842105, "MT_precision": 0.9206008583690987, "NML_recall": 0.46938775510204084, "NML_precision": 0.34328358208955223, "NROI_recall": 0.9474196689386563, "NROI_precision": 0.9838220424671386, "fold": 2 }, { "mcc": 0.817983570090549, "macro_f1": 0.7285785632292758, "MT_recall": 0.9058050383351588, "MT_precision": 0.9462242562929062, "NML_recall": 0.76, "NML_precision": 0.20652173913043478, "NROI_recall": 0.8946886446886447, "NROI_precision": 0.9799398194583752, "fold": 3 }, { "mcc": 0.7511652108597198, "macro_f1": 0.6301362729576805, "MT_recall": 0.8718510405257394, "MT_precision": 0.9149425287356322, "NML_recall": 0.17647058823529413, "NML_precision": 0.047619047619047616, "NROI_recall": 0.8801932367149758, "NROI_precision": 0.9691489361702128, "fold": 4 } ], "cv_means": { "MCC": 0.8409184215756543, "MCC_std": 0.05751463114543797, "macro_f1": 0.7384619951862833, "MT_recall": 0.9153996368248112, "MT_precision": 0.9364275557389942, "NML_recall": 0.5191308523409364, "NML_precision": 0.2658963570213954, "NROI_recall": 0.9283364264379514, "NROI_precision": 0.974375925471983 } }, "best_method": "avg_softmax", "best_final": { "mcc": 0.8986285866331987, "macro_f1": 0.7870065958764059, "MT_recall": 0.950920245398773, "MT_precision": 0.9607438016528925, "NML_recall": 0.5283018867924528, "NML_precision": 0.37333333333333335, "NROI_recall": 0.9625334522747547, "NROI_precision": 0.9729486023444545, "label": "ens_crt_best_test" }, "methods_final": { "logreg_logits_balanced": { "mcc": 0.8113816534564904, "macro_f1": 0.7026872849336631, "MT_recall": 0.8312883435582822, "MT_precision": 0.9806996381182147, "NML_recall": 0.6226415094339622, "NML_precision": 0.15492957746478872, "NROI_recall": 0.9553969669937555, "NROI_precision": 0.9648648648648649, "label": "ens_crt_logreg_logits_balanced_test" }, "logreg_softmax_balanced": { "mcc": 0.8779595877368471, "macro_f1": 0.7793891042915391, "MT_recall": 0.9141104294478528, "MT_precision": 0.9770491803278688, "NML_recall": 0.7547169811320755, "NML_precision": 0.29850746268656714, "NROI_recall": 0.9580731489741302, "NROI_precision": 0.9737080689029919, "label": "ens_crt_logreg_softmax_balanced_test" }, "avg_softmax": { "mcc": 0.8986285866331987, "macro_f1": 0.7870065958764059, "MT_recall": 0.950920245398773, "MT_precision": 0.9607438016528925, "NML_recall": 0.5283018867924528, "NML_precision": 0.37333333333333335, "NROI_recall": 0.9625334522747547, "NROI_precision": 0.9729486023444545, "label": "ens_crt_avg_softmax_test" } } }}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325=== GPU Wait Monitor ===Threshold: 20% util (3 consecutive)Resize: letterboxStarted monitoring: Wed Aug 19 12:21:38 AM HKT 2026
Wed Aug 19 12:21:38 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 12:22:38 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 12:23:38 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 12:24:38 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 12:25:38 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 12:26:38 AM HKT 2026: GPU util=91% β waiting...Wed Aug 19 12:27:38 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 12:28:39 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 12:29:39 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 12:30:39 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 12:31:39 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 12:32:39 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 12:33:39 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 12:34:39 AM HKT 2026: GPU util=93% β waiting...Wed Aug 19 12:35:39 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 12:36:39 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 12:37:39 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 12:38:39 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 12:39:39 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 12:40:39 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 12:41:39 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 12:42:39 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 12:43:39 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 12:44:40 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 12:45:40 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 12:46:40 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 12:47:40 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 12:48:40 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 12:49:40 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 12:50:40 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 12:51:40 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 12:52:40 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 12:53:40 AM HKT 2026: GPU util=0% β low count: 1/3Wed Aug 19 12:54:40 AM HKT 2026: GPU util=3% β low count: 2/3Wed Aug 19 12:55:40 AM HKT 2026: GPU util=96% β resetting counterWed Aug 19 12:56:40 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 12:57:40 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 12:58:40 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 12:59:40 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:00:40 AM HKT 2026: GPU util=94% β waiting...Wed Aug 19 01:01:40 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:02:41 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:03:41 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:04:41 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:05:41 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:06:41 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:07:41 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:08:41 AM HKT 2026: GPU util=93% β waiting...Wed Aug 19 01:09:41 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:10:41 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:11:41 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:12:41 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:13:41 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:14:41 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:15:41 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:16:41 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:17:41 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:18:41 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:19:42 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:20:42 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:21:42 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:22:42 AM HKT 2026: GPU util=95% β waiting...Wed Aug 19 01:23:42 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:24:42 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:25:42 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:26:42 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:27:42 AM HKT 2026: GPU util=79% β waiting...Wed Aug 19 01:28:42 AM HKT 2026: GPU util=0% β low count: 1/3Wed Aug 19 01:29:42 AM HKT 2026: GPU util=96% β resetting counterWed Aug 19 01:30:42 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:31:42 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:32:42 AM HKT 2026: GPU util=94% β waiting...Wed Aug 19 01:33:42 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:34:42 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:35:42 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:36:43 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:37:43 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:38:43 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:39:43 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:40:43 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:41:43 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:42:43 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:43:43 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:44:43 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:45:43 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:46:43 AM HKT 2026: GPU util=0% β low count: 1/3Wed Aug 19 01:47:43 AM HKT 2026: GPU util=96% β resetting counterWed Aug 19 01:48:43 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:49:43 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:50:43 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:51:43 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:52:43 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:53:44 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:54:44 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:55:44 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:56:44 AM HKT 2026: GPU util=0% β low count: 1/3Wed Aug 19 01:57:44 AM HKT 2026: GPU util=96% β resetting counterWed Aug 19 01:58:44 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 01:59:44 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:00:44 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:01:44 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:02:44 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:03:44 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:04:44 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:05:44 AM HKT 2026: GPU util=95% β waiting...Wed Aug 19 02:06:44 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:07:44 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:08:44 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:09:44 AM HKT 2026: GPU util=94% β waiting...Wed Aug 19 02:10:45 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:11:45 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:12:45 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:13:45 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:14:45 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:15:45 AM HKT 2026: GPU util=0% β low count: 1/3Wed Aug 19 02:16:45 AM HKT 2026: GPU util=96% β resetting counterWed Aug 19 02:17:45 AM HKT 2026: GPU util=95% β waiting...Wed Aug 19 02:18:45 AM HKT 2026: GPU util=93% β waiting...Wed Aug 19 02:19:45 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:20:45 AM HKT 2026: GPU util=95% β waiting...Wed Aug 19 02:21:45 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:22:45 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:23:45 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:24:45 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:25:45 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:26:45 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:27:46 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:28:46 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:29:46 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:30:46 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:31:46 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:32:46 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:33:46 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:34:46 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:35:46 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:36:46 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:37:46 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:38:46 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:39:46 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:40:46 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:41:46 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:42:46 AM HKT 2026: GPU util=91% β waiting...Wed Aug 19 02:43:46 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:44:47 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:45:47 AM HKT 2026: GPU util=95% β waiting...Wed Aug 19 02:46:47 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:47:47 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:48:47 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:49:47 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:50:47 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:51:47 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:52:47 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:53:47 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:54:47 AM HKT 2026: GPU util=95% β waiting...Wed Aug 19 02:55:47 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:56:47 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:57:47 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 02:58:47 AM HKT 2026: GPU util=0% β low count: 1/3Wed Aug 19 02:59:47 AM HKT 2026: GPU util=0% β low count: 2/3Wed Aug 19 03:00:47 AM HKT 2026: GPU util=96% β resetting counterWed Aug 19 03:01:47 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:02:48 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:03:48 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:04:48 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:05:48 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:06:48 AM HKT 2026: GPU util=0% β low count: 1/3Wed Aug 19 03:07:48 AM HKT 2026: GPU util=96% β resetting counterWed Aug 19 03:08:48 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:09:48 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:10:48 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:11:48 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:12:48 AM HKT 2026: GPU util=94% β waiting...Wed Aug 19 03:13:48 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:14:48 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:15:48 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:16:48 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:17:48 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:18:48 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:19:49 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:20:49 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:21:49 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:22:49 AM HKT 2026: GPU util=0% β low count: 1/3Wed Aug 19 03:23:49 AM HKT 2026: GPU util=0% β low count: 2/3Wed Aug 19 03:24:49 AM HKT 2026: GPU util=96% β resetting counterWed Aug 19 03:25:49 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:26:49 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:27:49 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:28:49 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:29:49 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:30:49 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:31:49 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:32:49 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:33:49 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:34:49 AM HKT 2026: GPU util=95% β waiting...Wed Aug 19 03:35:49 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:36:50 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:37:50 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:38:50 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:39:50 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:40:50 AM HKT 2026: GPU util=94% β waiting...Wed Aug 19 03:41:50 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:42:50 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:43:50 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:44:50 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:45:50 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:46:50 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:47:50 AM HKT 2026: GPU util=95% β waiting...Wed Aug 19 03:48:50 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:49:50 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:50:50 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:51:50 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:52:51 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:53:51 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:54:51 AM HKT 2026: GPU util=94% β waiting...Wed Aug 19 03:55:51 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:56:51 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:57:51 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 03:58:51 AM HKT 2026: GPU util=85% β waiting...Wed Aug 19 03:59:51 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:00:51 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:01:51 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:02:51 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:03:51 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:04:51 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:05:51 AM HKT 2026: GPU util=95% β waiting...Wed Aug 19 04:06:51 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:07:51 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:08:52 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:09:52 AM HKT 2026: GPU util=93% β waiting...Wed Aug 19 04:10:52 AM HKT 2026: GPU util=94% β waiting...Wed Aug 19 04:11:52 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:12:52 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:13:52 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:14:52 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:15:52 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:16:52 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:17:52 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:18:52 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:19:52 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:20:52 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:21:52 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:22:52 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:23:52 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:24:52 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:25:53 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:26:53 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:27:53 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:28:53 AM HKT 2026: GPU util=94% β waiting...Wed Aug 19 04:29:53 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:30:53 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:31:53 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:32:53 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:33:53 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:34:53 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:35:53 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:36:53 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:37:53 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:38:53 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:39:53 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:40:53 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:41:54 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:42:54 AM HKT 2026: GPU util=0% β low count: 1/3Wed Aug 19 04:43:54 AM HKT 2026: GPU util=2% β low count: 2/3Wed Aug 19 04:44:54 AM HKT 2026: GPU util=96% β resetting counterWed Aug 19 04:45:54 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:46:54 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:47:54 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:48:54 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:49:54 AM HKT 2026: GPU util=0% β low count: 1/3Wed Aug 19 04:50:54 AM HKT 2026: GPU util=96% β resetting counterWed Aug 19 04:51:54 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:52:54 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:53:54 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:54:54 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:55:54 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:56:54 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:57:54 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:58:54 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 04:59:55 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 05:00:55 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 05:01:55 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 05:02:55 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 05:03:55 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 05:04:55 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 05:05:55 AM HKT 2026: GPU util=0% β low count: 1/3Wed Aug 19 05:06:55 AM HKT 2026: GPU util=0% β low count: 2/3Wed Aug 19 05:07:55 AM HKT 2026: GPU util=96% β resetting counterWed Aug 19 05:08:55 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 05:09:55 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 05:10:55 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 05:11:55 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 05:12:55 AM HKT 2026: GPU util=95% β waiting...Wed Aug 19 05:13:55 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 05:14:55 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 05:15:55 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 05:16:55 AM HKT 2026: GPU util=92% β waiting...Wed Aug 19 05:17:56 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 05:18:56 AM HKT 2026: GPU util=87% β waiting...Wed Aug 19 05:19:56 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 05:20:56 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 05:21:56 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 05:22:56 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 05:23:56 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 05:24:56 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 05:25:56 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 05:26:56 AM HKT 2026: GPU util=70% β waiting...Wed Aug 19 05:27:56 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 05:28:56 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 05:29:56 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 05:30:56 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 05:31:56 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 05:32:56 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 05:33:57 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 05:34:57 AM HKT 2026: GPU util=93% β waiting...Wed Aug 19 05:35:57 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 05:36:57 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 05:37:57 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 05:38:57 AM HKT 2026: GPU util=95% β waiting...Wed Aug 19 05:39:57 AM HKT 2026: GPU util=96% β waiting...Wed Aug 19 05:40:57 AM HKT 2026: GPU util=96% β waiting...123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354#!/bin/bash# GPU monitor: waits for GPU to be consistently free, then runs run_all.sh# Checks every 60s. Requires 3 consecutive low-util readings to start.# Logs to gpu_wait.log## Usage: bash gpu_wait_and_run.sh [threshold] [resize]# threshold: GPU util % below which to start (default: 20)# resize: letterbox (default) or squeeze
set -euo pipefail
THRESHOLD="${1:-20}"RESIZE="${2:-letterbox}"ROOT="$(cd "$(dirname "$0")" && pwd)"WAIT_LOG="${ROOT}/gpu_wait.log"RUN_LOG="${ROOT}/run_$(date +%Y%m%d_%H%M%S).log"
echo "=== GPU Wait Monitor ===" | tee "$WAIT_LOG"echo "Threshold: ${THRESHOLD}% util (3 consecutive)" | tee -a "$WAIT_LOG"echo "Resize: $RESIZE" | tee -a "$WAIT_LOG"echo "Started monitoring: $(date)" | tee -a "$WAIT_LOG"echo "" | tee -a "$WAIT_LOG"
LOW_COUNT=0
while true; do UTIL=$(nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader,nounits 2>/dev/null | head -1 | tr -d ' ') # Handle [N/A] case if [ "$UTIL" = "[N/A]" ] || ! [[ "$UTIL" =~ ^[0-9]+$ ]]; then UTIL=0 fi if [ "$UTIL" -lt "$THRESHOLD" ]; then LOW_COUNT=$((LOW_COUNT + 1)) echo "$(date): GPU util=${UTIL}% β low count: ${LOW_COUNT}/3" | tee -a "$WAIT_LOG" if [ "$LOW_COUNT" -ge 3 ]; then echo "$(date): GPU free for 3 consecutive checks β starting pipeline!" | tee -a "$WAIT_LOG" echo "$(date): Launching run_all.sh $RESIZE" | tee -a "$WAIT_LOG" bash "${ROOT}/run_all.sh" "$RESIZE" "$RUN_LOG" 2>&1 | tee -a "$WAIT_LOG" echo "$(date): Pipeline complete!" | tee -a "$WAIT_LOG" exit 0 fi else if [ "$LOW_COUNT" -gt 0 ]; then echo "$(date): GPU util=${UTIL}% β resetting counter" | tee -a "$WAIT_LOG" else echo "$(date): GPU util=${UTIL}% β waiting..." | tee -a "$WAIT_LOG" fi LOW_COUNT=0 fi sleep 60done123version https://git-lfs.github.com/spec/v1oid sha256:73b6d15dc8c827b0b13c9cdb78bf1fda3bd6b6c56aac166dad2b52cb3e04e9fbsize 2810488123version https://git-lfs.github.com/spec/v1oid sha256:9bc2571fc45061ab450355dc4d26a32f4d5bb4fc298591b51e3ee73229b4d688size 594826123version https://git-lfs.github.com/spec/v1oid sha256:1f03d6ba8dfd23ccb07dfe123abda4a9b436f9ed8459a01b0e10da6f30760b84size 2810488123version https://git-lfs.github.com/spec/v1oid sha256:4a7d56f5306d17930f47f46c63f2a53fe5b856d0954a245ece454c9f098f8d73size 594826123version https://git-lfs.github.com/spec/v1oid sha256:9d11f5f77dbf6658abd743dcf13dffedefe322c3afb27705fb19baf12e0570d0size 2810488123version https://git-lfs.github.com/spec/v1oid sha256:5d307a780ad4ef28c732831c61843ff26329cdaa845287998da8c464f8752004size 594826123version https://git-lfs.github.com/spec/v1oid sha256:9e4cdee8fcde69a09de2bbcdb2e180de25f2b3186240bf272623ab9a13340169size 2810488123version https://git-lfs.github.com/spec/v1oid sha256:024fecaaae151dcb79390c7d784f065e7d2f5e11dd1fe9419a4e2943000291casize 594826123version https://git-lfs.github.com/spec/v1oid sha256:c9275f654c778d3f95bedf7f1d4d2fac5c93b418f2a55289b6472929fe6a0791size 2810488.gitattributes+7
stage1_final/results/resized/resnet/seg_resnet_fold3_val.jsonAdded+261
stage1_final/results/resized/resnet/seg_resnet_fold4_val.jsonAdded+231
stage1_final/results/resized/resnet/target3_resnet_cv_summary.jsonAdded+374
stage1_final/results/resized/resnet/target3_resnet_final.jsonAdded+4512
stage1_final/results/resized/resnet/target3_resnet_fold0_val.jsonAdded+172
stage1_final/results/resized/resnet/target3_resnet_fold1_val.jsonAdded+202
stage1_final/results/resized/resnet/target3_resnet_fold2_val.jsonAdded+132
stage1_final/results/resized/resnet/target3_resnet_fold3_val.jsonAdded+147
stage1_final/results/resized/resnet/target3_resnet_fold4_val.jsonAdded+152
stage1_final/results/resized/swin/crt_swin_cv_summary.jsonAdded+351
stage1_final/results/resized/swin/crt_swin_final.jsonAdded+70
stage1_final/results/resized/swin/emit_crt_swin_oof.jsonAdded+351
stage1_final/results/resized/swin/emit_crt_swin_test.jsonAdded+70
stage1_final/results/resized/swin/emit_plain_swin_oof.jsonAdded+352
stage1_final/results/resized/swin/emit_plain_swin_test.jsonAdded+71
stage1_final/results/resized/swin/seg_swin_cv_summary.jsonAdded+33
stage1_final/results/resized/swin/seg_swin_final.jsonAdded+133
stage1_final/results/resized/swin/seg_swin_fold0_val.jsonAdded+141
stage1_final/results/resized/swin/seg_swin_fold1_val.jsonAdded+165
stage1_final/results/resized/swin/seg_swin_fold2_val.jsonAdded+237
stage1_final/results/resized/swin/seg_swin_fold3_val.jsonAdded+189
stage1_final/results/resized/swin/seg_swin_fold4_val.jsonAdded+183
stage1_final/results/resized/swin/target3_swin_cv_summary.jsonAdded+349
stage1_final/results/resized/swin/target3_swin_final.jsonAdded+4517
stage1_final/results/resized/swin/target3_swin_fold0_val.jsonAdded+112
stage1_final/results/resized/swin/target3_swin_fold1_val.jsonAdded+147
stage1_final/results/resized/swin/target3_swin_fold2_val.jsonAdded+142
stage1_final/results/resized/swin/target3_swin_fold3_val.jsonAdded+162
stage1_final/results/resized/swin/target3_swin_fold4_val.jsonAdded+112
stage1_final/train_cls.pyAdded+352
stage1_final/train_crt.pyAdded+347
stage1_final/train_seg.pyAdded+340
stage1_final/verify_all.pyAdded+566
stage1v2_final/check_progress.shAdded+21
stage1v2_final/dataset_f.pyAdded+202
stage1v2_final/dataset_f_squeeze.pyAdded+175
stage1v2_final/ensemble.pyAdded+295
stage1v2_final/f_reference_metrics.jsonAdded+1336
stage1v2_final/gpu_wait.logAdded+325
stage1v2_final/gpu_wait_and_run.shAdded+54
stage1v2_final/logits/letterbox/convnext/convnext_oof.npzAdded+3
stage1v2_final/logits/letterbox/convnext/convnext_test.npzAdded+3
stage1v2_final/logits/letterbox/convnext/plain_convnext_oof.npzAdded+3
stage1v2_final/logits/letterbox/convnext/plain_convnext_test.npzAdded+3
stage1v2_final/logits/letterbox/mamba/mamba_oof.npzAdded+3
stage1v2_final/logits/letterbox/mamba/mamba_test.npzAdded+3
stage1v2_final/logits/letterbox/mamba/plain_mamba_oof.npzAdded+3
stage1v2_final/logits/letterbox/mamba/plain_mamba_test.npzAdded+3
stage1v2_final/logits/letterbox/resnet/plain_resnet_oof.npzAdded+3