Skip to content

cherixrodrigues/RP-CNN-Classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RP-CNN-Classification

Python PyTorch License: MIT Status

Deep Learning pipeline for Retinitis Pigmentosa (RP) gene group classification using Convolutional Neural Networks and Transfer Learning with ResNet architectures.


Overview

Retinitis Pigmentosa (RP) is a heterogeneous group of inherited retinal dystrophies caused by mutations in over 80 genes. This project develops a CNN-based classification pipeline to distinguish between 5 gene groups — both syndromic and non-syndromic — from retinal imaging data, leveraging Transfer Learning with ResNet models pre-trained on ImageNet.

Key Features

  • Transfer Learning with ResNet (ResNet-18 / ResNet-50) via PyTorch & torchvision
  • 5-class classification covering syndromic and non-syndromic RP gene groups
  • K-Fold Cross-Validation for robust model evaluation across data splits
  • Detailed metrics: Classification Report, Confusion Matrix, per-class accuracy
  • Reproducible training pipeline with configurable hyperparameters

Gene Groups

Group Type Description
Group 1 Non-syndromic Autosomal dominant RP genes
Group 2 Non-syndromic Autosomal recessive RP genes
Group 3 Non-syndromic X-linked RP genes
Group 4 Syndromic Usher syndrome genes
Group 5 Syndromic Bardet-Biedl syndrome genes

Project Structure

RP-CNN-Classification/
│
├── notebooks/                  # Jupyter notebooks for experiments
│   └── .gitkeep
│
├── docs/                       # Documentation and figures
│   └── .gitkeep
│
├── .github/
│   └── ISSUE_TEMPLATE/
│       ├── bug_report.md
│       └── feature_request.md
│
├── README.md
├── LICENSE
├── .gitignore
└── requirements.txt

Installation

Prerequisites

  • Python 3.8+
  • CUDA-compatible GPU (recommended)

Setup

# Clone the repository
git clone https://github.com/YOUR_USERNAME/RP-CNN-Classification.git
cd RP-CNN-Classification

# Create and activate a virtual environment
python -m venv venv
source venv/bin/activate        # Linux/macOS
venv\Scripts\activate           # Windows

# Install dependencies
pip install -r requirements.txt

Usage

Training

Open and run the main training notebook:

jupyter notebook notebooks/

Cross-Validation

The pipeline uses stratified K-Fold cross-validation. Each fold trains a ResNet model from scratch (with frozen/unfrozen backbone options) and evaluates on the held-out fold.

Evaluation Metrics

After training, the pipeline produces:

  • Confusion Matrix — per-fold and aggregated
  • Classification Report — precision, recall, F1-score per gene group
  • Accuracy curves — training vs. validation per epoch

Results

Results section to be updated after final experiments.

Model Folds Mean Accuracy Mean F1 (macro)
ResNet-18 5
ResNet-50 5

Dependencies

See requirements.txt for the full list. Core libraries:


Academic Context

This project was developed as part of a Deep Learning coursework focused on medical image analysis and genetic classification of retinal diseases.


License

This project is licensed under the MIT License — see the LICENSE file for details.

About

Deep Learning pipeline for Retinitis Pigmentosa gene classification using CNNs and Transfer Learning with ResNet

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors