Hi All,
I keep exploring Gemini’s spatial vision capabilities. Here is another example — a simple geology map of isolines with lots of hand-written labels on them. Can Gemini read these labels?
The image "as is" is too big for AI, so FME has to do some work first.
If I resample the image to AI-suitable sizes, the labels will be 3-4 pixels high, then even a human won’t be able to read them. Tiling is the only way to preserve the label pixels. I tile the raster into 1024×1024 chunks — the size Gemini likes — and send them to the AI. But I don't ask it to read the labels yet because the results weren’t great — I’ve got a lot of misread or missed labels. Instead I ask for the pixel coordinates of each label, which I turn into points, then buffer them into tiny clippers — each one just big enough to fit a single label. I can pack a few hundred of these tiny rasters into a single request, which, for this sheet, was a very reasonable 370 KB. I ask for text and rotation in the response, and since I already have coordinates from the previous step, I have my labels!
I also decided to try one more operation — can we heal the gaps in the isolines with Gemini? It seems like we can. Most gaps close cleanly, and the lines shed a lot of the scan's irregularities along the way.
Was this process perfect? No — we still cannot pass this work to AI blindly. The label rotation wasn't too great (and FME is not the best labelling engine, so I decided not to rotate labels in my video). Outside the map frame, Gemini hallucinated a few extra isolines — very convincingly. There's also one spot inside the map where it got “creative”. In general, however, the results are quite good, and suitable for vectorization (yellow lines at the end of the video), and for a spatial overlay to pass extracted label values to isolines.
Considering the amount of manual work in this process, curated AI is absolutely worth it. I feel like Gemini, with its remarkable spatial vision, becomes a handy cartographic tool. With the FME’s supportive hand, of course.
Dmitri


