← Latest papers
⚡ electrical engineering

Two-Stage Fine-Tuning of ResNet50 for High-Sensitivity Melanoma Detection on Dermoscopic Images

This paper proposes and validates a two-stage fine-tuning strategy for ResNet50 that effectively addresses class imbalance and prevents catastrophic forgetting, achieving high-sensitivity melanoma detection (87.56% sensitivity, 0.9559 AUC) on dermoscopic images while outperforming single-stage approaches.

Original authors: Aryan Bhagat

Published 2026-06-17
📖 5 min read🧠 Deep dive

Original authors: Aryan Bhagat

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are trying to teach a very smart, well-traveled robot (called ResNet50) how to spot a dangerous skin condition called melanoma in photos of skin. This robot has already seen millions of regular photos (like cats, cars, and trees) and is an expert at recognizing general shapes and colors. But now, it needs to learn a very specific, high-stakes skill: telling the difference between a harmless mole and a dangerous cancer.

Here is how the author, Aryan Bhagat, taught this robot to do it, explained simply:

1. The Problem: The Robot Was Biased and Confused

The robot faced two big hurdles:

  • The "Too Many Good Moles" Problem: In the real world, most moles are harmless (benign), and very few are cancerous (melanoma). If you just show the robot a pile of photos where 8 out of 10 are harmless, it gets lazy. It starts guessing "harmless" for everything just to be right most of the time. This is dangerous because it misses the cancer.
  • The "One-Size-Fits-All" Problem: Usually, when we teach a robot a new trick, we just tweak its brain all at once. But the author found that doing this too fast made the robot forget the general knowledge it already had (like how to see edges and shadows) and confused it with the new, specific skin details.

2. The Solution: A Two-Stage "Boot Camp"

Instead of throwing the robot into the deep end immediately, the author used a Two-Stage Fine-Tuning approach. Think of this like training an athlete in two distinct phases:

  • Stage 1: The Warm-Up (Stabilizing the Head)
    The author froze the robot's "brain" (the part that sees general features) so it couldn't change. They only trained the "decision maker" (the classification head) for a short time.

    • Analogy: Imagine a new employee who knows how to use a computer but doesn't know the company's specific rules. In Stage 1, you only teach them the rules (the decision-making part) without letting them touch the complex machinery yet. This ensures they don't get overwhelmed.
    • The Fix: Before this, the author balanced the training photos so there were equal numbers of "cancer" and "no cancer" pictures. This forced the robot to pay attention to both, not just the easy "no cancer" ones.
  • Stage 2: The Deep Dive (Fine-Tuning Everything)
    Once the decision-maker was stable, the author unfroze the whole brain. They let the robot adjust its entire network to understand skin photos, but they turned the learning speed down to a crawl (a very low "learning rate").

    • Analogy: Now that the employee knows the rules, they are allowed to touch the machinery, but they are told to move very slowly and carefully. This prevents them from accidentally breaking the useful skills they learned in their previous job (the "ImageNet" knowledge) while they learn the new skin-specific skills.

3. The Results: A Sharp Eye

When they tested this robot on a completely new set of 3,826 skin photos it had never seen before, the results were impressive:

  • It caught the cancer: It correctly identified about 87.6% of the actual melanoma cases. This is the most important number because missing a cancer case is the worst outcome.
  • It didn't panic: It correctly said "this is safe" for about 89.1% of the harmless moles. This is great because it means fewer people get unnecessary biopsies (surgery to check a mole) when they don't need it.
  • The "Ablation Study" (The Proof): The author proved this method worked by comparing it to a robot trained the "old way" (just one stage). The two-stage robot was 4% better at finding cancer. In a group of 3,800 people, that difference means catching about 161 extra cases of cancer that the old method would have missed.

4. Seeing the Robot's Thinking (Grad-CAM)

The author didn't just trust the numbers; they asked the robot to show its work using a tool called Grad-CAM.

  • Analogy: It's like the robot drawing a glowing red map over the photo to show exactly where it was looking.
  • The Result: When the robot saw cancer, the red map concentrated on the weird, irregular borders of the mole. When it saw a safe mole, the map was more spread out. This proved the robot was actually looking at the skin lesion, not just guessing based on random background noise like hair or rulers in the photo.

5. What This Means

The paper concludes that you don't need to invent a brand-new, complex robot architecture to get great results. Instead, how you teach the robot matters more. By using this specific two-step training method and making sure the robot sees the photos in the exact same way during training and testing, the author created a highly sensitive detector.

The author has even built a free, working app (using Streamlit) where anyone can upload a skin photo and see the robot's prediction, along with the "heat map" showing where it looked. All the code is open for anyone to check and use.

In short: The paper shows that by training a standard AI model in two careful steps rather than one rushed step, we can significantly improve its ability to spot dangerous skin cancer while avoiding false alarms.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →