Skip to content

Conversation

@JonathanHUnity
Copy link
Contributor

Peer Review Information:

Fixing bug where instance ids that do not match any IdLabelConfig entries are reported as matching the first entry, resulting in bounding boxes being drawn around objects whose labels have no matches in the IdLabelConfig.

Editor / Package versioning:

Editor Version Target (i.e. 19.3, 20.1): 2019.3

Dev Testing:

Tests Added:
Adding tests for LabelEntryMatchCache


Package Tests (Pass/Fail):
[X] - Make sure automation passes


Core Scenario Tested:


At Risk Areas:


Notes + Expectations:

…any entries are reported as matching the first entry.
/// <inheritdoc/>
public bool Equals(IdLabelEntry other)
{
return label == other.label && id == other.id;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't need to be addressed in this PR, but can we end up with a label that has the same string as another label but a different ID, or same ID but different strings?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two entries with the same id but different labels is certainly feasible - for example "Car" and "Truck" mapping to label id '1' in your dataset. "Car" mapping to both '1' and '2' doesn't make as much sense, since the first entry would always match.

From this struct's perspective though that's an implementation detail. For equality of simple data types it's almost always right to just compare all of the data.

Comment on lines +65 to +71
var label = "label";
//only way to guarantee registration order is to run frames.
//We want to ensure labeledPlane is registered before labeledPlane2 so that the cache does not early out
var labeledPlane = TestHelper.CreateLabeledPlane(label: "foo");
AddTestObjectForCleanup(labeledPlane);
yield return null;
var labeledPlane2 = TestHelper.CreateLabeledPlane(label: label);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kind of an anti-pattern here: one argument gets a variable name but the other doesn't

Copy link
Contributor

@mrpropellers mrpropellers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing alarming. Left a small nit if you're bored :)

@JonathanHUnity JonathanHUnity merged commit 385b68d into master Aug 21, 2020
@JonathanHUnity JonathanHUnity deleted the fix_unmatching_labels branch August 21, 2020 19:28
eugeneteoh pushed a commit to eugeneteoh/com.eugeneteoh.perception that referenced this pull request Apr 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants