voxreality/rgb_language_vqa_onnx
By voxreality · ↓ 0 · ♥ 0 · Updated 2025-04-29
What's in this repo
This page lists the files in voxreality/rgb_language_vqa_onnx, including model.onnx.
- 1 ONNX models (.onnx files)
- 8 files, including 4 .json, 1 .md, 1 .onnx, 1 .txt
- Last updated 2025-04-29
ONNX files
| File | Size | Download |
|---|---|---|
| model.onnx | — | Download |
How to use
These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.
README
ONNX format of voxreality/rgb_language_vqa model
Model inference example:
import onnxruntime as ort
from transformers import BlipProcessor
import numpy as np
from PIL import Image
# load the ONNX model
onnx_model_path = "models/rgb_language_vqa_onnx/model.onnx"
ort_session = ort.InferenceSession(onnx_model_path,providers=["CPUExecutionProvider"])
# load the processor
model_id = "models/rgb_language_vqa_onnx"
processor = BlipProcessor.from_pretrained(model_id)
# prepare the input image and question
raw_image = Image.open("img1.jpg")
question = "Where is the person?"
# process the inputs using the processor
inputs = processor(raw_image, question, return_tensors="np")
# the input tensors for ONNX
pixel_values = inputs["pixel_values"]
input_ids = inputs["input_ids"]
# run inference on the ONNX model
outputs = ort_session.run(
None,
{
"pixel_values": pixel_values,
"input_ids": input_ids,
}
)
# decode the output
output_ids = outputs[0] # Extract the output (token IDs)
decoded_output = processor.tokenizer.decode(output_ids[0], skip_special_tokens=True)
print(decoded_output)
Model info
onnx
license:apache-2.0
region:us
↓ 0
♥ 0
Created: 2025-04-23
Updated: 2025-04-29
View on Hugging FaceFiles (8)
.gitattributes
README.md
model.onnx
ONNX
preprocessor_config.json
special_tokens_map.json
tokenizer.json
tokenizer_config.json
vocab.txt
Related models
More from voxreality
More models
No task type declared.