-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(43909856) ViT (Visual Transformer) for image classification of ADNI dataset #172
base: topic-recognition
Are you sure you want to change the base?
(43909856) ViT (Visual Transformer) for image classification of ADNI dataset #172
Conversation
This is an initial inspection, no action is required at this point Difficulty: Hard Readme: Commit messages: Excellent, detailed. Code:
Functionality/Performance:
|
MarkingGood Practice (Design/Commenting, TF/Torch Usage)Adequate design and implementation Recognition ProblemSolves problem Commit LogMeaningful commit messages DocumentationReadMe acceptable/good Pull RequestSuccessful Pull Request (Working Algorithm Delivered on Time in Correct Branch) |
Please remove gitignore file for merge, does not affect grade only merge. |
Hi @shakes76, I have resolved the merge conflict related to the .gitignore file. Thanks |
Feedback attempt and no feedback marks lost. |
Hi there,
This fork of the 'topic-recognition' branch contains code for a ViT (a Visual Transformer) model. This is based on the ViT-S/16
model, from the IEEE conference paper "Scaling Vision Transformers" (Zhai et al., 2022).
This model was used to perform binary classification of images from the Alzheimer's Disease Neuroimaging Initiative (ADNI) MRI dataset. The ViT attempts to classify 2D MRI slices as belonging to either Cognitive Normal (NC) or Alzheimer's Detected (AD) patients.
For more detailed information about the model, its performance, and any dependencies/requirements for training or testing it, please see the README file. All files related to the ViT model, including the README, are in the directory location 'recognition/TRANSFORMER_43909856'.
The files added include:
dataset.py: Loads the ADNI dataset images and their corresponding image labels, and performs the required train/validation/test set splits. Also applies any required pre-processing or transforms to the data. A basic plot of the input images (after pre-processing transforms) can be generated from a method in this file.
modules.py: Contains the modules required to create the ViT model network and its sub-components.
train.py: Trains the model on the ADNI dataset over the specified number of epochs. Evaluates the model on the validation set during the training process, at the end of every epoch. Also contains methods for plotting training and validation loss (and validation accuracy) throughout training.
predict.py: Used to run inference (make predictions of classes) on the model. Also contains a method for generating a confusion matrix, based on the test set's predicted classes and empirical/observed classes.
Additional plots can be found in the 'plots' subdirectory.