Downloads · 30 days
899
13% of all-time downloads
1aurent/vit_giant_patch14_reg4_224.h-optimus-v0
vit_giant_patch14_reg4_224.h-optimus-v0 is a feature extraction model from 1aurent. Use it when you need embeddings to search or compare text. It is set up for timm. The card lists the license as apache-2.0.
Downloads · 30 days
899
13% of all-time downloads
All-time downloads
6.9K
Public
Parameters
1.1B
4.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors4.5 GB · 100%
From the Hugging Face model README

from PIL import Image
import torch
import timm
# load model from the hub
model = timm.create_model(
model_name="hf-hub:1aurent/vit_giant_patch14_reg4_224.h-optimus-v0",
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)
img = Image.open(...)
data = transforms(img).unsqueeze(0) # input is a (batch_size, num_channels, img_size, img_size) shaped tensor
output = model(data) # output is a (batch_size, num_features) shaped tensor
@software{hoptimus0,
title = {H-optimus-0},
author = {Saillard, Charlie and Jenatton, Rodolphe and Llinares-López, Felipe and Mariet, Zelda and Cahané, David and Durand, Eric and Vert, Jean-Philippe},
url = {https://github.com/bioptimus/releases/tree/main/models/h-optimus/v0},
year = {2024},
}