이 페이지에서는 지도 학습을 사용하여 동영상 데이터에서 Gemini 미세 조정에 필요한 기본 요건과 자세한 안내를 제공합니다.
지원되는 모델
다음 Gemini 모델은 동영상 조정을 지원합니다.
Gemini 2.5 Flash
Gemini 2.5 Flash-Lite
Gemini 2.5 Pro
사용 사례
미세 조정을 사용하면 특수한 작업에 맞게 기본 Gemini 모델을 조정할 수 있습니다.
다음은 몇 가지 동영상 사용 사례입니다.
자동 동영상 요약: 긴 동영상의 간결하고 일관된 요약을 생성하여 주요 테마, 이벤트, 내러티브를 포착하도록 LLM을 조정합니다. 이는 콘텐츠 검색, 보관, 빠른 검토에 유용합니다.
자세한 이벤트 인식 및 현지화: 파인 튜닝을 통해 LLM은 동영상 타임라인 내에서 특정 작업, 이벤트 또는 객체를 더 정확하게 식별하고 찾아낼 수 있습니다. 예를 들어 마케팅 동영상에서 특정 제품의 모든 인스턴스를 식별하거나 스포츠 영상에서 특정 동작을 식별할 수 있습니다.
콘텐츠 검토: 전문적인 조정은 LLM이 동영상 내에서 민감하거나 부적절하거나 정책을 위반하는 콘텐츠를 감지하는 능력을 향상시켜 단순한 객체 감지를 넘어 맥락과 미묘한 차이를 이해할 수 있습니다.
동영상 자막 및 자막: 이미 일반적인 애플리케이션이지만, 튜닝을 통해 비언어적 신호에 대한 설명을 비롯한 자동 생성 자막 및 자막의 정확성, 유창성, 맥락 인식 기능을 개선할 수 있습니다.
제한사항
최대 동영상 파일 크기: 100MB
대용량 동영상 파일에는 충분하지 않을 수 있습니다. 권장되는 해결 방법은 다음과 같습니다.
대용량 파일이 매우 적은 경우 JSONL 파일에 포함하지 마세요.
데이터 세트에 큰 파일이 많고 무시할 수 없는 경우 파일의 시각적 해상도를 줄입니다. 이로 인해 성능이 저하될 수 있습니다.
파일 크기를 100MB로 제한하도록 동영상을 청크로 나누고 청크로 나눈 동영상을 튜닝에 사용합니다. 원래 동영상에 해당하는 타임스탬프 주석을 새 (청크) 동영상 타임라인으로 변경해야 합니다.
예시별 최대 동영상 길이: MEDIA_RESOLUTION_MEDIUM의 경우 5분, MEDIA_RESOLUTION_LOW의 경우 20분
삭제된 예: 예에 지원되는 최대 길이보다 긴 동영상이 포함된 경우 해당 예가 데이터 세트에서 삭제됩니다. 삭제된 예는 청구되지 않으며 학습에 사용되지 않습니다.
데이터 세트의 10% 이상이 삭제되면 학습이 시작되기 전에 오류 메시지와 함께 작업이 실패합니다.
다양한 미디어 해상도 혼합은 지원되지 않음: 전체 학습 데이터 세트의 각 예시에 대한 mediaResolution 값이 일관되어야 합니다. 학습 및 검증에 사용되는 JSONL 파일의 모든 줄에는 동일한 mediaResolution 값이 있어야 합니다.
데이터 세트 형식
fileUri 필드는 데이터 세트의 위치를 지정합니다. Cloud Storage 버킷의 파일 URI이거나 공개적으로 사용 가능한 HTTP 또는 HTTPS URL일 수 있습니다.
mediaResolution 필드는 입력 동영상의 프레임당 토큰 수를 다음 값 중 하나로 지정하는 데 사용됩니다.
MEDIA_RESOLUTION_LOW: 프레임당 64개 토큰
MEDIA_RESOLUTION_MEDIUM: 프레임당 256개 토큰
MEDIA_RESOLUTION_LOW로 모델을 조정하는 것이 MEDIA_RESOLUTION_MEDIUM로 조정하는 것보다 약 4배 빠르며 성능 개선은 최소화됩니다.
동영상 세그먼트가 학습 및 검증에 사용되는 경우 동영상 세그먼트는 videoMetadata 필드에 있습니다. 튜닝 중에 이 데이터 포인트는 startOffset 타임스탬프 (시작 오프셋, 초 단위)부터 endOffset까지 지정된 동영상 파일에서 추출된 세그먼트의 정보를 포함하도록 디코딩됩니다.
{"contents":[{"role":"user","parts":[{"fileData":{"fileUri":"gs://<path to the mp4 video file>","mimeType":"video/mp4"},},{"text":" You are a video analysis expert. Detect which animal appears in the video.The video can only have one of the following animals: dog, cat, rabbit.\n Output Format:\n Generate output in the following JSON format:\n [{\n \"animal_name\": \"<CATEGORY>\",\n }]\n"}]},{"role":"model","parts":[{"text":"```json\n[{\"animal_name\": \"dog\"}]\n```"}]},],"generationConfig":{"mediaResolution":"MEDIA_RESOLUTION_LOW"}}
동영상 세그먼트가 학습 및 검증에 사용되는 경우의 JSON 스키마 예
이 스키마는 JSONL 파일에 단일 행으로 추가됩니다.
{"contents":[{"role":"user","parts":[{"fileData":{"fileUri":"gs://<path to the mp4 video file>","mimeType":"video/mp4"},"videoMetadata":{"startOffset":"5s","endOffset":"25s"}},{"text":" You are a video analysis expert. Detect which animal appears in the video.The video can only have one of the following animals: dog, cat, rabbit.\n Output Format:\n Generate output in the following JSON format:\n [{\n \"animal_name\": \"<CATEGORY>\",\n }]\n"}]},{"role":"model","parts":[{"text":"```json\n[{\"animal_name\": \"dog\"}]\n```"}]},],"generationConfig":{"mediaResolution":"MEDIA_RESOLUTION_LOW"}}
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[],[],null,["# Video tuning\n\nThis page provides prerequisites and detailed instructions for fine-tuning\nGemini on video data using supervised learning.\n\nSupported models\n----------------\n\nThe following Gemini models support video tuning:\n\n- Gemini 2.5 Flash\n- Gemini 2.5 Flash-Lite\n- Gemini 2.5 Pro\n\nUse cases\n---------\n\nFine-tuning lets you adapt base Gemini models for specialized tasks.\nHere are some video use cases:\n\n- **Automated video summarization**: Tuning LLMs to generate concise and\n coherent summaries of long videos, capturing the main themes, events, and\n narratives. This is useful for content discovery, archiving, and quick\n reviews.\n\n- **Detailed event recognition and localization**: Fine-tuning allows LLMs to\n identify and pinpoint specific actions, events, or objects within a video\n timeline with greater accuracy. For example, identifying all instances of a\n particular product in a marketing video or a specific action in sports\n footage.\n\n- **Content moderation**: Specialized tuning can improve an LLM's ability to\n detect sensitive, inappropriate, or policy-violating content within videos,\n going beyond simple object detection to understand context and nuance.\n\n- **Video captioning and subtitling**: While already a common application,\n tuning can improve the accuracy, fluency, and context-awareness of\n automatically generated captions and subtitles, including descriptions of\n nonverbal cues.\n\nLimitations\n-----------\n\n- **Maximum video file size** : 100MB. This may not be sufficient for large video files. Some recommended workarounds are as follows:\n - If there are very few large files, drop those files from including those in the JSONL files.\n - If there are many large files in your dataset and cannot be ignored, reduce visual resolution of the files. This may hurt performance.\n - Chunk the videos to limit the files size to 100MB and use the chunked videos for tuning. Make sure to change any timestamp annotations corresponding to the original video to the new (chunked) video timeline.\n- **Maximum video length per example** : 5 minutes with `MEDIA_RESOLUTION_MEDIUM` and 20 minutes with `MEDIA_RESOLUTION_LOW`.\n- **Dropped examples**: If an example contains video that is longer than the supported maximum length, that example is dropped from the dataset. Dropped examples are not billed or used for training. If more than 10% of the dataset is dropped, the job will fail with an error message before the start of training.\n- **Mixing different media resolutions isn't supported** : The value of `mediaResolution` for each example in the entire training dataset must be consistent. All lines in the JSONL files used for training and validation should have the same value of `mediaResolution`.\n\nDataset format\n--------------\n\nThe `fileUri` field specifies the location of your dataset. It can be the URI\nfor a file in a Cloud Storage bucket, or it can be a publicly available HTTP\nor HTTPS URL.\n\nThe `mediaResolution` field is used to specify the token count per frame for\nthe input videos, as one of the following values:\n\n- `MEDIA_RESOLUTION_LOW`: 64 tokens per frame\n- `MEDIA_RESOLUTION_MEDIUM`: 256 tokens per frame\n\nModel tuning with `MEDIA_RESOLUTION_LOW` is roughly 4 times faster than the ones\ntuned with `MEDIA_RESOLUTION_MEDIUM` with minimal performance improvement.\n\nWhen a video segment is used for training and validation, the video segment\nis in the `videoMetadata` field. During tuning, this data point is decoded\nto contain information from the segment extracted from the specified video file,\nstarting from timestamp `startOffset` (the start offset, in seconds) until\n`endOffset`.\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 sections present video dataset format examples.\n\n### JSON schema example for cases where the full video is used for training and validation\n\nThis schema is added as a single line in the JSONL file. \n\n {\n \"contents\": [\n {\n \"role\": \"user\",\n \"parts\": [\n {\n \"fileData\": {\n \"fileUri\": \"gs://\u003cpath to the mp4 video file\u003e\",\n \"mimeType\": \"video/mp4\"\n },\n },\n {\n \"text\": \"\n You are a video analysis expert. Detect which animal appears in the\n video.The video can only have one of the following animals: dog, cat,\n rabbit.\\n Output Format:\\n Generate output in the following JSON\n format:\\n\n [{\\n\n \\\"animal_name\\\": \\\"\u003cCATEGORY\u003e\\\",\\n\n }]\\n\"\n }\n ]\n },\n {\n \"role\": \"model\",\n \"parts\": [\n {\n \"text\": \"```json\\n[{\\\"animal_name\\\": \\\"dog\\\"}]\\n```\"\n }\n ]\n },\n ],\n \"generationConfig\": {\n \"mediaResolution\": \"MEDIA_RESOLUTION_LOW\"\n }\n }\n\n### JSON schema example for cases where a video segment is used for training and validation\n\nThis schema is added as a single line in the JSONL file. \n\n {\n \"contents\": [\n {\n \"role\": \"user\",\n \"parts\": [\n {\n \"fileData\": {\n \"fileUri\": \"gs://\u003cpath to the mp4 video file\u003e\",\n \"mimeType\": \"video/mp4\"\n },\n \"videoMetadata\": {\n \"startOffset\": \"5s\",\n \"endOffset\": \"25s\"\n }\n },\n {\n \"text\": \"\n You are a video analysis expert. Detect which animal appears in the\n video.The video can only have one of the following animals: dog, cat,\n rabbit.\\n Output Format:\\n Generate output in the following JSON\n format:\\n\n [{\\n\n \\\"animal_name\\\": \\\"\u003cCATEGORY\u003e\\\",\\n\n }]\\n\"\n }\n ]\n },\n {\n \"role\": \"model\",\n \"parts\": [\n {\n \"text\": \"```json\\n[{\\\"animal_name\\\": \\\"dog\\\"}]\\n```\"\n }\n ]\n },\n ],\n \"generationConfig\": {\n \"mediaResolution\": \"MEDIA_RESOLUTION_LOW\"\n }\n }\n\nWhat's next\n-----------\n\n- To learn more about video tuning, see [How to fine-tune Gemini 2.5 using videos via Vertex AI](https://cloud.google.com/blog/products/ai-machine-learning/how-to-fine-tune-video-outputs-using-vertex-ai?e=48754805).\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)."]]