Run this model with HF Jobs
Run northlight-ai/owlv2-multilingual-base-patch16-onnx on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/northlight-ai/owlv2-multilingual-base-patch16-onnx. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/northlight-ai/owlv2-multilingual-base-patch16-onnx on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use northlight-ai/owlv2-multilingual-base-patch16-onnx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use northlight-ai/owlv2-multilingual-base-patch16-onnx with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-object-detection", model="northlight-ai/owlv2-multilingual-base-patch16-onnx")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForZeroShotObjectDetection processor = AutoProcessor.from_pretrained("northlight-ai/owlv2-multilingual-base-patch16-onnx") model = AutoModelForZeroShotObjectDetection.from_pretrained("northlight-ai/owlv2-multilingual-base-patch16-onnx", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- OWLv2 Multilingual Base Patch16 (
northlight-ai/owlv2-multilingual-base-patch16-onnx)- Quickstart (1-Line Transformers Drop-In)
- Benchmarks (Probe-Free Held-Out Splits)
- 1. Multilingual COCO 2017 Val (4,752 Fresh Held-Out Images, 80/80 Classes × 16 Languages, 0 Probe Overlap)
- 2. Probe-Free Federated LVIS v1 Val Shard 0–1 Subset (4,761 of 19,809 Official Val Images, 0 COCO Probe Overlap, 564–1203 Canonical WordNet 3.0 Classes × 8 Languages)
- 3. Normalized Exact-Caption-Disjoint Compositional Grounding on XM3600 (
944Images × 16 Languages)
- Split ONNX Exports (
onnx/) - Limitations & Scope
- Citation
OWLv2 Multilingual Base Patch16 (northlight-ai/owlv2-multilingual-base-patch16-onnx)
Built by Pankaj Garg at Northlight.
A 1-line drop-in multilingual open-vocabulary object detector extending google/owlv2-base-patch16-ensemble from English-only (16 tokens) to 16 languages across 8 scripts (en, es, fr, de, it, pt, nl, pl, ru, zh, ja, ko, ar, hi, el, th) with 64-token native context, bit-exact frozen vision/box/class/objectness weights, and split FP32 + per-channel INT8 (q8) ONNX exports (175.0 MB total INT8) for CPU and browser (ONNX Runtime Web / WASM) deployment.
- License: Apache-2.0 (
Copyright (c) 2026 Pankaj Garg) - Zero
trust_remote_code& Cross-Version Verified: Tested withAutoTokenizer,AutoProcessor,AutoModelForZeroShotObjectDetection, andtransformers.pipeline("zero-shot-object-detection")on bothtransformers 4.57.1andtransformers 5.24.1(use_safetensors=True). - Frozen Vision Guarantee: All
91,569,928vision, box predictor, class head, and objectness weights remain bit-exact identical togoogle/owlv2-base-patch16-ensemble(SHA256: a3eb59f75210035e850161ad6d09b59092b71f6c22234bf0edd0fd5693a81be6). Only the 63.4M text tower (Owlv2TextModel+text_projection, extended frommax_position_embeddings = 16to64) was trained via zero-image multilingual text-space distillation using strictly commercial-permissive data (Tatoeba CC-BY-2.0-FR, Wikidata CC0-1.0, and permissive OMW-1.4 sub-lexicons).
Quickstart (1-Line Transformers Drop-In)
Verified on transformers>=4.57.1 (tested on 4.57.1 and 5.24.1).
from PIL import Image
from transformers import pipeline
detector = pipeline(
"zero-shot-object-detection",
model="northlight-ai/owlv2-multilingual-base-patch16-onnx",
model_kwargs={"use_safetensors": True},
)
image = Image.open("street.jpg")
# Query natively in Chinese, Arabic, Japanese, Hindi, Russian, Spanish, Thai, Greek, English, etc.
results = detector(
image,
candidate_labels=["汽车", "行人", "自行车", "红绿灯", "消防栓"],
threshold=0.15,
)
for det in results:
print(det["label"], round(det["score"], 3), det["box"])
Explicit Truncating Path (Recommended for Long Queries > 64 Tokens)
Important Note (Applies to Both
transformers 4.57.1and5.24.1): In both tested Transformers versions (4.57.1and5.24.1), the defaultpipeline("zero-shot-object-detection")does not passtruncation=Trueautomatically when a single query exceeds64UTF-8 BPE tokens (for example, our 219-token stress-test query fails through the default pipeline in both versions). For arbitrarily long descriptive queries, useAutoProcessorwith explicittruncation=True, max_length=64, which passes cleanly in both4.57.1and5.24.1:
import torch
from PIL import Image
from transformers import AutoProcessor, AutoModelForZeroShotObjectDetection
model_id = "northlight-ai/owlv2-multilingual-base-patch16-onnx"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForZeroShotObjectDetection.from_pretrained(model_id, use_safetensors=True)
image = Image.open("street.jpg")
texts = [["سيارة حمراء", "شخص يمشي", "دراجة هوائية", "إشارة ضوئية"]]
inputs = processor(
text=texts,
images=image,
return_tensors="pt",
padding=True,
truncation=True,
max_length=64,
)
with torch.no_grad():
outputs = model(**inputs)
target_sizes = torch.tensor([[image.height, image.width]])
results = processor.post_process_grounded_object_detection(
outputs=outputs, threshold=0.15, target_sizes=target_sizes, text_labels=texts
)[0]
Benchmarks (Probe-Free Held-Out Splits)
All models — google/owlv2-base-patch16-ensemble, both 568M permissive BAAI/bge-m3 + Ridge fits (BGE-M3 Ridge (full 1,439,236 rows) fit on 100% of train_text_align_v2.jsonl [comp_phrase=294,883, en_anchor=359,809, omw_lex=239,342, tatoeba=382,666, visual_noun=162,536], dev nonEN_cos=0.74970; and BGE-M3 Ridge (Stage-2 reweighted: 1,189,934 unique / 1,398,334 weighted rows; 249,302 omitted), dev nonEN_cos=0.75024), and ours (63M) — were evaluated under identical image preprocessing, full 3,600 patches, tie-grouped 101-point AP accumulation with deterministic box-coordinate greedy tie-breaking, and paired image-cluster bootstrap 95% CIs on untouched human ground-truth images (zero training images, zero COCO dev-probe overlap across all three primary tables).
1. Multilingual COCO 2017 Val (4,752 Fresh Held-Out Images, 80/80 Classes × 16 Languages, 0 Probe Overlap)
| Lang | Language | Stock OWLv2 AP | BGE-M3 Ridge (full 1.44M) | BGE-M3 Ridge (Stage-2) | Ours AP (63M) | Ours AP50 | Δ vs Stock [95% CI] | Δ vs BGE (full / S2) |
|---|---|---|---|---|---|---|---|---|
en |
English | 43.65 | 10.07 | 9.64 | 44.19 | 64.16 | +0.54 [+0.43, +0.67] | +34.12 / +34.55 |
es |
Spanish | 23.77 | 6.89 | 6.62 | 30.54 | 44.02 | +6.76 [+6.28, +7.23] | +23.65 / +23.92 |
fr |
French | 26.29 | 6.72 | 6.56 | 32.62 | 47.17 | +6.33 [+5.81, +6.87] | +25.90 / +26.06 |
de |
German | 25.65 | 6.00 | 5.77 | 31.25 | 45.11 | +5.60 [+5.17, +6.12] | +25.25 / +25.48 |
it |
Italian | 22.75 | 5.70 | 5.47 | 30.98 | 44.48 | +8.22 [+7.66, +8.75] | +25.28 / +25.50 |
pt |
Portuguese | 17.63 | 5.24 | 5.09 | 32.28 | 46.59 | +14.66 [+14.07, +15.31] | +27.04 / +27.19 |
nl |
Dutch | 23.50 | 6.36 | 6.21 | 35.49 | 51.13 | +11.99 [+11.44, +12.53] | +29.12 / +29.28 |
pl |
Polish | 10.11 | 6.64 | 6.43 | 29.33 | 42.80 | +19.22 [+18.67, +19.79] | +22.69 / +22.91 |
ru |
Russian | 0.20 | 6.97 | 6.81 | 23.89 | 34.84 | +23.68 [+23.04, +24.44] | +16.91 / +17.08 |
zh |
Chinese | 2.61 | 8.30 | 8.21 | 27.11 | 39.64 | +24.51 [+23.81, +25.20] | +18.81 / +18.90 |
ja |
Japanese | 1.91 | 6.17 | 6.16 | 21.73 | 31.79 | +19.82 [+19.18, +20.53] | +15.55 / +15.57 |
ko |
Korean | 0.19 | 6.06 | 5.94 | 22.91 | 33.60 | +22.72 [+22.07, +23.43] | +16.85 / +16.97 |
ar |
Arabic | 0.18 | 5.95 | 5.83 | 26.99 | 39.04 | +26.81 [+26.10, +27.58] | +21.04 / +21.16 |
hi |
Hindi | 0.04 | 5.35 | 5.19 | 23.26 | 33.89 | +23.22 [+22.57, +23.83] | +17.91 / +18.07 |
el |
Greek | 0.03 | 7.01 | 6.96 | 18.95 | 27.23 | +18.93 [+18.44, +19.41] | +11.94 / +11.99 |
th |
Thai | 0.31 | 7.00 | 7.00 | 20.32 | 30.19 | +20.01 [+19.43, +20.67] | +13.32 / +13.32 |
15-lang |
Non-EN Macro Mean | 10.34 | 6.43 | 6.28 | 27.18 | 39.43 | +16.83 | +20.75 / +20.89 |
(Complete 4,952-image COCO 2017 val gives nearly identical results: EN 43.69 -> 44.23 [+0.55 AP], 15-lang non-EN macro AP 10.36 -> 27.18 [+16.83 AP].)
2. Probe-Free Federated LVIS v1 Val Shard 0–1 Subset (4,761 of 19,809 Official Val Images, 0 COCO Probe Overlap, 564–1203 Canonical WordNet 3.0 Classes × 8 Languages)
| Lang | Eval / Mapped Classes | Stock AP | BGE-M3 (full 1.44M) | BGE-M3 (Stage-2) | Ours AP | Ours AP50 | Δ vs Stock [95% CI] | Unseen (w/ GT) | Unseen Stock -> Ours (Δ) |
|---|---|---|---|---|---|---|---|---|---|
en |
843/1203 | 47.99 | 12.96 | 12.86 | 47.51 | 63.96 | -0.49 [-0.92, +0.01] | 104 (159) | 48.26 -> 46.10 (-2.16) |
es |
764/1099 | 17.18 | 8.17 | 8.05 | 26.26 | 34.84 | +9.08 [+8.11, +10.09] | 277 (398) | 15.81 -> 20.20 (+4.39) |
it |
629/877 | 14.49 | 7.41 | 7.46 | 25.83 | 35.08 | +11.34 [+10.34, +12.32] | 119 (169) | 13.95 -> 19.75 (+5.81) |
pl |
604/846 | 8.41 | 9.33 | 9.12 | 25.75 | 34.62 | +17.33 [+16.12, +18.41] | 132 (187) | 9.79 -> 19.74 (+9.95) |
zh |
501/692 | 2.46 | 14.05 | 14.55 | 31.99 | 42.61 | +29.52 [+28.09, +30.84] | 158 (229) | 1.27 -> 22.68 (+21.41) |
ja |
722/997 | 2.09 | 7.81 | 7.93 | 19.60 | 25.98 | +17.51 [+16.53, +18.45] | 324 (447) | 2.41 -> 8.94 (+6.53) |
el |
431/564 | 0.33 | 8.17 | 8.14 | 26.65 | 36.08 | +26.33 [+24.99, +27.76] | 6 (7) | 0.69 -> 9.90 (+9.21) |
th |
777/1090 | 1.02 | 11.81 | 12.29 | 22.65 | 30.38 | +21.62 [+20.64, +22.65] | 354 (500) | 1.26 -> 15.86 (+14.60) |
(Primary LVIS table excludes all 192 images overlapping the 200 COCO dev-probe IDs from the 4,953-image shard 0–1 matched subset of the 19,809-image official LVIS v1 validation split. On the full 4,953-image shard 0–1 subset [with the 192 overlapping probe IDs included], EN is 47.98 -> 47.45 [-0.53 AP] and 7/7 non-EN languages remain strongly positive with 95% CI > 0.)
3. Normalized Exact-Caption-Disjoint Compositional Grounding on XM3600 (944 Images × 16 Languages)
| Lang | Language | Stock Mean R@1 | BGE-M3 (full 1.44M) | BGE-M3 (Stage-2) | Ours Mean R@1 | Δ vs Stock [95% CI] | Stock R@5 | Ours R@5 |
|---|---|---|---|---|---|---|---|---|
en |
English | 24.15 | 10.65 | 9.96 | 23.99 | -0.16 [-1.48, +1.22] | 49.52 | 48.73 |
es |
Spanish | 14.09 | 12.34 | 11.92 | 18.01 | +3.92 [+1.32, +6.30] | 32.73 | 40.57 |
fr |
French | 12.71 | 11.39 | 11.18 | 16.68 | +3.97 [+1.96, +6.04] | 31.62 | 38.88 |
de |
German | 9.96 | 11.44 | 11.18 | 13.29 | +3.34 [+1.27, +5.35] | 21.40 | 33.74 |
it |
Italian | 10.43 | 11.28 | 10.86 | 14.67 | +4.24 [+2.22, +6.30] | 24.21 | 34.69 |
pt |
Portuguese | 10.86 | 9.53 | 9.48 | 14.04 | +3.18 [+1.06, +5.35] | 26.91 | 37.29 |
nl |
Dutch | 8.37 | 11.28 | 10.17 | 14.41 | +6.04 [+4.24, +7.89] | 19.54 | 33.58 |
pl |
Polish | 2.75 | 11.86 | 11.23 | 10.22 | +7.47 [+5.67, +9.16] | 6.41 | 26.22 |
ru |
Russian | 0.26 | 12.18 | 12.24 | 6.20 | +5.93 [+4.56, +7.20] | 1.11 | 17.00 |
zh |
Chinese | 0.48 | 12.71 | 11.33 | 10.22 | +9.75 [+8.26, +11.44] | 1.43 | 26.85 |
ja |
Japanese | 0.74 | 10.28 | 10.17 | 8.32 | +7.57 [+6.09, +9.22] | 2.07 | 22.35 |
ko |
Korean | 0.11 | 9.85 | 10.17 | 4.66 | +4.56 [+3.44, +5.83] | 0.69 | 11.02 |
ar |
Arabic | 0.21 | 8.79 | 7.89 | 8.85 | +8.63 [+7.10, +10.17] | 0.95 | 23.68 |
hi |
Hindi | 0.11 | 5.83 | 6.04 | 2.28 | +2.17 [+1.43, +3.02] | 0.58 | 8.05 |
el |
Greek | 0.16 | 7.26 | 7.57 | 4.40 | +4.24 [+3.23, +5.35] | 0.64 | 13.35 |
th |
Thai | 0.64 | 11.81 | 12.18 | 6.78 | +6.14 [+4.82, +7.57] | 1.43 | 22.30 |
15-lang |
Non-EN Macro Mean | 4.79 | 10.52 | 10.24 | 10.20 | +5.41 | 11.45 | 25.97 |
(Normalized exact-caption-disjoint analysis removes all 56 images from the 1,000-image image-ID-disjoint images[1000:2000] split whose NFKC + lowercase + whitespace-collapse scored first caption overlaps either the [0:1000] decontamination exclusion set [38 images / 41 occurrences] or train_text_align_v2.jsonl [18 images / 19 occurrences; 0 dev overlap], leaving 944 images with 15/15 non-EN 95% CIs > 0 and EN -0.16 R@1; stripping terminal punctuation removes 1 extra EN match -> 943 images with identical 15/15 positive non-EN CIs and -0.16 EN R@1. On the full 1,000-image image-ID-disjoint [1000:2000] split, non-EN Mean R@1 jumps 4.68 -> 9.94 [15/15 CI > 0, EN +0.05]; on the separate [0:1000] continuity split—where corpus construction applied an exclusion-only decontamination filter—non-EN Mean R@1 similarly jumps 5.19 -> 11.07, 14/15 CI > 0.)
Split ONNX Exports (onnx/)
Standard ONNX opset 17 graphs (zero custom ops) ready for ONNX Runtime CPU and onnxruntime-web (WASM). Because the vision tower is split from the text tower, applications can encode an image once and re-query arbitrary multilingual labels in milliseconds.
| File | Precision | Size | Notes |
|---|---|---|---|
onnx/text_model.onnx |
FP32 | 253.87 MB | Dynamic [batch, seq <= 64] -> L2-normalized [batch, 512]; max diff 5.66e-07 |
onnx/text_model_quantized.onnx |
INT8 (q8) |
64.4 MB | Per-channel weight-only INT8 (incl. embeddings); cosine 0.9995–0.9999 across seq 4..64 |
onnx/vision_detector.onnx |
FP32 | 364.99 MB | [batch, 3, 960, 960] -> pred_boxes, image_class_embeds, logit_shift, logit_scale, objectness_logits |
onnx/vision_detector_quantized.onnx |
INT8 (q8) |
110.62 MB | Per-channel weight-only INT8 ViT backbone (3.30× smaller) with FP32 detection heads; max COCO-200 joint ` |
Joint End-to-End Vision + Text ONNX Parity (COCO-200 Fresh Held-Out Images × 4 Languages)
| Lang | PyTorch AP | FP32 ONNX AP (Δ) | FP32 Top-1 Agree | Joint INT8 ONNX AP (Δ) | INT8 Top-1 Agree (vs PT) | INT8 Top-5 Overlap (vs FP32) |
|---|---|---|---|---|---|---|
en |
49.45 | 49.45 (+0.0000) | 100.0% | 49.83 (+0.3845) | 98.0% | 98.1% |
es |
37.81 | 37.81 (+0.0013) | 100.0% | 37.84 (+0.0220) | 96.0% | 97.0% |
zh |
34.30 | 34.30 (+0.0000) | 100.0% | 34.45 (+0.1487) | 95.5% | 97.1% |
ar |
33.17 | 33.17 (-0.0023) | 100.0% | 32.87 (-0.3006) | 94.0% | 96.4% |
Limitations & Scope
- Byte-level UTF-8 BPE tokenization: To maintain 100% native
Owlv2Processor/CLIPTokenizerdrop-in compatibility with zero custom code, non-Latin scripts are tokenized via UTF-8 byte-BPE (hence extendingmax_position_embeddings16 -> 64). Superiority over the 9× larger 568MBAAI/bge-m3 + Ridgebaselines is strictly scoped to object detection, where our 63M drop-in beats both fits on 16/16 COCO languages (+11.94 to +34.12 APvs full 1.44M;+11.99 to +34.55 APvs Stage-2 reweighted) and 8/8 LVIS languages (+10.84 to +34.54 APvs full 1.44M;+10.36 to +34.64 APvs Stage-2 reweighted). On944-image normalized exact-caption-disjoint XM3600 full-sentence captions, 568MBGE-M3 Ridge (full 1,439,236 rows)retains higher retrieval recall on 8/16 languages (pl,ru,zh,ja,ko,hi,el,th) andBGE-M3 Ridge (Stage-2)on 8/16 languages (pl,ru,zh,ja,ko,hi,el,th). - Supported languages: Explicitly trained and evaluated on 16 languages (
en, es, fr, de, it, pt, nl, pl, ru, zh, ja, ko, ar, hi, el, th). Other languages may see partial transfer if they share script/cognates, but are not evaluated.
Citation
If you use this model in your work, please cite:
@misc{garg2026owlv2multilingual,
author = {Garg, Pankaj},
title = {OWLv2 Multilingual Base Patch16: Frozen-Vision Open-Vocabulary Object Detector (ONNX)},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/northlight-ai/owlv2-multilingual-base-patch16-onnx}}
}
- Downloads last month
- 23
Model tree for northlight-ai/owlv2-multilingual-base-patch16-onnx
Base model
google/owlv2-base-patch16-ensemble