Inspiration

Medical data is the most sensitive data there is. In dermatology, many clinics are hesitant to use AI tools that require uploading patient photos to a central server due to HIPAA and privacy concerns. Inspired by the MONAI (Medical Open Network for AI) framework, I wanted to create a tool that gives doctors the power of a world-class dermatologist directly on their local workstation, with no internet connection required.

What it does

DermCheck performs two critical tasks simultaneously:

  1. Classification: It categorizes skin lesions into 7 different types (such as Melanoma, Basal Cell Carcinoma, or Nevus) using a DenseNet121 backbone.
  2. Segmentation: It uses a UNet architecture to precisely outline the boundaries of a lesion, helping doctors measure the growth and "asymmetry" of a potential risk area.

The model is optimized using PerforatedAI, allowing it to process massive datasets like HAM10000 (10,000+ images) with extreme efficiency.

How I built it

The project leverages the MONAI framework for medical imaging best practices.

  1. The Core: I implemented a DenseNet121 model specialized for the HAM10000 dataset.
  2. PAI Integration: I used the perforatedai library to wrap the MONAI model. We initialized the dendritic structures on the final classification layers where precision is most critical.
  3. Training: I processed the dataset using MONAI's DictionaryTransforms. The dendritic optimization was driven by the loss function: $$\mathcal{L}{total} = \mathcal{L}{CE} + \lambda \mathcal{L}{dendrite}$$ where $\mathcal{L}{CE}$ is the cross-entropy loss for classification.
  4. Validation: We benchmarked the final model by running batch inference on over 10,000 clinic images locally, proving its readiness for real-world medical scale.

Challenges I ran into

The main challenge was the sheer scale of the HAM10000 dataset. Loading 10,015 high-resolution images while training with dendritic growth requires careful memory management. I had to implement a custom DictionaryLoader and ensure the PAI tracker stayed synchronized with MONAI's validation metrics without causing a bottleneck.

Accomplishments that I'm proud of

I am proud to have successfully run a full batch inference on 10,015 images in a single pass. It demonstrated that the optimized AI doesn't just work in theory—it's robust enough to handle a professional clinic's entire historical database without crashing or slowing down.

What I learned

Integrating PerforatedAI with MONAI taught me about "Model Surgery." I learned how to identify which layers of a medical network are most sensitive to optimization and how dendritic growth can stabilize a model's learning on complex, highly-imbalanced medical image sets.

What's next for it

I plan to add support for 3D DICOM images, expanding the project from dermatology to radiology (CT/MRI scans), where the privacy-first, local-optimization approach is even more critical.

Built With

Share this project:

Updates