This repository contains code for classifying prostate MRI images using deep learning techniques.
-
Clone the repository:
git clone https://github.com/KevinMathewT/prostate-mri-classification.git cd prostate-mri-classification
-
Install dependencies using Poetry:
poetry install
-
Activate the virtual environment:
poetry shell
-
Create a configuration file or use an existing one from the
config/
directory. Example configurations may include hyperparameters, dataset paths, and training settings. -
Run the training script with the chosen configuration file:
accelerate launch -m train config/resnet50.yaml
Replace
path/to/config.yaml
with the actual path to your configuration file. -
The script will handle model initialization, training, validation, and logging based on the provided configuration.
You can load and evaluate trained models using code snippets provided in notebooks/
for further analysis and visualization.
config/
: Contains YAML configuration files for specifying training parameters.loader/
: Code for loading and preprocessing MRI datasets.model/
: Definitions of model architectures used for classification.notebooks/
: Jupyter notebooks for exploration and evaluation of model performance.criterion.py
: Implements custom loss functions for the training process.engine.py
: Core training and evaluation logic, including epochs and batch handling.optimizer.py
: Optimizer configurations for training.train.py
: Main training script, which integrates the components and runs the training pipeline.utils.py
: Utility functions for setup, initialization, and debugging.
Feel free to explore and modify the repository to suit your requirements!