Question
I'm generating manipulation data with mimic_gen, i.e. https://isaac-sim.github.io/IsaacLab/main/source/overview/teleop_imitation.html# . And I try to store the camera data (images) into the hdf5 file. But it takes a huge amount of time to store camera observation data into EpisodeData, almost over 100ms in each step.
I review the source code of IsaacLab, as following (https://github.com/isaac-sim/IsaacLab/blob/main/source/isaaclab/isaaclab/utils/datasets/episode_data.py, line 103-123)
sub_keys = key.split("/")
current_dataset_pointer = self._data
for sub_key_index in range(len(sub_keys)):
if sub_key_index == len(sub_keys) - 1:
# Add value to the final dict layer
if sub_keys[sub_key_index] not in current_dataset_pointer:
current_dataset_pointer[sub_keys[sub_key_index]] = value.unsqueeze(0).clone()
else:
current_dataset_pointer[sub_keys[sub_key_index]] = torch.cat(
(current_dataset_pointer[sub_keys[sub_key_index]], value.unsqueeze(0))
)
break
# key index
if sub_keys[sub_key_index] not in current_dataset_pointer:
current_dataset_pointer[sub_keys[sub_key_index]] = dict()
current_dataset_pointer = current_dataset_pointer[sub_keys[sub_key_index]]
In each simulation step, the image data would be stored into a single tensor variable by calling tensor.cat(...). It would take too much time when the image size is large.
Does anyone has suggestions, good idea to solve this problem?
Thanks
Question
I'm generating manipulation data with mimic_gen, i.e. https://isaac-sim.github.io/IsaacLab/main/source/overview/teleop_imitation.html# . And I try to store the camera data (images) into the hdf5 file. But it takes a huge amount of time to store camera observation data into EpisodeData, almost over 100ms in each step.
I review the source code of IsaacLab, as following (https://github.com/isaac-sim/IsaacLab/blob/main/source/isaaclab/isaaclab/utils/datasets/episode_data.py, line 103-123)
In each simulation step, the image data would be stored into a single tensor variable by calling tensor.cat(...). It would take too much time when the image size is large.
Does anyone has suggestions, good idea to solve this problem?
Thanks