Skip to content

Instantly share code, notes, and snippets.

@BexTuychiev
Created February 19, 2026 20:06
Show Gist options
  • Select an option

  • Save BexTuychiev/dee0b2b02cde99d19df07f4a17cfaa27 to your computer and use it in GitHub Desktop.

Select an option

Save BexTuychiev/dee0b2b02cde99d19df07f4a17cfaa27 to your computer and use it in GitHub Desktop.
Gemini 3 Flash agentic vision output: standard vs agentic on grocery shelf image
============================================================
STANDARD VISION (no code execution)
============================================================
[ANSWER] Based on the image provided, here is the information requested:
### The 'Liebe Kunden' Sign
The sign translates from German to English as follows:
> "Dear Customers,
> unfortunately, we must inform you that due to increased demand, we cannot currently offer all products. We are of course striving to be able to offer you all items again as soon as possible.
> We hope for your understanding!"
***
### Product Names and Prices (from shelf labels)
Here are the visible product names and their corresponding prices from the labels, scanned from top to bottom, left to right:
**Top Row Labels:**
* Uncle Ben's Express Reis Mexi-Scharf 250g: **1,69**
* Uncle Ben's Express Reis Griechisch 250g: **1,69**
* Uncle Ben's Express Reis Mexikanisch 250g: **1,69**
* Uncle Ben's Express Reis Curry 250g: **1,69**
* Uncle Ben's Naturreis & Quinoa Mediterran 220g: **1,69**
* Uncle Ben's Naturreis & Quinoa Mexik 220g: **1,69**
* Channa Masala 300g (partially obscured): **2,49**
* (Label obscured): **2,49**
* (Label obscured): **1,29**
* (Label obscured): **0,99**
* (Label obscured): **1,75**
* (Label obscured): **0,69**
* (Label obscured): **0,69**
**Second Row Labels:**
* Uncle Ben's Express Reis Chili con Carne 250g: **2,49**
* Uncle Ben's Spitzen-Langkorn Reis 10 Min 500g: **1,79**
* Uncle Ben's 20-Minuten-Reis Kochbeutel 500g: **1,79**
* Uncle Ben's 10-Minuten Naturreis KB 500g: **1,79**
* Uncle Ben's Basmati & Jasmin Reis 500g: **2,89**
* Uncle Ben's Langkorn & Wildreis 500g: **2,89**
* Uncle Ben's Basmati Reis 500g: **2,89**
* Uncle Ben's Langkorn & Wildreis 500g (duplicate/similar label): **2,89**
* (Label obscured): **2,99**
* (Label obscured): **2,79**
* (Label obscured): **2,79**
* (Label obscured): **2,99**
**Third Row Labels (row with the sign):**
* Uncle Ben's Naturreis 10-Min. KB 1kg: **3,69**
* Uncle Ben's Basmati Reis Kochbeutel 1kg: **4,99**
* Uncle Ben's Basmati & Jasmin Reis (partially obscured): **2,89**
* (Label obscured): **2,99**
* (Label obscured): **1,79**
* (Label obscured): **1,89**
* (Label obscured): **1,89**
* (Label obscured): **1,89**
============================================================
AGENTIC VISION (code execution + thinking)
============================================================
[THINK] **My Initial Assessment of the Information**
Okay, so the primary goal here is twofold: First, I need to decipher that "Liebe Kunden" sign down there. It's probably important context, maybe a disclaimer or some key information. Then, I need to build a comprehensive list of what's on this shelf. Specifically, I'm after the product names and their associated prices – that's the core data.
The plan is straightforward. I'll need to isolate and read that sign, it's the anchor point. Then, I'll syst
[CODE]
import PIL.Image
import PIL.ImageDraw
# Load the image to get dimensions
img = PIL.Image.open('input_file_0.jpeg')
width, height = img.size
# Define regions of interest
# 1. 'Liebe Kunden' sign
liebe_kunden_sign = [630, 447, 887, 559] # [ymin, xmin, ymax, xmax] in normalized coordinates
# 2. Shelf labels - let's group them or pick representative ones if there are too many.
# I'll try to pick a good number of labels from each shelf.
# Top shelf labels:
shelf1_labels = [
[92, 53, 172, 161],
[114, 165, 191, 259],
[135, 267, 206, 348],
[169, 387, 226, 458],
[188, 471, 244, 532],
[202, 538, 256, 595],
[222, 638, 269, 686],
[237, 731, 285, 773],
[252, 771, 296, 810],
[266, 831, 305, 865],
[279, 878, 314, 910],
[288, 905, 317, 932],
[295, 932, 321, 959],
[301, 974, 326, 998],
]
# Second shelf labels:
shelf2_labels = [
[406, 0, 471, 102],
[409, 101, 470, 201],
[413, 248, 469, 332],
[416, 350, 469, 423],
[418, 431, 467, 493],
[420, 503, 467, 558],
[419, 567, 462, 617],
[420, 706, 461, 755],
[423, 831, 463, 863],
[425, 870, 461, 900],
[428, 903, 463, 931],
[430, 933, 463, 957],
]
# Third shelf labels:
shelf3_labels = [
[681, 142, 757, 238],
[644, 381, 710, 452],
[606, 624, 655, 670],
[594, 678, 646, 722],
[592, 746, 642, 781],
[580, 832, 618, 862],
[572, 910, 604, 937],
[562, 963, 593, 988],
]
# Combine some for inspection
objs = [
{'box_2d': liebe_kunden_sign, 'label': 'liebe_kunden_sign'},
{'box_2d': shelf1_labels[0], 'label': 'shelf1_label1'},
{'box_2d': shelf1_labels[1], 'label': 'shelf1_label2'},
{'box_2d': shelf1_labels[3], 'label': 'shelf1_label3'},
{'box_2d': shelf2_labels[0], 'label': 'shelf2_label1'},
{'box_2d': shelf2_labels[1], 'label': 'shelf2_label2'},
{'box_2d': shelf2_labels[3], 'label': 'shelf2_label3'},
{'box_2d': shelf3_labels[0], 'label': 'shelf3_label1'},
{'box_2d': shelf3_labels[1], 'label': 'shelf3_label2'},
]
# Add more to make it comprehensive
# Actually, let's just do a few crops that cover multiple labels
shelf1_crop = [80, 50, 350, 1000]
shelf2_crop = [400, 0, 480, 1000]
shelf3_crop = [550, 140, 770, 1000]
crops = [
{'box_2d': liebe_kunden_sign, 'label': 'liebe_kunden_sign'},
{'box_2d': [80, 40, 240, 560], 'label': 'shelf1_left'},
{'box_2d': [190, 550, 310, 980], 'label': 'shelf1_right'},
{'box_2d': [400, 0, 480, 450], 'label': 'shelf2_left'},
{'box_2d': [410, 450, 480, 1000], 'label': 'shelf2_right'},
{'box_2d': [630, 130, 760, 460], 'label': 'shelf3_left'},
{'box_2d': [550, 600, 660, 990], 'label': 'shelf3_right'},
]
# Function to crop and save
def save_crops(image, regions, prefix='crop'):
for i, region in enumerate(regions):
ymin, xmin, ymax, xmax = region['box_2d']
left = xmin * width / 1000
top = ymin * height / 1000
right = xmax * width / 1000
bottom = ymax * height / 1000
crop = image.crop((left, top, right, bottom))
crop.save(f'{prefix}_{i}.png')
save_crops(img, crops)
[IMAGE] image/png, 135,953 bytes
[IMAGE] image/png, 90,395 bytes
[IMAGE] image/png, 125,816 bytes
[IMAGE] image/png, 102,288 bytes
[IMAGE] image/png, 173,606 bytes
[IMAGE] image/png, 283,263 bytes
[IMAGE] image/png, 100,522 bytes
[THINK] **Analysis of Store Shelf Labels and Customer Notice**
Alright, let's break this down systematically. My initial focus was the "Liebe Kunden" sign – clearly a customer notice. The German text states that due to high demand, the store is experiencing shortages and cannot offer the full range of products at the moment. They are working to restock and apologize for the inconvenience. That's a pretty standard supply chain issue, nothing groundbreaking, but worth noting for context.
Now, onto the m
[ANSWER] The 'Liebe Kunden' sign at the bottom of the shelf is in German and says:
**"Liebe Kunden,**
**leider müssen wir Sie darüber informieren, dass wir Ihnen aufgrund erhöhter Nachfrage aktuell nicht alle Produkte anbieten können. Wir sind selbstverständlich bestrebt, Ihnen sobald wie möglich wieder sämtliche Artikel anbieten zu können.**
**Wir hoffen auf Ihr Verständnis!"**
(Translation: "Dear customers, unfortunately we must inform you that we are currently unable to offer you all products due to increased demand. We are of course striving to be able to offer you all items again as soon as possible. We hope for your understanding!")
---
### Visible Product Names and Prices (from shelf labels):
**Top Shelf (Left to Right):**
* Uncle Ben's Express Reis Mexi. Scharf 250g: **1,69 €**
* Uncle Ben's Express Reis Griechisch 250g: **1,69 €**
* Uncle Ben's Express Reis Mexikanisch 250g: **1,69 €**
* Uncle Ben's Express Reis Curry 250g: **1,69 €**
* Uncle Ben's Naturreis & Quinoa Mediter. 220g: **1,69 €**
* Uncle Ben's 3-Korn-Mix + Quinoa Mexikanisch 220g: **1,69 €**
* Channa Masala 285g: **2,49 €**
* Madras Curry 285g: **2,49 €**
* Steam Basmati Reis Kochbeutel 250g: **1,99 €**
* Saucentopf 250g: **1,29 €**
* Reiskugeln Pur 4x2 St: **1,99 €**
* Reiskugeln Curry 4x2 St: **1,89 €**
* (Additional labels further right with prices like **1,79 €, 1,89 €, 1,75 €, 1,29 €, 0,99 €, 0,79 €**)
**Middle Shelf (Left to Right):**
* Uncle Ben's Express Reis Chili con Carne 250g: **2,49 €**
* Uncle Ben's Spitzen-Langkorn Reis 10 Min 500g: **1,79 €**
* Uncle Ben's 20-Minuten-Reis Kochbeutel 500g: **1,79 €**
* Uncle Ben's 10-Minuten Naturreis Kochbeutel 500g: **1,79 €**
* Uncle Ben's Kochbeutel Jasmin Reis 500g: **2,89 €**
* Uncle Ben's Kochbeutel Langkorn + Wildreis 500g: **2,89 €**
* Uncle Ben's Kochbeutel Basmati-Reis 500g: **2,89 €**
* Uncle Ben's Langkorn-Reis Quinoa Kochbeutel 375g: **2,89 €**
* Oryza Langkorn & Wildreis 500g Kochbeutel: **2,99 €**
* Oryza Basmati & Wildreis 500g Kochbeutel: **2,79 €**
* Oryza Jasmin Reis 500g Kochbeutel: **2,79 €**
* Oryza Risotto-Reis: **2,99 €**
**Bottom Shelf (Left to Right):**
* Uncle Ben's Natur Reis 10-Min. Kochbeutel 1kg: **3,69 €**
* Uncle Ben's Basmati Reis Kochbeutel 1kg: **4,99 €**
* Uncle Ben's Basmati Komposition Lose 500g: **2,89 €**
* Uncle Ben's Risotto-Reis Lose 500g: **2,99 €**
* Uncle Ben's Spitzen-Langkorn 1kg: **1,79 €**
* Reis-fit 10 Minuten Natur-Reis 500g: **1,89 €**
* Reis-fit Langkorn & Wildreis 500g: **1,89 €**
* Reis-fit Risotto-Reis 500g: **1,89 €**
* (Lower red labels at the very bottom: **0,69 €, 0,89 €**)
Saving generated images...
Saved: section4_crop_1.png
Saved: section4_crop_2.png
Saved: section4_crop_3.png
Saved: section4_crop_4.png
Saved: section4_crop_5.png
Saved: section4_crop_6.png
Saved: section4_crop_7.png
Done!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment