{ "cells": [ { "cell_type": "markdown", "id": "0", "metadata": {}, "source": [ "# Create Table from YOLO - Oriented Bounding Boxes (OBB)\n", "\n", "This notebook demonstrates how to create a 3LC Table from a YOLO-format dataset for **oriented bounding box detection** tasks.\n", "\n", "The resulting table will contain an \"image\" column with the image filenames, with corresponding oriented bounding box annotations in the \"obbs\" column.\n" ] }, { "cell_type": "markdown", "id": "1", "metadata": {}, "source": [ "## Project setup\n" ] }, { "cell_type": "code", "execution_count": null, "id": "2", "metadata": {}, "outputs": [], "source": [ "PROJECT_NAME = \"3LC Tutorials - YOLO OBB\"\n", "DATASET_NAME = \"YOLO-OBB-Dataset\"\n", "TABLE_NAME = \"initial-obb\"\n", "DATA_PATH = \"../../../data\"" ] }, { "cell_type": "markdown", "id": "3", "metadata": {}, "source": [ "## Install dependencies\n" ] }, { "cell_type": "code", "execution_count": null, "id": "4", "metadata": {}, "outputs": [], "source": [ "%pip install 3lc" ] }, { "cell_type": "markdown", "id": "5", "metadata": {}, "source": [ "## Imports\n" ] }, { "cell_type": "code", "execution_count": null, "id": "6", "metadata": {}, "outputs": [], "source": [ "import tlc" ] }, { "cell_type": "markdown", "id": "7", "metadata": {}, "source": [ "## Create OBB Table\n" ] }, { "cell_type": "code", "execution_count": null, "id": "8", "metadata": {}, "outputs": [], "source": [ "train_table = tlc.Table.from_yolo(\n", " dataset_yaml_file=\"dota-8.yaml\",\n", " split=\"train\",\n", " project_name=PROJECT_NAME,\n", " dataset_name=DATASET_NAME,\n", " table_name=TABLE_NAME,\n", " task=\"obb\",\n", ")" ] } ], "metadata": { "kernelspec": { "display_name": ".venv", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.10" } }, "nbformat": 4, "nbformat_minor": 5 }