Telekinesis Lens
Telekinesis Lens is a local React/TypeScript annotation studio backed by a Python FastAPI service. It opens YOLO/COCO datasets, image folders, and videos without uploading data.
Installation
The Python distribution name is telekinesis-lens. It requires Python 3.10 or newer.
pip install telekinesis-lens
telekinesis-lens
The command starts the local server and opens the GUI in your browser. PyPI wheels and source distributions include the compiled interface: no Node.js, npm, or manual build is needed after installation.
For editable development installs:
git clone git@gitlab.com:telekinesis/lens.git
cd lens
npm ci --prefix web
npm run build --prefix web
python -m pip install -e ".[dev]"
The standard install includes FastAPI, Uvicorn, NumPy, OpenCV, Pillow, PyYAML, Loguru, Telekinesis DataEngine, and Telekinesis datatypes. On Python 3.11 or newer it also includes Telekinesis trackers with runtime dependencies. Node.js is needed only to develop or rebuild the web UI.
Run
telekinesis-lens
telekinesis-lens --dataset /path/to/dataset
telekinesis-lens --video /path/to/video.mp4
python -m telekinesis.lens is equivalent. Use --no-browser to start only the local server or --port to choose a port. Lens uses the web Studio exclusively; there is no separate Python desktop GUI.
From Python:
import telekinesis.lens as lens
lens.launch("/path/to/dataset")
This runs the local service until interrupted and opens the UI in your browser.
If Lens is already running on the chosen port, it opens the dataset in that session.
Use lens.launch(port=5152, open_browser=False) to choose another port or skip opening the browser.
The browser handles the interface; the local service reads media and saves annotations in place. On Windows, browsing uses the modern native Shell picker through generated Windows SDK bindings, installed automatically by pip. Files are not uploaded or copied just to open a workspace.
Workflows
- Browse and filter samples by status, split, and annotated class.
- Draw/edit boxes, polygons, and masks in Studio with explicit save and revision checks.
- Select a mask and use Mask eraser (
E) to remove areas with an adjustable radius; undo/redo works for each stroke. - Run schema-backed Retina/Cornea operations on one image or a configurable preview batch, review predictions, then approve the same configuration for the full dataset.
- Propagate masks a chosen number of frames ahead with CUTIE, SAM3, or another registered compatible tracker. The count is limited to the remaining frames.
- Export YOLO detection/segmentation or COCO ZIPs. By default only classes containing annotations in the export scope are included; empty classes can be explicitly requested.
AI results remain reviewable predictions until saved. Optional integrations require their Python packages and model weights; missing models report an error instead of generating simulated results.
Development
Run the API and Vite development server in separate terminals:
python -m telekinesis.lens --no-browser
cd web
npm run dev
Vite proxies /api to port 5151. Production assets are built into src/telekinesis/lens/web/static/.
python -m pytest
cd web
npm run build
npx playwright install chromium
npm test
The main implementation lives in web/src/ (React), src/telekinesis/lens/web/ (HTTP API/workspaces), and src/telekinesis/lens/core/ (shared vision, tracking, geometry, and export bridges).
Packaging and PyPI releases
Maintainers need Node.js 22 and Python 3.10+ to build a release:
npm ci --prefix web
npm run build --prefix web
python -m pip install build twine
python -m build
python -m twine check --strict dist/*
python scripts/check_release.py
Start with an empty dist/ directory. The build refuses to produce a wheel or
source distribution without compiled UI assets. python -m build also rebuilds
the wheel from the source distribution, checking that it is self-contained.
Install the resulting wheel in a fresh virtual environment and run
python scripts/smoke_install.py to check the installed command and GUI assets.
The GitLab pipeline follows the Telekinesis develop/main release workflow.
Develop pushes publish a .devN package to GitLab. Main builds compile the UI,
validate that the wheel and source distribution contain the same compiled GUI,
publish to TestPyPI, and verify a clean install. Publishing the same build to
PyPI and GitLab is manual; successful approvals create the tag and bump the next
patch version on develop. See DEVELOPMENT.md.
One-time GitLab setup:
- Add your PyPI API token as a masked, protected CI/CD variable named
TWINE_PASSWORD. The pipeline uses__token__as the username. - Protect the
v*tag pattern and restrict release-tag creation to maintainers. - Ensure GitLab Docker runners are available for the pipeline.
To release, update version in pyproject.toml and __version__ in
src/telekinesis/lens/__init__.py, commit the changes, and push a matching tag:
git tag v0.1.0
git push origin v0.1.0
The pipeline rejects tags that do not match the package version. Use a new version for each release; PyPI does not allow replacing an uploaded distribution.
References: GitLab CI configuration and PyPI upload credentials.
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 telekinesis_lens-0.1.0.tar.gz.
File metadata
- Download URL: telekinesis_lens-0.1.0.tar.gz
- Upload date:
- Size: 140.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aaf70b02d42e213d6f4a3d2ebf901a2d569bfa80f95fc9abd468c31025e97a23
|
|
| MD5 |
1d3654b26a8078e2753d88d6ef18a4ba
|
|
| BLAKE2b-256 |
85fc321c1621adc83312ed0d408a33b7c827e9dd0d54d3769af0873792afc2a5
|
File details
Details for the file telekinesis_lens-0.1.0-py3-none-any.whl.
File metadata
- Download URL: telekinesis_lens-0.1.0-py3-none-any.whl
- Upload date:
- Size: 133.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a286c17d124bee0aee85ce80b10ab7ea4542a4b5933e124915833703824458f
|
|
| MD5 |
421ca8e02d845a814f6b32639e89ae64
|
|
| BLAKE2b-256 |
3d6ca9671bfaf008f7c29bc91b4def82a1205c9882a830ea142ca8c8f397be99
|