/ Модель

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

Лицензия
Apache 2.0
Библиотека
rfdetr
Опубликована
24 окт 2026

nih-chestxray14-rfdetr-small

Поиск объектовИзображение → bounding_boxes3 профессии
0скачиваний за 30 дней0лайковвеса обновлены24 окт 2026

Описание модели

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

Дообученная RF-DETR-S локализует восемь типов находок на рентгенограммах грудной клетки и предназначена только для исследовательских экспериментов.

Это дообученная модель RF-DETR-S для локализации восьми видов находок на рентгенограммах грудной клетки. Её обучили на размеченной рамками части набора NIH ChestX-ray14 и экспортировали в ONNX с входным размером 576×576; модель можно запускать в браузере через onnxruntime-web без серверного инференса.

Модель предсказывает рамки для ателектаза, кардиомегалии, выпота, инфильтрата, образования, узелка, пневмонии и пневмоторакса. На отложенной выборке из 348 снимков, разделённой по пациентам, mAP@50:95 составила 0,078. Обучающая выборка невелика, обучение длилось 30 эпох и не было полностью сходимым; оценки для редких классов особенно ненадёжны.

Разработчик указывает, что модель предназначена только для исследований: она не прошла клиническую проверку и не является медицинским устройством. Её нельзя использовать для диагностики, скрининга или сортировки пациентов. Лицензия — Apache-2.0.

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

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

Ограничения

Низкие метрики на небольшой выборке; разметка скудная, редкие классы оценены по малому числу рамок, а обучение частично не сошлось. Модель не прошла клиническую проверку и не предназначена для диагностики, скрининга или сортировки пациентов.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus

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

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

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

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

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

Открыть на Hugging Face

RF-DETR-S — 8-class lesion detector for chest radiographs

Fine-tuned RF-DETR-S for 8-class lesion localisation on chest radiographs, trained on the box-annotated subset of NIH ChestX-ray14. Exported to ONNX at 576×576; runs in the browser via onnxruntime-web with no server-side inference.

Research use only — not a medical device. No regulatory clearance, no clinical validation, no prospective testing. Do not use for diagnosis, screening or triage.

Results

Evaluated on 348 held-out images, split by patient so no patient appears in both halves:

MetricValue
mAP @50:950.078
mAP @500.144
mAP @750.075
mAR @1000.263
Inference33 ms/image

Per-class AP @50:95:

FindingAP@50:95boxes (val)
Cardiomegaly0.39528
Pneumothorax0.06717
Nodule0.06217
Mass0.05122
Infiltrate0.02632
Effusion0.01223
Atelectasis0.00834
Pneumonia0.00627

These numbers are low, and the reason is the data. The box-annotated subset is only 880 images and 984 boxes; nodule and mass have just 17 and 22 validation boxes between them, so those per-class figures are the least reliable here.

The spread across classes tracks how many boxes each class has. Cardiomegaly — large, consistently shaped, 28 validation boxes — reaches 0.395, while findings with fewer and more variable annotations sit an order of magnitude lower. Confidence and accuracy also come apart: mass reaches 0.504 median confidence at 0.051 AP, so a high score does not imply a correct box.

Using it

import numpy as np, onnxruntime as ort
from PIL import Image

RES, MEAN, STD = 576, np.array([0.485,0.456,0.406],np.float32), np.array([0.229,0.224,0.225],np.float32)
sess = ort.InferenceSession("rfdetr_nih.onnx", providers=["CPUExecutionProvider"])
img  = Image.open("chest.png").convert("RGB").resize((RES, RES), Image.BILINEAR)
x = ((np.asarray(img, np.float32)/255 - MEAN)/STD).transpose(2,0,1)[None]
dets, labels = sess.run(None, {"input": x.astype(np.float32)})
# dets: (1,300,4) normalised cxcywh;  labels: (1,300,9)
probs = 1/(1+np.exp(-labels[0]))          # sigmoid, NOT softmax

Two conventions worth knowing, both established by comparing against PyTorch:

  1. Scores are sigmoid(logit), not softmax.
  2. The graph emits 9 class logits for 8 classes. ONNX argmax index i maps to COCO category i+1 (index 1 is cardiomegaly, category 2). Only indices 0–7 are meaningful.

Class order (COCO ids 1–8): Atelectasis, Cardiomegaly, Effusion, Infiltrate, Mass, Nodule, Pneumonia, Pneumothorax.

Training

BaseRF-DETR-S, COCO-pretrained
Epochs30
Batch / grad-accum2 / 8
Resolution576
LR1e-4
Wall clock74.7 min (149.4 s/epoch)
Peak VRAM3.1 GB
Split1,432 train / 348 val, by patient

30 epochs is short for DETR-family models, so this is partially converged. Single seed, no confidence intervals — differences under roughly 0.02 mAP are noise.

Limitations

  • 984 boxes total, averaging ~120 per class. Nothing here is well supervised.
  • Nodule AP rests on 17 validation boxes; a different split seed would move it substantially.
  • Partially converged, single seed, no repeats.
  • The two models were scored with different evaluators (pycocotools for RF-DETR, D-FINE's own CocoEvaluator), so the gap between them is indicative only.
  • Trained on 8 findings; it is not a nodule-specific detector.
  • Not a medical device.

Licence and attribution

Apache-2.0. The training data carries its own terms: NIH ChestX-ray14 asks that redistribution carry a link to the download site, a citation of the CVPR 2017 paper, and acknowledgement of the NIH Clinical Center as data provider.

Wang X, Peng Y, Lu L, Lu Z, Bagheri M, Summers RM. ChestX-ray8: Hospital-scale Chest X-ray Database and Benchmarks on Weakly-Supervised Classification and Localization of Common Thorax Diseases. IEEE CVPR, pp. 3462–3471, 2017. DOI: 10.1109/CVPR.2017.369

Provided "AS IS", without warranties or conditions of any kind (Apache-2.0 §7–§8).

Links

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

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

GPU в ailist

Универсальный рантайм · rfdetr

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

В репозитории нет весов в формате PyTorch/safetensors.

Ревизия весов
4b48583

0 моделей