View source
Download
.ipynb
Train a YOLO model for object detection with oriented bounding boxes¶
This notebook trains a YOLO model for object detection with oriented bounding boxes on the HRSC2016-MS dataset.
The original dataset can be found here.

We re-use the Tables created in create-custom-obb-table.ipynb.
Project setup¶
[ ]:
PROJECT_NAME = "3LC Tutorials - OBBs"
RUN_NAME = "train-yolon-obb-hrsc2016-ms"
RUN_DESCRIPTION = "Train a yolo11n-obb model on HRSC-2016MS"
DATASET_NAME = "HRSC2016-MS"
MODEL_NAME = "yolo11n-obb.pt"
EPOCHS = 10
NUM_WORKERS = 0
Imports¶
[ ]:
%pip install -q 3lc-ultralytics
[ ]:
import tlc
from tlc_ultralytics import YOLO, Settings
Load tables¶
[ ]:
train_table = tlc.Table.from_names("train", DATASET_NAME, PROJECT_NAME)
val_table = tlc.Table.from_names("val", DATASET_NAME, PROJECT_NAME)
Train a model¶
[ ]:
model = YOLO(MODEL_NAME)
settings = Settings(
project_name=PROJECT_NAME,
run_name=RUN_NAME,
run_description=RUN_DESCRIPTION,
image_embeddings_dim=2,
)
model.train(
tables={"train": train_table, "val": val_table},
settings=settings,
label_column_name="obb",
epochs=EPOCHS,
workers=NUM_WORKERS,
)