An open API service indexing awesome lists of open source software.

https://github.com/sopheakchan/dull-razor-algorithm

DullRazor hair removal for dermoscopic skin images.
https://github.com/sopheakchan/dull-razor-algorithm

numpy opencv python

Last synced: about 2 months ago
JSON representation

DullRazor hair removal for dermoscopic skin images.

Awesome Lists containing this project

README

          

# DullRazor Hair Removal for Dermoscopic Images
A Preprocessing Script for Skin Lesion Datasets (Python + OpenCV)

A simple way to remove hair from skin lesion images. When working with skin cancer datasets (like ISIC or HAM10000), many images contain hair.
Hair can cover the lesion and make it harder for doctors and machine learning models to see important details.
The script processes an entire dataset with class subfolders and outputs hair-removed images while preserving the original folder structure.

Hair on the skin can:
- hide the true shape of the lesion
- confuse machine learning models
- make the image look noisy or unclear
- affect accuracy during training

By removing hair, the images become cleaner, easier to analyze, and better for training models.

# How DullRazor actually works
DullRazor follows a few simple steps:

1. Turn the image to grayscale
→ easier to detect dark hair.

2. Find the dark hair using a filter
→ this highlights hair areas.

3. Create a mask of where the hair is
→ white = hair, black = not hair.

4. Make the mask a bit thicker (optional)
→ so all the hair is removed.

5. Use inpainting to fill the hair areas
→ fills the hair pixels using nearby skin pixels
→ makes the image look natural.

image