Esacode

Docs / Blocks / AI

Check labels

Finds images whose label is likely wrong, from the labels of the images that look most like them, and images unlike any other.

Runs on a worker (Python) AI Version 1.0 Code you can open and adapt

How it works

For each image, its Neighbours most similar images (by the embeddings of Embed images) vote with their labels (the folders), weighted by similarity. When the image's own label gets less than Agreement (%) of the vote and another label wins, the image is flagged label, with the label its neighbours suggest and how sure that is.

Outliers (%): the share of images least like their neighbours, flagged outlier (empty frames, odd shots); 0: none. A confusion table shows which labels are mixed up with which. Curate and split removes the flagged images, or a person reviews them first.

Inputs

InputTakesWhat it is
Embeddings
embeddings
Files
npy, json
embeddings.npy and paths.json of Embed images

Outputs

OutputGivesWhat it is
Flags
table
Table
csv
label_check.csv: one row per image (path, label, suggested, agreement, confidence, isolation, flag, reason); flag is empty when the image is fine
Confusion
confusion
Table
csv
label_confusion.csv: how many images of each label the neighbours put in each label
Live telemetry
telemetry
Live telemetryWhat the block sends while it runs, for views such as Chart or 3D view.

Settings

SettingDefaultWhat it does
Neighbours
neighbours
10
From 1 to 100
Agreement (%)
agreement
30 Flagged when the image's own label gets less of the vote than this
From 0 to 100
Outliers (%)
outliers
1
From 0 to 20

Where it runs

On one of your computers with the EsaSim worker: Any worker. The worker installs the Python packages it needs when they are missing: numpy.

In its code, settings are ctx.params["key"], inputs ctx.inputs["id"] and outputs ctx.output("id", "name.ext"); see Custom blocks.

More in AI