Skip to content

Latest commit

 

History

History

qwen2_vl

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Qwen2-VL-2B

Input

Output

The image depicts a serene beach scene with a woman and a dog. The woman is sitting on the sand, wearing a plaid shirt and black pants, and appears to be smiling. She is giving a high-five to the dog, which is sitting on the sand next to her. The dog is wearing a colorful harness and appears to be wagging its tail. The background shows the ocean with gentle waves, and the sky is clear with a soft glow, suggesting either sunrise or sunset. The overall atmosphere is peaceful and joyful.

Requirements

This model requires additional module.

pip install git+https://github.com/huggingface/transformers@21fac7abba2a37fae86106f87fcf9974fd1e3830

Usage

Automatically downloads the onnx and prototxt files on the first run. It is necessary to be connected to the Internet while downloading.

For the sample image,

$ python3 qwen2_vl.py

If you want to specify the input image, put the image path after the --input option.

$ python3 qwen2_vl.py --input IMAGE_PATH --prompt "Describe this image."
$ python3 qwen2_vl.py --input IMAGE_PATH IMAGE_PATH2 --prompt "Identify the similarities between these images."

By adding the --video option, you can input the video.

$ python3 qwen2_vl.py --video VIDEO_PATH --prompt "Describe this video."

If you want to specify the prompt, put the prompt after the --prompt option.

$ python3 qwen2_vl.py --prompt PROMPT

Reference

Framework

Pytorch

Model Format

ONNX opset=17

Netron

Qwen2-VL-2B_vis.onnx.prototxt
Qwen2-VL-2B.onnx.prototxt