Custom implementations of ResNeXt and EfficientNet providing training, logging and inference on Augmented Alzheimer MRI Dataset
See below for a quickstart installation and usage example
Install
- Git clone the repository
git clone https://github.com/Kartikeya2710/alzheimer-prediction.git
- Install the requirements from
requirements.txt
pip3 install -r requirements.txt
Usage
You can use it directly from the Command Line Interface (CLI):
python3 main.py --model-config configs/models/resnext.yaml --dataset-config configs/datasets/alzheimer.yaml
Note: You can set the mode
of your model to train
or test
in its config file
mode: train # or test
Benchmark
Model | size (pixels) |
params (M) |
train_acc (%) |
val_acc (%) |
epochs |
---|---|---|---|---|---|
ResNeXt-50 | 224 x 224 | 23.015 | 99.01 | 98.90 | 20 |
Logs
Example of logs for validation:
[INFO] - 2023-06-21 22:11:26,009 - root - : Using resnext... in ./alzheimer-prediction/agents/alzheimer.py:23
[INFO] - 2023-06-21 22:11:26,090 - root - : Created annotations at ./data/imageset.csv in ./alzheimer-prediction/agents/alzheimer.py:26
[INFO] - 2023-06-21 22:11:26,514 - root - : Operation will be on *****GPU-CUDA***** in ./alzheimer-prediction/agents/alzheimer.py:53
[INFO] - 2023-06-21 22:11:29,144 - root - : Loading checkpoint 'experiments/resnextalzheimer/checkpoints/model_best.pth.tar' in ./alzheimer-prediction/agents/alzheimer.py:93
[INFO] - 2023-06-21 22:11:29,663 - root - : Checkpoint loaded successfully from 'experiments/resnextalzheimer/checkpoints/' at (epoch 21) in ./alzheimer-prediction/agents/alzheimer.py:100
[INFO] - 2023-06-21 22:11:38,909 - root - : Validation result at epoch-21 | - Val Acc: tensor(98.9114, device='cuda:0') in ./alzheimer-prediction/agents/alzheimer.py:219