For the complete documentation index, see llms.txt. This page is also available as Markdown.

Manage Annotation Workflow

List image batches, list annotation jobs, and assign images to labelers from the Python SDK.

Project exposes the annotation-pipeline primitives: list the upload batches, inspect annotation jobs, and create new jobs that assign images to a labeler and a reviewer.

List image batches

Every uploaded set of images belongs to a batch. List a project's batches:

import roboflow

rf = roboflow.Roboflow(api_key="YOUR_API_KEY")
project = rf.workspace().project("my-detector")

batches = project.get_batches()
for b in batches.get("batches", []):
    print(b["id"], b["name"], b["images"], "images")

Get a single batch's details:

batch = project.get_batch("<batch-id>")
print(batch)

List annotation jobs

jobs = project.get_annotation_jobs()
for job in jobs.get("jobs", []):
    print(job["id"], job["name"], job["status"], job["annotated"], "/", job["numImages"])

Get a single job:

Create an annotation job

Assign images from a batch to a labeler (and a reviewer, if your workspace has Role-Based Access Control enabled):

Parameters

  • name (str) - display name for the job.

  • batch_id (str) - id of the upload batch the images come from.

  • num_images (int) - how many images from the batch to include in this job.

  • labeler_email (str) - email of a workspace member who will draw the labels.

  • reviewer_email (str) - email of a workspace member who will review. If RBAC isn't enabled, set this equal to the labeler.

Save an annotation programmatically

When you have annotations from another source (an existing CVAT export, a model prediction you want to commit), use Project.save_annotation to attach them directly to an image.

REST and CLI equivalents

Last updated

Was this helpful?