Sign inSign up

mahdisabetkish/vision2words-infer

By mahdisabetkish

•Updated 10 days ago

C++ inference for Vision2Words captioning, using ONNX Runtime on CPU.

Image
0

82

mahdisabetkish/vision2words-infer repository overview

⁠vision2words-infer

Command-line caption generator for Vision2Words, built in C++17 on ONNX Runtime (CPU). No Python or CUDA is needed in the image.

The image needs the exported ONNX models and vocabulary, which you mount at run time. Create them with v2w export-onnx (see the source repository).

⁠Run

docker run --rm \
    -v "$(pwd)/export/onnx:/app/export" \
    -v "$(pwd)/images:/app/images:ro" \
    mahdisabetkish/vision2words-infer /app/images/photo.jpg \
    --model-dir /app/export --decoder lstm_attention --beam-size 3

--decoder accepts lstm_attention or transformer.

⁠Source

https://github.com/mahdisabetkish/Vision2Words⁠

Tag summary

Content type

Image

Digest

sha256:22377c578…

Size

46.4 MB

Last updated

10 days ago

docker pull mahdisabetkish/vision2words-infer