Downloads · 30 days
229
6% of all-time downloads
Snarcy/OmniRad-base
OmniRad-base is a image feature extraction model from Snarcy. Use it for the image feature extraction task on the model card, and read the license before you ship it in a product. It is set up for timm. The card lists the license as cc-by-4.0.
Downloads · 30 days
229
6% of all-time downloads
All-time downloads
3.7K
Public
Parameters
85.7M
686 MB on disk
Likes
2
Public
Click a slice to open those files.
.bin343 MB · 50%
From the Hugging Face model README
OmniRad is a self-supervised radiological foundation model designed to learn stable, transferable, and task-agnostic visual representations for medical imaging. It is pretrained on large-scale, heterogeneous radiological data and intended for reuse across classification, segmentation, and exploratory vision–language tasks without task-specific pretraining.
This repository provides the OmniRad-base variant, a compact Vision Transformer encoder that offers an excellent trade-off between computational efficiency and representational power.
from PIL import Image
from torchvision import transforms
import timm
import torch
# Load OmniRad-base from Hugging Face Hub
model = timm.create_model(
"hf_hub:Snarcy/OmniRad-base",
pretrained=True,
num_classes=0 # return embeddings
)
model.eval()
device = "cuda" if torch.cuda.is_available() else "cpu"
model.to(device)
# Preprocessing
transform = transforms.Compose([
transforms.Resize((224, 224)),
transforms.ToTensor(),
transforms.Normalize(
mean=[0.485, 0.456, 0.406],
std=[0.229, 0.224, 0.225],
),
])
# Load image
image = Image.open("path/to/radiology_image.png").convert("RGB")
x = transform(image).unsqueeze(0).to(device)
# Extract features
with torch.no_grad():
embedding = model(x) # shape: [1, 384]
The official OmniRad repository provides end-to-end implementations for all evaluated downstream tasks:
👉 https://github.com/unica-visual-intelligence-lab/OmniRad
Including:
OmniRad is intended as a general-purpose radiological image encoder for:
Not intended for direct clinical deployment without task-specific validation.
This project and the released model weights are licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0) license.
<div align="center">Made with ❤️ by UNICA Visual Intelligence Lab
</div>