jxu124 commited on
Commit
3cde9e7
1 Parent(s): 6fe49e6

Update OpenX-Embodiment.py

Browse files
Files changed (1) hide show
  1. OpenX-Embodiment.py +5 -0
OpenX-Embodiment.py CHANGED
@@ -22,6 +22,11 @@ def load_webdataset(filepath):
22
  data = [decode_data(v) for v in data]
23
  elif isinstance(data, np.ndarray): # wds to datasets
24
  data = data.tolist()
 
 
 
 
 
25
  return data
26
  return wds.WebDataset(filepath).decode().map(decode_data)
27
 
 
22
  data = [decode_data(v) for v in data]
23
  elif isinstance(data, np.ndarray): # wds to datasets
24
  data = data.tolist()
25
+ elif isinstance(data, bytes):
26
+ try:
27
+ data = PILImage.open(BytesIO(data))
28
+ except:
29
+ pass
30
  return data
31
  return wds.WebDataset(filepath).decode().map(decode_data)
32