Gemini Robotics-ER 1.5

Gemini Robotics-ER 1.5 হল একটি দৃষ্টি-ভাষা মডেল (VLM) যা রোবোটিক্সে জেমিনীর এজেন্টিক ক্ষমতা নিয়ে আসে। এটি ভৌত ​​জগতে উন্নত যুক্তির জন্য ডিজাইন করা হয়েছে, যা রোবটগুলিকে জটিল ভিজ্যুয়াল ডেটা ব্যাখ্যা করতে, স্থানিক যুক্তি সঞ্চালন করতে এবং প্রাকৃতিক ভাষা কমান্ড থেকে কর্মের পরিকল্পনা করতে দেয়।

মূল বৈশিষ্ট্য এবং সুবিধা:

  • বর্ধিত স্বায়ত্তশাসন: রোবটগুলি যুক্তি, মানিয়ে নিতে এবং উন্মুক্ত পরিবেশে পরিবর্তনের প্রতিক্রিয়া জানাতে পারে।
  • প্রাকৃতিক ভাষা মিথস্ক্রিয়া: প্রাকৃতিক ভাষা ব্যবহার করে জটিল টাস্ক অ্যাসাইনমেন্ট সক্ষম করে রোবটগুলিকে ব্যবহার করা সহজ করে তোলে।
  • টাস্ক অর্কেস্ট্রেশন: প্রাকৃতিক ভাষার কমান্ডগুলিকে সাবটাস্কে ডিকনস্ট্রাক্ট করে এবং দীর্ঘ-দিগন্তের কাজগুলি সম্পূর্ণ করতে বিদ্যমান রোবট কন্ট্রোলার এবং আচরণের সাথে সংহত করে।
  • বহুমুখী ক্ষমতা: বস্তু সনাক্ত করে এবং সনাক্ত করে, বস্তুর সম্পর্ক বোঝে, পরিকল্পনা করে এবং গতিশীল দৃশ্যের ব্যাখ্যা করে।

এই নথিটি মডেলটি কী করে তা বর্ণনা করে এবং মডেলটির এজেন্টিক ক্ষমতাগুলিকে হাইলাইট করে এমন কয়েকটি উদাহরণের মাধ্যমে আপনাকে নিয়ে যায়।

আপনি যদি সরাসরি ঝাঁপ দিতে চান, আপনি Google AI স্টুডিওতে মডেলটি ব্যবহার করে দেখতে পারেন।

Google AI স্টুডিওতে চেষ্টা করুন

নিরাপত্তা

যদিও Gemini Robotics-ER 1.5 নিরাপত্তার কথা মাথায় রেখে তৈরি করা হয়েছে, রোবটের চারপাশে নিরাপদ পরিবেশ বজায় রাখা আপনার দায়িত্ব। জেনারেটিভ এআই মডেল ভুল করতে পারে, এবং শারীরিক রোবট ক্ষতির কারণ হতে পারে। নিরাপত্তা একটি অগ্রাধিকার, এবং বাস্তব-বিশ্বের রোবোটিক্সের সাথে ব্যবহার করার সময় জেনারেটিভ এআই মডেলগুলিকে নিরাপদ করা আমাদের গবেষণার একটি সক্রিয় এবং সমালোচনামূলক ক্ষেত্র। আরও জানতে, Google DeepMind রোবোটিক্স নিরাপত্তা পৃষ্ঠায় যান।

শুরু করা: একটি দৃশ্যে বস্তু খোঁজা

নিম্নলিখিত উদাহরণটি একটি সাধারণ রোবোটিক্স ব্যবহারের ক্ষেত্রে দেখায়। এটি দেখায় কিভাবে একটি ইমেজ এবং একটি টেক্সট প্রম্পট মডেলে generateContent পদ্ধতি ব্যবহার করে তাদের সংশ্লিষ্ট 2D পয়েন্ট সহ চিহ্নিত বস্তুর তালিকা পেতে হয়। মডেলটি একটি ছবিতে চিহ্নিত আইটেমগুলির জন্য পয়েন্ট ফেরত দেয়, তাদের স্বাভাবিক 2D স্থানাঙ্ক এবং লেবেল ফেরত দেয়।

আপনি একটি রোবোটিক্স API এর সাথে এই আউটপুটটি ব্যবহার করতে পারেন বা একটি ভিশন-ল্যাঙ্গুয়েজ-অ্যাকশন (VLA) মডেল বা অন্য কোন তৃতীয় পক্ষের ব্যবহারকারী-সংজ্ঞায়িত ফাংশনকে কল করতে পারেন যাতে একটি রোবট সঞ্চালনের জন্য অ্যাকশন তৈরি করতে পারে।

পাইথন

from google import genai
from google.genai import types

import IPython
from PIL import Image

# Initialize the GenAI client and specify the model
MODEL_ID = "gemini-robotics-er-1.5-preview"
PROMPT = """
          Point to no more than 10 items in the image. The label returned
          should be an identifying name for the object detected.
          The answer should follow the json format: [{"point": <point>,
          "label": <label1>}, ...]. The points are in [y, x] format
          normalized to 0-1000.
        """
client = genai.Client()

# Load your image
img = Image.open("my-image.png")
img = img.resize((800, int(800 * img.size[1] / img.size[0])), Image.Resampling.LANCZOS) # Resizing to speed-up rendering

image_response = client.models.generate_content(
    model=MODEL_ID,
    contents=[
        img,
        PROMPT
    ],
    config = types.GenerateContentConfig(
        temperature=0.5,
        thinking_config=types.ThinkingConfig(thinking_budget=0)
    )
)

print(image_response.text)

বিশ্রাম

# First, ensure you have the image file locally.
# Encode the image to base64
IMAGE_BASE64=$(base64 -w 0 my-image.png)

curl -X POST \
  "https://generativelanguage.googleapis.com/v1beta/models/gemini-robotics-er-1.5-preview:generateContent \
  -H "x-goog-api-key: $GEMINI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [
      {
        "parts": [
          {
            "inlineData": {
              "mimeType": "image/png",
              "data": "'"${IMAGE_BASE64}"'"
            }
          },
          {
            "text": "Point to no more than 10 items in the image. The label returned should be an identifying name for the object detected. The answer should follow the json format: [{\"point\": [y, x], \"label\": <label1>}, ...]. The points are in [y, x] format normalized to 0-1000."
          }
        ]
      }
    ],
    "generationConfig": {
      "temperature": 0.5,
      "thinkingConfig": {
        "thinkingBudget": 0
      }
    }
  }'

আউটপুটটি একটি JSON অ্যারে হবে যার মধ্যে বস্তু থাকবে, প্রতিটিতে একটি point (সাধারণকৃত [y, x] স্থানাঙ্ক) এবং একটি label অবজেক্ট সনাক্ত করবে।

JSON

[
  {"point": [376, 508], "label": "small banana"},
  {"point": [287, 609], "label": "larger banana"},
  {"point": [223, 303], "label": "pink starfruit"},
  {"point": [435, 172], "label": "paper bag"},
  {"point": [270, 786], "label": "green plastic bowl"},
  {"point": [488, 775], "label": "metal measuring cup"},
  {"point": [673, 580], "label": "dark blue bowl"},
  {"point": [471, 353], "label": "light blue bowl"},
  {"point": [492, 497], "label": "bread"},
  {"point": [525, 429], "label": "lime"}
]

নিম্নলিখিত চিত্রটি এই পয়েন্টগুলি কীভাবে প্রদর্শিত হতে পারে তার একটি উদাহরণ:

একটি উদাহরণ যা একটি ছবিতে বস্তুর বিন্দু প্রদর্শন করে

এটা কিভাবে কাজ করে

জেমিনি রোবোটিক্স-ইআর 1.5 আপনার রোবটগুলিকে স্থানিক বোঝাপড়া ব্যবহার করে বাস্তব জগতে প্রাসঙ্গিককরণ এবং কাজ করার অনুমতি দেয়। এটি ইমেজ/ভিডিও/অডিও ইনপুট এবং প্রাকৃতিক ভাষা প্রম্পট করে:

  • অবজেক্ট এবং দৃশ্যের প্রেক্ষাপট বুঝুন : বস্তু সনাক্ত করে, এবং দৃশ্যের সাথে তাদের সম্পর্ক সম্পর্কে কারণ, তাদের সামর্থ্য সহ।
  • কাজের নির্দেশাবলী বুঝুন : প্রাকৃতিক ভাষায় দেওয়া কাজগুলিকে ব্যাখ্যা করে, যেমন "কলা খুঁজুন"।
  • স্থানিক এবং অস্থায়ীভাবে কারণ : কর্মের ক্রম এবং সময়ের সাথে বস্তুগুলি কীভাবে একটি দৃশ্যের সাথে যোগাযোগ করে তা বুঝুন।
  • স্ট্রাকচার্ড আউটপুট প্রদান করুন : বস্তুর অবস্থানের প্রতিনিধিত্বকারী স্থানাঙ্ক (পয়েন্ট বা বাউন্ডিং বাক্স) প্রদান করে।

এটি রোবটকে তাদের পরিবেশকে প্রোগ্রাম্যাটিকভাবে "দেখতে" এবং "বুঝতে" সক্ষম করে।

জেমিনি রোবোটিক্স-ইআর 1.5 এছাড়াও এজেন্টিক, যার মানে এটি দীর্ঘ দিগন্তের কাজগুলিকে অর্কেস্ট্রেট করার জন্য জটিল কাজগুলিকে (যেমন "বাটিতে আপেল রাখুন") ভেঙে ফেলতে পারে:

  • সিকোয়েন্সিং সাবটাস্ক : ধাপগুলির একটি যৌক্তিক ক্রমানুসারে কমান্ডগুলিকে পচিয়ে দেয়।
  • ফাংশন কল/কোড এক্সিকিউশন : আপনার বিদ্যমান রোবট ফাংশন/টুলস কল করে বা জেনারেটেড কোড এক্সিকিউট করে ধাপগুলি চালায়।

মিথুনের সাথে ফাংশন কলিং কীভাবে কাজ করে সে সম্পর্কে আরও পড়ুন ফাংশন কলিং পৃষ্ঠায়

Gemini Robotics-ER 1.5 এর সাথে চিন্তার বাজেট ব্যবহার করা

Gemini Robotics-ER 1.5 এর একটি নমনীয় চিন্তার বাজেট রয়েছে যা আপনাকে লেটেন্সি বনাম নির্ভুলতা ট্রেডঅফের উপর নিয়ন্ত্রণ দেয়। অবজেক্ট সনাক্তকরণের মতো স্থানিক বোঝার কাজগুলির জন্য, মডেলটি একটি ছোট চিন্তা বাজেটের সাথে উচ্চ কর্মক্ষমতা অর্জন করতে পারে। গণনা এবং ওজন অনুমানের মতো আরও জটিল যুক্তিযুক্ত কাজগুলি একটি বড় চিন্তার বাজেট থেকে উপকৃত হয়। এটি আপনাকে আরও চ্যালেঞ্জিং কাজগুলির জন্য উচ্চ-নির্ভুলতার ফলাফল সহ কম-বিলম্বিত প্রতিক্রিয়াগুলির প্রয়োজনের ভারসাম্য বজায় রাখতে দেয়।

চিন্তা বাজেট সম্পর্কে আরও জানতে, চিন্তার মূল ক্ষমতা পৃষ্ঠাটি দেখুন।

রোবোটিক্সের জন্য এজেন্টিক ক্ষমতা

এই বিভাগটি জেমিনি রোবোটিক্স-ইআর 1.5 এর বিভিন্ন ক্ষমতার মধ্য দিয়ে চলে, রোবটিক উপলব্ধি, যুক্তি এবং পরিকল্পনা অ্যাপ্লিকেশনের জন্য মডেলটি কীভাবে ব্যবহার করতে হয় তা প্রদর্শন করে।

এই বিভাগের উদাহরণগুলি একটি চিত্রে বস্তুর ইশারা করা এবং খোঁজা থেকে শুরু করে ট্র্যাজেক্টোরির পরিকল্পনা করা এবং দীর্ঘ দিগন্তের কাজগুলি অর্কেস্ট্রেট করার ক্ষমতা প্রদর্শন করে। সরলতার জন্য, কোড স্নিপেটগুলিকে প্রম্পট দেখানোর জন্য এবং generate_content API-এ কল করার জন্য ছোট করা হয়েছে। সম্পূর্ণ রানযোগ্য কোডের পাশাপাশি অতিরিক্ত উদাহরণ রোবোটিক্স কুকবুকে পাওয়া যাবে।

বস্তুর দিকে ইঙ্গিত করা

ইমেজ বা ভিডিও ফ্রেমে বস্তু নির্দেশ করা এবং খোঁজা রোবোটিক্সে দৃষ্টি-এন্ড-ভাষা মডেলের (ভিএলএম) একটি সাধারণ ব্যবহার। নিম্নলিখিত উদাহরণটি মডেলটিকে একটি চিত্রের মধ্যে নির্দিষ্ট বস্তুগুলি খুঁজে পেতে এবং একটি ছবিতে তাদের স্থানাঙ্কগুলি ফেরত দিতে বলে।

পাইথন

from google import genai
from google.genai import types

# Initialize the GenAI client and specify the model
MODEL_ID = "gemini-robotics-er-1.5-preview"
client = genai.Client()

# Load your image and set up your prompt
  with open('path/to/image-with-objects.jpg', 'rb') as f:
      image_bytes = f.read()

queries = [
    "bread",
    "starfruit",
    "banana",
]

prompt = f"""
    Get all points matching the following objects: {', '.join(queries)}. The
    label returned should be an identifying name for the object detected.
    The answer should follow the json format:
    [\{\{"point": <point>, "label": <label1>\}\}, ...]. The points are in
    [y, x] format normalized to 0-1000.
    """

image_response = client.models.generate_content(
  model=MODEL_ID,
  contents=[
    types.Part.from_bytes(
      data=image_bytes,
      mime_type='image/jpeg',
    ),
    prompt
  ],
  config = types.GenerateContentConfig(
      temperature=0.5,
      thinking_config=types.ThinkingConfig(thinking_budget=0)
  )
)

print(image_response.text)

আউটপুটটি শুরু করার উদাহরণের মতো হবে, একটি JSON যাতে পাওয়া বস্তুর স্থানাঙ্ক এবং তাদের লেবেল থাকে।

[
  {"point": [671, 317], "label": "bread"},
  {"point": [738, 307], "label": "bread"},
  {"point": [702, 237], "label": "bread"},
  {"point": [629, 307], "label": "bread"},
  {"point": [833, 800], "label": "bread"},
  {"point": [609, 663], "label": "banana"},
  {"point": [770, 483], "label": "starfruit"}
]

একটি উদাহরণ যা একটি ছবিতে চিহ্নিত বস্তুর বিন্দু প্রদর্শন করে

নির্দিষ্ট বস্তুর পরিবর্তে "ফল" এর মতো বিমূর্ত বিভাগগুলি ব্যাখ্যা করার জন্য মডেলটিকে অনুরোধ করতে নিম্নলিখিত প্রম্পটটি ব্যবহার করুন এবং চিত্রের সমস্ত উদাহরণ সনাক্ত করুন৷

পাইথন

prompt = f"""
        Get all points for fruit. The label returned should be an identifying
        name for the object detected.
        """ + """The answer should follow the json format:
        [{"point": <point>, "label": <label1>}, ...]. The points are in
        [y, x] format normalized to 0-1000."""

অন্যান্য চিত্র প্রক্রিয়াকরণ কৌশলগুলির জন্য চিত্র বোঝার পৃষ্ঠাটি দেখুন।

একটি ভিডিওতে বস্তু ট্র্যাকিং

Gemini Robotics-ER 1.5 সময়ের সাথে সাথে অবজেক্ট ট্র্যাক করতে ভিডিও ফ্রেম বিশ্লেষণ করতে পারে। সমর্থিত ভিডিও ফরম্যাটের তালিকার জন্য ভিডিও ইনপুট দেখুন।

মডেল বিশ্লেষণ করে প্রতিটি ফ্রেমে নির্দিষ্ট বস্তুগুলি খুঁজে বের করার জন্য নিম্নলিখিত বেস প্রম্পটটি ব্যবহার করা হয়:

পাইথন

# Define the objects to find
queries = [
    "pen (on desk)",
    "pen (in robot hand)",
    "laptop (opened)",
    "laptop (closed)",
]

base_prompt = f"""
  Point to the following objects in the provided image: {', '.join(queries)}.
  The answer should follow the json format:
  [\{\{"point": <point>, "label": <label1>\}\}, ...].
  The points are in [y, x] format normalized to 0-1000.
  If no objects are found, return an empty JSON list [].
  """

আউটপুট ভিডিও ফ্রেম জুড়ে একটি কলম এবং ল্যাপটপ ট্র্যাক করা দেখায়।

একটি উদাহরণ যা একটি জিআইএফ-এ ফ্রেমের মাধ্যমে বস্তুগুলিকে ট্র্যাক করা দেখায়৷

সম্পূর্ণ চালানোযোগ্য কোডের জন্য, রোবোটিক্স কুকবুক দেখুন।

অবজেক্ট ডিটেকশন এবং বাউন্ডিং বক্স

একক পয়েন্টের বাইরে, মডেলটি 2D বাউন্ডিং বাক্সগুলিও ফেরত দিতে পারে, একটি আয়তক্ষেত্রাকার অঞ্চল প্রদান করে যা একটি বস্তুকে ঘিরে রাখে।

এই উদাহরণটি একটি টেবিলে শনাক্তযোগ্য বস্তুর জন্য 2D বাউন্ডিং বাক্সের অনুরোধ করে। মডেলটিকে আউটপুটকে 25টি অবজেক্টে সীমিত করতে এবং একাধিক দৃষ্টান্তকে অনন্যভাবে নাম দেওয়ার নির্দেশ দেওয়া হয়েছে।

পাইথন

from google import genai
from google.genai import types

# Initialize the GenAI client and specify the model
MODEL_ID = "gemini-robotics-er-1.5-preview"
client = genai.Client()

# Load your image and set up your prompt
  with open('path/to/image-with-objects.jpg', 'rb') as f:
      image_bytes = f.read()

prompt = """
      Return bounding boxes as a JSON array with labels. Never return masks
      or code fencing. Limit to 25 objects. Include as many objects as you
      can identify on the table.
      If an object is present multiple times, name them according to their
      unique characteristic (colors, size, position, unique characteristics, etc..).
      The format should be as follows: [{"box_2d": [ymin, xmin, ymax, xmax],
      "label": <label for the object>}] normalized to 0-1000. The values in
      box_2d must only be integers
      """

  image_response = client.models.generate_content(
    model=MODEL_ID,
    contents=[
      types.Part.from_bytes(
        data=image_bytes,
        mime_type='image/jpeg',
      ),
      prompt
    ],
    config = types.GenerateContentConfig(
        temperature=0.5,
        thinking_config=types.ThinkingConfig(thinking_budget=0)
    )
  )

  print(image_response.text)

নিম্নলিখিতটি মডেল থেকে ফিরে আসা বাক্সগুলি প্রদর্শন করে।

পাওয়া বস্তুর জন্য বাউন্ডিং বাক্স দেখানোর একটি উদাহরণ

সম্পূর্ণ চালানোযোগ্য কোডের জন্য, রোবোটিক্স কুকবুক দেখুন। চিত্র বোঝার পৃষ্ঠায় বিভাজন এবং অবজেক্ট সনাক্তকরণের মতো ভিজ্যুয়াল কাজের অতিরিক্ত উদাহরণ রয়েছে।

অতিরিক্ত বাউন্ডিং বাক্সের উদাহরণ চিত্র বোঝার পৃষ্ঠায় পাওয়া যাবে।

ট্রাজেক্টোরিজ

জেমিনি রোবোটিক্স-ইআর 1.5 পয়েন্টের ক্রম তৈরি করতে পারে যা একটি ট্র্যাজেক্টোরি সংজ্ঞায়িত করে, রোবট চলাচলের পথনির্দেশের জন্য দরকারী।

এই উদাহরণটি একটি সংগঠকের কাছে একটি লাল কলম সরানোর জন্য একটি ট্র্যাজেক্টোরির অনুরোধ করে, যার মধ্যে প্রারম্ভিক বিন্দু এবং মধ্যবর্তী পয়েন্টগুলির একটি সিরিজ রয়েছে।

পাইথন

from google import genai
from google.genai import types

# Initialize the GenAI client and specify the model
MODEL_ID = "gemini-robotics-er-1.5-preview"
client = genai.Client()

# Load your image and set up your prompt
  with open('path/to/image-with-objects.jpg', 'rb') as f:
      image_bytes = f.read()

points_data = []
prompt = """
        Place a point on the red pen, then 15 points for the trajectory of
        moving the red pen to the top of the organizer on the left.
        The points should be labeled by order of the trajectory, from '0'
        (start point at left hand) to <n> (final point)
        The answer should follow the json format:
        [{"point": <point>, "label": <label1>}, ...].
        The points are in [y, x] format normalized to 0-1000.
        """

  image_response = client.models.generate_content(
    model=MODEL_ID,
    contents=[
      types.Part.from_bytes(
        data=image_bytes,
        mime_type='image/jpeg',
      ),
      prompt
    ],
    config = types.GenerateContentConfig(
        temperature=0.5,
    )
  )

  print(image_response.text)

প্রতিক্রিয়া হল স্থানাঙ্কের একটি সেট যা সংগঠকের উপরে স্থানান্তরিত করার কাজটি সম্পূর্ণ করতে লাল কলমটি অনুসরণ করা উচিত এমন পথের গতিপথ বর্ণনা করে:

[
  {"point": [550, 610], "label": "0"},
  {"point": [500, 600], "label": "1"},
  {"point": [450, 590], "label": "2"},
  {"point": [400, 580], "label": "3"},
  {"point": [350, 550], "label": "4"},
  {"point": [300, 520], "label": "5"},
  {"point": [250, 490], "label": "6"},
  {"point": [200, 460], "label": "7"},
  {"point": [180, 430], "label": "8"},
  {"point": [160, 400], "label": "9"},
  {"point": [140, 370], "label": "10"},
  {"point": [120, 340], "label": "11"},
  {"point": [110, 320], "label": "12"},
  {"point": [105, 310], "label": "13"},
  {"point": [100, 305], "label": "14"},
  {"point": [100, 300], "label": "15"}
]

পরিকল্পিত গতিপথ দেখানো একটি উদাহরণ

অর্কেস্ট্রেশন

জেমিনি রোবোটিক্স-ইআর 1.5 উচ্চ-স্তরের স্থানিক যুক্তি, কর্ম অনুমান করতে বা প্রাসঙ্গিক বোঝার উপর ভিত্তি করে সর্বোত্তম অবস্থান সনাক্ত করতে পারে।

ল্যাপটপের জন্য জায়গা তৈরি করা

এই উদাহরণটি দেখায় কিভাবে Gemini Robotics-ER একটি স্থান সম্পর্কে যুক্তি দিতে পারে। প্রম্পট মডেলটিকে অন্য আইটেমের জন্য স্থান তৈরি করতে কোন বস্তুটি সরানো দরকার তা সনাক্ত করতে বলে।

পাইথন

from google import genai
from google.genai import types

# Initialize the GenAI client and specify the model
MODEL_ID = "gemini-robotics-er-1.5-preview"
client = genai.Client()

# Load your image and set up your prompt
  with open('path/to/image-with-objects.jpg', 'rb') as f:
      image_bytes = f.read()

prompt = """
          Point to the object that I need to remove to make room for my laptop
          The answer should follow the json format: [{"point": <point>,
          "label": <label1>}, ...]. The points are in [y, x] format normalized to 0-1000.
        """

  image_response = client.models.generate_content(
    model=MODEL_ID,
    contents=[
      types.Part.from_bytes(
        data=image_bytes,
        mime_type='image/jpeg',
      ),
      prompt
    ],
    config = types.GenerateContentConfig(
        temperature=0.5,
        thinking_config=types.ThinkingConfig(thinking_budget=0)
    )
  )

  print(image_response.text)

প্রতিক্রিয়াটিতে বস্তুটির একটি 2D স্থানাঙ্ক রয়েছে যা ব্যবহারকারীর প্রশ্নের উত্তর দেয়, এই ক্ষেত্রে, যে বস্তুটি ল্যাপটপের জন্য জায়গা তৈরি করতে হবে।

[
  {"point": [672, 301], "label": "The object that I need to remove to make room for my laptop"}
]

একটি উদাহরণ যা দেখায় যে কোন বস্তুটিকে অন্য বস্তুর জন্য সরানো দরকার

একটি মধ্যাহ্নভোজন প্যাকিং

মডেলটি বহু-পদক্ষেপের কাজের জন্য নির্দেশনাও প্রদান করতে পারে এবং প্রতিটি ধাপের জন্য প্রাসঙ্গিক বস্তুর দিকে নির্দেশ করতে পারে। এই উদাহরণটি দেখায় কিভাবে মডেলটি একটি লাঞ্চ ব্যাগ প্যাক করার জন্য ধাপগুলির একটি সিরিজ পরিকল্পনা করে৷

পাইথন

from google import genai
from google.genai import types

# Initialize the GenAI client and specify the model
MODEL_ID = "gemini-robotics-er-1.5-preview"
client = genai.Client()

# Load your image and set up your prompt
  with open('path/to/image-of-lunch.jpg', 'rb') as f:
      image_bytes = f.read()

prompt = """
          Explain how to pack the lunch box and lunch bag. Point to each
          object that you refer to. Each point should be in the format:
          [{"point": [y, x], "label": }], where the coordinates are
          normalized between 0-1000.
        """

  image_response = client.models.generate_content(
    model=MODEL_ID,
    contents=[
      types.Part.from_bytes(
        data=image_bytes,
        mime_type='image/jpeg',
      ),
      prompt
    ],
    config = types.GenerateContentConfig(
        temperature=0.5,
        thinking_config=types.ThinkingConfig(thinking_budget=0)
    )
  )

  print(image_response.text)

এই প্রম্পটের প্রতিক্রিয়া হল ইমেজ ইনপুট থেকে লাঞ্চ ব্যাগ প্যাক করার জন্য ধাপে ধাপে নির্দেশাবলীর একটি সেট।

ইনপুট ইমেজ

একটি লাঞ্চ বক্সের একটি ছবি এবং এতে রাখা আইটেম৷

মডেল আউটপুট

Based on the image, here is a plan to pack the lunch box and lunch bag:

1.  **Pack the fruit into the lunch box.** Place the [apple](apple), [banana](banana), [red grapes](red grapes), and [green grapes](green grapes) into the [blue lunch box](blue lunch box).
2.  **Add the spoon to the lunch box.** Put the [blue spoon](blue spoon) inside the lunch box as well.
3.  **Close the lunch box.** Secure the lid on the [blue lunch box](blue lunch box).
4.  **Place the lunch box inside the lunch bag.** Put the closed [blue lunch box](blue lunch box) into the [brown lunch bag](brown lunch bag).
5.  **Pack the remaining items into the lunch bag.** Place the [blue snack bar](blue snack bar) and the [brown snack bar](brown snack bar) into the [brown lunch bag](brown lunch bag).

Here is the list of objects and their locations:
*   [{"point": [899, 440], "label": "apple"}]
*   [{"point": [814, 363], "label": "banana"}]
*   [{"point": [727, 470], "label": "red grapes"}]
*   [{"point": [675, 608], "label": "green grapes"}]
*   [{"point": [706, 529], "label": "blue lunch box"}]
*   [{"point": [864, 517], "label": "blue spoon"}]
*   [{"point": [499, 401], "label": "blue snack bar"}]
*   [{"point": [614, 705], "label": "brown snack bar"}]
*   [{"point": [448, 501], "label": "brown lunch bag"}]

একটি কাস্টম রোবট API কল করা হচ্ছে

এই উদাহরণটি একটি কাস্টম রোবট API এর সাথে টাস্ক অর্কেস্ট্রেশন প্রদর্শন করে। এটি একটি পিক-এন্ড-প্লেস অপারেশনের জন্য ডিজাইন করা একটি মক API প্রবর্তন করে। কাজটি হল একটি নীল ব্লক বাছাই করা এবং এটি একটি কমলা বাটিতে রাখা:

ব্লক এবং বাটি একটি ছবি

এই পৃষ্ঠার অন্যান্য উদাহরণের মতো, সম্পূর্ণ চালানোর যোগ্য কোডটি রোবোটিক্স কুকবুকে পাওয়া যায়।

প্রথম ধাপ হল নিম্নলিখিত প্রম্পটের মাধ্যমে উভয় আইটেম সনাক্ত করা:

পাইথন

prompt = """
            Locate and point to the blue block and the orange bowl. The label
            returned should be an identifying name for the object detected.
            The answer should follow the json format: [{"point": <point>, "label": <label1>}, ...].
            The points are in [y, x] format normalized to 0-1000.
          """

মডেল প্রতিক্রিয়া ব্লক এবং বাটি স্বাভাবিক স্থানাঙ্ক অন্তর্ভুক্ত:

[
  {"point": [389, 252], "label": "orange bowl"},
  {"point": [727, 659], "label": "blue block"}
]

এই উদাহরণটি নিম্নলিখিত মক রোবট API ব্যবহার করে:

পাইথন

def move(x, y, high):
  print(f"moving to coordinates: {x}, {y}, {15 if high else 5}")

def setGripperState(opened):
  print("Opening gripper" if opened else "Closing gripper")

def returnToOrigin():
  print("Returning to origin pose")

পরবর্তী পদক্ষেপটি কর্মটি কার্যকর করার জন্য প্রয়োজনীয় যুক্তি সহ API ফাংশনগুলির একটি ক্রম কল করছে। নিম্নলিখিত প্রম্পটে রোবট API-এর একটি বিবরণ রয়েছে যা মডেলটিকে এই কাজটি সাজানোর সময় ব্যবহার করা উচিত।

পাইথন

prompt = f"""
    You are a robotic arm with six degrees-of-freedom. You have the
    following functions available to you:

    def move(x, y, high):
      # moves the arm to the given coordinates. The boolean value 'high' set
      to True means the robot arm should be lifted above the scene for
      avoiding obstacles during motion. 'high' set to False means the robot
      arm should have the gripper placed on the surface for interacting with
      objects.

    def setGripperState(opened):
      # Opens the gripper if opened set to true, otherwise closes the gripper

    def returnToOrigin():
      # Returns the robot to an initial state. Should be called as a cleanup
      operation.

    The origin point for calculating the moves is at normalized point
    y={robot_origin_y}, x={robot_origin_x}. Use this as the new (0,0) for
    calculating moves, allowing x and y to be negative.
    Perform a pick and place operation where you pick up the blue block at
    normalized coordinates ({block_x}, {block_y}) (relative coordinates:
    {block_relative_x}, {block_relative_y}) and place it into the orange
    bowl at normalized coordinates ({bowl_x}, {bowl_y})
    (relative coordinates: {bowl_relative_x}, {bowl_relative_y}).
    Provide the sequence of function calls as a JSON list of objects, where
    each object has a "function" key (the function name) and an "args" key
    (a list of arguments for the function).
    Also, include your reasoning before the JSON output.
    For example:
    Reasoning: To pick up the block, I will first move the arm to a high
    position above the block, open the gripper, move down to the block,
    close the gripper, lift the arm, move to a high position above the bowl,
    move down to the bowl, open the gripper, and then lift the arm back to
    a high position.
"""

নিম্নলিখিতটি প্রম্পট এবং মক রোবট API-এর উপর ভিত্তি করে মডেলের সম্ভাব্য আউটপুট দেখায়। আউটপুটে মডেল চিন্তার প্রক্রিয়া এবং ফলাফল হিসাবে এটি পরিকল্পনা করা কাজগুলি অন্তর্ভুক্ত করে। এটি রোবট ফাংশন কলের আউটপুটও দেখায় যা মডেলটি একসাথে সিকোয়েন্স করে।

Reasoning: To perform the pick and place operation, I will first move the
robotic arm to a high position above the blue block to ensure clearance. Then, I
will open the gripper in preparation for grasping. Next, I will lower the arm to
the surface level to position the gripper around the block and close the gripper
to secure it. After picking up the block, I will lift the arm to clear the
surface and move towards the orange bowl, maintaining a high position to avoid
collisions. Once positioned above the bowl, I will lower the arm to place the
block inside. I will then open the gripper to release the block. Finally, I will
lift the arm out of the bowl and call `returnToOrigin` to reset the robot's
state.

[
  {
    "function": "move",
    "args": [
      163,
      427,
      true
    ]
  },
  {
    "function": "setGripperState",
    "args": [
      true
    ]
  },
  {
    "function": "move",
    "args": [
      163,
      427,
      false
    ]
  },
  {
    "function": "setGripperState",
    "args": [
      false
    ]
  },
  {
    "function": "move",
    "args": [
      163,
      427,
      true
    ]
  },
  {
    "function": "move",
    "args": [
      -247,
      90,
      true
    ]
  },
  {
    "function": "move",
    "args": [
      -247,
      90,
      false
    ]
  },
  {
    "function": "setGripperState",
    "args": [
      true
    ]
  },
  {
    "function": "move",
    "args": [
      -247,
      90,
      true
    ]
  },
  {
    "function": "returnToOrigin",
    "args": []
  }
]


Executing Function Calls:
moving to coordinates: 163, 427, 15
Opening gripper
moving to coordinates: 163, 427, 5
Closing gripper
moving to coordinates: 163, 427, 15
moving to coordinates: -247, 90, 15
moving to coordinates: -247, 90, 5
Opening gripper
moving to coordinates: -247, 90, 15
Returning to origin pose

কোড এক্সিকিউশন

জেমিনি রোবোটিক্স-ইআর 1.5 ডায়নামিক অ্যাকশনের প্রয়োজন হয় এমন কাজগুলি সম্পাদন করার জন্য পাইথন কোডের পরামর্শ এবং কার্যকর করতে পারে, যেমন আরও ভাল বিশদের জন্য একটি চিত্র অঞ্চলে জুম করা।

এই উদাহরণটি প্রদর্শন করে যে মডেলটি কীভাবে একটি চিত্রের একটি নির্দিষ্ট এলাকায় "জুম ইন" করার জন্য কোড এক্সিকিউশন টুল ব্যবহার করার পরামর্শ দিতে পারে, যা এটি ব্যবহারকারীর প্রশ্নের উত্তর দেওয়ার জন্য বহন করে।

পাইথন

from google import genai
from google.genai import types

client = genai.Client()

MODEL_ID = "gemini-robotics-er-1.5-preview"

# Load your image and set up your prompt
  with open('path/to/image-of-object.jpg', 'rb') as f:
      image_bytes = f.read()
prompt = """
          What is the air quality reading? Using the code execution feature,
          zoom in on the image to take a closer look.
        """

response = client.models.generate_content(
    model=MODEL_ID,
    contents=[
        img,
        prompt
    ],
    config = types.GenerateContentConfig(
        temperature=0.5,
        tools=[types.Tool(code_execution=types.ToolCodeExecution)]
    )
)

for part in response.candidates[0].content.parts:
    if part.text is not None:
        print(part.text)
    if part.executable_code is not None:
        print(part.executable_code.code)
    if part.code_execution_result is not None:
        print(part.code_execution_result.output)

নিম্নলিখিত এই কাজের জন্য একটি সম্ভাব্য মডেল প্রতিক্রিয়া দেখায়. আউটপুটটি স্ক্রীনটি আরও ভালভাবে পড়ার জন্য চিত্রটিতে জুম করার জন্য মডেল তৈরির কোড দেখায়। এটি ক্রপিংয়ের সাথে করা সমন্বয়গুলির চারপাশে চিন্তার প্রক্রিয়াটিও দেখায়। সম্পূর্ণ নমুনা আউটপুটের জন্য, রোবোটিক্স কুকবুক দেখুন।

# Detect relevant objects and output in json format
# [{"box_2d": [379, 407, 481, 553], "label": "display"}]
from PIL import Image

# Open the image
img = Image.open("input_file_0.jpeg")

# Define the coordinates for cropping (normalized to 0-1000)
# Based on visual inspection, the display is roughly centered around [430, 430] to [500, 500] in a 1000x1000 scale.
# Let's try to zoom in on the display area.
# Bounding box for display: [ymin, xmin, ymax, xmax] in pixels.
# From visual inspection of the original image (size 90489 bytes, resolution
unknown but let's assume a standard aspect ratio and roughly 1000x1000 for
relative positioning),
# the display is located at approximately y=380-480, x=410-540.
# Let's define a larger area around it for context.
# Let's say we want to crop from y=350 to y=550 and x=350 to x=650.

...

thought
The crop was too tight and only captured part of the display. Let's adjust the bounding box.
The previous crop was `img.crop((400, 350, 600, 500))`. This means xmin=400, ymin=350, xmax=600, ymax=500.
The display is centered around x=480, y=430.
The previous crop captured the left side of the display.
Let's expand the x range to the right and y range to cover the whole circle.
New bounding box estimate: ymin=370, xmin=400, ymax=500, xmax=600.
Let's try again with a wider crop.
# Detect relevant objects and output in json format
# [{"box_2d": [379, 407, 481, 553], "label": "display"}]
from PIL import Image

# Open the image
img = Image.open("input_file_0.jpeg")

# Define the coordinates for cropping (normalized to 0-1000)
…

The reading of 14 falls into the "Moderate" category.
The prompt asks for the "air quality reading", which can be interpreted as
either the numerical value or the categorical description. Given the numerical
value is explicitly displayed, it's the primary reading.

Let's provide the numerical value as the reading.
The reading is 014.
Based on the display on the air purifier, the air quality reading is **014**.

সর্বোত্তম অনুশীলন

আপনার রোবোটিক্স অ্যাপ্লিকেশনগুলির কার্যকারিতা এবং নির্ভুলতা অপ্টিমাইজ করার জন্য, মিথুন মডেলের সাথে কীভাবে কার্যকরভাবে যোগাযোগ করা যায় তা বোঝা গুরুত্বপূর্ণ। এই বিভাগটি সবচেয়ে নির্ভরযোগ্য ফলাফল অর্জনের জন্য প্রম্পট তৈরি, ভিজ্যুয়াল ডেটা পরিচালনা এবং কাঠামোগত কাজগুলির জন্য সর্বোত্তম অনুশীলন এবং মূল কৌশলগুলির রূপরেখা দেয়৷

  1. পরিষ্কার এবং সহজ ভাষা ব্যবহার করুন।

    • প্রাকৃতিক ভাষা আলিঙ্গন করুন : মিথুন মডেলটি প্রাকৃতিক, কথোপকথন ভাষা বোঝার জন্য ডিজাইন করা হয়েছে। আপনার প্রম্পটগুলিকে এমনভাবে গঠন করুন যা শব্দার্থগতভাবে পরিষ্কার এবং একজন ব্যক্তি কীভাবে স্বাভাবিকভাবে নির্দেশনা দেবে তা প্রতিফলিত করে।

    • দৈনন্দিন পরিভাষা ব্যবহার করুন : প্রযুক্তিগত বা বিশেষ শব্দের চেয়ে সাধারণ, দৈনন্দিন ভাষা বেছে নিন। যদি মডেলটি একটি নির্দিষ্ট পদে প্রত্যাশিতভাবে সাড়া না দেয়, তাহলে এটিকে আরও সাধারণ সমার্থক শব্দ দিয়ে পুনরায় বলার চেষ্টা করুন।

  2. ভিজ্যুয়াল ইনপুট অপ্টিমাইজ করুন।

    • বিস্তারিত জানার জন্য জুম ইন করুন : ছোট বা বৃহত্তর শটে বোঝা কঠিন বস্তুগুলির সাথে কাজ করার সময়, আগ্রহের বস্তুটিকে আলাদা করতে একটি বাউন্ডিং বক্স ফাংশন ব্যবহার করুন। তারপরে আপনি এই নির্বাচনের চিত্রটি ক্রপ করতে পারেন এবং আরও বিশদ বিশ্লেষণের জন্য মডেলটিতে নতুন, ফোকাস করা চিত্রটি পাঠাতে পারেন।

    • আলো এবং রঙ নিয়ে পরীক্ষা : মডেলের উপলব্ধি চ্যালেঞ্জিং আলোর অবস্থা এবং খারাপ রঙের বৈসাদৃশ্য দ্বারা প্রভাবিত হতে পারে।

  3. জটিল সমস্যাগুলিকে ছোট ছোট ধাপে ভাগ করুন। প্রতিটি ছোট পদক্ষেপকে পৃথকভাবে সম্বোধন করে, আপনি মডেলটিকে আরও সুনির্দিষ্ট এবং সফল ফলাফলের দিকে পরিচালিত করতে পারেন।

  4. ঐক্যমতের মাধ্যমে নির্ভুলতা উন্নত করুন। যে কাজের জন্য উচ্চ মাত্রার নির্ভুলতা প্রয়োজন, আপনি একই প্রম্পটের মাধ্যমে মডেলটিকে একাধিকবার জিজ্ঞাসা করতে পারেন। ফিরে আসা ফলাফলের গড় করে, আপনি একটি "ঐকমত্য" এ পৌঁছাতে পারেন যা প্রায়শই আরও সঠিক এবং নির্ভরযোগ্য।

সীমাবদ্ধতা

Gemini Robotics-ER 1.5 এর সাথে বিকাশ করার সময় নিম্নলিখিত সীমাবদ্ধতাগুলি বিবেচনা করুন:

  • প্রিভিউ স্ট্যাটাস: মডেলটি বর্তমানে প্রিভিউতে রয়েছে। API এবং ক্ষমতা পরিবর্তিত হতে পারে, এবং পুঙ্খানুপুঙ্খ পরীক্ষা ছাড়া এটি উত্পাদন-সমালোচনামূলক অ্যাপ্লিকেশনের জন্য উপযুক্ত নাও হতে পারে।
  • লেটেন্সি: জটিল প্রশ্ন, উচ্চ-রেজোলিউশন ইনপুট, বা ব্যাপক thinking_budget প্রক্রিয়াকরণের সময় বাড়াতে পারে।
  • হ্যালুসিনেশন: সমস্ত বড় ভাষার মডেলের মতো, জেমিনি রোবোটিক্স-ইআর 1.5 মাঝে মাঝে "হ্যালুসিনেশন" করতে পারে বা ভুল তথ্য দিতে পারে, বিশেষ করে অস্পষ্ট প্রম্পট বা বিতরণের বাইরে ইনপুটগুলির জন্য।
  • প্রম্পট মানের উপর নির্ভরতা: মডেলের আউটপুটের গুণমান ইনপুট প্রম্পটের স্বচ্ছতা এবং নির্দিষ্টতার উপর অত্যন্ত নির্ভরশীল। অস্পষ্ট বা দুর্বল কাঠামোগত প্রম্পট সাবঅপ্টিমাল ফলাফলের দিকে নিয়ে যেতে পারে।
  • কম্পিউটেশনাল খরচ: মডেল চালানো, বিশেষ করে ভিডিও ইনপুট বা উচ্চ thinking_budget সাথে, কম্পিউটেশনাল রিসোর্স ব্যবহার করে এবং খরচ বহন করে। আরো বিস্তারিত জানার জন্য চিন্তা পাতা দেখুন.
  • ইনপুট প্রকার: প্রতিটি মোডের সীমাবদ্ধতার বিশদ বিবরণের জন্য নিম্নলিখিত বিষয়গুলি দেখুন৷

গোপনীয়তা বিজ্ঞপ্তি

আপনি স্বীকার করেন যে এই নথিতে উল্লেখ করা মডেলগুলি ("রোবোটিক্স মডেল") আপনার নির্দেশাবলী অনুসারে আপনার হার্ডওয়্যার পরিচালনা এবং সরানোর জন্য ভিডিও এবং অডিও ডেটার সুবিধা দেয়৷ তাই আপনি রোবোটিক্স মডেলগুলি পরিচালনা করতে পারেন যাতে শনাক্তযোগ্য ব্যক্তিদের কাছ থেকে ডেটা যেমন ভয়েস, ইমেজরি এবং সাদৃশ্য ডেটা ("ব্যক্তিগত ডেটা") রোবোটিক্স মডেলগুলি দ্বারা সংগ্রহ করা হবে৷ আপনি যদি ব্যক্তিগত ডেটা সংগ্রহ করে এমন পদ্ধতিতে রোবোটিক্স মডেলগুলি পরিচালনা করার জন্য নির্বাচন করেন তবে আপনি সম্মত হন যে আপনি কোনও শনাক্তযোগ্য ব্যক্তিকে রোবোটিক্স মডেলগুলির সাথে যোগাযোগ করতে বা তার আশেপাশের এলাকায় উপস্থিত থাকার অনুমতি দেবেন না, যতক্ষণ না এই ধরনের শনাক্তযোগ্য ব্যক্তিদের পর্যাপ্তভাবে অবহিত করা হয় এবং সম্মতি না দেওয়া হয় যে তাদের এপিআই-এর জন্য Gemini-এ অতিরিক্ত ব্যবহার করা হতে পারে। পরিষেবার শর্তাবলী https://ai.google.dev/gemini-api/terms- এ পাওয়া যায় ("শর্তাবলী"), "How Google আপনার ডেটা ব্যবহার করে" শিরোনামের বিভাগ অনুসারে। আপনি নিশ্চিত করবেন যে এই ধরনের বিজ্ঞপ্তিটি শর্তাবলীতে বর্ণিত ব্যক্তিগত ডেটা সংগ্রহ ও ব্যবহারের অনুমতি দেয় এবং আপনি ব্যাবসায়িকভাবে যুক্তিসঙ্গত প্রচেষ্টা ব্যবহার করে ব্যক্তিগত ডেটা সংগ্রহ এবং বিতরণ কমিয়ে আনতে ব্যবহার করবেন যেমন মুখ ঝাপসা করা এবং রোবটিক্স মডেলগুলি পরিচালনা করার মতো কৌশলগুলি ব্যবহার করে যেখানে শনাক্তকরণযোগ্য ব্যক্তি নেই এমন এলাকায়।

মূল্য নির্ধারণ

মূল্য এবং উপলব্ধ অঞ্চলের বিস্তারিত তথ্যের জন্য, মূল্য পৃষ্ঠাটি পড়ুন।

মডেল সংস্করণ

সম্পত্তি বর্ণনা
মডেল কোড gemini-robotics-er-1.5-preview
সমর্থিত ডেটা প্রকার

ইনপুট

পাঠ্য, ছবি, ভিডিও, অডিও

আউটপুট

পাঠ্য

টোকেন সীমা [*]

ইনপুট টোকেন সীমা

1,048,576

আউটপুট টোকেন সীমা

65,536

ক্ষমতা

অডিও প্রজন্ম

সমর্থিত নয়

ব্যাচ API

সমর্থিত নয়

ক্যাশিং

সমর্থিত নয়

কোড এক্সিকিউশন

সমর্থিত

ফাংশন কলিং

সমর্থিত

ইমেজ প্রজন্ম

সমর্থিত নয়

লাইভ API

সমর্থিত নয়

গ্রাউন্ডিং অনুসন্ধান করুন

সমর্থিত

স্ট্রাকচার্ড আউটপুট

সমর্থিত

ভাবছেন

সমর্থিত

URL প্রসঙ্গ

সমর্থিত

সংস্করণ
আরো বিস্তারিত জানার জন্য মডেল সংস্করণ নিদর্শন পড়ুন.
  • পূর্বরূপ: gemini-robotics-er-1.5-preview
সর্বশেষ আপডেট সেপ্টেম্বর 2025
জ্ঞান কাটঅফ জানুয়ারী 2025

পরবর্তী পদক্ষেপ

  • অন্যান্য ক্ষমতাগুলি অন্বেষণ করুন এবং জেমিনি রোবোটিক্স-ইআর 1.5 এর জন্য আরও অ্যাপ্লিকেশন আবিষ্কার করতে বিভিন্ন প্রম্পট এবং ইনপুটগুলির সাথে পরীক্ষা চালিয়ে যান৷ আরও উদাহরণের জন্য রোবোটিক্স কুকবুক দেখুন।
  • নিরাপত্তার কথা মাথায় রেখে জেমিনি রোবোটিক্স মডেলগুলি কীভাবে তৈরি করা হয়েছিল সে সম্পর্কে জানুন, Google DeepMind রোবোটিক্স সুরক্ষা পৃষ্ঠা দেখুন৷
  • জেমিনি রোবোটিক্স ল্যান্ডিং পৃষ্ঠায় জেমিনি রোবোটিক্স মডেলের সর্বশেষ আপডেট সম্পর্কে পড়ুন।