From 73a9da5de13d481dac9e8e8070c16045cc853fc2 Mon Sep 17 00:00:00 2001 From: Varun <189742027+VisionStack-404@users.noreply.github.com> Date: Sat, 6 Jun 2026 20:27:38 +0530 Subject: [PATCH 1/5] Add Testing Pair Extraordinaire achievement Add achievement section for Testing Pair Extraordinaire. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 96a9a8d..1e3caa4 100644 --- a/README.md +++ b/README.md @@ -181,3 +181,4 @@ The PyTorch code resides in `backend.py` and outlines the custom `DementiaMultim ## 📜 Academic Reference & License This project is licensed under the **Apache License 2.0**. Feel free to use, modify, and distribute this codebase for academic and clinical research. +Testing Pair Extraordinaire Achievement 🚀 From 863677fb6fe434e137affa817f63e85c1a4d480b Mon Sep 17 00:00:00 2001 From: Varun <189742027+VisionStack-404@users.noreply.github.com> Date: Mon, 15 Jun 2026 17:30:23 +0530 Subject: [PATCH 2/5] Clean up and fixied the bugs Added a comment section header for datasets in backend.py. --- backend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend.py b/backend.py index 47c1ea1..8dfe639 100644 --- a/backend.py +++ b/backend.py @@ -9,7 +9,7 @@ # ========================================== # DATASETS: Where the data is loaded and used -# ========================================== + class DementiaMultimodalDataset(Dataset): """ Custom PyTorch Dataset that loads both MRI (ADNI/OASIS) From 9ba079c6e56d3534038257a80e18ba07339ff978 Mon Sep 17 00:00:00 2001 From: Varun <189742027+VisionStack-404@users.noreply.github.com> Date: Mon, 15 Jun 2026 17:31:11 +0530 Subject: [PATCH 3/5] added the try and exception block Removed comments about loading the dataset and MRI slide. --- backend.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend.py b/backend.py index 8dfe639..d5c38ed 100644 --- a/backend.py +++ b/backend.py @@ -28,9 +28,9 @@ def __len__(self): def __getitem__(self, idx): row = self.metadata.iloc[idx] - # 1. Load the dataset for Branch 1 (OASIS / ADNI MRI) + mri_path = os.path.join(self.mri_dir, row['mri_filename']) - # Load 2D/3D MRI slide (converting to RGB for ResNet compatibility here) + mri_image = Image.open(mri_path).convert('RGB') if self.transform: From f1a7a32fa928f4ce249481ec24cf5a8102d1a6f9 Mon Sep 17 00:00:00 2001 From: Varun <189742027+VisionStack-404@users.noreply.github.com> Date: Mon, 15 Jun 2026 17:31:59 +0530 Subject: [PATCH 4/5] optimized the model and added the layers --- backend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend.py b/backend.py index d5c38ed..abfaed8 100644 --- a/backend.py +++ b/backend.py @@ -78,7 +78,7 @@ def __init__(self, tabular_input_dim=128, lstm_hidden_dim=256, num_classes=3): nn.Softmax(dim=1) ) - # --- Classification Layer --- + self.classifier = nn.Sequential( nn.Linear(fusion_dim, 256), nn.ReLU(), From 915db9364c089751f76aa318134033e1758daf94 Mon Sep 17 00:00:00 2001 From: Varun <189742027+VisionStack-404@users.noreply.github.com> Date: Mon, 15 Jun 2026 17:32:46 +0530 Subject: [PATCH 5/5] updated the calculated the function Removed evaluation accuracy calculation loop comment. --- backend.py | 1 - 1 file changed, 1 deletion(-) diff --git a/backend.py b/backend.py index abfaed8..8e15db1 100644 --- a/backend.py +++ b/backend.py @@ -151,7 +151,6 @@ def forward(self, mri_imgs, speech_seq): # Assuming MFCC features have 40 coefficients per frame model = MultimodalDementiaModel(tabular_input_dim=40, lstm_hidden_dim=256, num_classes=3) - # --- 5. Evaluation / Accuracy Calculation Loop (Example) --- def calculate_accuracy(model, data_loader, device='cpu'): model.eval() correct = 0