Skip to content

Fix out-of-range seq_index in VKittiDataset during eval - #483

Open
somtri wants to merge 1 commit into
facebookresearch:mainfrom
somtri:fix-vkitti-seq-index-eval
Open

Fix out-of-range seq_index in VKittiDataset during eval#483
somtri wants to merge 1 commit into
facebookresearch:mainfrom
somtri:fix-vkitti-seq-index-eval

Conversation

@somtri

@somtri somtri commented Jul 18, 2026

Copy link
Copy Markdown

VKittiDataset.get_data() only resamples seq_index when inside_random and self.training are both true (vkitti.py:110). In eval mode (training=False), seq_index keeps whatever value the caller passed in, which can be a stale index from ComposedDataset's upsampling remap and out of range for sequence_list. That's the out-of-range seq_index reported in #353 (values like 5053 and 53547, far past the actual number of VKitti sequences).

co3d.py's get_data() does the same resampling without the training check (co3d.py:183). This drops the and self.training condition from vkitti.py so it matches that pattern.

Repro: built a VKittiDataset instance with 5 dummy sequences, inside_random=True, training=False, called get_data(seq_index=9999).

  • Before the fix: IndexError: list index out of range
  • After the fix: seq_index gets resampled into [0, 4], no error

This is a mocked instance-level repro, not a run against real VKitti data or a full training loop.

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.
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jul 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant