Train LibreYOLO
Overview
Fine-tunes a LibreYOLO detector from your workspace registry on OvalBee training and validation datasets, and registers the result as a new version of that model. The node converts both datasets to YOLO format itself, so no conversion or upload node sits on either side of it.
LibreYOLO is an MIT-licensed library. This node offers two detectors built on the same YOLOv9 backbone and neck, and which one trains is decided by the model you pick, not by a setting on this node:
- YOLOv9 (
LibreYOLO9) predicts boxes with the standard head, so predictions are suppressed with NMS after the network. - LibreYOLO9E2E adds a one-to-one head that returns final detections directly, so no NMS runs after the network. Both heads are trained together; inference uses only the one-to-one one.
Detection is the only task. The run’s live report opens from the node, and the Best mAP badge shows the best validation mAP50-95 reached.
Pretrained models
The model catalog ships these COCO-pretrained detectors. Copy one into your workspace from the Model picker to use it. OvalBee hosts none of these weights: the catalog names each one’s .pt file on Hugging Face, which the node downloads into its cache on first use and checks against the SHA-256 the catalog pins. With safe weights on, a .pt file is refused before it is read, so a catalog model trains once its weights are converted.
All eight are MIT-licensed. The YOLOv9 weights are those of MultimediaTechLab/YOLO (release v1.0-alpha), converted to the LibreYOLO format by the LibreYOLO project without changing the learned parameters. The E2E models keep those weights for the backbone, neck and one-to-many head and add a one-to-one head trained on COCO 2017. The mAP figures are the COCO val2017 values on the LibreYOLO9E2E model cards; the YOLOv9 cards state none. Parameter counts are those stored in each checkpoint, so an E2E model counts both heads.
Prerequisites
Exported YOLO dataset structure
The node writes this tree into the task’s own working directory before training:
Both datasets are exported in a single pass so the two splits share one class index space. The tree is rebuilt from the datasets on every run and nothing downstream can read it.
How it works
Loads the starting weights of the picked version: its own model files, or the file its catalog entry names. Safetensors weights are built into the network LibreYOLO defines for the version’s architecture, and the head, NMS or end-to-end, is that architecture’s; a LibreYOLO .pt is read by LibreYOLO itself, which only happens with safe weights off.
FAQ
How does it estimate data usefulness?
The node sets save_period to a tenth of the epoch budget, and after training it runs inference over the training split with the weights saved nearest 10%, 25% and 50% of the run and with the final weights. For every labelled object it records the confidence of the best matching prediction of the right class, or zero when nothing matches, and scores each image by the average of one minus those confidences. An object counts as found once that confidence reaches 0.25, the default confidence threshold of the matching Predict node, and an image counts as learned once at least 80% of its objects are found.
Images learned in the first quarter of the run and never lost again are the ones the model needed least. Confident predictions that match no label are counted separately: they point at missing labels or genuine mistakes, and they do not decide whether an image was learned.
How is the Recommended keep set chosen?
Only images solved early and never forgotten can be dropped, easiest first, and every class keeps at least 80% of its instances. When nothing is safely droppable, the output stays empty rather than handing over a dataset the report advises against. To check the estimate, train again on the keep set from the same model this run started from and compare the two runs’ evaluation metrics.
What happens when I rerun the node?
Every run adds a new version to the model, or to Destination model when one is set, unless it continues a version that is not fully trained (below). Earlier versions stay in the registry and the source datasets aren’t changed. When Model names the model itself rather than a pinned version, it follows the newest version that is ready or not fully trained, so a rerun that trains into the same model fine-tunes the previous run’s result, or continues that run when it did not finish. Pick a specific version to start every run from the same weights.
What happens if training fails partway through?
The version is created before training starts and receives the best weights so far about every two minutes. At the end of the first epoch, and then at an epoch’s end at most every two minutes, the node also saves a checkpoint into the version: the network, the optimizer, the position in the learning-rate schedule, the EMA weights, the mixed-precision scaler, the best mAP so far and the batch size batch: -1 settled on, with the best weights and logs as of that epoch. An epoch that is no checkpoint copies nothing for it. Training never waits for a checkpoint’s upload, and no new checkpoint starts while one uploads, so a run that is killed loses the training since its last checkpoint that finished uploading: about one epoch or two minutes, whichever is longer, plus the time a checkpoint takes to upload. A run that stops after its first checkpoint leaves the version Incomplete: the model pickers offer it with its best weights so far, marked as not fully trained, and running the node with that version in Model (Latest picks it while it is the newest) continues the run from its last checkpoint into the same version, with the settings it started with. The run’s last epoch, which is the epoch early stopping ends it at when it does, is not a checkpoint, so a run interrupted after it repeats that epoch. On Kubernetes, a run whose machine was taken away is retried and continues from its last checkpoint by itself. A run that stops before its first checkpoint marks its version failed, and it isn’t offered in the model pickers. If uploading fails five times in a row, the node stops training rather than carry on with no way to save the result.
Set seed in Hyperparameters to choose the run’s seed (including 0; the default is 0). The checkpoint records it. A continued run draws its shuffles and augmentations from a seed derived from the run’s seed and the epoch it continues at, so it never repeats the order and augmentations of the epochs already trained, though it does not reproduce the sequence an uninterrupted run would have drawn either.
Why does a run that continues an unfinished version refuse to start?
A run that continues an unfinished version continues the same run, so the node first compares the run with the checkpoint and refuses, naming each difference, when the hyperparameters (epochs included), the classes, the datasets, the architecture or the LibreYOLO version differ. To train longer or with other settings, start from a fully trained version, or save the unfinished one as a new version and train from that.
What does the trained version record?
The version holds model.safetensors, the best weights, and config.json, which names the architecture, the classes in output order and the input size, beside the LibreYOLO results and training log, your hyperparameters as typed, and the full argument set LibreYOLO resolved. It also records the class list, the train and validation datasets, the version training started from, the training report, the GPU the run used with its peak memory, and the mAP50 and mAP50-95 of the epoch that produced the best weights. No pickle (.pt) is ever written.
Which classes does the model learn?
When the train dataset is pinned to an ontology, the model learns that ontology’s object classes in its order, and labels of any other class are skipped. Otherwise the classes come from the annotations in the datasets. Tags never become classes. The classification layers are resized to the new class count; the rest of the network keeps its pretrained weights.
Is the backbone frozen?
No. By default every layer trains. Add freeze: backbone to Hyperparameters to train the neck and head only; an integer or a list of layer selectors is accepted as well. LibreYOLO’s code states that in a LibreYOLO9E2E model the one-to-one head’s loss does not reach the backbone or neck, which are then trained through the one-to-many head.
Why does the run use a shorter no-augmentation tail than LibreYOLO's default?
LibreYOLO turns off mosaic and mixup for the last no_aug_epochs epochs, 15 by default, which suits a run of a hundred epochs or more. For a shorter run that would leave little or no strong augmentation. When Hyperparameters has no no_aug_epochs, the node sets it to a fifth of epochs, at most 15 and at least 1. Set no_aug_epochs yourself to keep your value.
How is the Best mAP badge calculated?
It is the highest box mAP50-95 on the validation dataset over the epochs that were validated, shown as mAP: value with four decimal places. It stays empty until the first validation has run. Hyperparameters can set eval_interval to validate every N epochs; the final epoch is always validated.
Why are precision and recall not reported?
In LibreYOLO’s results file the precision and recall columns repeat COCO’s mAP50-95 and AR@100 (average recall with up to 100 detections per image). The report shows mAP50-95, mAP50, mAP75 and AR@100 under their own names and publishes only mAP50 and mAP50-95 to the registry.
Why does the run stop with a dataset error?
The datasets hold no annotated object classes, so there is nothing to train on. The check uses the datasets’ computed statistics before anything is downloaded, and the export repeats it. Check the dataset contents, then rerun.
Why does training fail as soon as it starts?
Hyperparameters may not be a YAML mapping, may set a key that names a file, weights or a download, or that the node fills in itself (model, pretrained, resume, distill_model, cfg, data, project, name, exist_ok, device, …), may give a value of the wrong type, or may contain an argument the node does not accept. Every plain setting of LibreYOLO’s own training configuration for these architectures is accepted - a number, a switch or one name out of a fixed set - written as LibreYOLO itself reads it: a switch may be 1 or 0 as well as true or false, and cache: 1 caches the decoded images in RAM as cache: ram does. What is refused besides the keys above is average_best and precise_bn, which read back a checkpoint this node never writes; export_check, which belongs to Export LibreYOLO; lora, which would publish weights the other nodes cannot build; and the profile_* group, which reports the run a second way. A name LibreYOLO has no argument for is refused rather than ignored, so a typo fails at the start. The error names every problem at once.
Why are the gallery, metrics, or checkpoint widgets empty?
Validation may be switched off (eval_interval: 0), or LibreYOLO may not have produced the required files. Keep validation enabled and check the effective training configuration.
Why can't I open the report?
Training continues when the report asset cannot be created. Check the run logs and workspace asset permissions.
Inputs
Dataset to train on. Its assets and annotations are converted to YOLO format for you, so nothing has to convert them first. Key: TRAIN_DATASET.
Dataset held out to measure quality while training runs. Converted together with the training dataset, so both share the same class list. Key: VAL_DATASET.
After training, score every training image with weights saved across the run to estimate how much of the data was actually needed, and publish the subset worth keeping. Sets save_period to a tenth of the epoch budget so those weights exist, and adds a few inference passes over the training split after the run. Key: ESTIMATE_DATA_USEFULNESS.
Model to fine-tune, trained in this workspace or installed from the zoo, and with it the detection head: a YOLOv9 version trains the NMS head, a LibreYOLO9E2E one the end-to-end head that needs no NMS afterwards. Training starts from the weights of the version you pick, and the result is registered as a new version of this model unless Destination model names another one. When the version picked is not fully trained (Latest picks one when it is the newest), the run continues that training with the settings it started with, not the ones set here. Key: MODEL.
Model the trained version is registered under, when it should not go to the one being fine-tuned. Leave empty to add the new version to the Model above. Key: DESTINATION_MODEL.
LibreYOLO training settings in YAML - number of epochs, image size, batch size and the rest. Only LibreYOLO’s training arguments are accepted, each with a value of its type, anything that names a file, weights or a download (model, pretrained, resume, distill_model, cfg, …) is refused, because the starting weights always come from Model. Dataset paths, the device and the output location are filled in for you and cannot be set here. freeze: backbone trains the neck and head only, by default nothing is frozen. eval_interval is how often validation runs. Key: CONFIG.
Outputs
ID of the asset containing the live LibreYOLO training report. Shown as an artifact. Key: REPORT_ID.
Reference to the registry version this run produced, as <model id>@<version id>. It wires into the Model input of a predict, export or evaluate node and pins it to exactly these weights. Empty when the run could not be registered. Shown as an artifact. Key: MODEL.
Best validation mAP (IoU 0.5:0.95) reached during the run (shown as a badge). Shown on the node as a badge. Key: BEST_MAP.
The training images this run’s usefulness estimate says are worth keeping. To check the estimate, wire it into the Train dataset of another Train LibreYOLO node that starts from the same model this run started from, and compare the two runs’ evaluation metrics. Short-lived, so copy it if you want to keep it. Empty when the estimate found nothing safe to drop. Shown as an artifact. Key: KEEP_DATASET.
Share of the training images the keep set retains. Shown on the node as a badge. Selecting the badge opens KEEP_DATASET. Key: KEEP_SHARE.
Models and configuration
Model is both what training starts from and where its result is filed: the run adds a version to that model. Set Destination model to file the result elsewhere. The trained version is created there instead, and Model is then only the starting weights. Both pickers list only LibreYOLO models of this workspace, with their ready versions and their incomplete ones, marked as not fully trained.
Checkpoint selection details
A version produced by training starts from the best weights stored with it. A version copied from the catalog hosts no weights of its own, so the node downloads the file its catalog entry names and checks its SHA-256. Either way the new version records the picked version as its starting point.
Default hyperparameters
OvalBee starts with these values in Hyperparameters:
Delete a value to use the LibreYOLO default instead. Its optimizer is SGD at a learning rate of 0.01 with a linear schedule, EMA and mixed precision on.
Configuration
Hyperparameters must be a YAML mapping. The effective configuration follows this order:
- Values present in Hyperparameters override the LibreYOLO defaults of the architecture.
no_aug_epochsis derived fromepochswhen it is absent (see the FAQ).- The node sets
data,project,name,exist_okanddeviceso the exported dataset, the task’s artifacts directory and the GPU of the run are used, and turns on the TensorBoard logger for the report.
Report
The report appears near the start of training and updates as new metrics and files arrive. It tracks metrics, losses, learning rates, TensorBoard and checkpoints. A final update after training adds the predictions gallery and a download panel for the trained checkpoints.
Report sections
Runtime
GPU memory use depends on the model, image size, and batch size; the report records the peak the run reached. OvalBee does not list specific RTX models as supported because the runtime image has no pinned digest or recorded end-to-end hardware matrix.
Details
- Configured image:
ovalbee/node-libreyolo:0.0.17, shared with the predict and export nodes. - Upstream base: the OvalBee PyTorch CUDA 12.8 base image, with
libreyolo==1.6.0installed on top. - Added components: OvalBee SDK, TensorBoard, ONNX tooling and TensorRT for the export node.
- Exact CUDA, PyTorch, NVIDIA driver, and GPU compatibility depends on the image digest deployed by the worker.
JSON config
Machine-readable node interface for automation and advanced usage.