Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
En esta página, se proporcionan los requisitos previos y las instrucciones detalladas para ajustar Gemini en datos de imagen con el aprendizaje supervisado.
Casos de uso
El ajuste fino te permite adaptar modelos de imágenes previamente entrenados para tareas especializadas, lo que mejora significativamente su rendimiento. Estos son algunos casos de uso de imágenes:
Mejora del catálogo de productos: Extrae atributos clave de las imágenes (p. ej., marca, color y tamaño) para crear y enriquecer automáticamente tu catálogo de productos.
Moderación de imágenes: Ajusta un modelo para detectar y marcar contenido inapropiado o prejudicial en las imágenes, lo que garantiza una experiencia en línea más segura.
Inspección visual: Entrena un modelo para identificar objetos o defectos específicos dentro de las imágenes y automatizar los procesos de control de calidad o inspección.
Clasificación de imágenes: Mejora la exactitud de la clasificación de imágenes para dominios específicos, como el análisis de imágenes médicas o de imágenes satelitales.
Recomendaciones basadas en imágenes: Analizan las imágenes para proporcionar recomendaciones personalizadas, como sugerir productos similares o artículos complementarios.
Extracción de contenido de tablas: Extrae datos de tablas dentro de imágenes y conviértelos en formatos estructurados, como hojas de cálculo o bases de datos.
Limitaciones
Cantidad máxima de imágenes por ejemplo: 16
Tamaño máximo del archivo de imagen: 20 MB
Para obtener más información sobre los requisitos de las muestras de imágenes, consulta la página Comprensión de imágenes.
Formato del conjunto de datos
El siguiente es un ejemplo de un conjunto de datos de imágenes.
{"contents":[{"role":"user","parts":[{"fileData":{"mimeType":"image/jpeg","fileUri":"gs://cloud-samples-data/ai-platform/generative_ai/gemini-1_5/image/longcap100/100.jpeg"}},{"text":"Describe this image in detail that captures the essence of it."}]},{"role":"model","parts":[{"text":"A man stands on a road, wearing a blue denim jacket, tan pants, and white sneakers. He has his hands in his pockets and is wearing a white t-shirt under his jacket. The man's pants are cuffed, and his shoes are white. The road is dark grey, and the leaves are green. The man is standing in the shade, and the light is shining on the ground."}]}]}
Conjunto de datos de muestra
Puedes usar un conjunto de datos de muestra para aprender a ajustar un modelo gemini-1.5-pro o gemini-1.5-flash.
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-04 (UTC)"],[],[],null,["# Image tuning\n\nThis page provides prerequisites and detailed instructions for fine-tuning\nGemini on image data using supervised learning.\n\nUse cases\n---------\n\nFine-tuning lets you adapt base Gemini models for specialized tasks.\nHere are some image use cases:\n\n- **Product catalog enhancement**: Extract key attributes from images (e.g., brand, color, size) to automatically build and enrich your product catalog.\n- **Image moderation**: Fine-tune a model to detect and flag inappropriate or harmful content in images, ensuring a safer online experience.\n- **Visual inspection**: Train a model to identify specific objects or defects within images, automating quality control or inspection processes.\n- **Image classification**: Improve the accuracy of image classification for specific domains, such as medical imaging or satellite imagery analysis.\n- **Image-based recommendations**: Analyze images to provide personalized recommendations, such as suggesting similar products or complementary items.\n- **Table content extraction**: Extract data from tables within images and convert it into structured formats like spreadsheets or databases.\n\nLimitations\n-----------\n\n- Maximum images per example: 30\n- Maximum image file size: 20MB\n\nTo learn more about image sample requirements, see the [Image understanding](/vertex-ai/generative-ai/docs/multimodal/image-understanding#image-requirements) page.\n\nDataset format\n--------------\n\nThe `fileUri` for your dataset can be the URI for a file in a Cloud Storage\nbucket, or it can be a publicly available HTTP or HTTPS URL.\n\nTo see the generic format example, see\n[Dataset example for Gemini](/vertex-ai/generative-ai/docs/models/gemini-supervised-tuning-prepare#dataset-example).\n\nThe following is an example of an image dataset. \n\n {\n \"contents\": [\n {\n \"role\": \"user\",\n \"parts\": [\n {\n \"fileData\": {\n \"mimeType\": \"image/jpeg\",\n \"fileUri\": \"gs://cloud-samples-data/ai-platform/generative_ai/gemini-2_0/image/longcap100/100.jpeg\"\n }\n }, \n {\n \"text\": \"Describe this image in detail that captures the essence of it.\"\n }\n ]\n }, \n {\n \"role\": \"model\",\n \"parts\": [\n {\n \"text\": \"A man stands on a road, wearing a blue denim jacket, tan pants, and white sneakers. He has his hands in his pockets and is wearing a white t-shirt under his jacket. The man's pants are cuffed, and his shoes are white. The road is dark grey, and the leaves are green. The man is standing in the shade, and the light is shining on the ground.\"\n }\n ]\n }\n ]\n }\n\n### Sample datasets\n\nYou can use the following sample datasets to learn how to tune a\nGemini model. To use these datasets, specify the URIs in the\napplicable parameters when creating a text model supervised fine-tuning job.\n\nTo use the sample tuning dataset, specify its location as follows: \n\n \"training_dataset_uri\": \"gs://cloud-samples-data/ai-platform/generative_ai/gemini-2_0/text/sft_train_data.jsonl\",\n\nTo use the sample validation dataset, specify its location as follows: \n\n \"validation_dataset_uri\": \"gs://cloud-samples-data/ai-platform/generative_ai/gemini-2_0/text/sft_validation_data.jsonl\",\n\nWhat's next\n-----------\n\n- To learn more about the image understanding capability of Gemini, see our [Image understanding](/vertex-ai/generative-ai/docs/multimodal/image-understanding) documentation.\n- To start tuning, see [Tune Gemini models by using supervised fine-tuning](/vertex-ai/generative-ai/docs/models/gemini-use-supervised-tuning)\n- To learn how supervised fine-tuning can be used in a solution that builds a generative AI knowledge base, see [Jump Start Solution: Generative AI\n knowledge base](/architecture/ai-ml/generative-ai-knowledge-base)."]]