Skip to main content

AI-powered image annotation and segmentation tool for Google Colab (UI + library API for Grounding DINO + SAM 2)

Project description

DriverFlow

DriverFlow is an AI-assisted image annotation and segmentation workspace for Google Colab. It combines Grounding DINO detection, SAM 2 segmentation, click refinement, versioned previews, and YOLO/raw-media export in a browser UI.

Quick Start

!pip install driverflow

from driverflow import DriverFlow

DriverFlow().start()              # Colab proxy URL
# DriverFlow().start(tunnel=True) # public Cloudflare quick-tunnel URL

DriverFlow starts the current workspace UI. The older single-image, detect-only UI is still available as DriverFlowOld for backwards compatibility.

from driverflow import DriverFlowOld

DriverFlowOld().start()

Workspace UI

The web UI lets you build a small in-memory workspace of images and videos:

  • Import images, videos, or zip files by dragging onto the page, clicking the import button, or clicking the empty preview area.
  • Import from the mocked DriverFlow Cloud tree. Cloud is not implemented yet; selected image files become 500x500 white PNGs and selected video files become plain 2-second MP4s.
  • Use the left sidebar to browse raw, processed, and exported items with image/video filters.
  • Click or drag one item into the preview area to make it the working item.
  • Use the right tools panel to run image tools. Videos can be organized, previewed, and raw-exported, but no video tools are currently available.
  • Scroll to the Data Workspace to view every version of the working item: raw media, detected boxes, segmented masks, and refined masks with clicks.
  • Click or drag any Data Workspace card into the preview area to make that version authoritative for the next tool run or export.

Replacing a dirty working item warns before switching away from unexported derived work.

Models And Tools

Models are loaded on demand from the right-side model panel:

  • Detect requires Grounding DINO and a raw image version.
  • Segment requires SAM 2 and a detected image version with boxes.
  • Refine requires SAM 2 and a segmented or refined image version with masks.

Trying to interact with a tool whose model is not loaded expands/highlights the required model. Heavy model dependencies and weights are installed lazily when models are loaded.

Export

The export button exports exactly the version currently shown in the preview:

  • Raw image/video versions export the original media bytes.
  • Detected image versions export YOLO bounding-box annotations.
  • Segmented or refined image versions export YOLO segmentation annotations.

YOLO exports are ZIP files containing classes.txt and annotations.txt.

Library API

You can also use the pipeline directly from Python:

from driverflow import Pipeline, viz

pipe = Pipeline().setup(dino=True, sam=True)
det = pipe.detect("image.jpg", prompt="car . person . traffic light")
seg = pipe.segment(det)
viz.show_masks(seg)

Web API Shape

The workspace UI is backed by a local FastAPI server. The main endpoint groups are:

  • POST /api/import/upload
  • GET /api/import/cloud_tree
  • POST /api/import/cloud_select
  • GET /api/items
  • GET /api/preview/{item_id}
  • GET /api/preview/thumb/{item_id}
  • GET /api/models/status
  • POST /api/models/load_dino
  • POST /api/models/load_sam
  • GET /api/tools/registry
  • POST /api/tools/{name}
  • GET /api/export/{item_id}

The old /api/detect and /api/download_yolo endpoints belong to the legacy DriverFlowOld UI.

License

MIT - see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

driverflow-0.5.1.tar.gz (55.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

driverflow-0.5.1-py3-none-any.whl (73.9 kB view details)

Uploaded Python 3

File details

Details for the file driverflow-0.5.1.tar.gz.

File metadata

  • Download URL: driverflow-0.5.1.tar.gz
  • Upload date:
  • Size: 55.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for driverflow-0.5.1.tar.gz
Algorithm Hash digest
SHA256 06aea18bb8b7b41d0268501614661977c2994a5583c0e18062c659415e3024dc
MD5 2e1f2fa8494e9cd24e0258d0f0bf3c9b
BLAKE2b-256 d4d69417feac52b34f5a39e036e5678fb925dcf3397d8d9d63e8c3f0bbad481d

See more details on using hashes here.

Provenance

The following attestation bundles were made for driverflow-0.5.1.tar.gz:

Publisher: publish.yml on chirumer/DriverFlow

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file driverflow-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: driverflow-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 73.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for driverflow-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 145bb6cf9e733c1aa8a6905f1cc739e3b1b9bdaf84b56114906cbbb85c297d70
MD5 7be479120ae67be64381f8ff44c94fd0
BLAKE2b-256 81b2014adae4f74298c4e2d2a84c2426a19aa6ff8bf37292c8bbb05158d87d6e

See more details on using hashes here.

Provenance

The following attestation bundles were made for driverflow-0.5.1-py3-none-any.whl:

Publisher: publish.yml on chirumer/DriverFlow

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page