unum-cloud / uform-vl-english-small-gpu-fp32

huggingface.co
Total runs: 13
24-hour runs: 0
7-day runs: 1
30-day runs: 3
Model's Last Updated: March 29 2024
feature-extraction

Introduction of uform-vl-english-small-gpu-fp32

Model Details of uform-vl-english-small-gpu-fp32

UForm

Multi-Modal Inference Library
For Semantic Search Applications

UForm is a Multi-Modal Modal Inference package, designed to encode Multi-Lingual Texts, Images, and, soon, Audio, Video, and Documents, into a shared vector space!

This is model card of the English only model with:

  • 4 layers BERT (2 layers for unimodal encoding and rest layers for multimodal encoding)
  • ViT-S/16 (image resolution is 224x224)

If you need Multilingual model, check this .

Evaluation

The following metrics were obtained with multimodal re-ranking (text-to-image retrieval):

Dataset Recall@1 Recall@5 Recall@10
Zero-Shot Flickr 0.565 0.790 0.860
Zero-Shot MS-COCO 0.281 0.525 0.645

ImageNet-Top1: 0.361
ImageNet-Top5: 0.608

Installation
pip install uform[onnx-gpu]
Usage

To load the model:

import uform

model, processor = uform.get_model_onnx('unum-cloud/uform-vl-english-small', device='gpu', dtype='fp32')

To encode data:

from PIL import Image

text = 'a small red panda in a zoo'
image = Image.open('red_panda.jpg')

image_data = processor.preprocess_image(image)
text_data = processor.preprocess_text(text)

image_features, image_embedding = model.encode_image(image_data, return_features=True)
text_features, text_embedding = model.encode_text(text_data, return_features=True)
score, joint_embedding = model.encode_multimodal(
    image_features=image_features,
    text_features=text_features,
    attention_mask=text_data['attention_mask'],
    return_scores=True
)

There are two options to calculate semantic compatibility between an image and a text: cosine similarity and Matching Score .

Cosine Similarity

The similarity will belong to the [-1, 1] range, 1 meaning the absolute match.

Pros :

  • Computationally cheap.
  • Only unimodal embeddings are required, unimodal encoding is faster than joint encoding.
  • Suitable for retrieval in large collections.

Cons :

  • Takes into account only coarse-grained features.
Matching Score

Unlike cosine similarity, unimodal embedding are not enough. Joint embedding will be needed and the resulting score will belong to the [0, 1] range, 1 meaning the absolute match.

Pros :

  • Joint embedding captures fine-grained features.
  • Suitable for re-ranking – sorting retrieval result.

Cons :

  • Resource-intensive.
  • Not suitable for retrieval in large collections.

Runs of unum-cloud uform-vl-english-small-gpu-fp32 on huggingface.co

13
Total runs
0
24-hour runs
2
3-day runs
1
7-day runs
3
30-day runs

More Information About uform-vl-english-small-gpu-fp32 huggingface.co Model

More uform-vl-english-small-gpu-fp32 license Visit here:

https://choosealicense.com/licenses/apache-2.0

uform-vl-english-small-gpu-fp32 huggingface.co

uform-vl-english-small-gpu-fp32 huggingface.co is an AI model on huggingface.co that provides uform-vl-english-small-gpu-fp32's model effect (), which can be used instantly with this unum-cloud uform-vl-english-small-gpu-fp32 model. huggingface.co supports a free trial of the uform-vl-english-small-gpu-fp32 model, and also provides paid use of the uform-vl-english-small-gpu-fp32. Support call uform-vl-english-small-gpu-fp32 model through api, including Node.js, Python, http.

uform-vl-english-small-gpu-fp32 huggingface.co Url

https://huggingface.co/unum-cloud/uform-vl-english-small-gpu-fp32

unum-cloud uform-vl-english-small-gpu-fp32 online free

uform-vl-english-small-gpu-fp32 huggingface.co is an online trial and call api platform, which integrates uform-vl-english-small-gpu-fp32's modeling effects, including api services, and provides a free online trial of uform-vl-english-small-gpu-fp32, you can try uform-vl-english-small-gpu-fp32 online for free by clicking the link below.

unum-cloud uform-vl-english-small-gpu-fp32 online free url in huggingface.co:

https://huggingface.co/unum-cloud/uform-vl-english-small-gpu-fp32

uform-vl-english-small-gpu-fp32 install

uform-vl-english-small-gpu-fp32 is an open source model from GitHub that offers a free installation service, and any user can find uform-vl-english-small-gpu-fp32 on GitHub to install. At the same time, huggingface.co provides the effect of uform-vl-english-small-gpu-fp32 install, users can directly use uform-vl-english-small-gpu-fp32 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

uform-vl-english-small-gpu-fp32 install url in huggingface.co:

https://huggingface.co/unum-cloud/uform-vl-english-small-gpu-fp32

Url of uform-vl-english-small-gpu-fp32

uform-vl-english-small-gpu-fp32 huggingface.co Url

Provider of uform-vl-english-small-gpu-fp32 huggingface.co

unum-cloud
ORGANIZATIONS

Other API from unum-cloud

huggingface.co

Total runs: 32
Run Growth: -11
Growth Rate: -34.38%
Updated:December 31 2023