Editing
Radiology AI
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== <span style="color: #FFFFFF;">Applying</span> == '''Chest X-ray classification pipeline:''' <syntaxhighlight lang="python"> import torch import torch.nn as nn from torchvision import models, transforms from torch.utils.data import Dataset, DataLoader import pydicom import numpy as np from PIL import Image class ChestXRayDataset(Dataset): """Load CheXpert or CheXpert-like chest X-ray dataset.""" def __init__(self, df, transform=None): self.df = df self.transform = transform # 14 pathology labels self.labels = ['No Finding', 'Enlarged Cardiomediastinum', 'Cardiomegaly', 'Lung Opacity', 'Lung Lesion', 'Edema', 'Consolidation', 'Pneumonia', 'Atelectasis', 'Pneumothorax', 'Pleural Effusion', 'Pleural Other', 'Fracture', 'Support Devices'] def __len__(self): return len(self.df) def __getitem__(self, idx): row = self.df.iloc[idx] img = Image.open(row['Path']).convert('RGB') if self.transform: img = self.transform(img) labels = torch.tensor([row.get(l, 0) for l in self.labels], dtype=torch.float) return img, labels # DenseNet-121 (CheXNet architecture) transform = transforms.Compose([ transforms.Resize(256), transforms.CenterCrop(224), transforms.ToTensor(), transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225]) ]) model = models.densenet121(weights='IMAGENET1K_V1') model.classifier = nn.Linear(1024, 14) # 14 pathologies, multi-label # Multi-label binary cross-entropy with label smoothing criterion = nn.BCEWithLogitsLoss() # Clinical note: output sigmoid probabilities + threshold per pathology # Different thresholds for different pathologies based on clinical priority: # Pneumothorax: sensitivity priority (low threshold ~0.2) # Cardiomegaly: specificity priority (high threshold ~0.6) THRESHOLDS = {'Pneumothorax': 0.2, 'Pneumonia': 0.3, 'default': 0.5} def predict_with_clinical_thresholds(logits, labels): probs = torch.sigmoid(logits) preds = torch.zeros_like(probs) for i, label in enumerate(labels): thresh = THRESHOLDS.get(label, THRESHOLDS['default']) preds[:, i] = (probs[:, i] > thresh).float() return probs, preds </syntaxhighlight> ; Radiology AI products and datasets : '''Chest X-ray detection''' β CheXNet (research), Enlitic, Annalise CXR, Qure.ai qXR : '''CT triage''' β Viz.ai (PE, stroke), Aidoc (hemorrhage, PE), Accipiolite : '''Mammography''' β iCAD PowerLook, Hologic Genius AI, Transpara (Screenpoint) : '''Bone X-ray''' β Gleamer BoneView, Nanox.AI, Zebra Medical : '''Datasets''' β CheXpert (224K), MIMIC-CXR (227K), RSNA PE, NIH ChestX-ray14 </div> <div style="background-color: #8B4500; color: #FFFFFF; padding: 20px; border-radius: 8px; margin-bottom: 15px;">
Summary:
Please note that all contributions to BloomWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
BloomWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information