Metadata-Version: 2.4
Name: telekinesis-dataengine
Version: 0.0.2
Summary: Data-collection logging (MCAP over Zenoh) and detection-dataset tooling (YOLO / RF-DETR) for the Telekinesis SDK.
Author-email: Telekinesis <support@telekinesis.ai>
License-Expression: LicenseRef-Proprietary
Project-URL: Homepage, https://telekinesis.ai
Project-URL: Documentation, https://docs.telekinesis.ai
Project-URL: Telekinesis Examples Repository, https://github.com/telekinesis-ai/telekinesis-examples
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: babyros>=0.1.6
Requires-Dist: mcap>=1.0.0
Requires-Dist: loguru>=0.5.0
Requires-Dist: numpy>=1.26.0
Requires-Dist: pillow>=9.0.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: telekinesis-datatypes>=0.2.3
Provides-Extra: viz
Requires-Dist: fiftyone==1.17.0; extra == "viz"
Provides-Extra: dev
Requires-Dist: ruff==0.15.8; extra == "dev"
Requires-Dist: pylint==4.0.5; extra == "dev"
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: pytest-cov>=5.0.0; extra == "dev"
Dynamic: license-file

<div align="center">
  <p>
    <a align="center" href="" target="_blank">
      <img
        width="100%"
        src="https://telekinesis-public-assets.s3.us-east-1.amazonaws.com/Telekinesis+Banner.png"
      >
    </a>
  </p>

  <br>

  [Telekinesis Examples](https://github.com/telekinesis-ai/telekinesis-examples)
  <br>

[![PyPI version](https://img.shields.io/pypi/v/telekinesis-dataengine)](https://pypi.org/project/telekinesis-dataengine/)
[![License](https://img.shields.io/pypi/l/telekinesis-dataengine)](https://pypi.org/project/telekinesis-dataengine/)
[![Python versions](https://img.shields.io/pypi/pyversions/telekinesis-dataengine)](https://pypi.org/project/telekinesis-dataengine/)

</div>

<p align="center">
  <a href="https://github.com/telekinesis-ai">GitHub</a>
  &nbsp;•&nbsp;
  <a href="https://www.linkedin.com/company/telekinesis-ai/">LinkedIn</a>
  &nbsp;•&nbsp;
  <a href="https://x.com/telekinesis_ai">X</a>
  &nbsp;•&nbsp;
  <a href="https://discord.gg/7NnQ3bQHqm">Discord</a>
</p>


# Telekinesis Data Engine

Telekinesis Data Engine turns real-world, online-collected robot and perception data into standard, trainable datasets within the Telekinesis ecosystem.

## Features

It includes:
- MCAP logging: capture every publisher on the Zenoh network into a single self-describing `.mcap` file, and read it back into live objects
- Detection-dataset logging: write labelled frames straight to a trainable **YOLO** (Ultralytics) or **RF-DETR** (COCO) dataset, with automatic train/val/test routing
- Decoupled pub/sub writers so disk I/O never stalls the capture loop
- Lossless conversion and merging between the YOLO and COCO / RF-DETR layouts
- FiftyOne-based visualization of detection datasets

## Requirements
Current support for Python versions - `3.10`, `3.11`, `3.12`.


**Note**
- Telekinesis Data Engine is currently in its early development phase (pre-1.0).
- There will be continuous **version updates** which introduce new features and optimizations. To have the latest features, please always install or upgrade to the **latest version of the package.**


## Installation

```bash
pip install telekinesis-dataengine
```

## Example

Run a sample python code to quickly test your installation.

1. Create a `Python` file named `dataengine_example.py` in a directory of your choice, and copy paste the below:

    ```python
    import numpy as np
    from telekinesis.dataengine import DetectionLogger

    # Create a logger that writes an Ultralytics YOLO dataset.
    # categories=None builds the class table dynamically from what you log.
    logger = DetectionLogger.create("yolo", "results/demo_dataset", mode="overwrite")

    # A labelled frame: a raw image (HxWxC) + COCO-style boxes [x, y, w, h].
    image = np.zeros((480, 640, 3), dtype=np.uint8)
    annotations = [{"category_id": 0, "bbox": [100, 120, 80, 60]}]

    logger.log(image, annotations)   # auto-routed 80/10/10 across train/val/test
    logger.close()                   # writes images/, labels/, and data.yaml

    print("Dataset written to results/demo_dataset")
    ```

2. On a terminal, navigate to the directory where `dataengine_example.py` was created, and run:

    ```bash
    python dataengine_example.py
    ```

    Expected output:
    ```bash
    Dataset written to results/demo_dataset
    ```

    Swap `"yolo"` → `"rfdetr"` to emit a COCO dataset instead — the call sites stay the same.

You are now set up with Telekinesis Data Engine.

## Resources

- Examples
  Runnable usage examples for the Telekinesis SDK: [Telekinesis Examples](https://github.com/telekinesis-ai/telekinesis-examples)

- Documentation
  Full SDK documentation and usage details: [Telekinesis Documentation](https://docs.telekinesis.ai)

- Development
  Building, testing, and contributing to this package: [DEVELOPMENT.md](DEVELOPMENT.md)

## Support

For issues and questions:
- Create an [issue](https://gitlab.com/telekinesis/data-engine/-/issues) in the GitLab repository.
- Contact the Telekinesis development team at support@telekinesis.ai or on [Discord](https://discord.com/invite/7NnQ3bQHqm).
