Downloads · 30 days
24
18% of all-time downloads
dnamodel/xraydar-cv
xraydar-cv is a image classification model from dnamodel. Use it when you need a label for an image. It is set up for pytorch. The card lists the license as other.
Pre-trained model weights for the computer vision component of X-Raydar, from "Development and validation of open-source deep neural networks for comprehensive chest x-ray reading"00218-2/fulltext) (Cid, Macpherson et…
Downloads · 30 days
24
18% of all-time downloads
All-time downloads
132
Public
Repo size
588 MB
Likes
1
Public
Click a slice to open those files.
.tar588 MB · 100%
From the Hugging Face model README
Pre-trained model weights for the computer vision component of X-Raydar, from "Development and validation of open-source deep neural networks for comprehensive chest x-ray reading" (Cid, Macpherson et al., The Lancet Digital Health, 2024).
Trained on over 2.5 million chest X-ray studies from six NHS hospitals across the UK.
Website: x-raydar.info Code: github.com/gmontana/xraydar-cv NLP model: dnamodel/xraydar-nlp
XNet38MS is a multi-scale Inception v3 ensemble that takes a chest X-ray image and predicts probabilities for 37 radiological findings. Three models trained at different resolutions (299, 512, 1024 pixels) are averaged at inference time.
| File | Description |
|---|---|
cv/is299/model_best.pth.tar | Inception v3 trained at 299px (187 MB) |
cv/is299/model_TranslatorCVLogitsToUrgency_fcs.pth.tar | Urgency head (299px) |
cv/is512/model_best.pth.tar | Inception v3 trained at 512px (187 MB) |
cv/is512/model_TranslatorCVLogitsToUrgency_fcs.pth.tar | Urgency head (512px) |
cv/is1024/model_best.pth.tar | Inception v3 trained at 1024px (187 MB) |
cv/is1024/model_TranslatorCVLogitsToUrgency_fcs.pth.tar | Urgency head (1024px) |
from huggingface_hub import snapshot_download
snapshot_download(
repo_id="dnamodel/xraydar-cv",
local_dir="./xraydar-cv-weights"
)
from huggingface_hub import hf_hub_download
import shutil, os
for size in [299, 512, 1024]:
dest = f"src/model_20210820_XNet38MS/model_weights/direct_multi93_is{size}_Rv10_pre00_imagenet"
os.makedirs(dest, exist_ok=True)
for f in ["model_best.pth.tar", "model_TranslatorCVLogitsToUrgency_fcs.pth.tar"]:
path = hf_hub_download("dnamodel/xraydar-cv", f"cv/is{size}/{f}")
shutil.copy(path, os.path.join(dest, f))
See the code repository for full inference instructions.
| # | Finding | # | Finding |
|---|---|---|---|
| 0 | Abnormal (non-clinically important) | 19 | Interstitial shadowing |
| 1 | Aortic calcification | 20 | Mediastinum displaced |
| 2 | Apical changes | 21 | Mediastinum widened |
| 3 | Atelectasis | 22 | Object |
| 4 | Axillary abnormality | 23 | Paraspinal mass |
| 5 | Bronchial changes | 24 | Paratracheal/hilar enlargement |
| 6 | Bulla | 25 | Parenchymal lesion |
| 7 | Cardiomegaly | 26 | Pleural abnormality |
| 8 | Cavity | 27 | Pleural effusion |
| 9 | Clavicle fracture | 28 | Pneumomediastinum |
| 10 | Consolidation | 29 | Pneumoperitoneum |
| 11 | Cardiac calcification | 30 | Pneumothorax |
| 12 | Dextrocardia | 31 | Rib fracture |
| 13 | Dilated bowel | 32 | Rib lesion |
| 14 | Emphysema | 33 | Scoliosis |
| 15 | Ground-glass opacification | 34 | Subcutaneous emphysema |
| 16 | Hemidiaphragm elevated | 35 | Tortuosity of aorta |
| 17 | Hernia | 36 | Pulmonary blood flow redistribution |
| 18 | Hyperexpanded lungs | 37 | Volume loss |
@article{cid2024development,
title={Development and validation of open-source deep neural networks for comprehensive chest x-ray reading: a retrospective, multicentre study},
author={Cid, Yan Digilov and Macpherson, Matt and others},
journal={The Lancet Digital Health},
volume={6},
number={1},
pages={e44--e57},
year={2024},
publisher={Elsevier},
doi={10.1016/S2589-7500(23)00218-2}
}
For academic research and non-commercial evaluation only. See x-raydar.info for terms and conditions.