Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IdentityIndex property to PoseIdentity #14

Merged
merged 4 commits into from
Jun 8, 2023

Conversation

bruno-f-cruz
Copy link
Contributor

@bruno-f-cruz bruno-f-cruz commented Jun 8, 2023

This PR adds an extra field to the PoseIdentity class that stores the ArgMax value from the Identity inference output vector when running the PredictPoseIdentities operator:

var maxIndex = ArgMax(idArr, iid, Comparer<float>.Default, out float maxScore);

This value is useful when the user wants to store the output of the network in a non-text format such as a flat binary file or HarpMessage objects.

For full backward compatibility, an [XmlIgnore] attribute was added to the property, guaranteeing that downstream operations', namely text-based logging using CsvWriter, behavior remains unchanged.

Finally, if the operator's property IdentityMinConfidence is greater than the inferred maximum confidence, the PoseIdentity class will be returned as:

IdentityIndex = -1
Confidence = float.NaN;
Identity = string.Empty;

@glopesdev glopesdev merged commit 76828a0 into bonsai-rx:main Jun 8, 2023
@bruno-f-cruz bruno-f-cruz deleted the id-index-bc branch June 8, 2023 10:31
@bruno-f-cruz bruno-f-cruz restored the id-index-bc branch June 8, 2023 10:32
@bruno-f-cruz bruno-f-cruz deleted the id-index-bc branch June 8, 2023 10:32
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