Downloads · 30 days
9
17% of all-time downloads
kittn/eupe_vitb16-onnx
eupe_vitb16-onnx is a image feature extraction model from kittn. Use it for the image feature extraction task on the model card, and read the license before you ship it in a product. It is set up for transformers.js. The card lists the license as other.
ONNX export of kittn/eupevitb16 for transformers.js image feature extraction.
Downloads · 30 days
9
17% of all-time downloads
All-time downloads
52
Public
Repo size
343 MB
Likes
0
Public
Click a slice to open those files.
.onnx343 MB · 100%
From the Hugging Face model README
ONNX export of kittn/eupe_vitb16 for transformers.js image feature extraction.
This repo contains:
config.jsonpreprocessor_config.jsononnx/model.onnxThe exported model takes dynamic pixel_values shaped [batch, channels, height, width] and returns dynamic last_hidden_state shaped [batch, sequence_length, hidden].
Minimal transformers.js usage:
import { pipeline, RawImage } from "@huggingface/transformers";
const extractor = await pipeline("image-feature-extraction", "kittn/eupe_vitb16-onnx", {
device,
dtype,
});
extractor.processor.image_processor.do_resize = false;
const imageData = await RawImage.fromCanvas(imageCanvas);
const features = await extractor(imageData, { pooling: "none" });
const numRegisterTokens = extractor.model.config.num_register_tokens ?? 0;
const patchFeatures = features.slice(null, [1 + numRegisterTokens, null]);
const normalizedFeatures = patchFeatures.normalize(2, -1);