> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ovalbee.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ovalbee.com/_mcp/server.

# Active learning

Every other use case is one step of a bigger loop: images come in, the useful ones get labeled, the data is checked, a model is trained and scored, and the best model ships. **Active learning** runs that whole loop in one flow and keeps it running. People only label the images that add something new, a live model does part of the drawing, bad labels are kept out of training, and the production model is replaced only when a new one really scores higher.

Use it when you collect images faster than you can label them, and want the model to improve every week without someone rebuilding the pipeline each time.

```mermaid
flowchart LR
  import["Import"] --> sample["Diverse sampling"] --> prelabel["Pre-label"] --> label["Label and review"] --> check["Dataset checks"] --> split["Train/val split"] --> train["Train YOLO and DEIM"] --> best["Pick the best model"] --> export["Production export"]
  check -. "flagged images" .-> label
```

![The template library open on Active learning (object detection): a read-only preview of the graph with the import, sampling, live training and labeling blocks, and the template's description with its 75 nodes](/_fern-files/_img/aa700b2fd6274e60a718a5f15041bd15c16f065ddd2ca52fbb610a0b905b57b6.webp)

## The template and its blocks

The **Active learning (object detection)** template draws the loop as ten blocks. Each block is also a template of its own, so you can start with the part you need now and drop in the rest later from **Templates** in the flow toolbar. Dropped next to each other, the blocks offer to connect to what is already in the flow.

| Block            | Template                                       | What it does                                                                                                                                                                                                                                                                   |
| ---------------- | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Import           | *Active learning: data import*                 | New images from a cloud bucket, every 15 minutes, or dropped by hand, land in the **Data Lake** dataset. See [Bring data in](/use-cases/bring-data-in).                                                                                                                        |
| Diverse sampling | *Active learning: diverse sampling*            | Every 5 hours, picks the images least like anything sampled before, with [AI search](/node-library/nodes/models-clip-ai-search) over image embeddings. A picked image is never picked again, so labeling time isn't spent on look-alikes.                                      |
| Pre-label        | *Live training module*                         | Small batches go to a live training session. When it finds at least 60% of the objects on the latest images, it pre-labels the batch; otherwise the batch goes to labeling as it is. See [Pre-label with a model](/use-cases/pre-label#live-training).                         |
| Label and review | *Active learning: labeling and review*         | Labelers draw or fix boxes, reviewers accept or reject, and rejected images return to labeling. A prelabeling efficiency report shows how much of the drawing the live model did. See [Organize labeling](/use-cases/organize-labeling).                                       |
| Collect          | (part of the above)                            | Once a day, when more than 10 images are accepted, they move to the labeled dataset as a new version.                                                                                                                                                                          |
| Dataset checks   | *Active learning: dataset checks*              | Runs the [Dataset intelligence](/use-cases/check-and-clean-data#audit-a-dataset-in-one-run) checks. Images flagged as duplicates, outliers, or likely label errors go back to labeling; the rest move on to training.                                                          |
| Split            | *Active learning: train/validation split*      | A 70/30 split into training and validation sets, each saved as a new version, so every model can be traced to the exact data it saw.                                                                                                                                           |
| Train            | *Active learning: train YOLO* and *train DEIM* | Once a day, YOLO and then DEIM are trained on the new versions, predict on the validation set and are scored there. See [Train a detector](/use-cases/train-a-detector).                                                                                                       |
| Pick the best    | *Active learning: pick the best model*         | Every scored model goes to a model registry. The best model so far is re-scored on the latest validation set, so the new models and the old best are measured on the same images, and the winner is named. See [Evaluate and compare models](/use-cases/evaluate-and-compare). |
| Production       | *Active learning: production export*           | The winner is exported to ONNX and TensorRT, and its speed is measured.                                                                                                                                                                                                        |

The first round has no earlier best model, so the comparison, the learning curve and the export start from the second round.

## Setting it up

When you add the template, a short setup asks for four things and creates every dataset the flow needs:

1. **Classes.**
2. **Labelers and reviewers.**
3. **Models to start from** — a Grounding DINO model for live training, and a YOLO and a DEIM checkpoint to fine-tune, copied from the model catalog.
4. **Images** — the dataset new images land in, and optionally a cloud bucket folder the import checks.

Live training, training and export run on a GPU.

The pre-labeling block uses live training, a set of [professional nodes](/concepts/nodes#professional-nodes) that run with the Pro plan on OvalBee Cloud and with the Business plan on your own installation. On a plan without it, delete that block and move the sampled images straight into the labeling pool: people then draw every box themselves, and the rest of the loop works the same.

## What you get

Every round leaves a new version of the labeled dataset and of the training and validation sets, so any model traces back to the data it was trained on. Along the way you get:

* a dataset report that says what to fix first,
* evaluation reports for each new YOLO and DEIM model,
* a [model registry](/node-library/nodes/models-general-model-registry) report that tracks every scored model over time,
* a comparison report that names the winner, and an [active learning curve](/node-library/nodes/evaluate-active-learning-curve) of quality against the number of labeled images,
* a prelabeling efficiency report — how much drawing the live model saved,
* the best model exported to ONNX and TensorRT, with its frames per second.

## A smaller loop

**Active learning with live training** is a compact variant for a fixed set of images you can't afford to label in full. People label a random first batch and the images the model is scored on. After that the loop runs itself for a set number of rounds: it trains YOLO, finds the validation images the model gets most wrong, picks unlabeled images that look like them, lets the live training session label those, and trains again. A learning curve shows how quality grows with every labeled image, and the last model is scored on a test set. It also needs live training.

## Make it yours

* **Start small.** Begin with the labeling and training blocks, and add sampling, checks and export as the project grows. Every block is a template.
* **Change the pace.** The schedules — import every 15 minutes, sampling every 5 hours, collect and train once a day at midnight — sit on the nodes that start each block: the *Every 15 minutes* and *Every 5 hours* nodes, the *If enough images* check and the *Wait* before training. Change them in each node's automation settings. Pausing the flow stops all of them.
* **Change the gate.** The quality gate before pre-labeling and the "more than 10 accepted images" check before a new version are [Condition](/node-library/nodes/flow-control-condition) nodes with a number you can edit.
* **Use other architectures.** Swap the YOLO or DEIM training block for any detector in [Train a detector](/use-cases/train-a-detector#choose-an-architecture).