Detection Logger
SUMMARY
The Detection Logger writes labeled image frames to training-ready YOLO or RF-DETR/COCO datasets in real time — directly from a running detection pipeline. No post-processing or manual annotation step required.
The Detection Logger is the data collection layer for object detection models. It captures image frames alongside their annotations as a detection Skill runs, and writes them to properly structured, split-ready datasets ready for model training.
Install
bash
pip install telekinesis-dataengineFor FiftyOne visualization support:
bash
pip install "telekinesis-dataengine[viz]"Components
| Component | Description |
|---|---|
DetectionLogger | Writes frames and annotations inline — in the same process as detection. |
DetectionLoggerPublisher / DetectionLoggerSubscriber | Decoupled pub/sub writer — detection and disk I/O run in separate processes over Zenoh. |
| Utilities | Convert between YOLO and RF-DETR formats, merge multiple datasets, and visualize with FiftyOne. |
Supported Formats
| Format | Layout | Use With |
|---|---|---|
"yolo" | images/<split>/, labels/<split>/, data.yaml | Ultralytics YOLOv8 / v9 / v11 |
"rfdetr" | <split>/, <split>/_annotations.coco.json | RF-DETR, any COCO-compatible trainer |
Quick Start
python
from telekinesis.dataengine import DetectionLogger
# ------------------------------------------------
# 1. Define categories
# ------------------------------------------------
categories = [
{"id": 1, "name": "box", "supercategory": "object"},
{"id": 2, "name": "carton", "supercategory": "object"},
]
# ------------------------------------------------
# 2. Create a YOLO logger
# ------------------------------------------------
logger = DetectionLogger.create("yolo", "results/my_dataset", categories)
# ------------------------------------------------
# 3. Log frames — splits assigned automatically (80/10/10)
# ------------------------------------------------
for image, annotations in detections:
logger.log(image, annotations)
logger.close()
