Instructions to use kittn/eupe_vits16-onnx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use kittn/eupe_vits16-onnx with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('image-feature-extraction', 'kittn/eupe_vits16-onnx');
|
Download README.md from kittn/eupe_vits16-onnx: direct link, hf CLI and curl.
- Browser
- Download file 1.16 kB
-
https://huggingface.co/kittn/eupe_vits16-onnx/resolve/main/README.md
- Command line
-
hf download hf://kittn/eupe_vits16-onnx/README.md
-
curl -L -o README.md https://huggingface.co/kittn/eupe_vits16-onnx/resolve/main/README.md
1.16 kB
metadata
library_name: transformers.js
tags:
- vision
- image-feature-extraction
- onnx
- transformers.js
- dinov3
license: other
EUPE ViT-S/16 ONNX
ONNX export of kittn/eupe_vits16 for transformers.js image feature extraction.
This repo contains:
config.jsonpreprocessor_config.jsononnx/model.onnx
The 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_vits16-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);