Skip to main content

Python library designed to analyze and detect the sclerosis from MRI brain scans using advanced deep learning algorithms

Project description

Bachelor’s Thesis – University of Málaga (Sept 2024 – Jun 2025) Author: Emilio Rodrigo Carreira Villalta (emiliorodrigo.ecr@gmail.com)

Ask DeepWiki PyPI Version PyPI Python version PyPI License CI

Segmenting sclerosis lesions on 3‑D MRI volumes is a critical yet time‑consuming step in clinical workflows. This repository contains the open‑source code, experiments and analysis accompanying my bachelor’s thesis, which investigates the synergy between YOLOv11 object detection and nnUNet semantic segmentation, enhanced by a novel 3‑D consensus‑ensemble strategy.

Key features

  • Dual‑model pipeline – combines fast YOLOv11 localisation with nnUNet high‑resolution segmentation.
  • Rotation‑and‑cut consensus – aggregates predictions across multiple axial rotations and random 3‑D crops to mitigate viewpoint bias.
  • Statistical benchmarking – leverages the SAES library to run non‑parametric tests and automatically generate LaTeX reports.
  • HPC‑ready – training scripts tested on Málaga’s Picasso Supercomputer (SLURM job templates provided).
  • Reproducible experimentsconfigs/ YAML files capture every run; hashes are logged with Weights & Biases.

Getting started

1. Clone & install

git clone https://github.com/rorro6787/neurodegenerative-disease-detector.git
cd neurodegenerative-disease-detector
python3 -m venv venv
source venv/bin/activate

2. Launch experiments

cd models

# Train the different YOLO and nnUNet models
python models_pipeline.py

3. Ensemble inference

An example Jupyter notebook that visualises the different nnUNet model inferences is available at notebooks/predict/visualize_segmentation.ipynb.

4. Statistical analysis

You can observe the statistical analysis results at notebooks/results/experimental_results.ipynb.

Repository structure

├── .github/                  # Github Actions
├── information/              # Relevant Documents
├── neuro_disease_detector/   # Main Library
├── notebooks/                # Exploratory notebooks
├── picasso/                  # Picasso files used for Experiments
├── tests/                    # Test for the package
├── .gitignore          
├── LICENSE.md
├── pyproject.toml
└── README.md

Results

See information/ThesisTFG.pdf for the full ablation study.

Citing

If you use this code, please cite:

@article{carreira2025sclerosis,
  author  = {Emilio Rodrigo Carreira Villalta},
  title   = {Deep Learning–Based MRI Segmentation for Sclerosis Using YOLOv11 and nnUNet},
  journal = {To appear},
  year    = {2025}
}

License

This project is licensed under the MIT License – see LICENSE.md for details.

Acknowledgements

  • University of Málaga & SCENIC research group for guidance.
  • Málaga Supercomputing Center (Picasso) for GPU resources.
  • The open‑source communities behind YOLO, nnUNet and PyTorch.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nnd-0.2.0.tar.gz (63.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nnd-0.2.0-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

Details for the file nnd-0.2.0.tar.gz.

File metadata

  • Download URL: nnd-0.2.0.tar.gz
  • Upload date:
  • Size: 63.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for nnd-0.2.0.tar.gz
Algorithm Hash digest
SHA256 cb4dcc9af44ffe4de2e1586b248719aecd31b36a16534823277316cb9a8b306c
MD5 ca50cb328f285a0b98156c2d33f4adf3
BLAKE2b-256 36d77516d2eccd377f0ea1b1a44c340826138359524068d16121f74e4fcc6937

See more details on using hashes here.

Provenance

The following attestation bundles were made for nnd-0.2.0.tar.gz:

Publisher: publish_pypi.yml on rorro6787/neurodegenerative-disease-detector

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nnd-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: nnd-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 19.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for nnd-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f6e65c3a769081b0cde399598c1b28c1f1053d5b9a056f4c94aefc296b82da7f
MD5 657f9bec1372c59041769c903f138271
BLAKE2b-256 ec7b1ea2fbe2c01a65d81188732aef0daac54e3a8ae1fc12cf5fc63531abf3a1

See more details on using hashes here.

Provenance

The following attestation bundles were made for nnd-0.2.0-py3-none-any.whl:

Publisher: publish_pypi.yml on rorro6787/neurodegenerative-disease-detector

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page