What Is Google Cloud Auto Annotate?

Timothy MPublished Nov 19, 2026
34 min read

Image annotation is the process of adding labels to images so that computer vision models can learn what each image contains. An annotation can assign a class such as car or person, mark an object's location with a bounding box, or label the whole scene. These annotations make large image datasets searchable, and they also serve as training data for custom computer vision models.

For images stored in Cloud Storage (opens in a new tab), this annotation step can now be automated with Google Cloud Auto Annotate (opens in a new tab), which Google now calls object enrichments. It runs inference with pre-trained Google vision models on the images in a bucket and attaches the predictions to each image. These predictions include object detections with bounding boxes, face detections with landmarks, likelihood ratings for adult and violent content, and image-level labels. Cloud Storage can then export them to BigQuery (opens in a new tab), where a single SQL query can retrieve every image with a label.

This guide covers the following topics.

  • What Google Cloud Auto Annotate does and how its pipeline works
  • The four image models (opens in a new tab) it runs and what each one returns
  • How it compares to Gemini on cost and accuracy
  • Six practical ways to use the labels in vision projects
  • How to bring the labels into Roboflow to train and deploy your own model

By the end of this guide, you will have a clear understanding of Google Cloud Auto Annotate. You will also see how its labels can become training data for a custom computer vision model that you own.

The diagram below shows how to take object detections from Google Cloud Auto Annotate, review them in Roboflow, and use them to train, test, and deploy your own detector.

Process for annotating images with Google Cloud Auto Annotate and training, evaluating, and deploying an object detector with Roboflow.

What Google Cloud Auto Annotate Does

Manually annotating a few hundred images is slow but possible. Annotating ten million images is a different problem, because new images keep arriving while the backlog is still unlabeled. Google Cloud Auto Annotate is built for that second case.

Google Cloud Auto Annotate is a managed Cloud Storage feature that applies Google's pre-trained machine learning models to the objects in your buckets. Each model produces structured metadata, and Cloud Storage stores that metadata on the object itself as object contexts (opens in a new tab). The feature exists to help teams search, curate, and govern unstructured data at scale (opens in a new tab) without building their own inference pipeline. Google runs model inference, writes the predictions, and manages retries and throttling for you.

Google's overview diagram shows this flow in one picture.

Object Enrichments Overview by Google Cloud (opens in a new tab)

The diagram reads from left to right. Raw data such as images and PDFs goes into object enrichments inside the Cloud Storage. Object enrichments automatically extracts context using pre-trained ML models. Object contexts then hold the result as metadata stored directly with the object. These contexts serve downstream AI and analytics workflows. The AI agents box on the right shows one of those uses. The rest of this guide follows the analytics path from object contexts to BigQuery.

From Auto Annotate to Object Enrichments

Google first announced auto annotate in October 2025 as a limited experimental release (opens in a new tab). In November 2026, the feature launched in preview as object enrichments (opens in a new tab) in the Cloud Storage console and API. The same feature now appears under both names, and the Google Cloud docs use the new one.

The old name still lives inside the API. The configuration block is autoAnnotateConfig, the CLI flag is --auto-annotate-models, and the service agent (opens in a new tab) is service-PROJECT_NUMBER@gcp-sa-autoannotate.iam.gserviceaccount.com. This guide uses Auto Annotate and object enrichments for the same feature.

Object enrichments is in Preview (opens in a new tab), so the Pre-GA Offerings Terms (opens in a new tab) apply. Pre-GA features are offered as is and might have limited support (opens in a new tab), which matters when you plan production use.

How the Pipeline Works

Google Cloud Auto Annotate processes eligible images in your Cloud Storage buckets in the background. It attaches the annotations to each image as metadata. You can inspect the results for a single image or query them across your image collection in BigQuery. The steps below explain how to configure Auto Annotate, how Cloud Storage generates and stores the annotations, and how to query them in BigQuery.

  • Feature configuration: Create a FeatureConfig to specify which buckets Cloud Storage should monitor and where it should process the images. The supported processing locations are us, eu, and asia.
  • Models: Choose one or more models for the configuration. For example, choose object detection to locate individual objects or image labeling to describe the image as a whole.
  • Asynchronous scan: Cloud Storage scans the configured buckets in the background and runs the selected models on eligible images.
  • Object contexts: Cloud Storage attaches each model’s output to the image as structured JSON under contexts.custom. The context key identifies the model that produced the result. For example, google:annotation:object-detector-v1 identifies output from the object detection model.
  • Storage Insights and BigQuery. Configure a Storage Insights dataset to export the object metadata to BigQuery. The object_contexts_catalog_view view contains one row per object, with its contexts grouped in that row. You can use SQL to find images that contain a particular label or detections above a chosen confidence score. See how to Analyze object enrichments in BigQuery (opens in a new tab).

The annotations stay attached to the image object. By default, Cloud Storage preserves its object contexts (opens in a new tab) when you copy or move it.

Process for annotating images in Cloud Storage and querying the results in BigQuery using Storage Insights datasets.

Turn On Auto Annotate for a Bucket

Setup takes a few clicks in the console or a few commands in the CLI. You need the Storage Admin role (opens in a new tab) on the project to create a configuration. In the console, open the Object enrichments page (opens in a new tab) and click Create. Enter a configuration name and the bucket names, select the models, choose a processing location, and grant permissions to the service agent. The gcloud CLI does the same in three commands.

Shell
# Create a feature configuration that runs four image models on one bucket
gcloud alpha storage feature-configs create product-images-config \
    --description="Label product and camera images" \
    --auto-annotate-models=object-detector,face-detector,label-detector,content-safety \
    --auto-annotate-processing-location=us \
    --include-bucket-id-regexes=my-image-bucket

# Let the Auto Annotate service agent read the bucket and attach enrichments
gcloud storage buckets add-iam-policy-binding gs://my-image-bucket \
    --member=serviceAccount:service-PROJECT_NUMBER@gcp-sa-autoannotate.iam.gserviceaccount.com \
    --role=roles/storage.annotationGeneratorService

# Let the service agent inspect bucket configurations
gcloud projects add-iam-policy-binding PROJECT_ID \
    --member=serviceAccount:service-PROJECT_NUMBER@gcp-sa-autoannotate.iam.gserviceaccount.com \
    --role=roles/storage.bucketViewer

Despite its name, the --include-bucket-id-regexes flag takes a comma-separated list of exact bucket names, and it does not support wildcards or regular expressions. After the two role grants, IAM permissions can take a few minutes to propagate before processing begins. A new or updated configuration can take up to 24 hours to take effect. Deleting a configuration stops new enrichments within minutes, but it leaves existing enrichments on the objects.

Query the Labels in BigQuery

To query labels across a whole bucket, turn on Storage Insights datasets (opens in a new tab), which are available only with Storage Intelligence (opens in a new tab). Cloud Storage then exports your object inventory and object contexts to a linked BigQuery dataset. Linking the dataset to BigQuery is a separate step after you create the dataset configuration. In the console, open the configuration and click Link dataset. With the gcloud CLI, run gcloud storage insights dataset-configs create-link DATASET_CONFIG_ID --location=LOCATION instead, using your own configuration name and location. The initial load takes 24 to 48 hours (opens in a new tab), so an empty object_contexts_catalog_view in that window means the data has not arrived yet. Querying needs the BigQuery Job User and BigQuery Data Viewer roles (opens in a new tab).

The query outputs in this guide come from small synthetic catalogs. Each one is a BigQuery view with the documented columns (opens in a new tab) of object_contexts_catalog_view, and the JSON inside it follows the output format of each model (opens in a new tab). The sample below is one row, trimmed to its object detection context and one car box. Like the rest of the test data, it has no knowledgeGraphId field, which Google's sample output (opens in a new tab) includes.

JSON
{
  "project": 123456789012,
  "bucket": "my-image-bucket",
  "name": "cams/gate1_0001.jpg",
  "generation": 1764000000000001,
  "location": "US",
  "createdTime": "2026-11-20T10:00:00Z",
  "catalogUpdatedTime": "2026-11-21T00:00:00Z",
  "contexts": [{
    "key": "google:annotation:object-detector-v1",
    "value": "SUCCESS",
    "contextCreationTime": "2026-11-20T10:01:00Z",
    "contextUpdateTime": "2026-11-20T10:01:00Z",
    "extendedData": {
      "modelName": "object-detector",
      "modelVersion": "v1",
      "objectAnnotationGroup": {
        "objectAnnotations": [{
          "name": "Car",
          "score": 0.94,
          "boundingPoly": {
            "normalizedVertices": [
              {"x": 0.12, "y": 0.4}, {"x": 0.58, "y": 0.4},
              {"x": 0.58, "y": 0.81}, {"x": 0.12, "y": 0.81}
            ]
          }
        }]
      }
    }
  }]
}

Each row of object_contexts_catalog_view holds the object's project, bucket, name, and generation, plus a repeated contexts record. Inside that record, key names the model, value holds the run status such as SUCCESS or FAILURE, and extendedData holds the model's JSON output. This recipe from Google returns each image that the image labeling model labels as car with a confidence score above 0.75.

SQL
SELECT
  project,
  bucket,
  name,
  generation
FROM
  `PROJECT_ID.DATASET_ID.object_contexts_catalog_view` AS t
WHERE
  EXISTS(
    SELECT 1
    FROM
      UNNEST(t.contexts) AS context,
      UNNEST(JSON_QUERY_ARRAY(context.extendedData.labelAnnotationGroup.labelAnnotations)) AS label
    WHERE
      context.key = 'google:annotation:label-detector-v1'
      AND LOWER(STRING(label.description)) = 'car'
      AND FLOAT64(label.score) > 0.75
  )
LIMIT 10;

One image can carry several contexts, one per model, and each model can return many detections. Use UNNEST when you need one row per detection, and use EXISTS when you need one row per image.

Car Label Query Output

Visualize the Labels From BigQuery

A table of box coordinates is hard to judge by eye. Drawing the stored boxes back onto the image shows at once whether each detection lines up with a real object. This quick check is worth running on a few images before the labels feed a prompt, a filter, or a training dataset.

Process of visualizing the Labels From BigQuery

The process has six steps which are following:

The script needs the Google Cloud client libraries, Pillow, and Supervision. After installing them, sign in with Application Default Credentials (opens in a new tab) so the script can reach BigQuery and Cloud Storage. The signed-in account also needs the Storage Object Viewer role on the bucket (opens in a new tab) to download the image.

Shell
pip install google-cloud-bigquery google-cloud-storage pillow supervision
gcloud auth application-default login

The script below runs the box query for one image, downloads that image, and saves a copy with every box drawn on it.

Python
import io
import math

import numpy as np
import supervision as sv
from google.api_core.exceptions import NotFound
from google.cloud import bigquery, storage
from PIL import Image

PROJECT_ID = "your-gcp-project"
DATASET_ID = "your_storage_insights_dataset"
BUCKET = "my-image-bucket"
IMAGE_NAME = "samples/car_and_person.jpg"
MIN_SCORE = 0.5

SQL = f"""
SELECT
  t.bucket,
  t.name,
  t.generation,
  STRING(object.name) AS class_name,
  FLOAT64(object.score) AS score,
  (
    SELECT AS STRUCT
      MIN(COALESCE(FLOAT64(v.x), 0.0)) AS x_min,
      MIN(COALESCE(FLOAT64(v.y), 0.0)) AS y_min,
      MAX(COALESCE(FLOAT64(v.x), 0.0)) AS x_max,
      MAX(COALESCE(FLOAT64(v.y), 0.0)) AS y_max
    FROM UNNEST(JSON_QUERY_ARRAY(object.boundingPoly.normalizedVertices)) AS v
  ).*
FROM
  `{PROJECT_ID}.{DATASET_ID}.object_contexts_catalog_view` AS t,
  UNNEST(t.contexts) AS context,
  UNNEST(JSON_QUERY_ARRAY(
    context.extendedData.objectAnnotationGroup.objectAnnotations)) AS object
WHERE
  context.key = 'google:annotation:object-detector-v1'
  AND t.bucket = @bucket
  AND t.name = @name
  AND FLOAT64(object.score) >= @min_score
"""


def fetch_boxes():
    client = bigquery.Client(project=PROJECT_ID)
    job_config = bigquery.QueryJobConfig(
        query_parameters=[
            bigquery.ScalarQueryParameter("bucket", "STRING", BUCKET),
            bigquery.ScalarQueryParameter("name", "STRING", IMAGE_NAME),
            bigquery.ScalarQueryParameter("min_score", "FLOAT64", MIN_SCORE),
        ]
    )
    return list(client.query(SQL, job_config=job_config).result())


def is_valid_box(row):
    box = (row["x_min"], row["y_min"], row["x_max"], row["y_max"])
    if any(v is None or not math.isfinite(v) for v in box):
        return False
    return 0 <= box[0] < box[2] <= 1 and 0 <= box[1] < box[3] <= 1


def load_image(generation):
    bucket = storage.Client(project=PROJECT_ID).bucket(BUCKET)
    blob = bucket.blob(IMAGE_NAME, generation=generation)
    try:
        data = blob.download_as_bytes()
    except NotFound:
        raise SystemExit(f"Generation {generation} of {IMAGE_NAME} was replaced or deleted")
    return Image.open(io.BytesIO(data)).convert("RGB")


def to_detections(rows, width, height):
    xyxy = np.array(
        [[r["x_min"] * width, r["y_min"] * height,
          r["x_max"] * width, r["y_max"] * height] for r in rows],
        dtype=float,
    )
    class_names = np.array([r["class_name"] for r in rows])
    _, class_ids = np.unique(class_names, return_inverse=True)
    return sv.Detections(
        xyxy=xyxy,
        confidence=np.array([r["score"] for r in rows], dtype=float),
        class_id=class_ids,
        data={"class_name": class_names},
    )


def draw(image, detections):
    labels = [
        f"{class_name} {confidence:.2f}"
        for class_name, confidence in zip(detections["class_name"], detections.confidence)
    ]
    annotated = sv.BoxAnnotator(thickness=4).annotate(
        scene=image.copy(), detections=detections)
    return sv.LabelAnnotator(text_scale=1.0, text_thickness=2).annotate(
        scene=annotated, detections=detections, labels=labels)


if __name__ == "__main__":
    rows = [row for row in fetch_boxes() if is_valid_box(row)]
    if not rows:
        raise SystemExit(f"No valid boxes with a score of at least {MIN_SCORE} for {IMAGE_NAME}")
    image = load_image(rows[0]["generation"])
    detections = to_detections(rows, *image.size)
    draw(image, detections).save("annotated.jpg")
    print(f"Drew {len(detections)} boxes on {IMAGE_NAME}")

The is_valid_box function first drops any box whose edges are missing or do not form a valid box inside the image, so one bad entry cannot crash the drawing. The to_detections function then scales the normalized edges to pixels and builds the Detections object. The draw function runs both annotators on a copy of the image. To check another image, change BUCKET and IMAGE_NAME to any row from the earlier queries.

The query also returns the object's generation, which identifies the version of an object (opens in a new tab) and changes when the object is replaced (opens in a new tab). The load_image function passes it to bucket.blob() (opens in a new tab), which then selects a specific revision of this object (opens in a new tab). The boxes therefore land on the exact image they came from. If that generation no longer exists, the script stops with a message instead of drawing old boxes on a new picture.

The COALESCE calls in the query handle boxes that touch the edge of the image. Google's Vertex AI object detection docs note that when the API detects a coordinate value of 0, that coordinate is omitted in the JSON response (opens in a new tab). The object enrichments docs do not say otherwise, so COALESCE reads a missing coordinate as 0. The box then keeps its full size instead of collapsing to zero width or height.

For the example below, a synthetic catalog holds one image with two test boxes in the object detection output format. The boxes sit on a photo of a person walking to a car (opens in a new tab) from Unsplash.

Box Query Output for One Image

BigQuery returns one row for the car and one for the person. Each row carries the generation, the class name, the confidence score, and the four box edges as fractions. The JSON view shows these values as text. The BigQuery Python client returns the score and box edges as floats and the generation as an integer.

BigQuery Boxes Drawn With Supervision

The script scaled both boxes to the 1600 × 1066 photo and drew them in place. The car box runs from about pixel 320 to 1302 across and from 338 to 791 down, which matches the outline of the car. Both boxes land exactly on their objects, which confirms that the scaling and drawing steps put every box where BigQuery says it is. On real Auto Annotate output, a box that drifts off its object is easy to spot in this view, long before it reaches a prompt or a training set. Taken together, the steps in this guide give every image the same path from the bucket to the screen.

Process for retrieving bounding boxes from BigQuery and drawing them on the original Cloud Storage image with Supervision.

Google's object detector annotates the image, and Cloud Storage stores the result on the object as an object context. A Storage Insights dataset then copies that context to BigQuery, where SQL fetches the class name, confidence score, box edges, and generation. The load_image function downloads that generation of the image from Cloud Storage. The to_detections function scales each box to pixels. Finally, Supervision draws each box and label on that image.

The Vision Models Inside Google Cloud Auto Annotate

Auto Annotate does not train on your data. Instead, you enable fixed pre-trained Google models, and each one performs a different vision task on every image. The four image models below cover object detection, face detection, content safety, and image labeling.

Vision models in Google Cloud Auto Annotate

Object Detection (object-detector)

The object detection model (opens in a new tab) localizes and classifies multiple objects in one image. Each detection has a name such as Person or Chair, a Google Knowledge Graph entity ID in knowledgeGraphId, a confidence score from 0 to 1, and a boundingPoly. The polygon comes in pixel vertices and in normalizedVertices scaled from 0 to 1. Results sit under the context key google:annotation:object-detector-v1.

For a business, this is the model that turns images into object counts and locations. A parking operator can count people in camera frames, and a retailer can retrieve product images that also contain a person.

Face Detection With Landmarks (face-detector)

The face detection model (opens in a new tab) returns two shapes for each face. boundingPoly encloses the whole head and face, while the tighter faceDetectionBoundingPoly covers only the skin and visible facial features. The model also places 36 facial landmarks (opens in a new tab), such as LEFT_EYE, NOSE_TIP, and CHIN_GNATHION, and each landmark has an x, y, and z position.

Head pose comes as rollAngle, panAngle, and tiltAngle in degrees. The model also scores likelihoods for joy, sorrow, anger, surprise, underexposure, blur, and headwear, along with detectionConfidence and landmarkingConfidence. The output schema has no identity field, so the model locates faces without saying who they are. That makes it a good fit for privacy reviews, portrait search, and image quality checks.

Explicit Content Detection (content-safety)

The content safety model (opens in a new tab) rates every image for adult content and violent content against Google safety policies. Each rating is one of five values, VERY_UNLIKELY, UNLIKELY, POSSIBLE, LIKELY, or VERY_LIKELY, stored in adultContentLikelihood and violentContentLikelihood. Trust and safety teams can use these ratings to moderate user uploads, and marketing teams can use them to keep risky images out of campaigns.

Image Labeling (label-detector)

The labeling model (opens in a new tab) assigns image-level labels for objects, scenery, activities, and places, such as Landscape, Urban, or Night. Each label has a description, a knowledgeGraphId, a confidence score, and a topicality value. Topicality measures how relevant the label is to the main subject of the image. In Google's sample output, Night has a score of 0.92 but a topicality of 0.19 (opens in a new tab). The model is confident the scene is at night, but night is not the subject. Filtering on both numbers gives cleaner search results than filtering on score alone.

Together, the four models give each image a layer of bounding boxes, face detections, safety ratings, and labels. The next question is how that layer compares with simply prompting Gemini.

How Google Cloud Auto Annotate Compares to Gemini for Labeling

Gemini can also detect objects and label images. Choosing between the two comes down to inference cost per image, label quality, and how much control you need over the class names.

Cost per Image

Auto Annotate charges per image, separately for each model you enable. The rate is $0.25 per 1,000 images for the first 1 million images per model in a month and $0.05 per 1,000 after that. Object contexts cost $3 per million per month (opens in a new tab), and queries follow BigQuery pricing (opens in a new tab).

Gemini bills by token instead of by image. On Gemini 3 and newer models, one image at the default media resolution counts as about 1,120 tokens (opens in a new tab). At the Gemini 3.5 Flash-Lite input price of $0.30 per 1 million tokens, these image tokens cost about $0.34 per 1,000 images.

The Batch API cuts Gemini prices by 50%, to about $0.17 per 1,000 images. That is below the $0.25 Auto Annotate first-tier rate, but it is more than three times the $0.05 rate above 1 million images a month. The Gemini figure covers image input tokens only, and the Auto Annotate figure covers one enabled model.

Measured Cost and Accuracy

Real Gemini calls also spend output and thinking tokens, so token math alone does not show the full cost. Roboflow's Vision Evals (opens in a new tab) benchmark runs each model on the same real-world samples and prices the tokens each call uses at published rates. It scores object detection (opens in a new tab) with mAP@50. Its identification (opens in a new tab) task asks a model to recognize and name a specific entity in an image, which is the closest task to image labeling.

In the table, Gemini costs are the Vision Evals cost per sample times 1,000. Gemini 3.8 Flash runs at low thinking.

OptionDetection cost per 1,000 imagesLabeling or identification cost per 1,000 imagesDetection mAP@50 on Vision EvalsVisual identification accuracy (LLM judge) on Vision Evals
Auto Annotate, first 1 million images a month$0.25 (opens in a new tab) with object-detector$0.25 (opens in a new tab) with label-detectorNot publishedNot published
Auto Annotate, above 1 million images a month$0.05 (opens in a new tab) with object-detector$0.05 (opens in a new tab) with label-detectorNot publishedNot published
Gemini 3.5 Flash-Lite (opens in a new tab)$2.30$0.4057.5%84.4%
Gemini 3.8 Flash (opens in a new tab), low thinking$4.50$1.6068.1%97.9%
Gemini 3.1 Pro (opens in a new tab)$10.00$7.0067.4%100.0%

The Vision Evals cost is an estimate on that benchmark rather than a universal model cost. Gemini 3.8 Flash prices also double on January 1, 2027, to $1.50 per 1 million input tokens and $7.50 per 1 million output tokens.

Accuracy is harder to compare. Google says Auto Annotate offers the AI models used by internal Google services such as Google Photos (opens in a new tab). Google has not published a benchmark that scores those models next to Gemini, and Auto Annotate is not part of Vision Evals.

The Gemini numbers still show one pattern. Gemini 3.1 Pro scores 67.4% mAP@50 at more than twice the cost of Gemini 3.8 Flash at 68.1% with low thinking. A larger model tier does not always detect better.

The class names differ too. Auto Annotate returns names from a fixed Google vocabulary, and you cannot add a class. Gemini follows a text prompt, so it can detect business-specific classes zero-shot, such as a dented carton or a missing hard hat. Its boxes and answers change with the model tier, the prompt, and the thinking level.

The reliable answer is a test on your own data. Label a few hundred representative images by hand as ground truth. Run both models on the same images and map their class names to your own classes. Then compare precision, recall, and AP per class, plus overall mAP, at the same IoU threshold. In Roboflow, Workflow Evals (opens in a new tab) can score a Gemini Workflow against labeled cases. The open-source supervision (opens in a new tab) library can compute mean average precision (opens in a new tab) for exported Auto Annotate boxes.

When to Use Which

Most teams end up using both models, each for the task it handles best.

  • Use Auto Annotate for general classes, such as people, cars, faces, scene labels, or safety ratings, across millions of images.
  • Use Gemini for business-specific classes, for questions that need visual reasoning, or for small volumes where token cost does not matter.
  • Use both for a specific question across a large volume. Auto Annotate runs a low-cost first stage, and Gemini runs inference only on the images that stage selects.
Selection of Auto Annotate, Gemini, or both based on image volume and the need for general or business-specific labels.

That combined option is the heart of the six patterns below.

Six Ways to Use Google Cloud Auto Annotate

Labels in BigQuery are useful on their own, but they create far more value when they drive downstream models and pipelines. The six patterns below show how vision teams put Auto Annotate output to work, from cutting LLM bills to training models they own. All six read from the same object_contexts_catalog_view view, so one setup serves every pattern.

1. Pre-Filter Images Before an LLM

Many LLM workloads need only a small slice of a large image dataset. A marketing team might want only car images that are safe for an ad campaign, and an insurer might want only images that show a vehicle. Sending the whole dataset to Gemini pays for inference on millions of images that a simple filter would reject.

A pre-filter places a low-cost screening stage in front of the expensive multimodal model. You query the Auto Annotate labels in BigQuery first, and only the images that pass go to Gemini. Sampling content by type before it reaches an LLM or a human reviewer is required in such case.

The idea has strong research behind it. NoScope (opens in a new tab) places a cascade of specialized models and difference detectors in front of a reference network. It reports speedups of 265 to 15,500 times real time on binary classification over fixed-angle video, with accuracy within 1% to 5% of state-of-the-art networks. FrugalGPT (opens in a new tab) calls a related design an LLM cascade and reports up to 98% cost reduction while matching the best single LLM.

This query returns images where the labeling model predicts a car with more than 0.75 confidence and the content safety model ran successfully without rating adult or violent content as likely.

SQL
SELECT
  t.bucket,
  t.name
FROM
  `PROJECT_ID.DATASET_ID.object_contexts_catalog_view` AS t
WHERE
  EXISTS(
    SELECT 1
    FROM
      UNNEST(t.contexts) AS context,
      UNNEST(JSON_QUERY_ARRAY(context.extendedData.labelAnnotationGroup.labelAnnotations)) AS label
    WHERE
      context.key = 'google:annotation:label-detector-v1'
      AND LOWER(STRING(label.description)) = 'car'
      AND FLOAT64(label.score) > 0.75
  )
  AND EXISTS(
    SELECT 1
    FROM
      UNNEST(t.contexts) AS context
    WHERE
      context.key = 'google:annotation:content-safety-v1'
      AND context.value = 'SUCCESS'
      AND STRING(context.extendedData.contentSafetyAnnotation.adultContentLikelihood) NOT IN ('LIKELY', 'VERY_LIKELY')
      AND STRING(context.extendedData.contentSafetyAnnotation.violentContentLikelihood) NOT IN ('LIKELY', 'VERY_LIKELY')
  );
Pre-Filter Query Output

Only two images pass this filter. The street_0004.jpg image still has a high-confidence car label, but its test safety entry rates adult content as LIKELY, so the query holds it back. A single safety rating is enough to drop an image that matches every other rule. The query also requires a SUCCESS status from the content safety model. An image whose safety check failed or has not run yet is held back as well. A missing safety result therefore never lets an image through.

Images rated POSSIBLE still pass, because the query blocks only LIKELY and VERY_LIKELY. A stricter campaign policy can add POSSIBLE to both lists or send those images to a human reviewer first, as the compliance audit below recommends. The images that pass are candidates for Gemini or for review, not images cleared for publication.

Only the rows this query returns go to Gemini, through the Google Gemini block (opens in a new tab) in Roboflow Workflows or through the Gemini API. A full build with a detector, a Continue If (opens in a new tab) gate, and Gemini is in How to Pre-Filter Images Before Sending Them to an LLM. The low-cost first stage decides which images the expensive model processes.

2. Enrich the Prompt With Labels and Boxes

Even when Gemini must process an image, it does not need to start from zero. Auto Annotate has already detected which objects are present and where they are located, and those detections can travel into the prompt as context.

In this pattern, you add the Auto Annotate object names, scores, and normalized boxes to the text prompt. You can also draw numbered boxes on the image before sending it by passing bounding boxes as context when prompting models like Gemini.

Research supports both forms. Jiao et al. (opens in a new tab) describe the strategy to "infuse detection information in text format" as simple and effective. They also found that fine-tuning a model on this format improved performance by 6.71% across 10 benchmarks. Set-of-Mark (SoM) (opens in a new tab) prompting overlays marks such as alphanumerics, masks, and boxes on image regions. With SoM in a zero-shot setting, GPT-4V outperformed a fully fine-tuned referring expression comprehension model on RefCOCOg.

A prompt built from Auto Annotate output might look like this.

Auto Annotate results for this image, with boxes as normalized x_min, y_min, x_max, y_max
1. Car, score 0.94, box [0.12, 0.40, 0.58, 0.81]
2. Person, score 0.88, box [0.63, 0.22, 0.79, 0.90]
Image labels: Sports car (0.91), Road (0.87)

For object 1, report the body color and whether the car is a convertible.
Answer in JSON with the keys object_id, color, and convertible.

In Roboflow Workflows, the String Template block (opens in a new tab) builds this kind of dynamic VLM prompt from runtime data, and the Google Gemini block sends it. An insurance claims team can use the same idea to ask about the exact detected vehicle instead of the whole image. A grounded prompt gives the model a map of the scene before it answers.

3. Crop and Stitch Regions of Interest

Small objects are easy to miss when a high-resolution image is downscaled to fit a fixed token budget. A dent on a parcel or a scratch on a phone case may cover only a few pixels of the full frame.

ROI stitching uses the Auto Annotate bounding boxes to fix this. You crop each region of interest, arrange several crops into one numbered collage, and send the collage to Gemini in a single request. Each answer then maps back to its original box through its ROI number, since positions in the collage do not match positions in the scene.

ROI Stitching

Zhang et al. (opens in a new tab) showed that MLLM performance is very sensitive to the size of the visual subject. Their training-free visual intervention methods use the model's own attention and gradient maps to focus on the relevant region. These methods significantly improved accuracy on small details. A crop to the Auto Annotate bounding box is a simple and explicit version of that focus.

There is a cost angle too. Gemini 3 and newer models count about 1,120 tokens per image (opens in a new tab) at the default setting. Ten crops sent as ten images can therefore use up to about ten times the image tokens of one collage. A single Gemini prompt can include multiple images (opens in a new tab), so the prompt text repeats only when each crop goes out as its own request. Each crop in a collage gets fewer pixels, though, so measure accuracy and tokens on your own images before you switch.

Inside Roboflow Workflows, where a detection model supplies the boxes, the Dynamic Crop block (opens in a new tab) cuts each detection into its own image. The Grid Visualization block (opens in a new tab) arranges a list of images into one grid, filling it left to right and top to bottom. Each tile position can then act as an ROI number. A complete build with numbered collage pages and ROI mapping is in Crop Regions of Interest and Stitch Them Before VLM Inference.

A parcel carrier, for example, can crop each parcel that a detector finds on a sorting belt and ask Gemini in one request whether each crop shows visible damage. The model sees each parcel at a higher effective resolution, and the job makes one API call instead of many.

4. Audit Images for Compliance

Some images should never reach a training set, a public website, or an outside vendor. Finding them through manual review across millions of files is slow and inconsistent.

Auto Annotate turns this audit into a query. The content safety model flags adult and violent content, and the face detection model shows which images contain faces that may need consent or blurring. Google suggests feeding the results of safety queries into Storage batch operations (opens in a new tab) to move flagged objects to a restricted quarantine bucket or delete them in bulk (opens in a new tab).

This query lists images that the content safety model rates as likely or very likely to contain adult or violent content.

SQL
SELECT
  project,
  bucket,
  name,
  generation
FROM
  `PROJECT_ID.DATASET_ID.object_contexts_catalog_view` AS t
WHERE
  EXISTS(
    SELECT 1
    FROM
      UNNEST(t.contexts) AS context
    WHERE
      context.key = 'google:annotation:content-safety-v1'
      AND (
        STRING(context.extendedData.contentSafetyAnnotation.adultContentLikelihood) IN ('LIKELY', 'VERY_LIKELY')
        OR STRING(context.extendedData.contentSafetyAnnotation.violentContentLikelihood) IN ('LIKELY', 'VERY_LIKELY')
      )
  );
Compliance Audit Query Output

The audit flags two images for review. The gate2_0003.jpg entry is rated LIKELY for violent content, and street_0004.jpg is rated LIKELY for adult content. The remaining images have lower ratings or no safety result at all, so they do not appear in the list.

Treat these ratings as a triage signal rather than a final verdict, and send borderline images rated POSSIBLE to a human reviewer. For faces, the Blur Visualization block (opens in a new tab) in Roboflow Workflows blurs detected regions for privacy protection before images are shared or published. L'Oréal uses object enrichments to manage its creative assets at scale while staying compliant across its markets (opens in a new tab). An audit that once needed manual review of every image becomes one query per policy.

5. Distill the Labels Into Your Own Model

Auto Annotate labels images inside Cloud Storage, but it cannot run on a camera, a phone, or an offline edge device. It also predicts only Google's fixed classes. Distillation turns its predictions into a model you own and can deploy anywhere.

Hinton, Vinyals, and Dean (opens in a new tab) describe distillation as a kind of training used "to transfer the knowledge from the cumbersome model to a small model" that suits deployment better. In their method, the small model learns from the class probabilities of the large model, which they call soft targets.

Auto Annotate does not expose those probabilities. It exposes class names, confidence scores, and boxes, so this pattern distills through labels instead. Auto Annotate acts as the teacher, and a person reviews its boxes in Roboflow. A small detector such as RF-DETR (opens in a new tab) then learns from the reviewed boxes as the student. This transfers supervision for detection, not every behavior of the teacher.

RF-DETR is Roboflow's transformer-based real-time detection model (opens in a new tab), and its smallest checkpoint, rfdetr-nano, lists 48.4 mAP50-95 (opens in a new tab) in the Roboflow benchmarks. Roboflow's open-source Autodistill (opens in a new tab) framework follows the same teacher-student idea, and its autodistill-gcp-vision (opens in a new tab) package already uses Google Cloud's object localization API as a base model. Our tutorials What Is Model Distillation for Computer Vision? and How to Distill a VLM Into a Small Object Detection Model cover the teacher-student setup in more depth.

A parking operator can label a year of archived camera frames with Auto Annotate once. It can then run a small RF-DETR model on every new frame at the entrance gate. The teacher model labels the archive, and the student model runs real-time inference at the edge.

6. Curate Training Data

The images that improve a model are rarely spread evenly across a bucket. Edge cases such as night scenes, rare classes, and unusual viewpoints hide inside millions of ordinary frames.

Auto Annotate makes those images easy to retrieve. A few SQL queries can count class frequencies, surface rare classes, and sample a balanced cohort for annotation. Google describes autonomous driving, smart home, and robotics teams that find exact training cohorts in minutes instead of months (opens in a new tab). Vivint, for example, reports that object enrichments with BigQuery cut its AI development time from 6 months to 1 month (opens in a new tab).

The choice of examples matters, not only their number. Sorscher et al. (opens in a new tab) show that data pruning with a high-quality pruning metric can beat power law scaling of error with dataset size. This query counts how many images carry each label with a confidence score above 0.75, from the rarest label to the most common one. It counts each image generation once, even if a label appears twice in its list.

SQL
SELECT
  STRING(label.description) AS label_name,
  COUNT(DISTINCT CONCAT(t.bucket, '/', t.name, '#', CAST(t.generation AS STRING))) AS image_count
FROM
  `PROJECT_ID.DATASET_ID.object_contexts_catalog_view` AS t,
  UNNEST(t.contexts) AS context,
  UNNEST(JSON_QUERY_ARRAY(context.extendedData.labelAnnotationGroup.labelAnnotations)) AS label
WHERE
  context.key = 'google:annotation:label-detector-v1'
  AND FLOAT64(label.score) > 0.75
GROUP BY
  label_name
ORDER BY
  image_count ASC
LIMIT 50;
Rare Label Query Output

The output lists Road, Advertising, Night, and Vehicle with one image each, followed by Car with three images. Labels with a score of 0.75 or lower, such as Parking at 0.72, are left out of the count. On a real bucket, the labels at the top of this list are the rare classes worth adding to a training set first.

Once you pick a cohort, Roboflow can bring it in from the bucket. Datasources (opens in a new tab) mirror Google Cloud Storage images into the Roboflow Asset Library (opens in a new tab). They also import a .json sidecar file with the same base name as image metadata (opens in a new tab). Auto Annotate labels written as sidecars then become fields you can search and slice. Higher-quality training data means fewer annotation hours and a more accurate model.

With these patterns in place, the last step is to turn the best labels into a model you own.

Bring the Labels Into Roboflow to Train and Deploy Your Own Model

Auto Annotate is a strong first pass, but production computer vision systems usually need more. They need custom classes, their own accuracy targets, and a model that runs on edge devices next to the cameras. Roboflow covers that path, from human-in-the-loop review to deployment. The steps below follow a parking operator who wants a real-time object detection model for cars and people at its entrance cameras.

From BigQuery to Roboflow

Step 1: Check the Object Names in BigQuery

Google's object vocabulary is fixed, so start by checking which class names the object detection model actually returns for your images. This query counts detections per object name and shows the average confidence score, which helps you set the class list and a starting confidence threshold.

SQL
SELECT
  STRING(object.name) AS object_name,
  COUNT(*) AS detections,
  ROUND(AVG(FLOAT64(object.score)), 2) AS avg_score
FROM
  `PROJECT_ID.DATASET_ID.object_contexts_catalog_view` AS t,
  UNNEST(t.contexts) AS context,
  UNNEST(JSON_QUERY_ARRAY(context.extendedData.objectAnnotationGroup.objectAnnotations)) AS object
WHERE
  context.key = 'google:annotation:object-detector-v1'
GROUP BY
  object_name
ORDER BY
  detections DESC
LIMIT 50;
Object Count Query Output

The synthetic catalog holds three car detections and two person detections. The person entries average 0.88, while the car entries average 0.73 because one car entry has a score of only 0.45. A gap like this is only a first hint for the confidence threshold. To set it, compare the Auto Annotate boxes with a small hand-reviewed sample and check precision (opens in a new tab) and recall (opens in a new tab) at a few cutoffs.

Boxes below your confidence threshold stay out of the export, so some real objects become false negatives in the dataset. The review step in Roboflow is where those gaps get fixed.

Step 2: Export the Images and Boxes as a COCO Dataset

The script below queries BigQuery for the chosen classes, samples up to 2,000 images, and downloads them from Cloud Storage. It converts each normalized box into pixel coordinates using the image size. It then writes COCO JSON files in the folder layout (opens in a new tab) that Roboflow's dataset upload expects. The sample is drawn by image rather than by box, so every kept box of an image travels with it. The catalog view updates every 24 hours (opens in a new tab), so an image can be deleted or replaced after the last refresh. The script therefore downloads the exact generation that the catalog lists. It skips and counts any image whose generation no longer exists.

Install the BigQuery (opens in a new tab) and Cloud Storage (opens in a new tab) client libraries, Pillow, and the Roboflow Python SDK (opens in a new tab). Then sign in with Application Default Credentials (opens in a new tab). The account needs the same BigQuery roles and Storage Object Viewer role as the visualization script.

Shell
pip install google-cloud-bigquery google-cloud-storage pillow roboflow
gcloud auth application-default login
Python
import json
import math
from pathlib import Path

from google.api_core.exceptions import NotFound
from google.cloud import bigquery, storage
from PIL import Image

PROJECT_ID = "your-gcp-project"
DATASET_ID = "your_storage_insights_dataset"
CLASSES = ["car", "person"]
MIN_SCORE = 0.5
MAX_IMAGES = 2000
VALID_PREFIXES = ["cams/gate1/2026-11-19/"]  # whole recordings for the valid split
TEST_PREFIXES = ["cams/gate2/2026-11-20/"]  # whole recordings kept out for the test split
OUT_DIR = Path("dataset")

SQL = f"""
WITH boxes AS (
  SELECT
    t.bucket,
    t.name,
    t.generation,
    LOWER(STRING(object.name)) AS class_name,
    (
      SELECT AS STRUCT
        MIN(COALESCE(FLOAT64(v.x), 0.0)) AS x_min,
        MIN(COALESCE(FLOAT64(v.y), 0.0)) AS y_min,
        MAX(COALESCE(FLOAT64(v.x), 0.0)) AS x_max,
        MAX(COALESCE(FLOAT64(v.y), 0.0)) AS y_max
      FROM UNNEST(JSON_QUERY_ARRAY(object.boundingPoly.normalizedVertices)) AS v
    ).*
  FROM
    `{PROJECT_ID}.{DATASET_ID}.object_contexts_catalog_view` AS t,
    UNNEST(t.contexts) AS context,
    UNNEST(JSON_QUERY_ARRAY(
      context.extendedData.objectAnnotationGroup.objectAnnotations)) AS object
  WHERE
    context.key = 'google:annotation:object-detector-v1'
    AND LOWER(STRING(object.name)) IN UNNEST(@classes)
    AND FLOAT64(object.score) >= @min_score
    AND NOT EXISTS(
      SELECT 1
      FROM UNNEST(@test_prefixes) AS prefix
      WHERE STARTS_WITH(t.name, prefix)
    )
),
sampled AS (
  SELECT bucket, name, generation
  FROM boxes
  GROUP BY bucket, name, generation
  ORDER BY FARM_FINGERPRINT(CONCAT(bucket, '/', name))
  LIMIT @max_images
)
SELECT boxes.*
FROM boxes
JOIN sampled USING (bucket, name, generation)
"""


def fetch_boxes():
    client = bigquery.Client(project=PROJECT_ID)
    job_config = bigquery.QueryJobConfig(
        query_parameters=[
            bigquery.ArrayQueryParameter("classes", "STRING", CLASSES),
            bigquery.ScalarQueryParameter("min_score", "FLOAT64", MIN_SCORE),
            bigquery.ScalarQueryParameter("max_images", "INT64", MAX_IMAGES),
            bigquery.ArrayQueryParameter("test_prefixes", "STRING", TEST_PREFIXES),
        ]
    )
    return client.query(SQL, job_config=job_config).result()


def is_valid_box(row):
    box = (row.x_min, row.y_min, row.x_max, row.y_max)
    if any(v is None or not math.isfinite(v) for v in box):
        return False
    return 0 <= row.x_min < row.x_max <= 1 and 0 <= row.y_min < row.y_max <= 1


def build_coco(rows):
    if OUT_DIR.exists():
        raise SystemExit(f"{OUT_DIR} already exists. Export into a new folder each time.")
    gcs = storage.Client(project=PROJECT_ID)
    categories = [{"id": i, "name": name} for i, name in enumerate(CLASSES, start=1)]
    category_ids = {c["name"]: c["id"] for c in categories}
    splits = {"train": {"images": [], "annotations": []},
              "valid": {"images": [], "annotations": []}}
    images, missing, rejected = {}, set(), 0

    for row in rows:
        key = (row.bucket, row.name, row.generation)
        if key in missing:
            continue
        if not is_valid_box(row):
            rejected += 1
            continue
        split_name = "valid" if row.name.startswith(tuple(VALID_PREFIXES)) else "train"
        split = splits[split_name]
        if key not in images:
            blob = gcs.bucket(row.bucket).blob(row.name, generation=row.generation)
            try:
                data = blob.download_as_bytes()
            except NotFound:
                missing.add(key)
                continue
            image_id = len(images) + 1
            file_name = f"{image_id:06d}_{Path(row.name).name}"
            local_path = OUT_DIR / split_name / file_name
            local_path.parent.mkdir(parents=True, exist_ok=True)
            local_path.write_bytes(data)
            with Image.open(local_path) as img:
                width, height = img.size
            images[key] = {"id": image_id, "file_name": file_name,
                           "width": width, "height": height}
            split["images"].append(images[key])
        image = images[key]
        x = row.x_min * image["width"]
        y = row.y_min * image["height"]
        w = (row.x_max - row.x_min) * image["width"]
        h = (row.y_max - row.y_min) * image["height"]
        split["annotations"].append({
            "id": len(split["annotations"]) + 1,
            "image_id": image["id"],
            "category_id": category_ids[row.class_name],
            "bbox": [round(x, 2), round(y, 2), round(w, 2), round(h, 2)],
            "area": round(w * h, 2),
            "iscrowd": 0,
        })

    for split_name, split in splits.items():
        if not split["images"]:
            continue
        coco = {
            "info": {"description": "Google Cloud Auto Annotate export"},
            "licenses": [],
            "images": split["images"],
            "annotations": split["annotations"],
            "categories": categories,
        }
        (OUT_DIR / split_name / "_annotations.coco.json").write_text(json.dumps(coco))
        print(f"{split_name}: {len(split['images'])} images and {len(split['annotations'])} boxes")
    if missing:
        print(f"Skipped {len(missing)} image(s) replaced or deleted since the last catalog update")
    if rejected:
        print(f"Rejected {rejected} box(es) with missing or out-of-range coordinates")


if __name__ == "__main__":
    build_coco(fetch_boxes())

The script also sets the train and valid splits by recording, using whole folders such as one camera on one day. Images under VALID_PREFIXES go to the valid folder, and all other exported images go to train. Recordings under TEST_PREFIXES stay out of the export entirely. Frames from the same recording are therefore assigned to only one dataset split. This helps prevent data leakage caused by highly correlated images appearing across dataset splits and ensures a more reliable evaluation of the model's generalization performance.

Three checks keep the export clean. Every image gets a file name that starts with its image ID, so objects such as a/b.jpg and a__b.jpg can never overwrite each other. Boxes with a missing coordinate, an edge outside the 0 to 1 range, or zero width or height are rejected and counted. The script also stops if the output folder already exists, so images from an earlier run cannot slip into the upload.

Each COCO file keeps the standard info and licenses keys, because the Roboflow Python SDK reads both when it parses a COCO folder (opens in a new tab).

Export Query Output

To test the export, the query inside the script was run with the script's settings. The five images in the synthetic catalog share one folder, so the held-out test prefix was set to cams/gate2_ to match their names. The output has three boxes from two images, and each row also carries the image's generation. The gate2_0003.jpg entry holds a person with a score of 0.89, which is above the 0.5 cutoff. The export still leaves it out, because the image sits under the held-out prefix. The car entry in street_0004.jpg is missing for a different reason, since its score of 0.45 falls below the cutoff.

Export Query Output in JSON View

The JSON view makes the box values easier to read. Each box has an x_min, y_min, x_max, and y_max value between 0 and 1, because the query reads the normalizedVertices (opens in a new tab) of each box. For example, the first car covers the image from 0.12 to 0.58 across its width and from 0.4 to 0.81 down its height. The script then converts these normalized values into pixel-space bounding boxes for the COCO files.

The test set comes from the held-out recordings rather than from the export. Those frames are picked before any filtering by Google's predictions, so they also include empty scenes, night frames, and objects that Google's model missed. Copy them into a test folder without labels.

Shell
mkdir -p dataset/test
gcloud storage cp "gs://my-image-bucket/cams/gate2/2026-11-20/*.jpg" dataset/test/

The gcloud storage cp (opens in a new tab) command accepts a wildcard in the source path, so one line copies a whole recording. Choose held-out recordings that add up to a few hundred frames and cover different cameras, times of day, and weather.

Step 3: Upload the Boxes as Predictions to Review

Upload the folder with Workspace.upload_dataset() (opens in a new tab). Setting is_prediction=True uploads the boxes as model predictions awaiting review instead of ground truth, which is the right status for model-generated labels.

Python
import roboflow

rf = roboflow.Roboflow(api_key="YOUR_ROBOFLOW_API_KEY")
workspace = rf.workspace()

workspace.upload_dataset(
    "./dataset/",
    "parking-detector",
    num_workers=10,
    project_license="Private",
    project_type="object-detection",
    batch_name="auto-annotate-import",
    num_retries=2,
    is_prediction=True,
)

When a prediction lands on an image in an upload batch, Roboflow moves that image into a review job (opens in a new tab). Reviewers then approve or fix the labels before they become ground truth. The test frames carry no annotations, so they enter a batch for labeling (opens in a new tab) instead.

Step 4: Review the Labels and Add Your Own Classes

Open the review job in Roboflow Annotate (opens in a new tab) and fix false negatives, loose bounding boxes, and misclassified objects. Smartphone images with EXIF orientation data deserve a quick check, since a rotated image can shift every bounding box on it.

Classes outside Google's vocabulary, such as a barrier arm or a ticket machine, can be added with Auto Label (opens in a new tab). Auto Label uses foundation models such as SAM 3 or Gemini 4 Argon to label the objects you describe in plain text.

The exported images already carry reviewed boxes, so choose Merge With Existing Annotations (opens in a new tab) when Auto Label asks how to handle them. That option keeps the existing annotations and adds only the predictions that do not overlap an existing annotation of the same class (opens in a new tab). In the Python SDK, set existing_annotations to merge, because the SDK and CLI use replace when you don't choose one (opens in a new tab).

Label the test frames by hand in the same editor. Cover every class in the project, including any you added with Auto Label. Use Mark Null (opens in a new tab) only on frames that contain none of those classes, since Roboflow uses it for background, or null, images. These empty frames show whether the trained model reports objects that are not there.

Step 5: Version the Dataset and Train RF-DETR

Create a dataset version (opens in a new tab) by clicking Versions in the project sidebar and then New Version. The train, valid, and test folders already set each image's split on upload (opens in a new tab), so keep the Train/Test Split as it is. A rebalance would undo the split by recording, because its default Random shuffle randomly reassigns every image across the splits (opens in a new tab). Size the valid and test recordings so the splits land near the 70/20/10 split (opens in a new tab) that Roboflow recommends as a starting point. The same page holds the preprocessing and augmentation settings.

Then train a model (opens in a new tab) and pick RF-DETR, which offers the best accuracy for object detection (opens in a new tab) on Roboflow. RF-DETR is released under the Apache 2.0 license (opens in a new tab), apart from the XL and 2XL detection sizes, which use the Roboflow Platform Model License. After training, Model Evaluation (opens in a new tab) shows how the model performs on the test and validation sets. The validation frames passed through the same class and score filter as the training frames, so they contain no empty scenes and none of the frames where Google's model missed every object. They are fine for monitoring training, but quote accuracy from the test set. The test frames were labeled by hand and never filtered by Google's predictions, so the test scores also count the cars and people that Google's model missed.

Step 6: Deploy the Model

Roboflow supports several deployment options (opens in a new tab). The Serverless Cloud API (opens in a new tab) answers single-image requests, and Batch Processing (opens in a new tab) handles stored images and videos. Roboflow Inference (opens in a new tab) runs the model on your own hardware and edge devices. After installing the SDK with pip install inference-sdk, this call sends one image to the trained model through the Serverless Cloud API.

Python
import os
from inference_sdk import InferenceHTTPClient, InferenceConfiguration

client = InferenceHTTPClient(
    api_url="https://serverless.roboflow.com",
    api_key=os.environ["ROBOFLOW_API_KEY"],
).configure(InferenceConfiguration(api_key_transport="header"))

result = client.infer("entrance-frame.jpg", model_id="parking-detector/1")
print(result)

To run the same model on a local Inference server (opens in a new tab), point api_url at http://localhost:9001. From there the feedback loop can keep running. New frames land in the bucket, Auto Annotate labels them, and you can send the hardest examples back into Roboflow to train the next model version.

Conclusion

Google Cloud Auto Annotate turns an unlabeled image bucket into a searchable table of bounding boxes, face detections, safety ratings, and labels at a tiered price per image for each model. Gemini adds visual reasoning where a fixed class vocabulary falls short, and Roboflow turns the best labels into a model you own and can deploy anywhere.

Sign up for a free Roboflow account and turn your Auto Annotate labels into your first custom model today.

More AboutData Labeling

Get started

Build on the Platform

For developers, engineers, and technical founders who want to get hands on. Try the free tier; the docs are open.

Bring it into your operation

For heads of AI, operations leaders, and enterprise teams. Bring a known problem, or work with us to find the first one worth taking on.