Get best model
Overview
Finds the best model measured on one version of a validation dataset and hands it to the next node.
It is made for an active learning round. Place it right after the node that saves the new validation version, next to the training nodes. It runs while the new models are still training, so it returns the best model of the previous round. Predict and evaluate that model on the new version, then compare each new model with it.
How it works
Ranks the models evaluated on the Validation dataset version by Metric. Each Task type has its own metrics to pick from.
When the best model of the previous version has no evaluation on this one yet, returns that model instead, and the log says it still has to be evaluated here.
FAQ
Why does it not return the model that just finished training?
It only ranks models evaluated on this dataset version. When it runs at the start of a round, the new models have no evaluations yet, so they cannot be picked. This is what makes it return the previous best model.
Why are evaluations from older dataset versions not compared?
Each version of a validation dataset holds different images, so scores from two versions do not compare. The previous best model is evaluated again on the new version instead.
How do I predict with the best model when it can be YOLO or DEIM?
Wire Best model framework into a Router and add one rule per framework, such as yolo and deim. Each rule’s edge leads to the Predict node of that framework.
What happens when two models have the same score?
The older model wins. The log names both models, the shared score and which one was kept.
Can I connect the newest version of the dataset?
Yes, but pin a saved version when you can. Labeling keeps changing the newest version, and an evaluation made before a change stops counting, so models would have to be evaluated again.
Which models can it pick?
The models of this workspace that have an evaluation on the dataset version and perform the selected Task type. A model uploaded by hand counts too, once it has been evaluated.
Inputs
Validation dataset version the models are ranked on. Pin a saved version, such as the output of Create version. Key: EVAL_DATASET.
Task the ranked models perform. Key: TASK_TYPE.
Options:
- Object detection (
object_detection) - Instance segmentation (
instance_segmentation) - Semantic segmentation (
semantic_segmentation) - Classification (
classification) - Tracking (
tracking)
Object detection metric that ranks the models. Visible when TASK_TYPE is object_detection. Key: OBJECT_DETECTION_METRIC.
Options:
- mAP 50-95 (
map50_95) - mAP 50 (
map50) - Precision (
precision) - Recall (
recall) - F1 (
f1)
Instance segmentation metric that ranks the models. Visible when TASK_TYPE is instance_segmentation. Key: INSTANCE_SEGMENTATION_METRIC.
Options:
- Mask mAP 50-95 (
mask_map50_95) - Mask mAP 50 (
mask_map50) - Mask precision (
mask_precision) - Mask recall (
mask_recall) - Mask F1 (
mask_f1)
Semantic segmentation metric that ranks the models. Visible when TASK_TYPE is semantic_segmentation. Key: SEMANTIC_SEGMENTATION_METRIC.
Options:
- mIoU (
miou) - Boundary mIoU (
mboundary_iou) - Mean F1 (
mf1) - Mean precision (
mprecision) - Mean recall (
mrecall) - Pixel accuracy (
pixel_acc)
Classification metric that ranks the models. Visible when TASK_TYPE is classification. Key: CLASSIFICATION_METRIC.
Options:
- Top-1 accuracy (
accuracy_top1) - Weighted F1 (
f1_weighted) - Macro F1 (
f1_macro)
Tracking metric that ranks the models. Visible when TASK_TYPE is tracking. Key: TRACKING_METRIC.
Options:
- HOTA (
hota) - MOTA (
mota) - IDF1 (
idf1) - DetA (
deta) - AssA (
assa) - LocA (
loca)
Outputs
Registry reference of the best model. Empty when no model has been evaluated on this dataset yet. Key: BEST_MODEL_ID.
Framework of the best model, such as yolo, to branch on in a Router. Empty when no model has been evaluated on this dataset yet. Key: BEST_MODEL_FRAMEWORK.
The validation dataset version the ranking ran on, pinned, for the Predict and Evaluate nodes of the best model. Key: EVAL_DATASET.
Name and version of the best model. Shown on the node as a badge. Key: BEST.
JSON config
Machine-readable node interface for automation and advanced usage.