09

Model Evaluation

How to score the model running at a site and the model improved with field data on a test set, and how to compare before and after.

What Model Evaluation Is

The Datasets > [Model evaluation] tab scores a trained (or uploaded) model on a test set that was never used for training and records objective numbers such as mAP. Use it to measure the performance of a model running at a site and to confirm that a model improved with field data is really better.

  1. Prepare a test set.
    One split (test, or val/train) of a shared dataset is the test set. See "Preparing a Test Set".
  2. Click [Run evaluation], pick a model and a test set, and start.
  3. Follow the progress in the list and click a finished row for the detailed result.
  4. Evaluate the before and after models on the same test set and compare the numbers.
Figure 8-1. The Model evaluation tab
Figure 8-1. The Model evaluation tab
Models that can be evaluated
Only models with pth weights and a config can be evaluated: your organization's trained and uploaded models and the public base models.

List Columns and Filters

Evaluations are listed newest run first, 20 per page.

ColumnWhat it showsNotes
Modelmodel name ยท versionHover to see the evaluation's own name.
Test setdataset name ยท split (e.g. KTE-Fire-v3 ยท test)-
mAP@50mAP at IoU 0.5 (bold). Only for finished runs, - otherwisePercent with one decimal (e.g. 28.0%)
mAP@50-95mAP averaged over IoU 0.5 to 0.95Finished runs only
ImagesNumber of images actually evaluatedThousands separators
ClassesNumber of scored classes plus an orange [N excluded] badge when any were left outSee "Excluded Classes".
StatusStatus text or a stage progress barSee "Status and Stages".
Run atWhen the evaluation was createdOrganization time zone
ActionsDelete iconSee "Deleting".
ControlBehavior
Test set dropdownDefault [All test sets]. Choosing one of the finished shared datasets (up to 100) shows only runs on that test set, and pre-fills it in the [Run evaluation] window.
Name searchMatches the evaluation name (case-insensitive, contains). Type text from your own name or from the default name (model / dataset split).
[Run evaluation]Opens the evaluation window.
Refresh iconReloads the list; it also refreshes every 3 seconds while a run is in progress.
Paging[Previous] ยท current / total ยท [Next] below the table with two or more pages
List state messages"No evaluations yet." / "Could not load the list."
Figure 8-2. The test set filter
Figure 8-2. The test set filter
Clicking a row
Clicking a finished row opens the result window. Rows that are not finished (queued, running, failed) do not open.

Status and Stages

The [Status] column shows how far an evaluation has come. While any run is in progress the list refreshes every 3 seconds (except runs judged not responding).

DisplayMeaning
QueuedAccepted; no stage information yet
Reading the test setCollecting the split's images and ground truth; a progress bar with %, hover for processed / total images
Preparing URLsPreparing the addresses the inference service will read
ScoringRunning the model on the images and computing scores (in batches of 200)
Storing resultsWriting the computed metrics
Done (green)Succeeded; numbers are filled in and the row opens the detail
Failed (red)Ended with an error; hover the status to see the error.
Not responding (red)A run in progress showed no progress for over 15 minutes (e.g. the server restarted); hover for details. The server later closes it as failed.
Common failure reasons (server messages)What to do
The split has no readable imagesCheck the stored images of the test set dataset.
No ground-truth boxes, or none in a class the model knowsThe test set's class names do not overlap with the model's at all. Check class names.
Inference or scoring failedContact the operations owner with the server message.
Failed after not respondingThe server was restarted during the run; run again with the same settings.

Running an Evaluation

The [Run evaluation] button above the list opens the [Evaluate model performance] window. It resets each time it opens, and pre-fills the test set if one was selected in the list filter.

  1. Click [Run evaluation] to open the window.
    Figure 8-3. The Evaluate model performance window (initial state)
    Figure 8-3. The Evaluate model performance window (initial state)
  2. Choose a dataset in [Test set].
    Hint: "One split of a catalog dataset serves as the test set. To register a test set of your own, upload it as a test split on the catalog tab."
  3. Choose the [Split].
    Disabled until a test set is chosen. Only splits with at least one image appear, with counts like test (445); test is the default (it switches to val, then train, if absent).
    Figure 8-4. Choosing the split
    Figure 8-4. Choosing the split
  4. Choose the [Model to evaluate].
    Entries read model name ยท version ยท source; the source is Base, Trained or Uploaded. Several models can share a name, so tell them apart by version and source.
    Figure 8-5. Choosing the model
    Figure 8-5. Choosing the model
  5. Optionally enter [Max images] and [Name (optional)].
    Figure 8-6. The window filled in
    Figure 8-6. The window filled in
  6. Click [Run evaluation].
    "Evaluation started." appears, the window closes and a new row shows up as [Queued]. Use [Cancel] to back out.

All Fields of the Evaluation Window

Defaults and constraints of every field.

FieldDescriptionRequiredDefaultConstraints
Test setThe shared dataset to evaluate onYesNone ("Choose a dataset")Only finished (Ready) datasets with at least one image appear (up to 100); public datasets of other organizations can be chosen too.
SplitWhich split of the dataset serves as the test setYestestOnly splits with images (test/val/train) can be chosen; a split with zero images cannot be run.
Model to evaluateThe model to scoreYesNone ("Choose a model")Only models with pth weights and a config appear. With none, a red "No model can be evaluated. One needs the pth weights and config the inference service loads." shows.
Max imagesUpper limit on images to evaluateNo500A whole number of 0 or more; 0 or empty means the whole split. A non-integer or negative number shows a red "Enter a whole number of 0 or more." and disables [Run evaluation]. The server evaluates at most 20,000 images per run, so a larger split is cut to its first 20,000.
Name (optional)Name of the evaluation recordNoEmptyUp to 200 characters. Empty generates model name / dataset name split. The name is what the list search matches, so use distinguishable names for comparisons.
Hint textExplanation
"N image(s) will be evaluated. 0 means the whole split."Images actually evaluated = the smaller of Max images and the split's image count (the whole split when 0)
"Choose a split first."The split's image count is not known yet
Model hint "Model and dataset classes are matched by name, never by index."Classes with the same name are scored as one even if their numbers differ.
Fixed values
The score threshold (only predicted boxes at or above it are used) is fixed at 0.05 and cannot be changed on the screen. The evaluation runs in the background on the server, so closing the window or leaving the screen does not stop it.
Same settings, same images
When the split is larger than Max images, images are taken from the front of the dataset's stored order. Running different models with the same test set, split and Max images therefore scores them on the same images. Keep all three identical when comparing before and after.

When a Run Cannot Start

The [Run evaluation] button is enabled only when a model and a test set are chosen, the split has at least one image and Max images is valid. These are the other cases where the server refuses.

SituationResult
The model has no pth weights or configInstead of the generic text, the server's message (the model has no weights to evaluate) is shown.
The test set is still importing or failedThe server's message appears; wait until it is Ready.
The chosen split has no imagesThe server's message appears; pick another split.
Anything else"Could not start the evaluation."

Evaluation Result Detail

Click a finished row to open the result window. The title is the evaluation's name; close it with [X] or Esc. If loading fails, "Could not load the result." appears.

Figure 8-7. The evaluation result window
Figure 8-7. The evaluation result window
AreaContents
Modelmodel name ยท version
Test setdataset name ยท split
Coverage"N images ยท N ground truth ยท N predictions"
Six metric cardsSee the table below
Class coverageNumber of scored classes and the names of excluded ones (next section)
Per-class resultsThe "Per-class results (N)" title with sort buttons and a row per class
CardValue
mAP@50 (large number)mAP at IoU 0.5; the headline metric
mAP@50-95mAP averaged over IoU 0.5 to 0.95
mAP@75mAP at IoU 0.75
Small / Medium / Large objectsmAP by object size (COCO convention)
Display format
All metrics are shown as percentages with one decimal; - when there is no value.

Reading Per-class Results

Each class has one row, in this order from the left.

PositionValueDescription
1Class nameTruncated when long; hover for the full name
2BarAP@50 drawn as a 0-100% bar
3AP@50 (bold number)That class's AP at IoU 0.5
4AP (muted number)AP averaged over IoU 0.5 to 0.95
5Support (far right, muted)The number of ground-truth boxes of that class; hover for "Ground-truth boxes for this class. The fewer there are, the closer the AP is to noise."
Sort buttonBehavior
[By AP@50] (default)Highest AP@50 first
[By support]Most ground-truth boxes first
[By name]Alphabetical by name
Classes with fewer than 10 ground-truth boxes are dimmed
Rows with fewer than 10 ground-truth boxes are dimmed. With so few samples the AP swings with chance, so do not base decisions on them. A class with zero ground truth shows 0.0% AP, which only means there was nothing to score.

Excluded Classes

The model and the test set are matched by class name. A class present on only one side is left out of the score, so the mAP is a value over the classes present on both sides, not over the whole test set.

WhereAppearance
List [Classes] columnAn orange [N excluded] badge next to the scored-class count; hover for "Classes present on only one side are left out of the score. The mAP above covers the rest."
Class coverage box in the detail windowWith none: "All N classes exist on both the model and the dataset." Otherwise a warning icon and "Only N classes were scored. The metrics above do not cover the rest."
Exclusion lineMeaning
Only in the dataset (the model cannot predict these): โ€ฆLabeled in the test set but unknown to the model, e.g. a newly added class evaluated against an older model.
Only in the model (the dataset never labels these): โ€ฆKnown to the model but never labeled in the test set
When comparing before and after
If the exclusion lists of two evaluations differ, their mAP values are over different class sets and cannot be compared directly. A class the improved model newly learned is excluded in the old model's evaluation. Compare the AP of the common classes in the per-class results to compare like with like.

Metric Interpretation Guide

Scoring follows the COCO evaluation method (bounding boxes). These are the basics of reading the numbers.

MetricMeaningUse it when
mAP@50Counts a predicted box as correct when it overlaps the ground truth by 50% or more, and averages that accuracy (AP) over all classesTo see whether the model finds the target at all; the first criterion for comparing models.
mAP@50-95Averages over overlap thresholds from 0.5 to 0.95 in steps of 0.05To see how tight the boxes are. It is always lower than mAP@50 and diverges when box quality changes.
mAP@75A strict criterion requiring 75% overlap or moreWhen mAP@50 is similar but mAP@75 differs a lot, the difference is in box precision.
Small/Medium/LargemAP by COCO area (small below 32x32 pixels, medium 32x32 to 96x96, large above 96x96)For sites with many small distant targets look at "Small objects" first. With no objects of a size the value can be unusually low or -.
Per-class AP@50 / APThe metrics above narrowed to one classTo find weak classes hidden by the average; do not trust classes with few ground-truth boxes.
Coverage (images, ground truth, predictions)The scale actually used for scoringToo few images make mAP unstable. Far more predictions than ground truth is normal because of the low score threshold (0.05).
Principles
1) Compare only numbers produced with the same test set, split and Max images. 2) Check first that the excluded-class lists match. 3) A gap of 1-2 points can be chance, so make sure there are enough images (hundreds to thousands). 4) mAP is computed from the ranking of confidence scores, so it can differ from the number of false alarms a site actually sees at its operating threshold.
Not the same as training-time metrics
The training pipeline measures mAP and similar values during training and keeps them in the model's training record. Those are computed during training, whereas [Model evaluation] re-scores on a separate test set that was not used for training, so the two can differ. Use the [Model evaluation] numbers when comparing models.

Preparing a Test Set

Model evaluation has no separate "register test set" feature. A test set is one split of a shared dataset, so upload your test images as a test split.

  1. Prepare the test images and a COCO annotation json.
    Use the same class names as the model to be evaluated (matching is by name). Do not include images used for training.
  2. Name the folders per the rules.
    e.g. annotations/instances_test.json + images/test/. The word test must be in the file and folder names to be recognized as a test split.
  3. Upload the folder with Datasets > [Shared datasets] > [Upload dataset].
    A test-only folder has a single split, so [Split handling] must be [Split at training] for the server to accept it. A folder with train/val/test can be uploaded as [Split preserved].
  4. Wait until [Status] shows [Ready].
  5. On the [Model evaluation] tab, choose that dataset and the test split in [Run evaluation].
Datasets that already have a test split
If the detail screen's summary line shows test N and the split filter offers test, the dataset already has a test split.
Keep it separate from training data
Using test images in training inflates the numbers. When you train an improved model on field clips, keep the clips set aside for evaluation out of the training data.

Comparing Before and After Improvement

There is no automatic comparison on the screen. Evaluate the model before improvement and the model after improvement on the same test set, each separately, and read the two results side by side.

  1. Evaluate the model before improvement (the one running at the site).
    In [Run evaluation] choose the test set and split and pick the old model. Note the [Max images] and give it a distinguishable [Name (optional)] such as before ....
  2. Evaluate the improved model (trained with field data) with identical settings.
    Use exactly the same test set, split and Max images, and name it after ....
  3. Wait until both evaluations are [Done].
  4. Narrow the list to that test set with the test set dropdown, find the two rows with name search and compare [mAP@50] and [mAP@50-95].
    First check that [Images] and [Classes] (including the excluded badge) are the same in both rows.
  5. Open each row's detail and compare mAP@75, small/medium/large objects and per-class AP@50.
    Check that the class you meant to improve (for example one with many false alarms) went up and that other classes did not drop. Leave out dimmed rows with fewer than 10 ground-truth boxes.
Check before comparingWhy they must match
Test set and splitNumbers scored on different images are not comparable.
Max images (= Images column)The same setting picks the same images; a different image count means different settings.
Excluded classesDifferent exclusion lists mean mAP over different class sets.
The test set was not used for trainingOtherwise the after numbers are inflated.
Keeping records
Evaluation records stay until deleted, so evaluating each improvement round on the same test set, with the date or model version in the name, lets you track performance over time.

Deleting an Evaluation

Delete an evaluation with the trash icon in the row's [Actions] column. It works independently of the detail window that opens when you click a row.

  1. Click the trash icon of the row.
  2. Read the confirmation "Delete this evaluation?"
    Body: "The result and per-class breakdown of "(name)" are deleted with it."
    Figure 8-8. The delete confirmation (closed with Cancel)
    Figure 8-8. The delete confirmation (closed with Cancel)
  3. Click [Delete] and "Deleted." appears. Use [Cancel] to back out.
    On failure: "Could not delete it."
Constraints
There is no special constraint. Only the evaluation record is removed; the model and the test set (dataset) are untouched.

Message Reference

Notices and messages you can see on this tab.

SituationMessage
StartingEvaluation started. / Could not start the evaluation. (the server's message when it gives one)
ValidationEnter a whole number of 0 or more. / Choose a split first. / No model can be evaluatedโ€ฆ
DeleteDeleted. / Could not delete it.
Result windowCould not load the result.
List stateNo evaluations yet. / Could not load the list.