Gemini Robotics ER 2는 두 가지 기능을 사용하여 연속 동영상 피드에서 작업 진행 상황을 추적할 수 있습니다.
- 순간 찾기: 주요 이벤트가 발생하는 정확한 타임스탬프를 식별합니다.
- 진행 상황 분류: 각 동영상을 5개의 완료 구간 (0~20%, 20~40%, 40~60%, 60~80%, 80~100%) 중 하나에 할당합니다.
순간 찾기
순간 찾기는 컵이 가득 차거나 매듭이 묶이는 등 중요한 이벤트가 발생하는 정확한 동영상 프레임을 식별합니다. 로봇은 이를 사용하여 성공 여부를 확인하고, 단계를 순서대로 진행하고, 수정을 트리거합니다.
다음 예시 프롬프트는 모델에 동영상에서 지정된 작업의 완료 순간을 식별하도록 요청합니다.
from google import genai
from google.genai import types
client = genai.Client()
with open("task_video.mp4", "rb") as f:
video_bytes = f.read()
prompt = """
At what timestamp (in seconds) does the task reach successful completion?
Return a JSON object: {"completion_time_seconds": <float>}.
If the task is not completed, return {"completion_time_seconds": null}.
"""
response = client.models.generate_content(
model="gemini-robotics-er-2-preview",
contents=[
types.Part.from_bytes(data=video_bytes, mime_type="video/mp4"),
prompt,
],
)
print(response.text)
다음은 모델이 작업 완료 타임스탬프를 식별하는 순간 찾기 동영상의 프레임 예시를 보여줍니다.
진행 상황 분류
진행 상황 분류는 동영상을 5개의 완료 구간(0~20%, 20~40%, 40~60%, 60~80%, 80~100%) 중 하나에 할당합니다. 이를 통해 로봇은 실시간으로 상황을 인식하여 전체 워크플로를 다시 시작하지 않고도 작업을 조정하거나 실패한 단계를 다시 시도할 수 있습니다.
다음 예시 프롬프트는 모델에 동영상의 현재 진행 상황 수준을 분류하도록 요청합니다.
from google import genai
from google.genai import types
client = genai.Client()
with open("task_video.mp4", "rb") as f:
video_bytes = f.read()
prompt = """
Watch this video and classify the task progress level at the final frame.
Return a JSON object with the progress bracket:
{"progress_level": "0-20" | "20-40" | "40-60" | "60-80" | "80-100"}.
"""
response = client.models.generate_content(
model="gemini-robotics-er-2-preview",
contents=[
types.Part.from_bytes(data=video_bytes, mime_type="video/mp4"),
prompt,
],
)
print(response.text)
다음은 모델이 진행 상황 구간을 할당하는 진행 상황 분류 동영상의 프레임 예시를 보여줍니다.
예
다단계 작업 추적을 비롯한 실행 가능한 전체 예시는 로봇공학 레시피를 참고하세요.
다음 단계
- 로봇공학용 Live API - 실시간 양방향 스트리밍
- 작업 오케스트레이션 - 공간 추론을 사용하는 장기 작업
- Gemini Robotics ER 개요 - 모델 비교 및 기능