Skip to content

SecondLook

SecondLook is a trust layer for an AI basal cell carcinoma detector, built for a dermatopathologist, Mohs surgeon, or dermatologist reading skin-pathology slides under real clinic load, where long days and fatigue nudge

Core trick

EfficientNet-B4 Grad-CAM heatmaps go to Claude, which returns VERIFIED, FLAGGED, or DEFER based on whether attention lands on tissue.

Tags

Description

SecondLook is a trust layer for an AI basal cell carcinoma detector, built for a dermatopathologist, Mohs surgeon, or dermatologist reading skin-pathology slides under real clinic load, where long days and fatigue nudge the hardest calls. AI support on a cancer-or-not call only helps if the doctor can trust it, and a confident wrong answer is worse than none. I trained EfficientNet-B4 detectors for basal cell carcinoma and built an app that scores regions of a slide, shows a Grad-CAM heatmap of where the model looked, and sorts each score into positive, uncertain, or negative. On a confident positive, Claude reads the heatmap and attention metrics and returns VERIFIED, FLAGGED, or DEFER. Claude never diagnoses and never changes the detector's call; it checks whether the model looked at the right place. The doctor keeps the final say. What I found: strong test scores cannot separate a trustworthy model from an unreliable one. Two models with near-identical scores can be looking at tissue or at a blank corner, and Claude tells them apart. It runs today as a live, open-source app, turning a detector a doctor could not trust into one they can.
aiedwardyi/SecondLook★ 42 forksPythonApache-2.0Created Jul 8, 2026 · last push Oct 13, 2026

README excerpt

# SecondLook: a trust layer for a skin-cancer detector

[![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)
![Python 3.12](https://img.shields.io/badge/python-3.12-blue.svg)
![EfficientNet-B4](https://img.shields.io/badge/model-EfficientNet--B4-blue.svg)

> Research and teaching demonstration only. Not a medical device. Not for diagnosis or clinical use.

*Detection approach presented at AAD Innovation Academy 2026. [See related research](#related-research).*

SecondLook is for a **dermatopathologist, Mohs surgeon, or dermatologist** reviewing tissue tiles for basal cell carcinoma. They upload images. The app scores each tile with EfficientNet-B4, shows Grad-CAM attention, and maps the score to a three-tier call (positive / uncertain / negative). On a confident positive, Claude runs a constrained attention check - a spellcheck on whether that finding should be trusted, not a diagnosis of the patient. The detector class never changes. The doctor owns the final call.

The detector finds cancer. Claude decides whether to trust that finding.

![Before and after Grad-CAM for one BCC tile](docs/figure_before_after.png)

- Left: a basal cell carcinoma tile.
- Center: baseline attention concentrates on the top-right padding corner, not the tissue.
- Right: after correction, attention sits on tissue.

## Try this first

1. Open the live app: [demo](https://aiedwardyi-secondlook.hf.space/)
2. Open **Compare** on a positive tile.
3. Note `before`:

Team