Mulai 29 April 2025, model Gemini 1.5 Pro dan Gemini 1.5 Flash tidak tersedia di project yang belum pernah menggunakan model ini, termasuk project baru. Untuk mengetahui detailnya, lihat Versi dan siklus proses model.
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Halaman ini memberikan prasyarat dan petunjuk mendetail untuk meningkatkan kualitas Gemini pada data gambar menggunakan pembelajaran dengan pengawasan.
Kasus penggunaan
Dengan fine-tuning, Anda dapat menyesuaikan model Gemini dasar untuk tugas khusus.
Berikut beberapa kasus penggunaan gambar:
Peningkatan kualitas katalog produk: Mengekstrak atribut utama dari gambar (misalnya, merek, warna, ukuran) untuk membuat dan memperkaya katalog produk Anda secara otomatis.
Moderasi gambar: Menyesuaikan model untuk mendeteksi dan melaporkan konten yang tidak pantas atau
berbahaya dalam gambar, sehingga memastikan pengalaman online yang lebih aman.
Pemeriksaan visual: Melatih model untuk mengidentifikasi objek atau kerusakan tertentu
dalam gambar, yang mengotomatiskan proses pemeriksaan atau kontrol kualitas.
Klasifikasi gambar: Meningkatkan akurasi klasifikasi gambar untuk domain
tertentu, seperti medical imaging atau analisis citra satelit.
Rekomendasi berbasis gambar: Menganalisis gambar untuk memberikan rekomendasi
yang dipersonalisasi, seperti menyarankan produk serupa atau item pelengkap.
Ekstraksi konten tabel: Mengekstrak data dari tabel dalam gambar dan mengonversinya
menjadi format terstruktur seperti spreadsheet atau database.
Batasan
Gambar maksimum per contoh: 30
Ukuran file gambar maksimum: 20 MB
Untuk mempelajari persyaratan sampel gambar lebih lanjut, lihat halaman Pemahaman gambar.
Format set data
fileUri untuk set data Anda dapat berupa URI untuk file di bucket Cloud Storage, atau dapat berupa URL HTTP atau HTTPS yang tersedia secara publik.
{"contents":[{"role":"user","parts":[{"fileData":{"mimeType":"image/jpeg","fileUri":"gs://cloud-samples-data/ai-platform/generative_ai/gemini-2_0/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."}]}]}
Contoh set data
Anda dapat menggunakan set data contoh berikut untuk mempelajari cara menyesuaikan
model Gemini. Untuk menggunakan set data ini, tentukan URI dalam parameter yang berlaku saat membuat tugas penyesuaian yang diawasi model teks.
Untuk menggunakan set data penyesuaian sampel, tentukan lokasinya sebagai berikut:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-25 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)."]]