Metadata-Version: 2.1
Name: alzheimer_classification
Version: 0.2.0
Summary: Detecting the stage of Alzheimer's based on MRI images.
Author: s24575
Author-email: sawickigrzegorz66@gmail.com
Requires-Python: >=3.9,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: matplotlib (>=3.9.0,<4.0.0)
Requires-Dist: numpy (<2.0.0)
Requires-Dist: pre-commit (>=3.7.1,<4.0.0)
Requires-Dist: pytorch-lightning (>=2.3.1,<3.0.0)
Requires-Dist: tensorboard (>=2.17.0,<3.0.0)
Requires-Dist: torch (>=2.3.1,<3.0.0)
Requires-Dist: torchvision (>=0.18.1,<0.19.0)
Description-Content-Type: text/markdown

# Stage of Alzheimer's classification.

The purpose of this project is to detect the stage of Alzheimer's based on MRI images.

# Dataset

The models are designed to be trained on [Alzheimer's Dataset ( 4 class of Images)](https://www.kaggle.com/datasets/tourist55/alzheimers-dataset-4-class-of-images) from Kaggle.
It has already been downloaded and is available in the dataset/ directory.

<p align="center">
  <img src="images/train_dataset.png" alt="Train Dataset" width="45%" />
  <img src="images/test_dataset.png" alt="Test Dataset" width="45%" />
</p>

# Usage

### Requirements
* Python 3.11+
* Poetry

### Training a model

    python train.py -m vgg16 -f model_filename
        -m/--model_name: Name of the model to train (vgg16 or cnn).
        -f/--filename: Filename to save the trained model.

### Predicting with a model

    python predict.py -m vgg16 -f model_filename -i ../dataset/test/ModerateDemented/27.jpg
        -m/--model_name: Name of the model to use for prediction (vgg16 or cnn).
        -f/--filename: Filename of the trained model.
        -i/--image_path: Path to the image file to predict.

# Development
## Pre-commits
Install pre-commits
https://pre-commit.com/#installation

If you are using VS-code install the extension https://marketplace.visualstudio.com/items?itemName=MarkLarah.pre-commit-vscode

To make a dry-run of the pre-commits to see if your code passes run
```
pre-commit run --all-files
```


## Adding python packages
Dependencies are handled by `poetry` framework, to add new dependency run
```
poetry add <package_name>
```
