|
|
Gemini Multimodal - Image Understanding and Analysis
Author: Venkata Sudhakar
The Gemini API supports image input alongside text prompts. You can send JPEG, PNG, GIF, and WebP images directly to the model and ask questions, extract data, or generate descriptions. ShopMax India uses this to automatically process product photos uploaded by vendors. Image inputs are passed using the Part object with inline data or a file URI. The model processes the image and the accompanying text prompt together to produce a grounded response. The below example shows how ShopMax India analyses product images to extract item names, prices, and condition ratings.
It gives the following output,
Product Name: Samsung Galaxy M34 5G
Estimated Price: Rs 18,500
Condition: New (sealed box visible in image)
You can also pass multiple images in a single prompt to compare products or verify authenticity. Use inline_data with base64-encoded bytes when working with images not stored on Google Cloud Storage.
It gives the following output,
Product A appears more premium:
- Metal frame vs plastic build in Product B
- Higher resolution camera module visible
- Cleaner retail packaging with hologram seal
Recommendation: List Product A at 15% higher price point.
For production deployments at ShopMax India, upload images to Google Cloud Storage and pass the GCS URI instead of inline bytes. This avoids the 20MB inline limit and enables batch processing of vendor catalogues.
|
|