MelanoScan: AI Skin Lesion Detector

by MiloszKotlega in Circuits > Raspberry Pi

22 Views, 0 Favorites, 0 Comments

MelanoScan: AI Skin Lesion Detector

Zdjęcie WhatsApp 2025-06-19 o 15.23.00_33c8880d.jpg

MelanoScan is a compact, DIY diagnostic station that uses AI to detect and classify skin lesions such as melanoma, keratosis and nevus using live camera feed.


The point of MelanoScan is to make early detection of potentially dangerous skin changes more accessible and efficient, supporting users at home. Early detection of melanoma and other skin cancers is important for effective treatment and improvement of survival rates.


The project is open and reproducible, making skin health more approchable.

Supplies

Zdjęcie WhatsApp 2025-06-19 o 10.49.25_04acbccc.jpg
Zdjęcie WhatsApp 2025-06-19 o 10.49.26_c4995fe3.jpg
Zdjęcie WhatsApp 2025-06-19 o 10.49.26_64e9de0b.jpg
  1. Raspberry PI
  2. Breadboard
  3. USB camera (with led light like vor example AVER)
  4. LCD display
  5. LED light
  6. Power supply
  7. 8mm multiplex plywood
  8. Laser cutter

Data Collection

Zrzut ekranu 2025-06-19 105436.png
Zrzut ekranu 2025-06-19 151507.png

Collect images of skin lesions from open databases like ISIC (https://gallery.isic-archive.com/#!/topWithHeader/onlyHeaderTop/gallery?filter=%5B%5D).

Ensure each image is labeled.

You can use tools like Roboflow to organize, annotate and split your dataset into training, validation and test set.

Export dataset in YOLO format.

Model Training

Zrzut ekranu 2025-06-19 110136.png

Train on your computer.

Install required libraries like ultralytics, numpy and opencv-python.

Train YOLOv8 model using the prepared dataset.

Monitor metrics like accuracy, mAP during training to ensure the model is learning well.

Save the best trained model weights (e.g. best.pt)


Or use Roboflow model.

Coding

I wrote a Python code to:

  1. Capture frames from the webcam
  2. Run trained YOLO model on each frame to detect and classify lesions
  3. Overlay color coded boundingboxes with their classes name

I used libraries like OpenCV for capturing and displaying images and Ultralytics for running YOLO models.