Skip to content

Releases: roboflow/roboflow-python

Workspace level new methods

03 Mar 11:33
257423d

Choose a tag to compare

At the workspace level you can now search and delete images.

Sample code using both:


"""Delete all orphan images matching a workspace-level search query.

Usage:
    python tests/manual/demo_search_delete.py
"""

from roboflow import Roboflow

QUERY = "project:false"
PAGE_SIZE = 100
DELETE_BATCH_SIZE = 1000
DRY_RUN = False  # set to False to actually delete

WORKSPACE_SLUG = "workspace"


def main():
    rf = Roboflow()
    workspace = rf.workspace(WORKSPACE_SLUG)

    print(f"Workspace: {workspace.url}")
    print(f"Query: {QUERY}")
    print(f"Dry run: {DRY_RUN}")
    print()

    # Collect all matching image IDs.
    # When deleting (not dry run), skip continuation tokens because deleted
    # images shift the result set — always re-search from page 1.
    all_ids = []
    token = None
    while True:
        page = workspace.search(
            QUERY,
            page_size=PAGE_SIZE,
            fields=["filename"],
            continuation_token=token,
        )
        results = page.get("results", [])
        if not results:
            break
        total = page.get("total", "?")
        all_ids.extend(img["id"] for img in results)
        print(f"Found {len(all_ids)}/{total} images so far...")
        token = page.get("continuationToken")
        if not token:
            break

    print(f"\nTotal images matching '{QUERY}': {len(all_ids)}")

    if not all_ids:
        print("Nothing to delete.")
        return

    if DRY_RUN:
        print("\n[DRY RUN] Would delete the above images. Set DRY_RUN=False to proceed.")
        return

    for i in range(0, len(all_ids), DELETE_BATCH_SIZE):
        batch = all_ids[i : i + DELETE_BATCH_SIZE]
        print(f"Deleting batch {i // DELETE_BATCH_SIZE + 1} ({len(batch)} images)...")
        result = workspace.delete_images(batch)
        print(f"  deleted={result.get('deletedSources')}, skipped={result.get('skippedSources')}")

    print(f"\nDone. Deleted {len(all_ids)} images.")


if __name__ == "__main__":
    main()

1.2.15 - Upload images with metadata

25 Feb 17:10
1eb8238

Choose a tag to compare

We now make it available to the python sdk to upload metadata when starting upload

Export search results functionality

18 Feb 14:21
7fee9f4

Choose a tag to compare

We provide a new method to export images and annotations based on search queries.
It replicates the Asset Library Download functionality on the CLI.

RFDETR large and seg models upload

23 Jan 23:51
4e4d79f

Choose a tag to compare

Includes model upload for new rf-detr models.
pi_heif discontinued Python3.9 support, so this is handled in the release as well.

Add yolo26 upload

15 Jan 10:03
0596010

Choose a tag to compare

Users can now upload yolo26 models from ultralytics 8.4.1 or higher

v1.2.11

13 Oct 14:57
3503694

Choose a tag to compare

What's Changed

Full Changelog: v1.2.10...v1.2.11

v1.2.10

03 Oct 10:06
7034b60

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.2.9...v1.2.10

v1.2.9

10 Sep 07:00
998d94b

Choose a tag to compare

What's Changed

Full Changelog: v1.2.8...v1.2.9

v1.2.8

09 Sep 21:16
3b92a62

Choose a tag to compare

What's Changed

  • Add are_predictions flag to dataset upload by @sberan in #412

Full Changelog: v1.2.7...v1.2.8

v1.2.7

27 Aug 12:41
c3b9e65

Choose a tag to compare

What's Changed

  • configuring devcontainer to call localhost by @digaobarbosa in #409
  • Create Project object local instead of calling API after create project by @iurisilvio in #411

Full Changelog: v1.2.6...v1.2.7