Scheduled Commit
Browse files
groot/vla/model/dreamzero/transform/dreamzero_cotrain.py
CHANGED
|
@@ -126,9 +126,11 @@ def collate(features: List[dict], tokenizer: AutoTokenizer, num_views=3, embodim
|
|
| 126 |
processed_item = "A multi-view video shows that a robot " + processed_item.lower() + " The video is split into four views: The top-left view shows the top camera, the top-right view shows the right camera, the bottom-left view shows the left camera, and the bottom-right view is a black screen. The robot " + processed_item.lower()
|
| 127 |
elif elem["embodiment_id"] == embodiment_tag_mapping[EmbodimentTag.TREX.value]:
|
| 128 |
processed_item = "A multi-view video shows that a bimanual robot with dexterous hands " + processed_item.lower() + " The video is split into four views: The top-left view shows the camera view from the robot's head, the top-right view shows the camera view from the right wrist, the bottom-left view shows the camera view from the left wrist, and the bottom-right view is a black screen. The robot " + processed_item.lower()
|
|
|
|
|
|
|
| 129 |
else:
|
| 130 |
-
raise ValueError(f"Embodiment ID {elem['embodiment_id']} not supported.")
|
| 131 |
-
output_values.append(processed_item)
|
| 132 |
except (ValueError, SyntaxError, TypeError):
|
| 133 |
# If parsing fails or item is already a string, use it directly
|
| 134 |
if num_views > 1 and elem["embodiment_id"] == embodiment_tag_mapping[EmbodimentTag.AGIBOT.value]:
|
|
@@ -150,8 +152,10 @@ def collate(features: List[dict], tokenizer: AutoTokenizer, num_views=3, embodim
|
|
| 150 |
item = "A multi-view video shows that a robot " + str(item).lower() + " The video is split into four views: The top-left view shows the top camera, the top-right view shows the right camera, the bottom-left view shows the left camera, and the bottom-right view is a black screen. The robot " + str(item).lower()
|
| 151 |
elif elem["embodiment_id"] == embodiment_tag_mapping[EmbodimentTag.TREX.value]:
|
| 152 |
item = "A multi-view video shows that a bimanual robot with dexterous hands " + str(item).lower() + " The video is split into four views: The top-left view shows the camera view from the robot's head, the top-right view shows the camera view from the right wrist, the bottom-left view shows the camera view from the left wrist, and the bottom-right view is a black screen. The robot " + str(item).lower()
|
|
|
|
|
|
|
| 153 |
else:
|
| 154 |
-
raise ValueError(f"Embodiment ID {elem['embodiment_id']} not supported.")
|
| 155 |
output_values.append(item)
|
| 156 |
# print("output_values", output_values)
|
| 157 |
ids, mask = tokenizer(output_values, return_mask=True, add_special_tokens=True)
|
|
|
|
| 126 |
processed_item = "A multi-view video shows that a robot " + processed_item.lower() + " The video is split into four views: The top-left view shows the top camera, the top-right view shows the right camera, the bottom-left view shows the left camera, and the bottom-right view is a black screen. The robot " + processed_item.lower()
|
| 127 |
elif elem["embodiment_id"] == embodiment_tag_mapping[EmbodimentTag.TREX.value]:
|
| 128 |
processed_item = "A multi-view video shows that a bimanual robot with dexterous hands " + processed_item.lower() + " The video is split into four views: The top-left view shows the camera view from the robot's head, the top-right view shows the camera view from the right wrist, the bottom-left view shows the camera view from the left wrist, and the bottom-right view is a black screen. The robot " + processed_item.lower()
|
| 129 |
+
elif elem["embodiment_id"] == embodiment_tag_mapping[EmbodimentTag.ROBOCASA_BIMANUAL_PANDA_INSPIRE_HAND.value]:
|
| 130 |
+
processed_item = "A multi-view video shows that a bimanual robot with dexterous hands " + processed_item.lower() + " The video is split into four views: The top-left view shows the camera view from the robot's head, the top-right view shows the camera view from the right wrist, the bottom-left view shows the camera view from the left wrist, and the bottom-right view is a black screen. The robot " + processed_item.lower()
|
| 131 |
else:
|
| 132 |
+
raise ValueError(f"Embodiment ID {elem['embodiment_id']} not supported.")
|
| 133 |
+
output_values.append(processed_item)
|
| 134 |
except (ValueError, SyntaxError, TypeError):
|
| 135 |
# If parsing fails or item is already a string, use it directly
|
| 136 |
if num_views > 1 and elem["embodiment_id"] == embodiment_tag_mapping[EmbodimentTag.AGIBOT.value]:
|
|
|
|
| 152 |
item = "A multi-view video shows that a robot " + str(item).lower() + " The video is split into four views: The top-left view shows the top camera, the top-right view shows the right camera, the bottom-left view shows the left camera, and the bottom-right view is a black screen. The robot " + str(item).lower()
|
| 153 |
elif elem["embodiment_id"] == embodiment_tag_mapping[EmbodimentTag.TREX.value]:
|
| 154 |
item = "A multi-view video shows that a bimanual robot with dexterous hands " + str(item).lower() + " The video is split into four views: The top-left view shows the camera view from the robot's head, the top-right view shows the camera view from the right wrist, the bottom-left view shows the camera view from the left wrist, and the bottom-right view is a black screen. The robot " + str(item).lower()
|
| 155 |
+
elif elem["embodiment_id"] == embodiment_tag_mapping[EmbodimentTag.ROBOCASA_BIMANUAL_PANDA_INSPIRE_HAND.value]:
|
| 156 |
+
item = "A multi-view video shows that a bimanual robot with dexterous hands " + str(item).lower() + " The video is split into four views: The top-left view shows the camera view from the robot's head, the top-right view shows the camera view from the right wrist, the bottom-left view shows the camera view from the left wrist, and the bottom-right view is a black screen. The robot " + str(item).lower()
|
| 157 |
else:
|
| 158 |
+
raise ValueError(f"Embodiment ID {elem['embodiment_id']} not supported.")
|
| 159 |
output_values.append(item)
|
| 160 |
# print("output_values", output_values)
|
| 161 |
ids, mask = tokenizer(output_values, return_mask=True, add_special_tokens=True)
|