debug: 归一化图像到[0, 1]
This commit is contained in:
@@ -87,6 +87,8 @@ class SimpleRobotDataset(Dataset):
|
||||
if h5_path in f:
|
||||
img = f[h5_path][meta["frame_idx"]]
|
||||
img = torch.from_numpy(img).float()
|
||||
# 归一化到 [0, 1] 范围(与推理时保持一致)
|
||||
img = img / 255.0
|
||||
frame[f"observation.{cam_name}"] = img.permute(2, 0, 1) # HWC -> CHW
|
||||
|
||||
return frame
|
||||
|
||||
Reference in New Issue
Block a user