[BUG] Fix setting metadata after transform#414
Closed
UnravelSports wants to merge 2 commits intoPySport:masterfrom
Closed
[BUG] Fix setting metadata after transform#414UnravelSports wants to merge 2 commits intoPySport:masterfrom
UnravelSports wants to merge 2 commits intoPySport:masterfrom
Conversation
Contributor
Author
|
Note: This seems to still not work 100% correctly, because for some reason we store pitch dimensions in two places, namely:
The former is fixed, but using Edit: Both should now be addressed, if dataset.metadata.coordinate_system.pitch_length = to_pitch_dimensions.pitch_length
dataset.metadata.coordinate_system.pitch_width = to_pitch_dimensions.pitch_width |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As mentioned here #407 when calling
replace()on the metadata the changes are not actually reflected in the new metadata object.Aka, the below simply doesn't work:
Since
Metadatais not afrozendataclass we can also update the existing metadata as follows:Finally, at the end of the transformation we do this:
For some reason this messed up a test (see below) because "action_executing_team" was not set when calling
frame_t4.attacking_direction. However, I think this is an issue with how the test was set up, because a TrackingDataset (which is used in this test) does not have the ability to be set toACTION_EXECUTING_TEAM, and it should instead be transformed toBALL_OWNING_TEAMinstead.