mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-24 10:16:09 +00:00
fix(ImageNet): excluding dpeth frames from ImageNet stats
This commit is contained in:
@@ -127,6 +127,8 @@ def make_dataset(cfg: TrainPipelineConfig) -> LeRobotDataset | MultiLeRobotDatas
|
|||||||
|
|
||||||
if cfg.dataset.use_imagenet_stats:
|
if cfg.dataset.use_imagenet_stats:
|
||||||
for key in dataset.meta.camera_keys:
|
for key in dataset.meta.camera_keys:
|
||||||
|
if key in dataset.meta.depth_keys:
|
||||||
|
continue # Exclude depth keys from ImageNet stats
|
||||||
for stats_type, stats in IMAGENET_STATS.items():
|
for stats_type, stats in IMAGENET_STATS.items():
|
||||||
dataset.meta.stats[key][stats_type] = torch.tensor(stats, dtype=torch.float32)
|
dataset.meta.stats[key][stats_type] = torch.tensor(stats, dtype=torch.float32)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user