r/computervision • u/tenkei_01 • 23d ago
Discussion A thin interface that coerce VLMs into vision tasks?!
Well, many people use VLMs, usually you write a prompt, send an image, and get some results.
This is good enough with chatbots, but I'm using VLMs in my pipelines (to extract various information from the image.) and I was trying to find something that would give me a structured output but couldn't find any, so I built one.
You simply specify:
task = tasks.Attributes(
backend,
attributes={
"material": ["wood", "metal", "plastic"],
"condition": ["clean", "dirty"],
},
context="Describe the chair in the image.",
)
result = task("chair.jpg")You get:
print(result.attributes) # {'material': 'wood', 'condition': 'clean'}Note: This is just a poc, if possible I want to avoid the trouble of maintaining some code and pypi packages:
https://github.com/Tenkei/vlm-tasks
Please let me know if you know a lightweight framework/repo that already do this.
Cheers!
2
u/QueasyBridge 23d ago
Hey! Nice work structuring VLM outputs! A new type of architecture that works with structured outputs out of the box are decision models (jev like models). I had some success with liquid.ai's d1 model for vision tasks.
1
u/blahreport 23d ago
This is essentially JEV from vercel. Cloudflare also has clef.
1
u/estebanfuhrmann 22d ago
Muy bueno ! Che me agregas a x así chateamos e intercambiamos un poco de info sobre modelos ? https://x.com/estebanfuhrman