Skip to content

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-dataengine

For FiftyOne visualization support:

bash
pip install "telekinesis-dataengine[viz]"

Components

ComponentDescription
DetectionLoggerWrites frames and annotations inline — in the same process as detection.
DetectionLoggerPublisher / DetectionLoggerSubscriberDecoupled pub/sub writer — detection and disk I/O run in separate processes over Zenoh.
UtilitiesConvert between YOLO and RF-DETR formats, merge multiple datasets, and visualize with FiftyOne.

Supported Formats

FormatLayoutUse With
"yolo"images/<split>/, labels/<split>/, data.yamlUltralytics YOLOv8 / v9 / v11
"rfdetr"<split>/, <split>/_annotations.coco.jsonRF-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()
DetectionLogger API Reference
Full constructor options, log() parameters, modes, and split configuration.
Read more →