Feature Extraction
medical
radiology
xray

Generate Image Embeddings with CXR-DINO-V1

1. Installation

pip install torch torchvision pillow
pip install lightly-train

2. Embed a Folder of Images (CLI)

lightly-train embed \
  data="images/" \
  checkpoint="/cxr-dino-model/model.pt" \
  out="embeddings.pth" \
  format="torch"
  • data โ†’ folder containing images
  • checkpoint โ†’ your cxr-dino model
  • out โ†’ output file with embeddings

3. Minimal Python Example

import lightly_train

lightly_train.embed(
    data="images/",
    checkpoint="cxr-dino-model/model.pt",
    out="embeddings.pth",
    format="torch"
)

print("Saved embeddings to embeddings.pth")

4. Load Embeddings

import torch

data = torch.load("embeddings.pth")
embeddings = data["embeddings"]
paths = data["image_paths"]

print(embeddings.shape)
print(paths[:5])
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for humantics/cxr-dino-v1

Finetuned
(19)
this model

Dataset used to train humantics/cxr-dino-v1