> 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.

# Check and clean a dataset

Label typos, empty images, duplicates across splits, blurry frames and mislabeled objects are cheap to fix before training and expensive to discover after. OvalBee has nodes that profile a dataset, point at the suspicious parts, and fix what the findings show — all as regular nodes, so the same checks run again on the next batch of data.

## Profile a dataset

```mermaid
flowchart LR
  dataset["Dataset"] --> quality["Annotation quality"]
```

The **Dataset quality control** template is the smallest useful flow in OvalBee: a dataset and an [Annotation quality](/node-library/nodes/dataset-ops-annotation-quality) node. Its report shows how many images carry labels, how classes balance across splits, how objects are sized and placed, and a list of findings that need a look — unlabeled images, labels outside the frame, duplicate images, leakage between splits, rare and possibly misspelled classes.

Two more nodes look at other sides of the data:

* [Image quality](/node-library/nodes/dataset-ops-image-quality) measures every image from its pixels — sharpness, exposure, flat or broken files — so it works on data nobody has labeled yet.
* [Dataset insights](/node-library/nodes/dataset-ops-dataset-insights) reads the statistics and findings of the other nodes and writes a short verdict on what they mean for training. It uses an LLM provided by the OvalBee instance and charged to the workspace's credits, so it needs no key of your own.

**See it running:** [live example](https://app.ovalbee.com/public/flows/dataset-quality-control) · [case study: reading a quality report](https://ovalbee.com/case-studies/dataset-quality-report-pcb)

## Fix it with rules

```mermaid
flowchart LR
  dataset["Dataset"] --> before["Annotation quality"] --> filter["Filter images"] --> transform["Transform annotations"] --> cleaned[("Cleaned dataset")] --> after["Annotation quality"]
```

The **Filter-based data cleanup** template turns findings into fixes and proves they worked: profile the dataset, remove the images that should carry labels but don't with [Filter images](/node-library/nodes/filter-filter-images), rename a misspelled class with [Transform annotations](/node-library/nodes/asset-ops-transform-annotations), and profile the cleaned copy next to the original. The source dataset is never changed, so the two reports compare directly.

Other rule-based tools for the same job:

* [Filter annotations](/node-library/nodes/filter-filter-annotations) removes the individual labels that match your conditions, or keeps only those.
* [Remove assets](/node-library/nodes/asset-ops-remove-assets) takes images out of a dataset.
* [Transform annotations](/node-library/nodes/asset-ops-transform-annotations) also keeps only some classes or one shape per class, which training nodes often need.

**See it running:** [live example](https://app.ovalbee.com/public/flows/filter-based-data-cleanup) · [case study](https://ovalbee.com/case-studies/filter-based-dataset-cleanup)

## Look deeper with embeddings

Some problems don't show in statistics: two classes that look the same, an object labeled as the wrong class, a batch of images unlike anything the model trained on. The embedding nodes compare images and objects by what they look like. Start with [AI index embeddings](/node-library/nodes/models-clip-ai-index-embeddings), which embeds a dataset into the workspace's index — every node below reads from that index.

| Node                                                                       | What it finds                                                                                                  |
| -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| [Similar pairs](/node-library/nodes/models-clip-similar-pairs)             | Exact and near duplicates inside a dataset, or leakage between a training and a test set.                      |
| [Label diagnostics](/node-library/nodes/models-clip-label-diagnostics)     | Objects that look unlike the rest of their class, and classes that look like each other — likely label errors. |
| [Embedding anomalies](/node-library/nodes/models-clip-embedding-anomalies) | Images far from everything else, or from a reference set you trust — outliers and drift.                       |
| [Embedding map](/node-library/nodes/models-clip-embedding-map)             | An interactive map of what the dataset contains, with named clusters and rare subgroups.                       |

Each writes its candidates into a review dataset, so the natural next step is a [labeling stage](/use-cases/organize-labeling) where someone confirms or corrects them.

## Let the model point at label errors

Once you have a model, its confident disagreements with the ground truth are a strong signal. After [Evaluate object detection](/node-library/nodes/evaluate-evaluate-object-detection), [Review suspected label errors](/node-library/nodes/sample-review-suspected-label-errors) collects the images the evaluation flagged as probable label mistakes into a dataset a labeler can open. [Find annotation gaps](/node-library/nodes/dataset-ops-find-annotation-gaps) does the same for objects the model finds confidently but nobody labeled.

## Make it yours

* **Check every batch.** Put the quality nodes after your import, so each new batch of data gets a report before it enters labeling.
* **Gate labeling.** Send the review datasets of Similar pairs or Label diagnostics into a labeling stage with outcomes such as *Keep*, *Fix* and *Remove*.
* **One verdict for everything.** Pass the reports of Annotation quality, Similar pairs and Label diagnostics to Dataset insights through its **Findings from other nodes** input, and get one summary instead of three reports.