Fix out-of-range seq_index in VKittiDataset during eval - #483
Open
somtri wants to merge 1 commit into
Open
Conversation
VKittiDataset.get_data() only resamples seq_index when inside_random and self.training are both true. In eval mode, seq_index keeps whatever value the caller passed in, which can be out of range for sequence_list. co3d.py's get_data() does the same resampling without the training check, so this drops the same condition from vkitti.py to match. Fixes the out-of-range seq_index reported in facebookresearch#353.
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.
VKittiDataset.get_data()only resamplesseq_indexwheninside_randomandself.trainingare both true (vkitti.py:110). In eval mode (training=False),seq_indexkeeps whatever value the caller passed in, which can be a stale index fromComposedDataset's upsampling remap and out of range forsequence_list. That's the out-of-rangeseq_indexreported in #353 (values like 5053 and 53547, far past the actual number of VKitti sequences).co3d.py'sget_data()does the same resampling without the training check (co3d.py:183). This drops theand self.trainingcondition from vkitti.py so it matches that pattern.Repro: built a
VKittiDatasetinstance with 5 dummy sequences,inside_random=True,training=False, calledget_data(seq_index=9999).IndexError: list index out of rangeseq_indexgets resampled into[0, 4], no errorThis is a mocked instance-level repro, not a run against real VKitti data or a full training loop.