Repository navigation
fix(schema): non-key frames have no sample, find key frames along the channel - #312
Closed
jacoblambert wants to merge 1 commit into
Closed
jacoblambert wants to merge 1 commit into
jacoblambert wants to merge 1 commit into
Conversation
Collaborator
Author
|
Memo: This approach was deemed inappropriate, instead include |
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.
Summary
Implements the decision in #311: in 1.0, only key frames belong to a sample, so non-key frames have
sample_data.sample_token: null. Code that needs the samples around a non-key frame walks its channel to the key frames, explicitly.In 0.x, non-key frames (about 90% of
sample_datain our datasets) point to the next sample, as in nuScenes. That link is easy to misread: it is not the frame's own sample, and not the nearest one.Changes
sample_token: null(V0Converter.convert_sample_data).T4Devkitmethods, for whoever relied on the 0.x link:get_prev_key_frame(sample_data_token): the key frame at or before the frame, walkingprev.get_next_key_frame(sample_data_token): the key frame at or after it, walkingnext.get_nearest_key_frame(sample_data_token): the closer of the two in time (the earlier on a tie).sample_datatoken, orNone;sample_data.sample_tokenof that frame gives the sample.get_box3dson a non-key frame: same result as before. It interpolated between the sample the 0.x link pointed to and its previous sample; it now finds that sample throughget_next_key_frame. After the last key frame (no next one), it returns the previous key frame's boxes. None of the local datasets has frames after the last key frame.get_box2dson a non-key frame: returns the 2D labels of that frame. Before, it returned the labels of the next sample, which are on other images.sample.ann_2dsholds the labels of key frames only, since non-key frames no longer link to a sample.docs/schema/v1/index.md(loading 0.x).Tests
tests/test_tier4.py::test_non_key_frame: one LiDAR frame of the 0.x sample made non-key (with the 0.x link to the next sample). It loads withsample_token: None; the previous / next / nearest key frames are found;get_box3dsgives the boxes of the next sample. Fails without the change.