Skip to content

Commit

Permalink
Update export_kitti_minimal.py
Browse files Browse the repository at this point in the history
  • Loading branch information
liuQuan98 authored Aug 3, 2024
1 parent 3b2cd7d commit 4627752
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions assets/export_kitti_minimal.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,21 @@ def __init__(self,

# Select subset of the data to look at.
self.nusc = NuScenes(version=nusc_version, dataroot=nusc_dir, verbose=True)

def _split_to_samples(self, split_logs: List[str]) -> List[str]:
"""
Convenience function to get the samples in a particular split.
:param split_logs: A list of the log names in this split.
:return: The list of samples.
"""
samples = []
for sample in self.nusc.sample:
scene = self.nusc.get('scene', sample['scene_token'])
log = self.nusc.get('log', scene['log_token'])
logfile = log['logfile']
if logfile in split_logs:
samples.append(sample['token'])
return samples

def nuscenes_construct_kitti_PCR_data(self) -> None:
"""
Expand Down

0 comments on commit 4627752

Please sign in to comment.