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/resnet50.lunit_bt",
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 resnet50.lunit_bt on huggingface.co
16
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs
More Information About resnet50.lunit_bt huggingface.co Model
resnet50.lunit_bt huggingface.co is an AI model on huggingface.co that provides resnet50.lunit_bt's model effect (), which can be used instantly with this 1aurent resnet50.lunit_bt model. huggingface.co supports a free trial of the resnet50.lunit_bt model, and also provides paid use of the resnet50.lunit_bt. Support call resnet50.lunit_bt model through api, including Node.js, Python, http.
resnet50.lunit_bt huggingface.co is an online trial and call api platform, which integrates resnet50.lunit_bt's modeling effects, including api services, and provides a free online trial of resnet50.lunit_bt, you can try resnet50.lunit_bt online for free by clicking the link below.
1aurent resnet50.lunit_bt online free url in huggingface.co:
resnet50.lunit_bt is an open source model from GitHub that offers a free installation service, and any user can find resnet50.lunit_bt on GitHub to install. At the same time, huggingface.co provides the effect of resnet50.lunit_bt install, users can directly use resnet50.lunit_bt installed effect in huggingface.co for debugging and trial. It also supports api for free installation.