from urllib.request import urlopen
from PIL import Image
import timm
# get example histology image
img = Image.open(
urlopen(
"https://github.com/owkin/HistoSSLscaling/raw/main/assets/example.tif"
)
)
# load model from the hub
model = timm.create_model(
model_name="hf-hub:1aurent/vit_small_patch8_224.lunit_dino",
pretrained=True,
).eval()
# get model specific transforms (normalization, resize)
data_config = timm.data.resolve_model_data_config(model)
transforms = timm.data.create_transform(**data_config, is_training=False)
output = model(transforms(img).unsqueeze(0)) # output is (batch_size, num_features) shaped tensor
Citation
@inproceedings{kang2022benchmarking,
author = {Kang, Mingu and Song, Heon and Park, Seonwook and Yoo, Donggeun and Pereira, Sérgio},
title = {Benchmarking Self-Supervised Learning on Diverse Pathology Datasets},
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2023},
pages = {3344-3354}
}
Runs of 1aurent vit_small_patch8_224.lunit_dino on huggingface.co
9.2K
Total runs
77
24-hour runs
66
3-day runs
-403
7-day runs
-2.4K
30-day runs
More Information About vit_small_patch8_224.lunit_dino huggingface.co Model
More vit_small_patch8_224.lunit_dino license Visit here:
vit_small_patch8_224.lunit_dino huggingface.co is an AI model on huggingface.co that provides vit_small_patch8_224.lunit_dino's model effect (), which can be used instantly with this 1aurent vit_small_patch8_224.lunit_dino model. huggingface.co supports a free trial of the vit_small_patch8_224.lunit_dino model, and also provides paid use of the vit_small_patch8_224.lunit_dino. Support call vit_small_patch8_224.lunit_dino model through api, including Node.js, Python, http.
vit_small_patch8_224.lunit_dino huggingface.co is an online trial and call api platform, which integrates vit_small_patch8_224.lunit_dino's modeling effects, including api services, and provides a free online trial of vit_small_patch8_224.lunit_dino, you can try vit_small_patch8_224.lunit_dino online for free by clicking the link below.
1aurent vit_small_patch8_224.lunit_dino online free url in huggingface.co:
vit_small_patch8_224.lunit_dino is an open source model from GitHub that offers a free installation service, and any user can find vit_small_patch8_224.lunit_dino on GitHub to install. At the same time, huggingface.co provides the effect of vit_small_patch8_224.lunit_dino install, users can directly use vit_small_patch8_224.lunit_dino installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
vit_small_patch8_224.lunit_dino install url in huggingface.co: