Skip to content
This repository was archived by the owner on Jun 28, 2026. It is now read-only.

Jacob7179/TPC6323-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TPC6323-Project

C# .NET LTS ILGPU BenchmarkDotNet Platform

📋 Project Overview

Subject: TPC6323 Parallel Computing

Title: Parallel Image Segmentation using K-Means for Brain Tumour

Category: Signal Processing

This project investigates the use of parallel computing techniques for brain tumour MRI image segmentation. Five segmentation algorithms are implemented and evaluated under three different execution models:

  • Sequential CPU
  • CPU Parallelism (Parallel.For)
  • GPU Parallelism (ILGPU)

The objective is to analyse computational performance improvements achieved through parallel computing while preserving the original segmentation algorithms. Execution time, speedup, scalability, and efficiency are compared to determine the most suitable execution model for medical image processing applications.


🎯 Objectives

  • Implement five brain tumour segmentation algorithms.
  • Develop sequential, CPU-parallel, and GPU-parallel versions of each algorithm.
  • Measure execution time using BenchmarkDotNet.
  • Compare computational speedup between execution models.
  • Demonstrate the benefits of parallel computing in medical image segmentation.

🧠 Algorithms Implemented

Algorithm Description
K-Means Clustering algorithm based on pixel intensity similarity.
Mean Shift Density-based clustering for image segmentation.
Fuzzy C-Means Soft clustering where pixels belong to multiple clusters with different membership values.
SLIC Superpixels Generates superpixels to simplify image segmentation.
Graph-Based Segmentation Segments images by modelling pixels as graph nodes and minimizing edge weights.

⚡ Execution Models

Execution Model Description
Sequential CPU Traditional single-threaded implementation.
CPU Parallel Multi-threaded implementation using Parallel.For.
GPU Parallel GPU implementation using ILGPU for massive parallel execution.

✨ Key Features

  • Five Segmentation Algorithms: K-Means, Mean Shift, Fuzzy C-Means, SLIC, and Graph-Based
  • Three Execution Models: Sequential CPU, Multi-threaded CPU (Parallel.For), GPU Parallel (ILGPU)
  • Comprehensive Performance Benchmarking: Using BenchmarkDotNet for accurate measurements
  • End-to-End Pipeline: From image preprocessing to segmentation mask generation
  • Dataset: Kaggle Brain Tumor MRI Dataset with glioma, pituitary, and meningioma classes

🛠 Technology Stack

Category Technology
Programming Language C#
Framework .NET
GPU Computing ILGPU
Parallel Programming Task Parallel Library (TPL)
Benchmarking BenchmarkDotNet
Image Processing System.Drawing

📊 Dataset

The project uses publicly available Brain MRI datasets from Kaggle.

📂 Dataset Sources

🧠 Tumour Classes

Class Description
Glioma Malignant brain tumour
Meningioma Tumour arising from the meninges
Pituitary Tumour located in the pituitary gland

📁 Project Structure

TPC6323-Project/
│
├── SLIC/                                       # SLIC Superpixels segmentation (Algorithm)
│   ├── Benchmark-focusOnAlgOnly/               # BenchmarkDotNet performance evaluation (CPU, GPU, Sequential & Prototype)
│   ├── Dataset/                                # Brain MRI datasetssegmentation (glioma, meningioma & pituitary)
│   ├── Grad-CAM-based pseudo ground truth/     # Pseudo ground truth generated using Grad-CAM (glioma, meningioma & pituitary)
│   ├── Parallel Slic (Full Benchmark Check)/   # Parallel SLIC (CPU & GPU)
│   └── TPC Preprocessing/                      # Image preprocessing utilities (Dataset, Preprocess Dataset & Preprocessing Code)
│
├── Fuzzy_C_Means/                              # Fuzzy C-Means (Algorithm)
│   ├── TPC_Fuzzy_CPU/                          # CPU Parallel
│   └── TPC_Fuzzy_GPU/                          # GPU Parallel 
│
├── GBS/                                        # Graph-Based Segmentation (Algorithm)
│   ├── backup/                                 # Backup source codes
│   ├── GBS_CPU/                                # CPU Parallel
│   ├── GBS_GPU/                                # GPU Parallel
│   └── Sequential GBS/                         # Sequential (old)
│
├── K-Means/                                    # K-Means segmentation (Algorithm)
│   ├── Baseline K-Means                        # Sequential CPU
│   ├── CPU-Parallelism K-Means                 # CPU Parallel
│   ├── GPU-Parallelism K-Means                 # GPU Parallel
│   └── K-Means Benchmark                       # BenchmarkDotNet performance evaluation
│
├── Mean_Shift/                                 # Mean Shift segmentation (Algorithm)
│   ├── CPU-Parallelism Mean Shift              # CPU Parallel
│   └── GPU-Parallelism Mean Shift              # GPU Parallel
│
└── Prototype/
    └── K-Means-GPU                             # Prototype (K-Means GPU Parallel)

👥 Contributors

Jacob7179 Avatar
Jacob7179
jeremypangdv Avatar
jeremypangdv
t1an-wei Avatar
t1an-wei

About

Parallel image segmentation for brain tumor MRI using K-Means, Mean Shift, Fuzzy C-Means, SLIC, and Graph-Based Segmentation with Sequential, CPU Parallel, and GPU Parallel (ILGPU) implementations.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors