From 9b8cf40297e4e0bee41e3a7697bb063c04ae7335 Mon Sep 17 00:00:00 2001 From: Vineet Kumar Date: Tue, 21 Apr 2026 23:59:25 -0400 Subject: add results (except pth files) --- .gitignore | 2 +- .../classification_report.txt | 13 + .../confusion_matrix.png | Bin 0 -> 77436 bytes .../training_curves.png | Bin 0 -> 78851 bytes .../classification_report.txt | 13 + .../confusion_matrix.png | Bin 0 -> 78612 bytes .../efficientnet_b0_clahe=True/training_curves.png | Bin 0 -> 83377 bytes results/old_output.txt | 375 +++++++++++++++++++++ .../resnet50_clahe=False/classification_report.txt | 13 + results/resnet50_clahe=False/confusion_matrix.png | Bin 0 -> 79723 bytes results/resnet50_clahe=False/training_curves.png | Bin 0 -> 79370 bytes .../resnet50_clahe=True/classification_report.txt | 13 + results/resnet50_clahe=True/confusion_matrix.png | Bin 0 -> 80274 bytes results/resnet50_clahe=True/training_curves.png | Bin 0 -> 80405 bytes .../vit_b_16_clahe=False/classification_report.txt | 13 + results/vit_b_16_clahe=False/confusion_matrix.png | Bin 0 -> 77874 bytes results/vit_b_16_clahe=False/training_curves.png | Bin 0 -> 98667 bytes .../vit_b_16_clahe=True/classification_report.txt | 13 + results/vit_b_16_clahe=True/confusion_matrix.png | Bin 0 -> 78314 bytes results/vit_b_16_clahe=True/training_curves.png | Bin 0 -> 82953 bytes 20 files changed, 454 insertions(+), 1 deletion(-) create mode 100644 results/efficientnet_b0_clahe=False/classification_report.txt create mode 100644 results/efficientnet_b0_clahe=False/confusion_matrix.png create mode 100644 results/efficientnet_b0_clahe=False/training_curves.png create mode 100644 results/efficientnet_b0_clahe=True/classification_report.txt create mode 100644 results/efficientnet_b0_clahe=True/confusion_matrix.png create mode 100644 results/efficientnet_b0_clahe=True/training_curves.png create mode 100644 results/old_output.txt create mode 100644 results/resnet50_clahe=False/classification_report.txt create mode 100644 results/resnet50_clahe=False/confusion_matrix.png create mode 100644 results/resnet50_clahe=False/training_curves.png create mode 100644 results/resnet50_clahe=True/classification_report.txt create mode 100644 results/resnet50_clahe=True/confusion_matrix.png create mode 100644 results/resnet50_clahe=True/training_curves.png create mode 100644 results/vit_b_16_clahe=False/classification_report.txt create mode 100644 results/vit_b_16_clahe=False/confusion_matrix.png create mode 100644 results/vit_b_16_clahe=False/training_curves.png create mode 100644 results/vit_b_16_clahe=True/classification_report.txt create mode 100644 results/vit_b_16_clahe=True/confusion_matrix.png create mode 100644 results/vit_b_16_clahe=True/training_curves.png diff --git a/.gitignore b/.gitignore index 50bd962..e191bcc 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,7 @@ __pycache__/ guix-root guix-root-1-link -results/ +*.pth venv/ report.tex report.pdf diff --git a/results/efficientnet_b0_clahe=False/classification_report.txt b/results/efficientnet_b0_clahe=False/classification_report.txt new file mode 100644 index 0000000..86399e2 --- /dev/null +++ b/results/efficientnet_b0_clahe=False/classification_report.txt @@ -0,0 +1,13 @@ +Experiment: efficientnet_b0_clahe=False + + precision recall f1-score support + + Healthy (0) 0.85 0.95 0.90 3872 + Mild NPDR (1) 0.25 0.06 0.10 366 + Moderate NPDR (2) 0.62 0.53 0.57 794 + Severe NPDR (3) 0.51 0.40 0.45 131 +Proliferative DR (4) 0.62 0.55 0.58 106 + + accuracy 0.80 5269 + macro avg 0.57 0.50 0.52 5269 + weighted avg 0.76 0.80 0.78 5269 diff --git a/results/efficientnet_b0_clahe=False/confusion_matrix.png b/results/efficientnet_b0_clahe=False/confusion_matrix.png new file mode 100644 index 0000000..e12d810 Binary files /dev/null and b/results/efficientnet_b0_clahe=False/confusion_matrix.png differ diff --git a/results/efficientnet_b0_clahe=False/training_curves.png b/results/efficientnet_b0_clahe=False/training_curves.png new file mode 100644 index 0000000..2d38888 Binary files /dev/null and b/results/efficientnet_b0_clahe=False/training_curves.png differ diff --git a/results/efficientnet_b0_clahe=True/classification_report.txt b/results/efficientnet_b0_clahe=True/classification_report.txt new file mode 100644 index 0000000..d5f3bf4 --- /dev/null +++ b/results/efficientnet_b0_clahe=True/classification_report.txt @@ -0,0 +1,13 @@ +Experiment: efficientnet_b0_clahe=True + + precision recall f1-score support + + Healthy (0) 0.86 0.91 0.88 3872 + Mild NPDR (1) 0.17 0.08 0.11 366 + Moderate NPDR (2) 0.55 0.53 0.54 794 + Severe NPDR (3) 0.40 0.52 0.45 131 +Proliferative DR (4) 0.62 0.58 0.60 106 + + accuracy 0.78 5269 + macro avg 0.52 0.52 0.51 5269 + weighted avg 0.75 0.78 0.76 5269 diff --git a/results/efficientnet_b0_clahe=True/confusion_matrix.png b/results/efficientnet_b0_clahe=True/confusion_matrix.png new file mode 100644 index 0000000..94e90dc Binary files /dev/null and b/results/efficientnet_b0_clahe=True/confusion_matrix.png differ diff --git a/results/efficientnet_b0_clahe=True/training_curves.png b/results/efficientnet_b0_clahe=True/training_curves.png new file mode 100644 index 0000000..b63ad8b Binary files /dev/null and b/results/efficientnet_b0_clahe=True/training_curves.png differ diff --git a/results/old_output.txt b/results/old_output.txt new file mode 100644 index 0000000..4d6269b --- /dev/null +++ b/results/old_output.txt @@ -0,0 +1,375 @@ +Using device: cuda +Downloading/locating dataset via kagglehub... +Dataset root: /home/vin/.cache/kagglehub/datasets/amanneo/diabetic-retinopathy-resized-arranged/versions/1 +Dataset split — train: 24588, val: 5269, test: 5269 + +====================================================================== +Experiment: resnet50 | CLAHE: False +====================================================================== + Using 2 GPUs via DataParallel +/home/vin/src/public/eel4759_finalproject_classification/guix-root/lib/python3.10/site-packages/torch/nn/modules/linear.py:125: UserWarning: Attempting to use hipBLASLt on an unsupported architecture! Overriding blas backend to hipblas (Triggered internally at /tmp/guix-build-python-pytorch-rocm-2.5.1.drv-0/source/aten/src/ATen/Context.cpp:296.) + return F.linear(input, self.weight, self.bias) +[resnet50_clahe=False] Epoch 1/50 | train loss: 1.0245 | val loss: 0.9964 | macro F1: 0.1852 | weighted F1: 0.3999 | lr: 1.00e-06 +[resnet50_clahe=False] Epoch 2/50 | train loss: 0.9314 | val loss: 0.8414 | macro F1: 0.2588 | weighted F1: 0.4671 | lr: 4.00e-06 +[resnet50_clahe=False] Epoch 3/50 | train loss: 0.7615 | val loss: 0.6517 | macro F1: 0.3182 | weighted F1: 0.4632 | lr: 7.00e-06 +/home/vin/src/public/eel4759_finalproject_classification/guix-root/lib/python3.10/site-packages/torch/optim/lr_scheduler.py:240: UserWarning: The epoch parameter in `scheduler.step()` was not necessary and is being deprecated where possible. Please use `scheduler.step()` to step the scheduler. During the deprecation, if epoch is different from None, the closed form is used instead of the new chainable form, where available. Please open an issue if you are unable to replicate your use case: https://github.com/pytorch/pytorch/issues/new/choose. + warnings.warn(EPOCH_DEPRECATION_WARNING, UserWarning) +[resnet50_clahe=False] Epoch 4/50 | train loss: 0.6579 | val loss: 0.5784 | macro F1: 0.3628 | weighted F1: 0.5279 | lr: 1.00e-05 +[resnet50_clahe=False] Epoch 5/50 | train loss: 0.6052 | val loss: 0.5553 | macro F1: 0.3466 | weighted F1: 0.5052 | lr: 9.99e-06 +[resnet50_clahe=False] Epoch 6/50 | train loss: 0.5523 | val loss: 0.5035 | macro F1: 0.3929 | weighted F1: 0.6145 | lr: 9.96e-06 +[resnet50_clahe=False] Epoch 7/50 | train loss: 0.5230 | val loss: 0.4800 | macro F1: 0.4087 | weighted F1: 0.5930 | lr: 9.90e-06 +[resnet50_clahe=False] Epoch 8/50 | train loss: 0.4867 | val loss: 0.5005 | macro F1: 0.3790 | weighted F1: 0.5139 | lr: 9.82e-06 +[resnet50_clahe=False] Epoch 9/50 | train loss: 0.4552 | val loss: 0.5179 | macro F1: 0.3835 | weighted F1: 0.5228 | lr: 9.72e-06 +[resnet50_clahe=False] Epoch 10/50 | train loss: 0.4253 | val loss: 0.4365 | macro F1: 0.4274 | weighted F1: 0.6266 | lr: 9.60e-06 +[resnet50_clahe=False] Epoch 11/50 | train loss: 0.4028 | val loss: 0.4509 | macro F1: 0.4160 | weighted F1: 0.6024 | lr: 9.46e-06 +[resnet50_clahe=False] Epoch 12/50 | train loss: 0.3771 | val loss: 0.4038 | macro F1: 0.4373 | weighted F1: 0.6812 | lr: 9.30e-06 +[resnet50_clahe=False] Epoch 13/50 | train loss: 0.3598 | val loss: 0.4183 | macro F1: 0.4330 | weighted F1: 0.6428 | lr: 9.12e-06 +[resnet50_clahe=False] Epoch 14/50 | train loss: 0.3373 | val loss: 0.4384 | macro F1: 0.4201 | weighted F1: 0.6056 | lr: 8.92e-06 +[resnet50_clahe=False] Epoch 15/50 | train loss: 0.3218 | val loss: 0.4118 | macro F1: 0.4360 | weighted F1: 0.6580 | lr: 8.71e-06 +[resnet50_clahe=False] Epoch 16/50 | train loss: 0.3145 | val loss: 0.4351 | macro F1: 0.4273 | weighted F1: 0.6133 | lr: 8.48e-06 +[resnet50_clahe=False] Epoch 17/50 | train loss: 0.2979 | val loss: 0.4389 | macro F1: 0.4241 | weighted F1: 0.6119 | lr: 8.23e-06 +[resnet50_clahe=False] Epoch 18/50 | train loss: 0.2895 | val loss: 0.4328 | macro F1: 0.4269 | weighted F1: 0.6206 | lr: 7.97e-06 +[resnet50_clahe=False] Epoch 19/50 | train loss: 0.2756 | val loss: 0.4400 | macro F1: 0.4357 | weighted F1: 0.6137 | lr: 7.69e-06 +[resnet50_clahe=False] Epoch 20/50 | train loss: 0.2712 | val loss: 0.4219 | macro F1: 0.4503 | weighted F1: 0.6445 | lr: 7.40e-06 +[resnet50_clahe=False] Epoch 21/50 | train loss: 0.2614 | val loss: 0.4592 | macro F1: 0.4380 | weighted F1: 0.5830 | lr: 7.10e-06 +[resnet50_clahe=False] Epoch 22/50 | train loss: 0.2565 | val loss: 0.4278 | macro F1: 0.4368 | weighted F1: 0.6325 | lr: 6.80e-06 +[resnet50_clahe=False] Epoch 23/50 | train loss: 0.2517 | val loss: 0.4127 | macro F1: 0.4541 | weighted F1: 0.6641 | lr: 6.48e-06 +[resnet50_clahe=False] Epoch 24/50 | train loss: 0.2415 | val loss: 0.4373 | macro F1: 0.4382 | weighted F1: 0.6198 | lr: 6.16e-06 +[resnet50_clahe=False] Epoch 25/50 | train loss: 0.2382 | val loss: 0.4130 | macro F1: 0.4585 | weighted F1: 0.6676 | lr: 5.83e-06 +[resnet50_clahe=False] Epoch 26/50 | train loss: 0.2363 | val loss: 0.4211 | macro F1: 0.4591 | weighted F1: 0.6563 | lr: 5.50e-06 +[resnet50_clahe=False] Epoch 27/50 | train loss: 0.2290 | val loss: 0.4322 | macro F1: 0.4538 | weighted F1: 0.6440 | lr: 5.17e-06 +[resnet50_clahe=False] Epoch 28/50 | train loss: 0.2263 | val loss: 0.4299 | macro F1: 0.4437 | weighted F1: 0.6414 | lr: 4.83e-06 +[resnet50_clahe=False] Epoch 29/50 | train loss: 0.2177 | val loss: 0.4171 | macro F1: 0.4536 | weighted F1: 0.6538 | lr: 4.50e-06 +[resnet50_clahe=False] Epoch 30/50 | train loss: 0.2174 | val loss: 0.4189 | macro F1: 0.4599 | weighted F1: 0.6671 | lr: 4.17e-06 +[resnet50_clahe=False] Epoch 31/50 | train loss: 0.2156 | val loss: 0.4180 | macro F1: 0.4590 | weighted F1: 0.6540 | lr: 3.84e-06 +[resnet50_clahe=False] Epoch 32/50 | train loss: 0.2094 | val loss: 0.4388 | macro F1: 0.4489 | weighted F1: 0.6309 | lr: 3.52e-06 +[resnet50_clahe=False] Epoch 33/50 | train loss: 0.2095 | val loss: 0.4170 | macro F1: 0.4544 | weighted F1: 0.6624 | lr: 3.20e-06 +[resnet50_clahe=False] Epoch 34/50 | train loss: 0.2047 | val loss: 0.4129 | macro F1: 0.4593 | weighted F1: 0.6698 | lr: 2.90e-06 +[resnet50_clahe=False] Epoch 35/50 | train loss: 0.1990 | val loss: 0.4372 | macro F1: 0.4538 | weighted F1: 0.6288 | lr: 2.60e-06 +[resnet50_clahe=False] Epoch 36/50 | train loss: 0.1997 | val loss: 0.4292 | macro F1: 0.4531 | weighted F1: 0.6472 | lr: 2.31e-06 +[resnet50_clahe=False] Epoch 37/50 | train loss: 0.2002 | val loss: 0.4450 | macro F1: 0.4547 | weighted F1: 0.6356 | lr: 2.03e-06 +[resnet50_clahe=False] Epoch 38/50 | train loss: 0.1953 | val loss: 0.4359 | macro F1: 0.4492 | weighted F1: 0.6448 | lr: 1.77e-06 +[resnet50_clahe=False] Epoch 39/50 | train loss: 0.1960 | val loss: 0.4283 | macro F1: 0.4617 | weighted F1: 0.6526 | lr: 1.52e-06 +[resnet50_clahe=False] Epoch 40/50 | train loss: 0.1910 | val loss: 0.4416 | macro F1: 0.4534 | weighted F1: 0.6405 | lr: 1.29e-06 +[resnet50_clahe=False] Epoch 41/50 | train loss: 0.1896 | val loss: 0.4199 | macro F1: 0.4626 | weighted F1: 0.6711 | lr: 1.08e-06 +[resnet50_clahe=False] Epoch 42/50 | train loss: 0.1915 | val loss: 0.4326 | macro F1: 0.4648 | weighted F1: 0.6557 | lr: 8.78e-07 +[resnet50_clahe=False] Epoch 43/50 | train loss: 0.1904 | val loss: 0.4213 | macro F1: 0.4547 | weighted F1: 0.6577 | lr: 6.98e-07 +[resnet50_clahe=False] Epoch 44/50 | train loss: 0.1883 | val loss: 0.4284 | macro F1: 0.4598 | weighted F1: 0.6512 | lr: 5.37e-07 +[resnet50_clahe=False] Epoch 45/50 | train loss: 0.1909 | val loss: 0.4330 | macro F1: 0.4561 | weighted F1: 0.6465 | lr: 3.97e-07 +[resnet50_clahe=False] Epoch 46/50 | train loss: 0.1902 | val loss: 0.4259 | macro F1: 0.4594 | weighted F1: 0.6519 | lr: 2.77e-07 +[resnet50_clahe=False] Epoch 47/50 | train loss: 0.1863 | val loss: 0.4299 | macro F1: 0.4550 | weighted F1: 0.6489 | lr: 1.78e-07 +[resnet50_clahe=False] Epoch 48/50 | train loss: 0.1882 | val loss: 0.4276 | macro F1: 0.4600 | weighted F1: 0.6555 | lr: 1.00e-07 +[resnet50_clahe=False] Epoch 49/50 | train loss: 0.1891 | val loss: 0.4210 | macro F1: 0.4625 | weighted F1: 0.6657 | lr: 4.46e-08 +[resnet50_clahe=False] Epoch 50/50 | train loss: 0.1895 | val loss: 0.4263 | macro F1: 0.4566 | weighted F1: 0.6599 | lr: 1.12e-08 + Training complete: 50 epochs, 7514.0s, best val macro F1: 0.4648 + Checkpoint saved: results/resnet50_clahe=False/best_model.pth + + Test results — Weighted F1: 0.6570 | Macro F1: 0.4630 | Accuracy: 0.6111 | Kappa: 0.5341 + precision recall f1-score support + + Healthy (0) 0.86 0.67 0.75 3872 + Mild NPDR (1) 0.11 0.35 0.17 366 + Moderate NPDR (2) 0.46 0.50 0.48 794 + Severe NPDR (3) 0.45 0.41 0.43 131 +Proliferative DR (4) 0.64 0.40 0.49 106 + + accuracy 0.61 5269 + macro avg 0.50 0.47 0.46 5269 + weighted avg 0.73 0.61 0.66 5269 + + +====================================================================== +Experiment: resnet50 | CLAHE: True +====================================================================== + Using 2 GPUs via DataParallel +[resnet50_clahe=True] Epoch 1/50 | train loss: 1.0238 | val loss: 1.0225 | macro F1: 0.1611 | weighted F1: 0.3049 | lr: 1.00e-06 +[resnet50_clahe=True] Epoch 2/50 | train loss: 0.9321 | val loss: 0.8636 | macro F1: 0.2377 | weighted F1: 0.3381 | lr: 4.00e-06 +[resnet50_clahe=True] Epoch 3/50 | train loss: 0.7489 | val loss: 0.7394 | macro F1: 0.2726 | weighted F1: 0.2384 | lr: 7.00e-06 +/home/vin/src/public/eel4759_finalproject_classification/guix-root/lib/python3.10/site-packages/torch/optim/lr_scheduler.py:240: UserWarning: The epoch parameter in `scheduler.step()` was not necessary and is being deprecated where possible. Please use `scheduler.step()` to step the scheduler. During the deprecation, if epoch is different from None, the closed form is used instead of the new chainable form, where available. Please open an issue if you are unable to replicate your use case: https://github.com/pytorch/pytorch/issues/new/choose. + warnings.warn(EPOCH_DEPRECATION_WARNING, UserWarning) +[resnet50_clahe=True] Epoch 4/50 | train loss: 0.6605 | val loss: 0.6103 | macro F1: 0.3472 | weighted F1: 0.4773 | lr: 1.00e-05 +[resnet50_clahe=True] Epoch 5/50 | train loss: 0.6087 | val loss: 0.5574 | macro F1: 0.3812 | weighted F1: 0.5527 | lr: 9.99e-06 +[resnet50_clahe=True] Epoch 6/50 | train loss: 0.5717 | val loss: 0.6886 | macro F1: 0.3069 | weighted F1: 0.3767 | lr: 9.96e-06 +[resnet50_clahe=True] Epoch 7/50 | train loss: 0.5410 | val loss: 0.5472 | macro F1: 0.3861 | weighted F1: 0.5587 | lr: 9.90e-06 +[resnet50_clahe=True] Epoch 8/50 | train loss: 0.5153 | val loss: 0.6006 | macro F1: 0.3587 | weighted F1: 0.4748 | lr: 9.82e-06 +[resnet50_clahe=True] Epoch 9/50 | train loss: 0.4801 | val loss: 0.5778 | macro F1: 0.3511 | weighted F1: 0.4467 | lr: 9.72e-06 +[resnet50_clahe=True] Epoch 10/50 | train loss: 0.4605 | val loss: 0.6081 | macro F1: 0.3479 | weighted F1: 0.3552 | lr: 9.60e-06 +[resnet50_clahe=True] Epoch 11/50 | train loss: 0.4312 | val loss: 0.5329 | macro F1: 0.3830 | weighted F1: 0.5007 | lr: 9.46e-06 +[resnet50_clahe=True] Epoch 12/50 | train loss: 0.4050 | val loss: 0.6114 | macro F1: 0.3433 | weighted F1: 0.3942 | lr: 9.30e-06 +[resnet50_clahe=True] Epoch 13/50 | train loss: 0.3893 | val loss: 0.4973 | macro F1: 0.4002 | weighted F1: 0.5184 | lr: 9.12e-06 +[resnet50_clahe=True] Epoch 14/50 | train loss: 0.3720 | val loss: 0.5185 | macro F1: 0.3813 | weighted F1: 0.4926 | lr: 8.92e-06 +[resnet50_clahe=True] Epoch 15/50 | train loss: 0.3572 | val loss: 0.4602 | macro F1: 0.4253 | weighted F1: 0.6034 | lr: 8.71e-06 +[resnet50_clahe=True] Epoch 16/50 | train loss: 0.3412 | val loss: 0.4855 | macro F1: 0.4119 | weighted F1: 0.5678 | lr: 8.48e-06 +[resnet50_clahe=True] Epoch 17/50 | train loss: 0.3293 | val loss: 0.5191 | macro F1: 0.3913 | weighted F1: 0.4668 | lr: 8.23e-06 +[resnet50_clahe=True] Epoch 18/50 | train loss: 0.3160 | val loss: 0.4860 | macro F1: 0.4172 | weighted F1: 0.5307 | lr: 7.97e-06 +[resnet50_clahe=True] Epoch 19/50 | train loss: 0.3008 | val loss: 0.4435 | macro F1: 0.4492 | weighted F1: 0.6188 | lr: 7.69e-06 +[resnet50_clahe=True] Epoch 20/50 | train loss: 0.3014 | val loss: 0.4456 | macro F1: 0.4312 | weighted F1: 0.6130 | lr: 7.40e-06 +[resnet50_clahe=True] Epoch 21/50 | train loss: 0.2881 | val loss: 0.4873 | macro F1: 0.4171 | weighted F1: 0.5459 | lr: 7.10e-06 +[resnet50_clahe=True] Epoch 22/50 | train loss: 0.2866 | val loss: 0.4176 | macro F1: 0.4596 | weighted F1: 0.6512 | lr: 6.80e-06 +[resnet50_clahe=True] Epoch 23/50 | train loss: 0.2749 | val loss: 0.4252 | macro F1: 0.4611 | weighted F1: 0.6455 | lr: 6.48e-06 +[resnet50_clahe=True] Epoch 24/50 | train loss: 0.2686 | val loss: 0.4157 | macro F1: 0.4631 | weighted F1: 0.6507 | lr: 6.16e-06 +[resnet50_clahe=True] Epoch 25/50 | train loss: 0.2612 | val loss: 0.4571 | macro F1: 0.4375 | weighted F1: 0.5825 | lr: 5.83e-06 +[resnet50_clahe=True] Epoch 26/50 | train loss: 0.2605 | val loss: 0.4122 | macro F1: 0.4560 | weighted F1: 0.6547 | lr: 5.50e-06 +[resnet50_clahe=True] Epoch 27/50 | train loss: 0.2521 | val loss: 0.4362 | macro F1: 0.4559 | weighted F1: 0.6230 | lr: 5.17e-06 +[resnet50_clahe=True] Epoch 28/50 | train loss: 0.2487 | val loss: 0.4511 | macro F1: 0.4397 | weighted F1: 0.5744 | lr: 4.83e-06 +[resnet50_clahe=True] Epoch 29/50 | train loss: 0.2446 | val loss: 0.4332 | macro F1: 0.4599 | weighted F1: 0.6134 | lr: 4.50e-06 +[resnet50_clahe=True] Epoch 30/50 | train loss: 0.2440 | val loss: 0.4364 | macro F1: 0.4538 | weighted F1: 0.5992 | lr: 4.17e-06 +[resnet50_clahe=True] Epoch 31/50 | train loss: 0.2387 | val loss: 0.4493 | macro F1: 0.4453 | weighted F1: 0.5933 | lr: 3.84e-06 +[resnet50_clahe=True] Epoch 32/50 | train loss: 0.2329 | val loss: 0.4114 | macro F1: 0.4750 | weighted F1: 0.6623 | lr: 3.52e-06 +[resnet50_clahe=True] Epoch 33/50 | train loss: 0.2332 | val loss: 0.4253 | macro F1: 0.4582 | weighted F1: 0.6266 | lr: 3.20e-06 +[resnet50_clahe=True] Epoch 34/50 | train loss: 0.2295 | val loss: 0.4181 | macro F1: 0.4710 | weighted F1: 0.6431 | lr: 2.90e-06 +[resnet50_clahe=True] Epoch 35/50 | train loss: 0.2271 | val loss: 0.4429 | macro F1: 0.4485 | weighted F1: 0.6159 | lr: 2.60e-06 +[resnet50_clahe=True] Epoch 36/50 | train loss: 0.2248 | val loss: 0.4404 | macro F1: 0.4527 | weighted F1: 0.6060 | lr: 2.31e-06 +[resnet50_clahe=True] Epoch 37/50 | train loss: 0.2201 | val loss: 0.4329 | macro F1: 0.4633 | weighted F1: 0.6234 | lr: 2.03e-06 +[resnet50_clahe=True] Epoch 38/50 | train loss: 0.2219 | val loss: 0.4181 | macro F1: 0.4654 | weighted F1: 0.6392 | lr: 1.77e-06 +[resnet50_clahe=True] Epoch 39/50 | train loss: 0.2201 | val loss: 0.4433 | macro F1: 0.4566 | weighted F1: 0.6084 | lr: 1.52e-06 +[resnet50_clahe=True] Epoch 40/50 | train loss: 0.2203 | val loss: 0.4200 | macro F1: 0.4683 | weighted F1: 0.6455 | lr: 1.29e-06 +[resnet50_clahe=True] Epoch 41/50 | train loss: 0.2174 | val loss: 0.4340 | macro F1: 0.4613 | weighted F1: 0.6123 | lr: 1.08e-06 +[resnet50_clahe=True] Epoch 42/50 | train loss: 0.2191 | val loss: 0.4246 | macro F1: 0.4619 | weighted F1: 0.6323 | lr: 8.78e-07 + Early stopping at epoch 42 (no improvement for 10 epochs). + Training complete: 42 epochs, 7428.3s, best val macro F1: 0.4750 + Checkpoint saved: results/resnet50_clahe=True/best_model.pth + + Test results — Weighted F1: 0.6473 | Macro F1: 0.4426 | Accuracy: 0.6058 | Kappa: 0.5234 + precision recall f1-score support + + Healthy (0) 0.86 0.66 0.75 3872 + Mild NPDR (1) 0.12 0.32 0.17 366 + Moderate NPDR (2) 0.39 0.52 0.45 794 + Severe NPDR (3) 0.35 0.33 0.34 131 +Proliferative DR (4) 0.46 0.56 0.50 106 + + accuracy 0.61 5269 + macro avg 0.44 0.48 0.44 5269 + weighted avg 0.72 0.61 0.65 5269 + + +====================================================================== +Experiment: efficientnet_b0 | CLAHE: False +====================================================================== + Using 2 GPUs via DataParallel +[efficientnet_b0_clahe=False] Epoch 1/50 | train loss: 1.0094 | val loss: 1.0305 | macro F1: 0.1622 | weighted F1: 0.2599 | lr: 1.00e-06 +[efficientnet_b0_clahe=False] Epoch 2/50 | train loss: 0.9135 | val loss: 0.8390 | macro F1: 0.2462 | weighted F1: 0.3625 | lr: 4.00e-06 +[efficientnet_b0_clahe=False] Epoch 3/50 | train loss: 0.7802 | val loss: 0.6796 | macro F1: 0.3085 | weighted F1: 0.4454 | lr: 7.00e-06 +/home/vin/src/public/eel4759_finalproject_classification/guix-root/lib/python3.10/site-packages/torch/optim/lr_scheduler.py:240: UserWarning: The epoch parameter in `scheduler.step()` was not necessary and is being deprecated where possible. Please use `scheduler.step()` to step the scheduler. During the deprecation, if epoch is different from None, the closed form is used instead of the new chainable form, where available. Please open an issue if you are unable to replicate your use case: https://github.com/pytorch/pytorch/issues/new/choose. + warnings.warn(EPOCH_DEPRECATION_WARNING, UserWarning) +[efficientnet_b0_clahe=False] Epoch 4/50 | train loss: 0.6916 | val loss: 0.6145 | macro F1: 0.3412 | weighted F1: 0.4696 | lr: 1.00e-05 +[efficientnet_b0_clahe=False] Epoch 5/50 | train loss: 0.6479 | val loss: 0.6016 | macro F1: 0.3530 | weighted F1: 0.4816 | lr: 9.99e-06 +[efficientnet_b0_clahe=False] Epoch 6/50 | train loss: 0.6232 | val loss: 0.5439 | macro F1: 0.3814 | weighted F1: 0.5468 | lr: 9.96e-06 +[efficientnet_b0_clahe=False] Epoch 7/50 | train loss: 0.6024 | val loss: 0.5210 | macro F1: 0.3909 | weighted F1: 0.5471 | lr: 9.90e-06 +[efficientnet_b0_clahe=False] Epoch 8/50 | train loss: 0.5788 | val loss: 0.5330 | macro F1: 0.3936 | weighted F1: 0.5652 | lr: 9.82e-06 +[efficientnet_b0_clahe=False] Epoch 9/50 | train loss: 0.5693 | val loss: 0.4784 | macro F1: 0.4241 | weighted F1: 0.6237 | lr: 9.72e-06 +[efficientnet_b0_clahe=False] Epoch 10/50 | train loss: 0.5533 | val loss: 0.4836 | macro F1: 0.4168 | weighted F1: 0.6054 | lr: 9.60e-06 +[efficientnet_b0_clahe=False] Epoch 11/50 | train loss: 0.5360 | val loss: 0.4841 | macro F1: 0.4225 | weighted F1: 0.6004 | lr: 9.46e-06 +[efficientnet_b0_clahe=False] Epoch 12/50 | train loss: 0.5262 | val loss: 0.4864 | macro F1: 0.4240 | weighted F1: 0.5978 | lr: 9.30e-06 +[efficientnet_b0_clahe=False] Epoch 13/50 | train loss: 0.5072 | val loss: 0.4667 | macro F1: 0.4395 | weighted F1: 0.6369 | lr: 9.12e-06 +[efficientnet_b0_clahe=False] Epoch 14/50 | train loss: 0.4993 | val loss: 0.4608 | macro F1: 0.4295 | weighted F1: 0.5932 | lr: 8.92e-06 +[efficientnet_b0_clahe=False] Epoch 15/50 | train loss: 0.4913 | val loss: 0.4630 | macro F1: 0.4375 | weighted F1: 0.6177 | lr: 8.71e-06 +[efficientnet_b0_clahe=False] Epoch 16/50 | train loss: 0.4824 | val loss: 0.4439 | macro F1: 0.4395 | weighted F1: 0.6329 | lr: 8.48e-06 +[efficientnet_b0_clahe=False] Epoch 17/50 | train loss: 0.4761 | val loss: 0.4512 | macro F1: 0.4469 | weighted F1: 0.6369 | lr: 8.23e-06 +[efficientnet_b0_clahe=False] Epoch 18/50 | train loss: 0.4608 | val loss: 0.4420 | macro F1: 0.4512 | weighted F1: 0.6506 | lr: 7.97e-06 +[efficientnet_b0_clahe=False] Epoch 19/50 | train loss: 0.4509 | val loss: 0.4284 | macro F1: 0.4489 | weighted F1: 0.6558 | lr: 7.69e-06 +[efficientnet_b0_clahe=False] Epoch 20/50 | train loss: 0.4410 | val loss: 0.4232 | macro F1: 0.4586 | weighted F1: 0.6566 | lr: 7.40e-06 +[efficientnet_b0_clahe=False] Epoch 21/50 | train loss: 0.4339 | val loss: 0.4292 | macro F1: 0.4498 | weighted F1: 0.6438 | lr: 7.10e-06 +[efficientnet_b0_clahe=False] Epoch 22/50 | train loss: 0.4260 | val loss: 0.4554 | macro F1: 0.4252 | weighted F1: 0.6216 | lr: 6.80e-06 +[efficientnet_b0_clahe=False] Epoch 23/50 | train loss: 0.4163 | val loss: 0.4584 | macro F1: 0.4267 | weighted F1: 0.5894 | lr: 6.48e-06 +[efficientnet_b0_clahe=False] Epoch 24/50 | train loss: 0.4194 | val loss: 0.4317 | macro F1: 0.4393 | weighted F1: 0.6219 | lr: 6.16e-06 +[efficientnet_b0_clahe=False] Epoch 25/50 | train loss: 0.4121 | val loss: 0.4469 | macro F1: 0.4260 | weighted F1: 0.6084 | lr: 5.83e-06 +[efficientnet_b0_clahe=False] Epoch 26/50 | train loss: 0.4032 | val loss: 0.4448 | macro F1: 0.4315 | weighted F1: 0.6125 | lr: 5.50e-06 +[efficientnet_b0_clahe=False] Epoch 27/50 | train loss: 0.3985 | val loss: 0.4556 | macro F1: 0.4163 | weighted F1: 0.5744 | lr: 5.17e-06 +[efficientnet_b0_clahe=False] Epoch 28/50 | train loss: 0.4012 | val loss: 0.4414 | macro F1: 0.4369 | weighted F1: 0.6114 | lr: 4.83e-06 +[efficientnet_b0_clahe=False] Epoch 29/50 | train loss: 0.3901 | val loss: 0.4544 | macro F1: 0.4269 | weighted F1: 0.5848 | lr: 4.50e-06 +[efficientnet_b0_clahe=False] Epoch 30/50 | train loss: 0.3827 | val loss: 0.4198 | macro F1: 0.4493 | weighted F1: 0.6541 | lr: 4.17e-06 + Early stopping at epoch 30 (no improvement for 10 epochs). + Training complete: 30 epochs, 4417.0s, best val macro F1: 0.4586 + Checkpoint saved: results/efficientnet_b0_clahe=False/best_model.pth + + Test results — Weighted F1: 0.6544 | Macro F1: 0.4565 | Accuracy: 0.6092 | Kappa: 0.5508 + precision recall f1-score support + + Healthy (0) 0.86 0.68 0.76 3872 + Mild NPDR (1) 0.12 0.38 0.18 366 + Moderate NPDR (2) 0.43 0.44 0.43 794 + Severe NPDR (3) 0.37 0.40 0.39 131 +Proliferative DR (4) 0.50 0.55 0.52 106 + + accuracy 0.61 5269 + macro avg 0.46 0.49 0.46 5269 + weighted avg 0.73 0.61 0.65 5269 + + +====================================================================== +Experiment: efficientnet_b0 | CLAHE: True +====================================================================== + Using 2 GPUs via DataParallel +[efficientnet_b0_clahe=True] Epoch 1/50 | train loss: 1.0340 | val loss: 0.9535 | macro F1: 0.1977 | weighted F1: 0.4595 | lr: 1.00e-06 +[efficientnet_b0_clahe=True] Epoch 2/50 | train loss: 0.9357 | val loss: 0.8644 | macro F1: 0.2540 | weighted F1: 0.4719 | lr: 4.00e-06 +[efficientnet_b0_clahe=True] Epoch 3/50 | train loss: 0.8071 | val loss: 0.7581 | macro F1: 0.2782 | weighted F1: 0.3761 | lr: 7.00e-06 +/home/vin/src/public/eel4759_finalproject_classification/guix-root/lib/python3.10/site-packages/torch/optim/lr_scheduler.py:240: UserWarning: The epoch parameter in `scheduler.step()` was not necessary and is being deprecated where possible. Please use `scheduler.step()` to step the scheduler. During the deprecation, if epoch is different from None, the closed form is used instead of the new chainable form, where available. Please open an issue if you are unable to replicate your use case: https://github.com/pytorch/pytorch/issues/new/choose. + warnings.warn(EPOCH_DEPRECATION_WARNING, UserWarning) +[efficientnet_b0_clahe=True] Epoch 4/50 | train loss: 0.7152 | val loss: 0.7045 | macro F1: 0.3216 | weighted F1: 0.4750 | lr: 1.00e-05 +[efficientnet_b0_clahe=True] Epoch 5/50 | train loss: 0.6679 | val loss: 0.6061 | macro F1: 0.3530 | weighted F1: 0.5111 | lr: 9.99e-06 +[efficientnet_b0_clahe=True] Epoch 6/50 | train loss: 0.6345 | val loss: 0.5824 | macro F1: 0.3795 | weighted F1: 0.5610 | lr: 9.96e-06 +[efficientnet_b0_clahe=True] Epoch 7/50 | train loss: 0.6218 | val loss: 0.6082 | macro F1: 0.3673 | weighted F1: 0.5309 | lr: 9.90e-06 +[efficientnet_b0_clahe=True] Epoch 8/50 | train loss: 0.5995 | val loss: 0.5310 | macro F1: 0.4200 | weighted F1: 0.6034 | lr: 9.82e-06 +[efficientnet_b0_clahe=True] Epoch 9/50 | train loss: 0.5713 | val loss: 0.5494 | macro F1: 0.3984 | weighted F1: 0.5903 | lr: 9.72e-06 +[efficientnet_b0_clahe=True] Epoch 10/50 | train loss: 0.5695 | val loss: 0.5148 | macro F1: 0.4143 | weighted F1: 0.5797 | lr: 9.60e-06 +[efficientnet_b0_clahe=True] Epoch 11/50 | train loss: 0.5582 | val loss: 0.5137 | macro F1: 0.4164 | weighted F1: 0.6019 | lr: 9.46e-06 +[efficientnet_b0_clahe=True] Epoch 12/50 | train loss: 0.5420 | val loss: 0.4829 | macro F1: 0.4390 | weighted F1: 0.6368 | lr: 9.30e-06 +[efficientnet_b0_clahe=True] Epoch 13/50 | train loss: 0.5272 | val loss: 0.5464 | macro F1: 0.4034 | weighted F1: 0.5600 | lr: 9.12e-06 +[efficientnet_b0_clahe=True] Epoch 14/50 | train loss: 0.5217 | val loss: 0.5122 | macro F1: 0.4191 | weighted F1: 0.5894 | lr: 8.92e-06 +[efficientnet_b0_clahe=True] Epoch 15/50 | train loss: 0.5070 | val loss: 0.4664 | macro F1: 0.4436 | weighted F1: 0.6234 | lr: 8.71e-06 +[efficientnet_b0_clahe=True] Epoch 16/50 | train loss: 0.5059 | val loss: 0.5205 | macro F1: 0.4144 | weighted F1: 0.5574 | lr: 8.48e-06 +[efficientnet_b0_clahe=True] Epoch 17/50 | train loss: 0.4872 | val loss: 0.4746 | macro F1: 0.4323 | weighted F1: 0.6283 | lr: 8.23e-06 +[efficientnet_b0_clahe=True] Epoch 18/50 | train loss: 0.4801 | val loss: 0.4534 | macro F1: 0.4345 | weighted F1: 0.6202 | lr: 7.97e-06 +[efficientnet_b0_clahe=True] Epoch 19/50 | train loss: 0.4659 | val loss: 0.4260 | macro F1: 0.4591 | weighted F1: 0.6698 | lr: 7.69e-06 +[efficientnet_b0_clahe=True] Epoch 20/50 | train loss: 0.4631 | val loss: 0.4721 | macro F1: 0.4343 | weighted F1: 0.6318 | lr: 7.40e-06 +[efficientnet_b0_clahe=True] Epoch 21/50 | train loss: 0.4559 | val loss: 0.4620 | macro F1: 0.4281 | weighted F1: 0.6117 | lr: 7.10e-06 +[efficientnet_b0_clahe=True] Epoch 22/50 | train loss: 0.4491 | val loss: 0.4908 | macro F1: 0.4294 | weighted F1: 0.6191 | lr: 6.80e-06 +[efficientnet_b0_clahe=True] Epoch 23/50 | train loss: 0.4461 | val loss: 0.4441 | macro F1: 0.4530 | weighted F1: 0.6423 | lr: 6.48e-06 +[efficientnet_b0_clahe=True] Epoch 24/50 | train loss: 0.4359 | val loss: 0.4833 | macro F1: 0.4273 | weighted F1: 0.6094 | lr: 6.16e-06 +[efficientnet_b0_clahe=True] Epoch 25/50 | train loss: 0.4335 | val loss: 0.4640 | macro F1: 0.4372 | weighted F1: 0.6126 | lr: 5.83e-06 +[efficientnet_b0_clahe=True] Epoch 26/50 | train loss: 0.4239 | val loss: 0.4630 | macro F1: 0.4415 | weighted F1: 0.6327 | lr: 5.50e-06 +[efficientnet_b0_clahe=True] Epoch 27/50 | train loss: 0.4233 | val loss: 0.4814 | macro F1: 0.4333 | weighted F1: 0.5907 | lr: 5.17e-06 +[efficientnet_b0_clahe=True] Epoch 28/50 | train loss: 0.4195 | val loss: 0.4707 | macro F1: 0.4348 | weighted F1: 0.6253 | lr: 4.83e-06 +[efficientnet_b0_clahe=True] Epoch 29/50 | train loss: 0.4106 | val loss: 0.4524 | macro F1: 0.4444 | weighted F1: 0.6188 | lr: 4.50e-06 + Early stopping at epoch 29 (no improvement for 10 epochs). + Training complete: 29 epochs, 5039.9s, best val macro F1: 0.4591 + Checkpoint saved: results/efficientnet_b0_clahe=True/best_model.pth + + Test results — Weighted F1: 0.6583 | Macro F1: 0.4510 | Accuracy: 0.6225 | Kappa: 0.5388 + precision recall f1-score support + + Healthy (0) 0.85 0.71 0.77 3872 + Mild NPDR (1) 0.11 0.31 0.17 366 + Moderate NPDR (2) 0.41 0.36 0.38 794 + Severe NPDR (3) 0.35 0.48 0.41 131 +Proliferative DR (4) 0.46 0.62 0.53 106 + + accuracy 0.62 5269 + macro avg 0.44 0.50 0.45 5269 + weighted avg 0.71 0.62 0.66 5269 + + +====================================================================== +Experiment: vit_b_16 | CLAHE: False +====================================================================== + Using 2 GPUs via DataParallel +/home/vin/src/public/eel4759_finalproject_classification/guix-root/lib/python3.10/site-packages/torch/nn/functional.py:6278: UserWarning: 1Torch was not compiled with memory efficient attention. (Triggered internally at /tmp/guix-build-python-pytorch-rocm-2.5.1.drv-0/source/aten/src/ATen/native/transformers/hip/sdp_utils.cpp:655.) + attn_output = scaled_dot_product_attention( +[vit_b_16_clahe=False] Epoch 1/50 | train loss: 0.8742 | val loss: 0.6483 | macro F1: 0.3378 | weighted F1: 0.5137 | lr: 1.00e-06 +[vit_b_16_clahe=False] Epoch 2/50 | train loss: 0.6200 | val loss: 0.5276 | macro F1: 0.4139 | weighted F1: 0.6270 | lr: 4.00e-06 +[vit_b_16_clahe=False] Epoch 3/50 | train loss: 0.5423 | val loss: 0.4780 | macro F1: 0.4336 | weighted F1: 0.6650 | lr: 7.00e-06 +/home/vin/src/public/eel4759_finalproject_classification/guix-root/lib/python3.10/site-packages/torch/optim/lr_scheduler.py:240: UserWarning: The epoch parameter in `scheduler.step()` was not necessary and is being deprecated where possible. Please use `scheduler.step()` to step the scheduler. During the deprecation, if epoch is different from None, the closed form is used instead of the new chainable form, where available. Please open an issue if you are unable to replicate your use case: https://github.com/pytorch/pytorch/issues/new/choose. + warnings.warn(EPOCH_DEPRECATION_WARNING, UserWarning) +[vit_b_16_clahe=False] Epoch 4/50 | train loss: 0.4824 | val loss: 0.4713 | macro F1: 0.4397 | weighted F1: 0.6484 | lr: 1.00e-05 +[vit_b_16_clahe=False] Epoch 5/50 | train loss: 0.3943 | val loss: 0.5388 | macro F1: 0.4058 | weighted F1: 0.5305 | lr: 9.99e-06 +[vit_b_16_clahe=False] Epoch 6/50 | train loss: 0.3380 | val loss: 0.4502 | macro F1: 0.4414 | weighted F1: 0.6493 | lr: 9.96e-06 +[vit_b_16_clahe=False] Epoch 7/50 | train loss: 0.2967 | val loss: 0.5407 | macro F1: 0.4048 | weighted F1: 0.5500 | lr: 9.90e-06 +[vit_b_16_clahe=False] Epoch 8/50 | train loss: 0.2683 | val loss: 0.4669 | macro F1: 0.4255 | weighted F1: 0.6103 | lr: 9.82e-06 +[vit_b_16_clahe=False] Epoch 9/50 | train loss: 0.2491 | val loss: 0.5058 | macro F1: 0.4202 | weighted F1: 0.5681 | lr: 9.72e-06 +[vit_b_16_clahe=False] Epoch 10/50 | train loss: 0.2314 | val loss: 0.5206 | macro F1: 0.3947 | weighted F1: 0.5672 | lr: 9.60e-06 +[vit_b_16_clahe=False] Epoch 11/50 | train loss: 0.2123 | val loss: 0.4093 | macro F1: 0.4600 | weighted F1: 0.6873 | lr: 9.46e-06 +[vit_b_16_clahe=False] Epoch 12/50 | train loss: 0.1984 | val loss: 0.4557 | macro F1: 0.4462 | weighted F1: 0.6466 | lr: 9.30e-06 +[vit_b_16_clahe=False] Epoch 13/50 | train loss: 0.1796 | val loss: 0.5881 | macro F1: 0.3977 | weighted F1: 0.4722 | lr: 9.12e-06 +[vit_b_16_clahe=False] Epoch 14/50 | train loss: 0.1653 | val loss: 0.5450 | macro F1: 0.4196 | weighted F1: 0.5442 | lr: 8.92e-06 +[vit_b_16_clahe=False] Epoch 15/50 | train loss: 0.1543 | val loss: 0.4631 | macro F1: 0.4565 | weighted F1: 0.6523 | lr: 8.71e-06 +[vit_b_16_clahe=False] Epoch 16/50 | train loss: 0.1406 | val loss: 0.4707 | macro F1: 0.4367 | weighted F1: 0.6526 | lr: 8.48e-06 +[vit_b_16_clahe=False] Epoch 17/50 | train loss: 0.1301 | val loss: 0.4762 | macro F1: 0.4604 | weighted F1: 0.6645 | lr: 8.23e-06 +[vit_b_16_clahe=False] Epoch 18/50 | train loss: 0.1178 | val loss: 0.4418 | macro F1: 0.4740 | weighted F1: 0.7078 | lr: 7.97e-06 +[vit_b_16_clahe=False] Epoch 19/50 | train loss: 0.1070 | val loss: 0.5175 | macro F1: 0.4431 | weighted F1: 0.6389 | lr: 7.69e-06 +[vit_b_16_clahe=False] Epoch 20/50 | train loss: 0.0997 | val loss: 0.4831 | macro F1: 0.4548 | weighted F1: 0.7043 | lr: 7.40e-06 +[vit_b_16_clahe=False] Epoch 21/50 | train loss: 0.0932 | val loss: 0.5100 | macro F1: 0.4572 | weighted F1: 0.6734 | lr: 7.10e-06 +[vit_b_16_clahe=False] Epoch 22/50 | train loss: 0.0820 | val loss: 0.5025 | macro F1: 0.4599 | weighted F1: 0.6818 | lr: 6.80e-06 +[vit_b_16_clahe=False] Epoch 23/50 | train loss: 0.0732 | val loss: 0.5247 | macro F1: 0.4565 | weighted F1: 0.6924 | lr: 6.48e-06 +[vit_b_16_clahe=False] Epoch 24/50 | train loss: 0.0690 | val loss: 0.5487 | macro F1: 0.4732 | weighted F1: 0.7083 | lr: 6.16e-06 +[vit_b_16_clahe=False] Epoch 25/50 | train loss: 0.0631 | val loss: 0.5392 | macro F1: 0.4704 | weighted F1: 0.7079 | lr: 5.83e-06 +[vit_b_16_clahe=False] Epoch 26/50 | train loss: 0.0585 | val loss: 0.5939 | macro F1: 0.4463 | weighted F1: 0.6931 | lr: 5.50e-06 +[vit_b_16_clahe=False] Epoch 27/50 | train loss: 0.0534 | val loss: 0.5767 | macro F1: 0.4859 | weighted F1: 0.7079 | lr: 5.17e-06 +[vit_b_16_clahe=False] Epoch 28/50 | train loss: 0.0489 | val loss: 0.5820 | macro F1: 0.4646 | weighted F1: 0.7143 | lr: 4.83e-06 +[vit_b_16_clahe=False] Epoch 29/50 | train loss: 0.0472 | val loss: 0.5762 | macro F1: 0.4666 | weighted F1: 0.7230 | lr: 4.50e-06 +[vit_b_16_clahe=False] Epoch 30/50 | train loss: 0.0435 | val loss: 0.6125 | macro F1: 0.4653 | weighted F1: 0.7279 | lr: 4.17e-06 +[vit_b_16_clahe=False] Epoch 31/50 | train loss: 0.0415 | val loss: 0.6332 | macro F1: 0.4475 | weighted F1: 0.7150 | lr: 3.84e-06 +[vit_b_16_clahe=False] Epoch 32/50 | train loss: 0.0366 | val loss: 0.6243 | macro F1: 0.4765 | weighted F1: 0.7230 | lr: 3.52e-06 +[vit_b_16_clahe=False] Epoch 33/50 | train loss: 0.0338 | val loss: 0.6617 | macro F1: 0.4562 | weighted F1: 0.7240 | lr: 3.20e-06 +[vit_b_16_clahe=False] Epoch 34/50 | train loss: 0.0330 | val loss: 0.6543 | macro F1: 0.4573 | weighted F1: 0.7261 | lr: 2.90e-06 +[vit_b_16_clahe=False] Epoch 35/50 | train loss: 0.0306 | val loss: 0.6551 | macro F1: 0.4678 | weighted F1: 0.7145 | lr: 2.60e-06 +[vit_b_16_clahe=False] Epoch 36/50 | train loss: 0.0278 | val loss: 0.6882 | macro F1: 0.4576 | weighted F1: 0.7208 | lr: 2.31e-06 +[vit_b_16_clahe=False] Epoch 37/50 | train loss: 0.0263 | val loss: 0.6960 | macro F1: 0.4667 | weighted F1: 0.7268 | lr: 2.03e-06 + Early stopping at epoch 37 (no improvement for 10 epochs). + Training complete: 37 epochs, 5571.3s, best val macro F1: 0.4859 + Checkpoint saved: results/vit_b_16_clahe=False/best_model.pth + + Test results — Weighted F1: 0.6913 | Macro F1: 0.4654 | Accuracy: 0.6800 | Kappa: 0.5326 + precision recall f1-score support + + Healthy (0) 0.83 0.79 0.81 3872 + Mild NPDR (1) 0.12 0.17 0.14 366 + Moderate NPDR (2) 0.41 0.46 0.43 794 + Severe NPDR (3) 0.50 0.37 0.43 131 +Proliferative DR (4) 0.63 0.43 0.51 106 + + accuracy 0.68 5269 + macro avg 0.50 0.45 0.47 5269 + weighted avg 0.71 0.68 0.69 5269 + + +====================================================================== +Experiment: vit_b_16 | CLAHE: True +====================================================================== + Using 2 GPUs via DataParallel +[vit_b_16_clahe=True] Epoch 1/50 | train loss: 0.8458 | val loss: 0.6484 | macro F1: 0.3372 | weighted F1: 0.5862 | lr: 1.00e-06 +[vit_b_16_clahe=True] Epoch 2/50 | train loss: 0.6195 | val loss: 0.5034 | macro F1: 0.4192 | weighted F1: 0.6381 | lr: 4.00e-06 +[vit_b_16_clahe=True] Epoch 3/50 | train loss: 0.5527 | val loss: 0.4780 | macro F1: 0.4058 | weighted F1: 0.5776 | lr: 7.00e-06 +/home/vin/src/public/eel4759_finalproject_classification/guix-root/lib/python3.10/site-packages/torch/optim/lr_scheduler.py:240: UserWarning: The epoch parameter in `scheduler.step()` was not necessary and is being deprecated where possible. Please use `scheduler.step()` to step the scheduler. During the deprecation, if epoch is different from None, the closed form is used instead of the new chainable form, where available. Please open an issue if you are unable to replicate your use case: https://github.com/pytorch/pytorch/issues/new/choose. + warnings.warn(EPOCH_DEPRECATION_WARNING, UserWarning) +[vit_b_16_clahe=True] Epoch 4/50 | train loss: 0.4705 | val loss: 0.5859 | macro F1: 0.3382 | weighted F1: 0.3211 | lr: 1.00e-05 +[vit_b_16_clahe=True] Epoch 5/50 | train loss: 0.3984 | val loss: 0.4626 | macro F1: 0.4063 | weighted F1: 0.5911 | lr: 9.99e-06 +[vit_b_16_clahe=True] Epoch 6/50 | train loss: 0.3541 | val loss: 0.5024 | macro F1: 0.4102 | weighted F1: 0.5132 | lr: 9.96e-06 +[vit_b_16_clahe=True] Epoch 7/50 | train loss: 0.3034 | val loss: 0.5261 | macro F1: 0.3908 | weighted F1: 0.5489 | lr: 9.90e-06 +[vit_b_16_clahe=True] Epoch 8/50 | train loss: 0.2757 | val loss: 0.5225 | macro F1: 0.4164 | weighted F1: 0.5205 | lr: 9.82e-06 +[vit_b_16_clahe=True] Epoch 9/50 | train loss: 0.2469 | val loss: 0.5351 | macro F1: 0.4040 | weighted F1: 0.5129 | lr: 9.72e-06 +[vit_b_16_clahe=True] Epoch 10/50 | train loss: 0.2217 | val loss: 0.4544 | macro F1: 0.4237 | weighted F1: 0.6428 | lr: 9.60e-06 +[vit_b_16_clahe=True] Epoch 11/50 | train loss: 0.2108 | val loss: 0.4344 | macro F1: 0.4614 | weighted F1: 0.6458 | lr: 9.46e-06 +[vit_b_16_clahe=True] Epoch 12/50 | train loss: 0.1908 | val loss: 0.3916 | macro F1: 0.4673 | weighted F1: 0.6911 | lr: 9.30e-06 +[vit_b_16_clahe=True] Epoch 13/50 | train loss: 0.1738 | val loss: 0.4206 | macro F1: 0.4557 | weighted F1: 0.6754 | lr: 9.12e-06 +[vit_b_16_clahe=True] Epoch 14/50 | train loss: 0.1640 | val loss: 0.5151 | macro F1: 0.4403 | weighted F1: 0.5692 | lr: 8.92e-06 +[vit_b_16_clahe=True] Epoch 15/50 | train loss: 0.1422 | val loss: 0.4217 | macro F1: 0.4604 | weighted F1: 0.6939 | lr: 8.71e-06 +[vit_b_16_clahe=True] Epoch 16/50 | train loss: 0.1299 | val loss: 0.5239 | macro F1: 0.4394 | weighted F1: 0.5880 | lr: 8.48e-06 +[vit_b_16_clahe=True] Epoch 17/50 | train loss: 0.1205 | val loss: 0.4722 | macro F1: 0.4480 | weighted F1: 0.6693 | lr: 8.23e-06 +[vit_b_16_clahe=True] Epoch 18/50 | train loss: 0.1061 | val loss: 0.4824 | macro F1: 0.4514 | weighted F1: 0.6643 | lr: 7.97e-06 +[vit_b_16_clahe=True] Epoch 19/50 | train loss: 0.0960 | val loss: 0.4572 | macro F1: 0.4621 | weighted F1: 0.6980 | lr: 7.69e-06 +[vit_b_16_clahe=True] Epoch 20/50 | train loss: 0.0899 | val loss: 0.4783 | macro F1: 0.4621 | weighted F1: 0.6845 | lr: 7.40e-06 +[vit_b_16_clahe=True] Epoch 21/50 | train loss: 0.0842 | val loss: 0.5032 | macro F1: 0.4517 | weighted F1: 0.6685 | lr: 7.10e-06 +[vit_b_16_clahe=True] Epoch 22/50 | train loss: 0.0742 | val loss: 0.5754 | macro F1: 0.4630 | weighted F1: 0.6337 | lr: 6.80e-06 + Early stopping at epoch 22 (no improvement for 10 epochs). + Training complete: 22 epochs, 3937.8s, best val macro F1: 0.4673 + Checkpoint saved: results/vit_b_16_clahe=True/best_model.pth + + Test results — Weighted F1: 0.6913 | Macro F1: 0.4777 | Accuracy: 0.6705 | Kappa: 0.5624 + precision recall f1-score support + + Healthy (0) 0.85 0.76 0.80 3872 + Mild NPDR (1) 0.13 0.22 0.16 366 + Moderate NPDR (2) 0.43 0.48 0.45 794 + Severe NPDR (3) 0.33 0.43 0.37 131 +Proliferative DR (4) 0.66 0.56 0.60 106 + + accuracy 0.67 5269 + macro avg 0.48 0.49 0.48 5269 + weighted avg 0.72 0.67 0.69 5269 + + +====================================================================== +Model CLAHE W-F1 M-F1 Acc Kappa Time(s) Epochs +---------------------------------------------------------------------- +resnet50 False 0.6570 0.4630 0.6111 0.5341 7514.0 50 +resnet50 True 0.6473 0.4426 0.6058 0.5234 7428.3 42 +efficientnet_b0 False 0.6544 0.4565 0.6092 0.5508 4417.0 30 +efficientnet_b0 True 0.6583 0.4510 0.6225 0.5388 5039.9 29 +vit_b_16 False 0.6913 0.4654 0.6800 0.5326 5571.3 37 +vit_b_16 True 0.6913 0.4777 0.6705 0.5624 3937.8 22 +====================================================================== + +Summary saved to results/summary.csv +Comparison chart saved to results/comparison_chart.png diff --git a/results/resnet50_clahe=False/classification_report.txt b/results/resnet50_clahe=False/classification_report.txt new file mode 100644 index 0000000..a966589 --- /dev/null +++ b/results/resnet50_clahe=False/classification_report.txt @@ -0,0 +1,13 @@ +Experiment: resnet50_clahe=False + + precision recall f1-score support + + Healthy (0) 0.86 0.94 0.90 3872 + Mild NPDR (1) 0.19 0.06 0.09 366 + Moderate NPDR (2) 0.60 0.54 0.57 794 + Severe NPDR (3) 0.48 0.52 0.50 131 +Proliferative DR (4) 0.55 0.48 0.52 106 + + accuracy 0.80 5269 + macro avg 0.54 0.51 0.51 5269 + weighted avg 0.76 0.80 0.77 5269 diff --git a/results/resnet50_clahe=False/confusion_matrix.png b/results/resnet50_clahe=False/confusion_matrix.png new file mode 100644 index 0000000..ec2fc1e Binary files /dev/null and b/results/resnet50_clahe=False/confusion_matrix.png differ diff --git a/results/resnet50_clahe=False/training_curves.png b/results/resnet50_clahe=False/training_curves.png new file mode 100644 index 0000000..7978272 Binary files /dev/null and b/results/resnet50_clahe=False/training_curves.png differ diff --git a/results/resnet50_clahe=True/classification_report.txt b/results/resnet50_clahe=True/classification_report.txt new file mode 100644 index 0000000..e9029b5 --- /dev/null +++ b/results/resnet50_clahe=True/classification_report.txt @@ -0,0 +1,13 @@ +Experiment: resnet50_clahe=True + + precision recall f1-score support + + Healthy (0) 0.87 0.91 0.89 3872 + Mild NPDR (1) 0.18 0.16 0.17 366 + Moderate NPDR (2) 0.60 0.48 0.53 794 + Severe NPDR (3) 0.39 0.53 0.45 131 +Proliferative DR (4) 0.66 0.58 0.61 106 + + accuracy 0.78 5269 + macro avg 0.54 0.53 0.53 5269 + weighted avg 0.76 0.78 0.77 5269 diff --git a/results/resnet50_clahe=True/confusion_matrix.png b/results/resnet50_clahe=True/confusion_matrix.png new file mode 100644 index 0000000..4370a88 Binary files /dev/null and b/results/resnet50_clahe=True/confusion_matrix.png differ diff --git a/results/resnet50_clahe=True/training_curves.png b/results/resnet50_clahe=True/training_curves.png new file mode 100644 index 0000000..293ad44 Binary files /dev/null and b/results/resnet50_clahe=True/training_curves.png differ diff --git a/results/vit_b_16_clahe=False/classification_report.txt b/results/vit_b_16_clahe=False/classification_report.txt new file mode 100644 index 0000000..91da839 --- /dev/null +++ b/results/vit_b_16_clahe=False/classification_report.txt @@ -0,0 +1,13 @@ +Experiment: vit_b_16_clahe=False + + precision recall f1-score support + + Healthy (0) 0.83 0.79 0.81 3872 + Mild NPDR (1) 0.12 0.17 0.14 366 + Moderate NPDR (2) 0.41 0.46 0.43 794 + Severe NPDR (3) 0.50 0.37 0.43 131 +Proliferative DR (4) 0.63 0.43 0.51 106 + + accuracy 0.68 5269 + macro avg 0.50 0.45 0.47 5269 + weighted avg 0.71 0.68 0.69 5269 diff --git a/results/vit_b_16_clahe=False/confusion_matrix.png b/results/vit_b_16_clahe=False/confusion_matrix.png new file mode 100644 index 0000000..569e42c Binary files /dev/null and b/results/vit_b_16_clahe=False/confusion_matrix.png differ diff --git a/results/vit_b_16_clahe=False/training_curves.png b/results/vit_b_16_clahe=False/training_curves.png new file mode 100644 index 0000000..ae7a9bc Binary files /dev/null and b/results/vit_b_16_clahe=False/training_curves.png differ diff --git a/results/vit_b_16_clahe=True/classification_report.txt b/results/vit_b_16_clahe=True/classification_report.txt new file mode 100644 index 0000000..b90af00 --- /dev/null +++ b/results/vit_b_16_clahe=True/classification_report.txt @@ -0,0 +1,13 @@ +Experiment: vit_b_16_clahe=True + + precision recall f1-score support + + Healthy (0) 0.85 0.80 0.83 3872 + Mild NPDR (1) 0.14 0.22 0.17 366 + Moderate NPDR (2) 0.45 0.45 0.45 794 + Severe NPDR (3) 0.43 0.47 0.45 131 +Proliferative DR (4) 0.56 0.56 0.56 106 + + accuracy 0.69 5269 + macro avg 0.49 0.50 0.49 5269 + weighted avg 0.73 0.69 0.71 5269 diff --git a/results/vit_b_16_clahe=True/confusion_matrix.png b/results/vit_b_16_clahe=True/confusion_matrix.png new file mode 100644 index 0000000..ddf0c0f Binary files /dev/null and b/results/vit_b_16_clahe=True/confusion_matrix.png differ diff --git a/results/vit_b_16_clahe=True/training_curves.png b/results/vit_b_16_clahe=True/training_curves.png new file mode 100644 index 0000000..72cdc00 Binary files /dev/null and b/results/vit_b_16_clahe=True/training_curves.png differ -- cgit v1.2.3