Downloads · 30 days
35
3% of all-time downloads
UCSC-VLAA/openvision2-vit-large-patch14-336-vision-only
openvision2-vit-large-patch14-336-vision-only is a image-to-text model from UCSC-VLAA. Use it when you need a caption or text from an image. It is set up for open_clip.
This repo now contains the full OpenVision2 generative model: the vision encoder (originally released here) plus the caption text decoder it was jointly trained with. Together they map an image - a descriptive caption…
Downloads · 30 days
35
3% of all-time downloads
All-time downloads
1.3K
Public
Repo size
1.8 GB
Likes
1
Public
Click a slice to open those files.
.bin1.2 GB · 69%
From the Hugging Face model README
This repo now contains the full OpenVision2 generative model: the vision encoder (originally released here) plus the caption text decoder it was jointly trained with. Together they map an image -> a descriptive caption. The encoder files are unchanged; only the decoder (and this card) were added.
| file | role |
|---|---|
open_clip_pytorch_model.bin, open_clip_config.json | L/14 vision encoder (open_clip format) |
caption_decoder.safetensors | caption text decoder weights |
text_decoder_config.json | decoder architecture config |
modeling_openvision2_decoder.py | standalone PyTorch decoder + generate() |
bert_base_vocab_bos_eos.txt | tokenizer vocab ([PAD]=0 [bos]=1 [eos]=2) |
caption_example.py | end-to-end image -> caption demo |
A concat / prefix-LM autoregressive transformer (not a CoCa cross-attention decoder): ViT patch tokens are linearly projected and prepended as a bidirectional prefix, and text is generated causally while attending to all image tokens.
12 layers · width 768 · 12 heads · mlp 3072 · vocab 32000 · pre-LN · gelu(tanh) · LayerNorm eps 1e-6 · no positional embedding on the text stream.
It consumes the encoder's pre-final-norm patch tokens (open_clip output_tokens=True).
Needs the patched open_clip providing create_vision_encoder_and_transforms
(https://github.com/UCSC-VLAA/OpenVision), plus torch, safetensors, pillow.
See caption_example.py:
python caption_example.py --image your.jpg