I try to analyse images in png format. Using Ollama I get useful results:
Using the following code I get no useful results:
I am using the same local models.
Why are they so different
type_line <- type_object(
set = type_string(description = "set"),
kuerzel = type_string(description = "Kuerzel"),
name = type_string(description = "Name")
)
type_ops <- type_array(type_line)
#| label: chat-ollama
# Initialise chat with gemma3 model
chat <- chat_ollama(
model = "Keyvan/german-ocr"
#system_prompt = system_prompt
)
png_files <- list.files(here("data"), include.dirs = TRUE, full.names = TRUE)
file <- png_files[1]
x <- chat$chat_structured(
content_image_file(png_files[1]),
type = type_ops
)
Result:
1 \nBlutungen\n1-591,04 abh.\n\nofte chirurgische Operation am Gefäßknotenepithel und an den Mesentern. Entnahme eines Gefäßperitoneoplasmaeine Kniegelenk.\n1-592,03,\n\nAtherosklerotische Operationen an der Gefäßknotenepithel-Va.\n1-631,01,\n\nAtherosklerotische Operationen am Gefäßknobelsystem und an den Mesentern. Entnahme eines Gefäßperitoneoplasmaeine Kniegelenk.\n1-631,01,\n\nAtherosklerotische Operation am Gefäßknobelsystem und an den Mesentern. Subchordale Kniegelenkchirurgie. [...]\n(4b) nach Prufba, Microinfrastruktur. Abzesseinflussfrequenz(eins.) Kniegelenk.\n
