Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,15 @@ Ideally you can start your GELLO near a known configuration each time. If this i
We have provided a simple example for collecting data with gello.
To save trajectories with the keyboard, add the following flag `--use-save-interface`

Data can then be processed using the demo_to_gdict script.
In order to process the data using the demo_to_gdict script, you will need to install the requirements by running
```
pip install -r requirements_data_process.txt
```
and then installing `ffmpeg` using your package manager. On Ubuntu, you can run
```
sudo apt install ffmpeg
```
Finally, run the demo_to_gdict script.
```
python gello/data_utils/demo_to_gdict.py --source-dir=<source dir location>
```
Expand Down
3 changes: 3 additions & 0 deletions gello/data_utils/gdict/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### `gdict`: dictionaries which support {np, torch} slicing.
---
taken from MS2: https://github.com/haosulab/ManiSkill2-Learn/tree/main/maniskill2_learn/utils
1 change: 1 addition & 0 deletions gello/data_utils/gdict/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .data import *
88 changes: 88 additions & 0 deletions gello/data_utils/gdict/data/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
from .array_ops import (
unsqueeze,
squeeze,
zeros_like,
ones_like,
repeat,
tile,
shuffle,
take,
concat,
stack,
share_memory,
to_item,
select_with_mask,
recover_with_mask,
slice_to_range,
detach,
split,
norm,
normalize,
clip,
arr_sum,
is_pcd,
arr_min,
arr_max,
arr_mean,
batch_shuffle,
batch_perm,
pad_item,
pad_clip,
clip_item,
to_gc,
to_nc,
encode_np,
decode_np,
gather,
to_two_dims,
reshape,
transpose,
contiguous,
split_dim,
slice_item,
sample_and_pad,
batch_index_select,
einsum,
broadcast_to,
deepcopy,
to_float
)
from .compression import float_to_int, int_to_float, f64_to_f32, to_f32, to_f16
from .converter import as_dtype, to_np, to_torch, to_array, dict_to_str, list_to_str, dict_to_seq, seq_to_dict, slice_to_range, range_to_slice, index_to_slice
from .dict_array import GDict, DictArray, SharedGDict, SharedDictArray, create_smm, delete_smm
from .filtering import filter_none, filter_with_regex
from .misc import equal, SLICE_ALL
from .seq_utils import (
concat_seq,
concat_list,
concat_tuple,
auto_pad_seq,
flatten_seq,
split_list_of_parameters,
select_by_index,
random_pad_clip_list,
)
from .string_utils import regex_match, custom_format, prefix_match, num_to_str, float_str, regex_replace, any_string, is_regex
from .type_utils import (
is_str,
is_dict,
is_num,
is_integer,
is_type,
is_seq_of,
is_list_of,
is_tuple_of,
is_iterable,
get_dtype,
is_np,
is_np_arr,
is_torch,
is_arr,
is_slice,
is_torch_distribution,
is_h5,
is_null,
is_not_null,
)
from .dict_utils import update_dict_with_begin_keys, first_dict_key, map_dict_keys, update_dict
from .wrappers import process_input, process_output, seq_to_np
Loading