How to convert predicted BBs to ground truth BBs#

In the Dashboard, you are not only able to manually create and edit BBs, but also you can convert predicted BBs to ground truth. It can be done on individual BBs, on a sample, or on all samples.

Converting a predicted BB#

To convert a predicted BB, select the BB and RightClick it on a chart with predicted BBs. In the popup menu, you can select either Immediately accept selected predictions or Accept selected predictions. The difference between the two options is that the former is to directly convert the selected BB to the ground truth while the latter will bring up the Accept predicted bounding boxes dialog, where you can customize all the criteria for converting. The keyboard shortcuts for the two options are M and Ctrl+M, respectively.

‘Accept predicted bounding boxes’ dialog#

The figure below shows the default setup in the Accept predicted bounding boxes dialog. You can modify any of the fields based on your needs. Any changes in the dialog will be automatically updated and used as the criteria for subsequent BB conversion operations.

The dialog has four sections, including Scope, Matching criteria, Preview of results, and Attribute overrides.

Scope#

The scope determines which BBs changes made with the dialog will be applied to.

Options for the scope include:

  • All rows

  • Selected row

  • Selected predicted bounding boxes

When this dialog is brought up by one of the three methods, the corresponding scope will be automatically focused. For instance, when you bring up this dialog by selecting Accept selected predictions as described above, the scope Selected predicted bounding boxes will be focused. You can always click and change to other scopes in the dialog. It’s worth noting that when you click the Accept button, changes will be applied to BBs in the focused scope.

The scope determines at a high level the input BBs that the dialog applies to. The criteria in the remaining sections then define how matches are selected between predicted and ground truth BBs and what changes will be made, whether scoped to selected BBs or batch assigning for all rows of the entire dataset.

Matching criteria#

There are two parameters under the Matching criteria. Required IOU is an IOU threshold with default 0.5. A ground truth BB is considered matched if the IOU between this ground truth BB and the selected predicted BB(s), or all filtered-in predicted BBs for the given image if none of predicted BBs are selected, exceeds the IOU threshold. Note: if there are multiple ground truth BBs with IOUs that are with respect to the same predicted BB and exceed the threshold, only the one with the highest IOU is considered matched and the rest are unmatched. The predicted BB used to pair a matched ground truth BB is considered matched. Otherwise, it will be as an unmatched.

Require matching label values is a matching criterion optionally applied in addition to the Required IOU. When toggled on, it requires that the ground truth BB and the predicted BB share the same label to be considered a match.

Preview of results#

This section provides a visual preview of the changes that will be made if the dialog is accepted. The top portion contains two diagram boxes representing the current number of Predicted BBs and Ground truth BBs in scope. Those diagram boxes are connected via white arrows to three diagram boxes in the bottom portion categorizing the predicted and ground truth BBs into Unmatched predicted BBs, Matched ground truth BBs, and Unmatched ground truth BBs, according to the matching criteria defined in the section above. All of the diagram boxes in the preview section have their depth scaled by the number of BBs they represent to allow for visual comparison of the numbers involved.

The number of matched predicted BBs is always equal to the number of matched ground truth BBs as they are paired. Thus, as illustrated in the diagram chart, the sum of Unmatched predicted BBs and Matched ground truth BBs is equal to the selected predicted BBs or the filtered-in predicted BBs, and the sum of Matched ground truth BBs and Unmatched ground truth BBs is equal to the ground truth BBs.

Each of the boxes in the bottom portion of the section contains a checkbox to determine what will be done with the BBs in that category.

  • Checking the ADD option in the Unmatched predicted BBs box specifies that the unmatched predicted BBs should be added as ground truth BBs. Unchecking the ADD button specifies that the unmatched predicted BBs should not be added as ground truth BBs, i.e. that they should remain as predicted BBs.

  • Checking the UPDATE option in the Matched ground truth BBs box specifies that the existing ground truth BBs matched by predicted BBs should be replaced with those matching predicted BBs. Unchecking the UPDATE button means that the pairs of matching predicted BBs and ground truth BBs should be left as-is.

  • Checking the KEEP option in the Unmatched ground truth BBs box specifies that those ground truth BBs should be kept as ground truth BBs. Unchecking the KEEP option means that those unmatched ground truth BBs should be deleted.

Attribute overrides#

This section lists all available attributes that you can override when converting BBs. For instance, checking the label box and selecting a desired label will override the labels of all converted BBs to the selected one. This setting is often used when you want to assign a set of false positive predictions to a new class.

With all the settings, click the Accept button to complete the BB conversion. Next time, if you do not intend to change the settings, you can select Immediately accept selected predictions to bypass the dialog and use the existing settings.

Converting predicted BBs on a sample#

To convert all predicted BBs on a sample, RightClick on anywhere (non-BB area) in a chart with predicted BBs. You can select either Immediately accept predictions this row or Accept predictions this row. The latter will bring up the same Accept predicted bounding boxes dialog except that the scope Selected row will be focused. If you do not want to change any settings in the dialog, you can bypass it by selecting Immediately accept predictions this row. Note: only filtered-in predicted BBs will be converted, but all ground truth BBs on this sample will be considered for matching, even if they are filtered out.

Batch assigning all predicted BBs on all samples#

Similar to converting predicted BBs on a sample, batch assignments for filtered-in predicted BBs on all samples can be done in one of three ways:

  • RightClick on the BBS_PREDICTED menu at the lower left corner of the chart (see figure below)

  • Press shortcut Ctrl + B

  • Switch the scope to All rows on an opened Accept predicted bounding boxes dialog

In the Accept predicted bounding boxes dialog, the scope is on All rows and all other settings are the same as before if you have changed some previously. The numbers of BBs and rows in each diagram box under Preview of results give you a preview of how many BBs will be added/not added, updated/not updated, and kept/not kept (removed). Once you are satisfied with all of the settings, click Accept to complete the batch assignments.