I mean it in the sense that I can upload a low quality phone photo of a page from a Chinese cookbook and it will OCR it, translate it into English and give me a summary of the ingredients.
I’ve been looking into vision models but they seem daunting to set up, and the specs say stuff like 384x384 image resolution, so it doesn’t seem like it would be able to do what I look for. Am I even searching in the right direction right now?
I think MiniCPM advertises with strong OCR capabilities. Maybe try that one. But is that 384 number correct? Seems to me even the common Llama 3.2 models do images up to 1120x1120px for a while and that should be enough. MiniCPM can do even more (1.8 million pixels).
Setup shouldn’t be too hard. Lots of interfaces and inference frameworks have vision capabilities these days. It should work pretty much out of the box with something like Ollama, AnythingLLM or llama.cpp based stuff.
Other approaches include doing OCR by more traditional means and then feed the result into an LLM. Just make sure to check that whatever you use can read Chinese.
I’m not entirely sure what your prompt should look like. Obviously attach the image. With ChatGPT I believe I had a bit better results when I told it to first copy and write down the text, and then translate it in a second step. And then do whatever I want after that. I’m not sure what it does if you make it do everything in one go.
Thank you, haven’t heard of it before and it looks really interesting! I need to test how it works with llama.cpp, I wonder how it works with resolutions higher than supported, will it get downscaled
Most frontends should have you covered and scale down the image appropriately (and automatically). I’m not entirely sure about that. I think working on resolutions higher than supported should either not work due to the image encoder, or lead to degraded performance. Usually they’re scaled to what the model needs, somewhere within the pipeline. You can crop them if you like, that sheds off some pixels. Or split them up and feed them in one part after the other, if that somehow makes sense. But I bet with most software you can just upload a random image and it’ll do whatever scaling is required for you.
Managed to run it with llama.cpp. It was a great suggestion, thank you! MiniCPM-o-2_6 iq4 managed to read text from a picture of a shirt that gemma could not get right