You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

Frozen ViT-L/14

A frozen vision encoder for pathology feature extraction.
病理图像特征提取模型。

  • Input / 输入: RGB 224×224
  • Output / 输出: CLS [B, 1024]

Usage / 使用

huggingface-cli download minxoy/forzenpath --local-dir ./forzenpath --token $HF_TOKEN
pip install -e ./forzenpath
import torch
from PIL import Image
from frozen_vitl import FrozenVitlModel, FrozenVitlImageProcessor

model = FrozenVitlModel.from_pretrained("minxoy/forzenpath", token=True, device="cuda")
processor = FrozenVitlImageProcessor(model.config)
model.eval()

x = processor(Image.open("patch.jpg")).unsqueeze(0).cuda()
with torch.no_grad():
    feat = model(x).pooler_output  # [1, 1024]

Local folder / 本地目录(含 config.json 和 model.safetensors):

model = FrozenVitlModel.from_pretrained("./forzenpath", device="cuda")

Requires torch, torchvision, Pillow.

Downloads last month
-
Safetensors
Model size
0.3B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support