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:
Detectrequires Grounding DINO and a raw image version.Segmentrequires SAM 2 and a detected image version with boxes.Refinerequires 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/uploadGET /api/import/cloud_treePOST /api/import/cloud_selectGET /api/itemsGET /api/preview/{item_id}GET /api/preview/thumb/{item_id}GET /api/models/statusPOST /api/models/load_dinoPOST /api/models/load_samGET /api/tools/registryPOST /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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06aea18bb8b7b41d0268501614661977c2994a5583c0e18062c659415e3024dc
|
|
| MD5 |
2e1f2fa8494e9cd24e0258d0f0bf3c9b
|
|
| BLAKE2b-256 |
d4d69417feac52b34f5a39e036e5678fb925dcf3397d8d9d63e8c3f0bbad481d
|
Provenance
The following attestation bundles were made for driverflow-0.5.1.tar.gz:
Publisher:
publish.yml on chirumer/DriverFlow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
driverflow-0.5.1.tar.gz -
Subject digest:
06aea18bb8b7b41d0268501614661977c2994a5583c0e18062c659415e3024dc - Sigstore transparency entry: 1416991581
- Sigstore integration time:
-
Permalink:
chirumer/DriverFlow@2704d1b85df599ff27683f1916d97b04b3ac0753 -
Branch / Tag:
refs/tags/v0.5.1 - Owner: https://github.com/chirumer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2704d1b85df599ff27683f1916d97b04b3ac0753 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
145bb6cf9e733c1aa8a6905f1cc739e3b1b9bdaf84b56114906cbbb85c297d70
|
|
| MD5 |
7be479120ae67be64381f8ff44c94fd0
|
|
| BLAKE2b-256 |
81b2014adae4f74298c4e2d2a84c2426a19aa6ff8bf37292c8bbb05158d87d6e
|
Provenance
The following attestation bundles were made for driverflow-0.5.1-py3-none-any.whl:
Publisher:
publish.yml on chirumer/DriverFlow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
driverflow-0.5.1-py3-none-any.whl -
Subject digest:
145bb6cf9e733c1aa8a6905f1cc739e3b1b9bdaf84b56114906cbbb85c297d70 - Sigstore transparency entry: 1416991630
- Sigstore integration time:
-
Permalink:
chirumer/DriverFlow@2704d1b85df599ff27683f1916d97b04b3ac0753 -
Branch / Tag:
refs/tags/v0.5.1 - Owner: https://github.com/chirumer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2704d1b85df599ff27683f1916d97b04b3ac0753 -
Trigger Event:
push
-
Statement type: