This project implements and compares multiple algorithms to segment skin lesions from dermoscopic images. It processes images, detects boundaries, and calculates performance metrics.
- Adaptive thresholding: segments lesions by computing local pixel means.
- K means clustering: converts images to the LAB color space and groups pixels into clusters.
- Canny edge detection: a custom implementation using Gaussian smoothing, Sobel gradients, non maximum suppression, and hysteresis thresholding.
- Marr Hildreth: uses Gaussian blurring and Laplacian filtering to find edges.
- Combined approach: combines adaptive thresholding and Canny edge detection using morphology operations.
- Original Images: contains raw dermoscopic images in BMP format.
- Ground Truths: contains the reference lesion masks.
- outputs: directory for results.
- masks: final segmentation masks.
- edge_maps: edge detection maps.
- final_processed_images: binary mask overlays.
- results: CSV file containing the Dice coefficient scores.
Ensure numpy and opencv are installed. To run the analysis on the dataset:
python main.py
To limit the number of processed images, change the LIMIT variable in main.py.