/ Модель

Характеристики

Лицензия
CC BY-NC 4.0
Базовая модель
resnet-18
Библиотека
pytorch
Опубликована
8 авг 2026

skin-lesion-classifier

Классификация изображенийИзображение → label3 профессии

Дообученная ResNet-18 классифицирует дерматоскопические изображения поражений кожи по семи диагнозам и отмечает подозрение на злокачественность.

0скачиваний за 30 дней0лайковвеса обновлены8 авг 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

Загружаем оценки…

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Это дообученная на датасете HAM10000 модель ResNet-18, разработанная автором репозитория miloszkrawczyk. Она классифицирует дерматоскопические изображения поражений кожи по семи классам: akiec, bcc, bkl, df, mel, nv и vasc. Дополнительно модель оценивает вероятность злокачественности, суммируя вероятности классов akiec, bcc и mel и сравнивая сумму с порогом 0,15. Модель принимает RGB-изображения 224×224, нормализованные по статистикам ImageNet, и выдаёт оценки классов.

Сценарии применения

  • классификация дерматоскопических изображений по семи классам HAM10000
  • оценка вероятности злокачественного поражения кожи в учебном проекте
  • сравнение результатов классификации поражений кожи в исследовательском прототипе

Ограничения

Модель предназначена только для образовательных целей и не является диагностическим инструментом или медицинским устройством; её нельзя использовать для решений о здоровье. Она обучена на дерматоскопических снимках, поэтому качество на фотографиях с телефона неизвестно и, вероятно, ниже; редкие классы представлены малым числом примеров, а на неподходящих входных изображениях модель может выдавать уверенные ошибочные результаты.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Skin lesion classifier (HAM10000)

ResNet18 pretrained on ImageNet, fine-tuned to name one of the seven diagnoses in HAM10000 and to say whether a lesion should be treated as malignant.

Educational project. Not a diagnostic tool, not a medical device, and not fit for making decisions about anyone's health.

What it does

Seven classes: akiec, bcc, bkl, df, mel, nv, vasc.

The malignant/benign answer does not come from the winning class. It adds up the probabilities of the three malignant diagnoses (akiec, bcc, mel) and compares the total against 0.15. A photo scoring 0.30 melanoma and 0.29 basal cell carcinoma is called an ordinary mole by the top-class rule, and flagged as suspicious by this one.

Results on the held-out test set

1508 images, 314 of them malignant. Split by lesion rather than by photo, so no lesion appears in both training and test. Run once, on the finished model.

Malignant or benign, at the 0.15 threshold:

recall on malignant92.0%
precision on malignant43.0%
malignant lesions missed25 of 314
false alarms383 of 1194

Per class, taking the top class:

classsupportrecallprecision
akiec6053.3%46.4%
bcc7972.2%63.3%
bkl19545.6%74.2%
df1275.0%24.3%
mel17566.3%42.5%
nv96783.4%91.1%
vasc20100.0%58.8%

Accuracy is 74.9%. That figure is close to meaningless here: two thirds of the data are ordinary moles, so answering nv every time scores 67.2%.

What it does badly

Wrong kind of photograph. HAM10000 is dermatoscope imagery. Phone snapshots look different enough that accuracy on them is unknown and probably lower. This is the largest limitation and it is not fixable without different training data.

Rare classes carry unreliable numbers. df has 12 test images, vasc 20. Their 75% and 100% move by tens of points on a handful of pictures.

Melanoma recall is 66.3% under the top-class rule, and 37 melanomas were called ordinary moles. The threshold rule catches most of those, because the model spreads its uncertainty across the malignant classes rather than settling on nv. That gap is the argument for the threshold.

It is confident about rubbish. Shown random noise, the classifier returned bkl at 86.5% certainty. Any application built on this needs its own check that the input is a skin photograph at all.

Using it

import torch
from torchvision.models import resnet18
import torch.nn as nn

CLASSES = ("akiec", "bcc", "bkl", "df", "mel", "nv", "vasc")

model = resnet18()
model.fc = nn.Linear(model.fc.in_features, len(CLASSES))
model.load_state_dict(torch.load("resnet.pth", map_location="cpu"))
model.eval()

Input is 224x224 RGB normalised with the ImageNet statistics mean=(0.485, 0.456, 0.406), std=(0.229, 0.224, 0.225), because that is what the pretrained layers were fed.

The application

This repository holds the weights. The running application, with the web interface, the JSON API and the attention maps, is at:

  • Live demo — scaled to zero, so the first request after a quiet spell takes about a minute while the container wakes
  • Source on GitHub

Training

baseResNet18, ImageNet weights, final layer replaced with 7 outputs
dataHAM10000, split 70/15/15 by lesion_id
augmentationhorizontal and vertical flips, ±20° rotation, colour jitter
losscross-entropy weighted by inverse class frequency
optimiserAdam, lr 0.0001
epochs15, best at 7

Splitting by lesion rather than by photo matters: HAM10000 photographs some lesions more than once, and a random split would put the same lesion on both sides and flatter the score.

Licence and citation

CC BY-NC 4.0, inherited from HAM10000. Non-commercial use only.

Tschandl P., Rosendahl C., Kittler H. The HAM10000 dataset, a large collection of multi-source dermatoscopic images of common pigmented skin lesions. Scientific Data 5, 180161 (2018). https://doi.org/10.1038/sdata.2018.161

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · pytorch · image-classification

Нельзя запустить

В репозитории нет config.json: не понять архитектуру модели.

Ревизия весов
645de35

0 моделей