← All models

image-feature-extraction Β· vision Β· WASM Β· ~636 MB

I-JEPA β€” image features learned by predicting, not reconstructing

I-JEPA turns any image into a general-purpose descriptor with no labels β€” but it got there by a route no other vision model here takes. Instead of reconstructing masked pixels (MAE) or pulling two augmented views together (DINO/CLIP), it predicts the encoder's own representations of masked target regions from a visible context block β€” learning in representation space. The backbone is a plain ViT with no [CLS] token and no register tokens: the whole output is the patch grid, and the image descriptor is their mean. Add a few images and watch it build a live similarity matrix; then look inside at the patch features predictive pretraining produces. Nothing leaves your device.

At a glance

Modelonnx-community/ijepa_vith14_1k (ONNX build of facebook/ijepa_vith14_1k)
Task / pipelineimage-feature-extraction
ArchitectureViT-Huge/14 @ 224px (~630M params) β†’ a 16Γ—16 = 256-patch grid, hidden size 1280. No [CLS], no register tokens β€” the descriptor is the mean of the patch tokens.
The I-JEPA ideaa context encoder sees a visible block; a predictor must predict the (EMA) target encoder's REPRESENTATIONS of several masked blocks β€” prediction in representation space, no pixel decoder, no contrastive negatives, no hand-crafted augmentations β€” Self-Supervised Learning from Images with a Joint-Embedding Predictive Architecture, Assran et al., 2023
TrainingSelf-supervised, no labels β€” ImageNet-1k
Descriptorthe mean patch token (1280-d), L2-normalized β†’ cosine = dot product
Quantizationq8 (8-bit) ONNX β€” onnx/model_quantized.onnx
BackendWebAssembly (runs anywhere; no WebGPU needed)
Download~636 MB, cached after first load β€” a heavy one-time download (ViT-Huge). Best on desktop / good connectivity.
LicenseCC-BY-NC-4.0 (non-commercial) β€” Meta AI. Fine for research/showcase; not for commercial use.
Web APIsWebAssembly, Web Workers, File API β€” all Baseline widely available

Distinct from DINOv2-with-registers and CLIP: same task, but a predictive pretraining objective (predict representations of masked regions) rather than DINO's self-distillation or CLIP's image–text contrast β€” and no [CLS]/register tokens at all. Compare the patch maps across the pages.

Run it β€” image similarity matrix

Start with the sample set (two cats, two cars, a mountain, a flower) or add your own. The model embeds each image; the matrix shows the cosine similarity between every pair β€” 1.00 down the diagonal, higher where two images look alike. Uploaded images never leave your browser.

See inside β€” the patch grid & the global descriptor

I-JEPA splits the image into a grid of 14Γ—14-pixel patches and produces one feature vector per patch β€” and that's all it produces (no [CLS], no registers). Two heatmaps read the grid. Cosine-to-descriptor shows which patches most define "what this image is" (the foreground the mean descriptor is dominated by). Patch norm shows the raw feature magnitude across the grid. Because I-JEPA is trained to predict masked-region representations from context, its patch features are smooth and semantically organised β€” no [CLS]-token bottleneck to route global information through.

Embed some images to inspect their features.

Why it matters

A general-purpose image descriptor is the vision equivalent of a text embedding β€” and because I-JEPA is trained without labels, it isn't boxed into a fixed list of classes. Its predictive objective is interesting precisely because it skips the expensive parts of other self-supervised recipes: no pixel decoder to reconstruct fine detail, and no bank of augmentations/negatives to hand-tune. That makes it a clean, efficient backbone whose features you can index, compare, and line up between images β€” here, entirely in a browser tab, without uploading a single photo.

Use cases

Basics

Two images in, one similarity number out β€” plus the patch heatmap and norm map for each.

Practical

Near-duplicate finder and reverse-image-search over a small on-device set.

Wild

Dense patch correspondence β€” colour-match the same regions across two images.

Multi-model

Retrieve the nearest image with I-JEPA, then label it with a ViT classifier.

How the API works

The image-feature-extraction pipeline is the whole recipe; drop to the raw model for patch features:

import { pipeline, RawImage } from "@huggingface/transformers";

const extractor = await pipeline(
  "image-feature-extraction",
  "onnx-community/ijepa_vith14_1k",
); // downloads + caches ~636 MB once

// Simple path: one pooled 1280-d descriptor per image (mean of patch tokens).
const out = await extractor("cat.jpg", { pool: true });
const vec = out.tolist()[0]; // 1280 numbers

// unit-normalize, then cosine similarity is just the dot product:
const norm = (v) => { const n = Math.hypot(...v); return v.map((x) => x / n); };
const sim = (a, b) => a.reduce((s, x, i) => s + x * b[i], 0);

// Deeper path: the raw model gives the per-PATCH sequence β€” no [CLS], no registers.
const image = await RawImage.read("cat.jpg");
const inputs = await extractor.processor(image);
const { last_hidden_state } = await extractor.model(inputs);
// last_hidden_state: [1, 256, 1280] β€” 256 patch tokens on a 16Γ—16 grid.
// the image descriptor = mean over the 256 tokens.

This page computes the mean descriptor plus each patch token's norm and cosine-to-descriptor, so "See inside" can show the real magnitudes and the patch map. Inference runs in a Web Worker so building the matrix never janks the page.

References