diff --git a/.gitignore.save b/.gitignore.save new file mode 100644 index 0000000..a087382 --- /dev/null +++ b/.gitignore.save @@ -0,0 +1,153 @@ +bin +logs +wandb +outputs +data/ +data_local +.vscode +_wandb + +**/.DS_Store + +fuse.cfg + +*.ai + +# Generation results +results/ + +ray/auth.json + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +my_ckpt/ +eval_results/ +task_configs/* +!task_configs/template.py +!task_configs/example_task.py +!task_configs/loader.py +!task_configs/config_augmentation/ +!task_configs/config_tools/ +test.* +test/ +demonstrations/ +onnx_output/ diff --git a/chat.py b/chat.py new file mode 100644 index 0000000..1821ea1 --- /dev/null +++ b/chat.py @@ -0,0 +1,77 @@ +import base64 +import requests +import cv2 + +# OpenAI API Key + + + +# Read text from .txt file +def read_text_from_file(file_path): + with open(file_path, "r") as file: + text = file.read() + return text + +initial_prompt_path = "/home/dyh/OCIA/initial_prompt.txt" + +initial_prompt = read_text_from_file(initial_prompt_path) + +pass_me_the_bowl_path = '/home/dyh/OCIA/pass_me_the_fruit.txt' + +pass_me_the_bowl = read_text_from_file(pass_me_the_bowl_path) + +def capture_and_encode_image(camera_index): + # Open USB camera + cap = cv2.VideoCapture(camera_index) + # Read image from camera + ret, frame = cap.read() + # Release camera + cap.release() + if not ret: + raise ValueError("Failedto capture image") + # Convert image to JPEG format + _, image_buffer = cv2.imencode('.jpg', frame) + # Encode image buffer to base64 + base64_image = base64.b64encode(image_buffer).decode('utf-8') + return base64_image + +# Set USB camera index +camera_index = 2 + +# Capture and encode image from USB camera +base64_image = capture_and_encode_image(camera_index) + +headers = { + "Content-Type": "application/json", + "Authorization": f"Bearer {api_key}" +} + +payload = { + "model": "gpt-4o", + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": initial_prompt + }, + { + "type": "image_url", + "image_url": { + "url": f"data:image/jpeg;base64,{base64_image}" + } + }, + { + "type": "text", + "text": pass_me_the_bowl + } + ] + } + ], + "max_tokens": 720 +} + +response = requests.post("https://api.openai.com/v1/chat/completions", headers=headers, json=payload) + +print(response.json()) \ No newline at end of file diff --git a/chat_with_gpt.py b/chat_with_gpt.py new file mode 100644 index 0000000..6683d57 --- /dev/null +++ b/chat_with_gpt.py @@ -0,0 +1,40 @@ +import os +import base64 +from openai import OpenAI + +# Set up proxy if needed +os.environ["http_proxy"] = "http://localhost:7890" +os.environ["https_proxy"] = "http://localhost:7890" + +def encode_image(image_path): + with open(image_path, "rb") as image_file: + return base64.b64encode(image_file.read()).decode('utf-8') + +# Path to your image +image_path = "/home/qiuzhi/bowls.png" + +# Getting the base64 string +base64_image = encode_image(image_path) + +client = OpenAI() + +response = client.chat.completions.create( + model="gpt-4o-mini", + messages=[ + { + "role": "user", + "content": [ + {"type": "text", "text": "What’s in this image?"}, + { + "type": "image_url", + "image_url": { + "url": f"data:image/jpeg;base64,{base64_image}", + }, + }, + ], + } + ], + max_tokens=300, +) + +print(response.choices[0]) \ No newline at end of file diff --git a/data_process/convert_all.py b/data_process/convert_all.py index c34439c..6a79687 100644 --- a/data_process/convert_all.py +++ b/data_process/convert_all.py @@ -55,17 +55,26 @@ def flatten_list(l): def flatten_sublist_in_flat_dict(d: dict) -> dict: """Flatten the sublist in the flat dict. This will change the original dict. - Returns the lenth of each value list. + Returns the length of each value list. """ trajs_lenth = {} + assert isinstance(d, dict), "The input data should be a dict." for key, traj in d.items(): + if not isinstance(traj, (list, tuple)): + print(f"Warning: The value for key '{key}' is not a list or tuple, but {type(traj)}") + trajs_lenth[key] = 0 + continue + traj_lenth = len(traj) if traj_lenth > 0: point = traj[0] if isinstance(point, list): if isinstance(point[0], list): for i, p in enumerate(traj): - traj[i] = sum(p, []) + if isinstance(p, list): + traj[i] = sum(p, []) + else: + print(f"Warning: The sublist for key '{key}' at index {i} is not a list, but {type(p)}") trajs_lenth[key] = traj_lenth return trajs_lenth @@ -292,6 +301,7 @@ def raw_to_dict( flatten_mode(str) -- the flatten mode for the dict keys name_converter(dict) -- the name converter for the flattened dict keys concatenater(dict) -- the concatenate dict to bind several flattened keys together + key_filter -- the key filter to remove the keys Returns: ep_dicts(dict) -- the raw data dictionary, with keys as the episode names Note: @@ -320,12 +330,17 @@ def raw_to_dict( ) # flatten the dict mode_to_sep_prefix = { - "hdf5": ("/", "/"), + "hdf5": ("/", ""), "hf": (".", ""), } sep_prefix = mode_to_sep_prefix.get(flatten_mode, None) assert sep_prefix is not None, f"Invalid flatten mode {flatten_mode}." data_flat: Dict[str, list] = flatten_dict(raw_data, "", *sep_prefix) + + # 检查 "/observations/stage" 键是否存在 + if "/observations/stage" not in data_flat: + print(f"Key '/observations/stage' not found in {ep_dir / state_file}") + # filter the keys if key_filter is not None: for key in key_filter: @@ -346,6 +361,7 @@ def raw_to_dict( ), "The length of each value list should be the same." for key, value in data_flat.items(): name = name_converter.get(key, key) + # print(f"Original key: {key}, Converted name: {name}") ep_dict[name] = pre_process(value) if video_file_names is not None: diff --git a/data_process/test_convert_airbot_play.ipynb b/data_process/test_convert_airbot_play.ipynb new file mode 100644 index 0000000..a07d02b --- /dev/null +++ b/data_process/test_convert_airbot_play.ipynb @@ -0,0 +1,548 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "%load_ext autoreload\n", + "%autoreload 2" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "DEBUG:h5py._conv:Creating converter from 7 to 5\n", + "DEBUG:h5py._conv:Creating converter from 5 to 7\n", + "DEBUG:h5py._conv:Creating converter from 7 to 5\n", + "DEBUG:h5py._conv:Creating converter from 5 to 7\n" + ] + } + ], + "source": [ + "import convert_all as crd" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Data Converting: 100%|██████████| 50/50 [00:00<00:00, 282.88it/s]" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "Warning: The value for key 'count' is not a list or tuple, but \n", + "[[-0.10166323184967041, -1.0812923908233643, 1.2232013940811157, 1.6962310075759888, -1.3185702562332153, -1.7835888862609863, 0.029158109387794097], [-0.10166323184967041, -1.0816738605499268, 1.2232013940811157, 1.6962310075759888, -1.3227664232254028, -1.7843518257141113, 0.029158109387794097], [-0.10166323184967041, -1.0816738605499268, 1.2232013940811157, 1.6966124773025513, -1.3277256488800049, -1.7877851724624634, 0.029158109387794097], [-0.10166323184967041, -1.0816738605499268, 1.2232013940811157, 1.6969939470291138, -1.3307774066925049, -1.7900739908218384, 0.029158109387794097], [-0.10204470902681351, -1.0816738605499268, 1.2232013940811157, 1.6989012956619263, -1.3368810415267944, -1.793888807296753, 0.029158109387794097], [-0.1028076633810997, -1.0816738605499268, 1.2232013940811157, 1.7057678699493408, -1.3448920249938965, -1.8015183210372925, 0.053681535767270375], [-0.1028076633810997, -1.0816738605499268, 1.2232013940811157, 1.7103456258773804, -1.354047417640686, -1.8087663650512695, 0.42326691862824684], [-0.1028076633810997, -1.0816738605499268, 1.2232013940811157, 1.7137788534164429, -1.3586251735687256, -1.8183032274246216, 0.841403797075346], [-0.1028076633810997, -1.0816738605499268, 1.2232013940811157, 1.7168307304382324, -1.361295461654663, -1.8270771503448486, 0.9261210398240524], [-0.1028076633810997, -1.0816738605499268, 1.2232013940811157, 1.7206454277038574, -1.3643473386764526, -1.8347066640853882, 0.9258733322094014], [-0.1028076633810997, -1.0816738605499268, 1.2170977592468262, 1.723697304725647, -1.3639658689498901, -1.8438620567321777, 0.9258733322094014], [-0.1028076633810997, -1.0816738605499268, 1.198405385017395, 1.7248417139053345, -1.3624398708343506, -1.8556878566741943, 0.9258733322094014], [-0.1028076633810997, -1.0797665119171143, 1.1675058603286743, 1.725223183631897, -1.344510555267334, -1.8659876585006714, 0.9261210398240524], [-0.1028076633810997, -1.0725184679031372, 1.1324101686477661, 1.7278934717178345, -1.3044556379318237, -1.875143051147461, 0.9258733322094014], [-0.1028076633810997, -1.0618371963500977, 1.0950255393981934, 1.729037880897522, -1.261730432510376, -1.8850613832473755, 0.9258733322094014], [-0.1028076633810997, -1.046196699142456, 1.0538262128829956, 1.729800820350647, -1.2140458822250366, -1.8938353061676025, 0.9258733322094014], [-0.1024261862039566, -1.0263599157333374, 1.0118639469146729, 1.731708288192749, -1.1720836162567139, -1.9045166969299316, 0.9258733322094014], [-0.1024261862039566, -1.0023269653320312, 0.9744792580604553, 1.7366673946380615, -1.126688003540039, -1.9136720895767212, 0.9258733322094014], [-0.1024261862039566, -0.9786755442619324, 0.9431982636451721, 1.7462043762207031, -1.0900664329528809, -1.9262608289718628, 0.9258733322094014], [-0.1024261862039566, -0.9618905782699585, 0.9199283123016357, 1.7553597688674927, -1.0664149522781372, -1.9396123886108398, 0.9258733322094014], [-0.10166323184967041, -0.951209306716919, 0.9008545279502869, 1.7629892826080322, -1.052681803703308, -1.946860432624817, 0.9258733322094014], [-0.10166323184967041, -0.9439612627029419, 0.8821622133255005, 1.7687113285064697, -1.039711594581604, -1.954108476638794, 0.9258733322094014], [-0.10166323184967041, -0.9393835067749023, 0.8638513684272766, 1.7736705541610718, -1.022926688194275, -1.957541823387146, 0.9258733322094014], [-0.10166323184967041, -0.9363317489624023, 0.8451590538024902, 1.7763408422470093, -1.0049973726272583, -1.9617379903793335, 0.9258733322094014], [-0.10166323184967041, -0.9344243407249451, 0.8268482685089111, 1.7793927192687988, -0.9786755442619324, -1.964408278465271, 0.9258733322094014], [-0.10166323184967041, -0.9336614012718201, 0.8096818327903748, 1.7813000679016113, -0.9561684727668762, -1.965552806854248, 0.9258733322094014], [-0.10166323184967041, -0.9332799315452576, 0.7936598658561707, 1.7862592935562134, -0.9279392957687378, -1.967841625213623, 0.9258733322094014], [-0.10166323184967041, -0.9332799315452576, 0.7803082466125488, 1.7923628091812134, -0.9088655114173889, -1.9720377922058105, 0.9258733322094014], [-0.10166323184967041, -0.9359502792358398, 0.7722972631454468, 1.80113685131073, -0.8947508931159973, -1.9747081995010376, 0.9258733322094014], [-0.09517814964056015, -0.9420538544654846, 0.7661936283111572, 1.8083847761154175, -0.883306622505188, -1.9762340784072876, 0.9258733322094014], [-0.07839322835206985, -0.9515907764434814, 0.76276034116745, 1.8095293045043945, -0.8752956390380859, -1.9777599573135376, 0.9258733322094014], [-0.05397878959774971, -0.9657053351402283, 0.7600900530815125, 1.8053330183029175, -0.8623254895210266, -1.97356379032135, 0.9258733322094014], [-0.03032730519771576, -0.9828717708587646, 0.7589455842971802, 1.7896925210952759, -0.8413442969322205, -1.9560158252716064, 0.9258733322094014], [-0.013923857361078262, -1.0034713745117188, 0.7578011751174927, 1.7751964330673218, -0.8203631639480591, -1.9342718124389648, 0.9258733322094014], [-0.004386968910694122, -1.024452567100525, 0.7574197053909302, 1.7599374055862427, -0.8070115447044373, -1.9136720895767212, 0.9258733322094014], [0.0020981156267225742, -1.042000412940979, 0.7566567659378052, 1.7484931945800781, -0.8005264401435852, -1.900701880455017, 0.9258733322094014], [0.006294346414506435, -1.0515373945236206, 0.7562752962112427, 1.7381932735443115, -0.7974746227264404, -1.8907835483551025, 0.9258733322094014], [0.009346150793135166, -1.0561150312423706, 0.7562752962112427, 1.733997106552124, -0.7925154566764832, -1.884679913520813, 0.9229008408335897], [0.010490577667951584, -1.0595483779907227, 0.7562752962112427, 1.7240787744522095, -0.7913710474967957, -1.8778133392333984, 0.7975588526044574], [0.012397955171763897, -1.0610742568969727, 0.7562752962112427, 1.7130159139633179, -0.7913710474967957, -1.8663691282272339, 0.5409298546902546], [0.012397955171763897, -1.0626001358032227, 0.7562752962112427, 1.7072938680648804, -0.7906080484390259, -1.8568322658538818, 0.34053133679674824], [0.013542382046580315, -1.0633630752563477, 0.7566567659378052, 1.7015717029571533, -0.7894636392593384, -1.8469138145446777, 0.34053133679674824], [0.013542382046580315, -1.0648889541625977, 0.76276034116745, 1.6973754167556763, -0.7925154566764832, -1.8396657705307007, 0.34053133679674824], [0.013542382046580315, -1.0645074844360352, 0.7799267768859863, 1.6977568864822388, -0.7932783961296082, -1.8343251943588257, 0.34053133679674824], [0.013923857361078262, -1.0648889541625977, 0.802815318107605, 1.7030975818634033, -0.8001449704170227, -1.8324178457260132, 0.34053133679674824], [0.013923857361078262, -1.0648889541625977, 0.8287556171417236, 1.7107270956039429, -0.8085374236106873, -1.8286030292510986, 0.34053133679674824], [0.01430533267557621, -1.0648889541625977, 0.8562218546867371, 1.7175936698913574, -0.8203631639480591, -1.8251698017120361, 0.34053133679674824], [0.01430533267557621, -1.0652704238891602, 0.882543683052063, 1.7240787744522095, -0.8264667987823486, -1.8236438035964966, 0.34053133679674824], [0.01430533267557621, -1.0652704238891602, 0.9069581031799316, 1.7286564111709595, -0.8321889042854309, -1.8213549852371216, 0.34053133679674824], [0.01430533267557621, -1.0664149522781372, 0.9279392957687378, 1.7343785762786865, -0.8363851308822632, -1.8198291063308716, 0.34053133679674824], [0.01430533267557621, -1.0667964220046997, 0.9458686113357544, 1.7374303340911865, -0.8363851308822632, -1.8175402879714966, 0.34053133679674824], [0.01430533267557621, -1.0675593614578247, 0.9626535177230835, 1.7401007413864136, -0.8291370868682861, -1.8163957595825195, 0.34053133679674824], [0.01430533267557621, -1.0679408311843872, 0.9779125452041626, 1.742008090019226, -0.8230335116386414, -1.814488410949707, 0.34028362918209726], [0.01430533267557621, -1.0740443468093872, 0.9946975111961365, 1.7431524991989136, -0.8165484070777893, -1.813725471496582, 0.34028362918209726], [0.01430533267557621, -1.0912108421325684, 1.0156786441802979, 1.743533968925476, -0.8215075731277466, -1.810673713684082, 0.34028362918209726], [0.01430533267557621, -1.1167696714401245, 1.038948655128479, 1.744296908378601, -0.8299000263214111, -1.8095293045043945, 0.34028362918209726], [0.01430533267557621, -1.1476691961288452, 1.0622186660766602, 1.7469673156738281, -0.8367666006088257, -1.8060959577560425, 0.34028362918209726], [0.01430533267557621, -1.180094599723816, 1.0809109210968018, 1.7492561340332031, -0.8436331748962402, -1.7988479137420654, 0.34028362918209726], [0.01430533267557621, -1.2125200033187866, 1.0946440696716309, 1.7504005432128906, -0.8447775840759277, -1.7935073375701904, 0.34028362918209726], [0.01430533267557621, -1.2434195280075073, 1.103417992591858, 1.7504005432128906, -0.8447775840759277, -1.7908369302749634, 0.34028362918209726], [0.01430533267557621, -1.272793173789978, 1.1087586879730225, 1.7500190734863281, -0.841725766658783, -1.7900739908218384, 0.34028362918209726], [0.01430533267557621, -1.2998778820037842, 1.1125733852386475, 1.7496376037597656, -0.8360036611557007, -1.7900739908218384, 0.34028362918209726], [0.01430533267557621, -1.3239108324050903, 1.114862322807312, 1.7500190734863281, -0.8348592519760132, -1.7896925210952759, 0.34028362918209726], [0.01430533267557621, -1.342221736907959, 1.1160067319869995, 1.7496376037597656, -0.8321889042854309, -1.7896925210952759, 0.34028362918209726], [0.01430533267557621, -1.353284478187561, 1.1175326108932495, 1.7496376037597656, -0.8299000263214111, -1.7900739908218384, 0.38239456229395685], [0.01430533267557621, -1.359006643295288, 1.118677020072937, 1.7496376037597656, -0.8253223299980164, -1.7915998697280884, 0.7316676207951137], [0.01430533267557621, -1.3635843992233276, 1.118677020072937, 1.7488746643066406, -0.8234149813652039, -1.7927442789077759, 0.9236439636775426], [0.01430533267557621, -1.3654917478561401, 1.1190584897994995, 1.7462043762207031, -0.8237964510917664, -1.7942702770233154, 0.9315706847550034], [0.01430533267557621, -1.3673990964889526, 1.1190584897994995, 1.7431524991989136, -0.8245593905448914, -1.7950332164764404, 0.9315706847550034], [0.01430533267557621, -1.3666361570358276, 1.1190584897994995, 1.741245150566101, -0.8257037997245789, -1.7950332164764404, 0.9315706847550034], [0.01430533267557621, -1.3586251735687256, 1.1190584897994995, 1.7393378019332886, -0.8268482685089111, -1.794651746749878, 0.9315706847550034], [0.01430533267557621, -1.339551329612732, 1.1190584897994995, 1.7343785762786865, -0.8268482685089111, -1.7942702770233154, 0.9315706847550034], [0.01430533267557621, -1.3120851516723633, 1.119439959526062, 1.7278934717178345, -0.8253223299980164, -1.7923628091812134, 0.9315706847550034], [0.01430533267557621, -1.2796597480773926, 1.119439959526062, 1.720263957977295, -0.8260852694511414, -1.7893110513687134, 0.9315706847550034], [0.01430533267557621, -1.2464714050292969, 1.119439959526062, 1.7111085653305054, -0.8337147831916809, -1.7866407632827759, 0.9315706847550034], [0.01430533267557621, -1.2148088216781616, 1.119439959526062, 1.7000458240509033, -0.8527885675430298, -1.7832074165344238, 0.9315706847550034], [0.01430533267557621, -1.1861982345581055, 1.119439959526062, 1.6821163892745972, -0.881780743598938, -1.7786297798156738, 0.9315706847550034], [0.01430533267557621, -1.1644541025161743, 1.119439959526062, 1.658846378326416, -0.9180209040641785, -1.7675669193267822, 0.9315706847550034], [0.01430533267557621, -1.1472877264022827, 1.1190584897994995, 1.6306172609329224, -0.9637979865074158, -1.7557412385940552, 0.9315706847550034], [0.01430533267557621, -1.1362248659133911, 1.117914080619812, 1.6023880243301392, -1.0107194185256958, -1.745059847831726, 0.9315706847550034], [0.01430533267557621, -1.1285953521728516, 1.1175326108932495, 1.5749218463897705, -1.058022379875183, -1.733234167098999, 0.9315706847550034], [0.01430533267557621, -1.124399185180664, 1.1167696714401245, 1.5520333051681519, -1.101129174232483, -1.7248417139053345, 0.9315706847550034], [0.01430533267557621, -1.120965838432312, 1.1167696714401245, 1.5310521125793457, -1.1388952732086182, -1.7137788534164429, 0.9315706847550034], [0.01430533267557621, -1.1190584897994995, 1.116388201713562, 1.5093079805374146, -1.1724650859832764, -1.7050049304962158, 0.9313229771403524], [0.013923857361078262, -1.1175326108932495, 1.116388201713562, 1.489852786064148, -1.196879506111145, -1.7004272937774658, 0.9248825017507974], [0.013542382046580315, -1.117151141166687, 1.116388201713562, 1.4723048210144043, -1.2148088216781616, -1.6950865983963013, 0.9236439636775426], [0.013542382046580315, -1.117151141166687, 1.115625262260437, 1.4612420797348022, -1.2277790307998657, -1.6939421892166138, 0.9236439636775426], [0.010109102353453636, -1.117151141166687, 1.1102845668792725, 1.4517052173614502, -1.2373158931732178, -1.6943236589431763, 0.9236439636775426], [-0.009727626107633114, -1.1175326108932495, 1.0999847650527954, 1.4494163990020752, -1.2422751188278198, -1.6966124773025513, 0.9236439636775426], [-0.045204851776361465, -1.117914080619812, 1.0847257375717163, 1.4566643238067627, -1.2430380582809448, -1.7053864002227783, 0.9236439636775426], [-0.08602273464202881, -1.1182955503463745, 1.0706111192703247, 1.4837491512298584, -1.2380788326263428, -1.7233158349990845, 0.9236439636775426], [-0.12378881871700287, -1.1182955503463745, 1.0587854385375977, 1.5283818244934082, -1.2235828638076782, -1.7473487854003906, 0.9236439636775426], [-0.1512550562620163, -1.1190584897994995, 1.0503928661346436, 1.565384864807129, -1.2144273519515991, -1.7702373266220093, 0.9236439636775426], [-0.17147326469421387, -1.1232547760009766, 1.0442893505096436, 1.593614101409912, -1.202601671218872, -1.7885481119155884, 0.9236439636775426], [-0.18635080754756927, -1.1335545778274536, 1.041237473487854, 1.6096360683441162, -1.1980239152908325, -1.8045700788497925, 0.9236439636775426], [-0.1962691694498062, -1.1484321355819702, 1.0385671854019165, 1.6298543214797974, -1.1934462785720825, -1.816014289855957, 0.9236439636775426], [-0.20275425910949707, -1.1675058603286743, 1.0370413064956665, 1.644350290298462, -1.1892499923706055, -1.8266956806182861, 0.9236439636775426], [-0.20542457699775696, -1.1884870529174805, 1.035896897315979, 1.658083438873291, -1.188105583190918, -1.8335622549057007, 0.9236439636775426], [-0.20733195543289185, -1.2083238363265991, 1.0355154275894165, 1.6687648296356201, -1.1854352951049805, -1.8358510732650757, 0.9236439636775426], [-0.20962081849575043, -1.2281605005264282, 1.0351338386535645, 1.6760128736495972, -1.178568720817566, -1.8389028310775757, 0.9236439636775426], [-0.21114671230316162, -1.2479972839355469, 1.034752368927002, 1.6809719800949097, -1.176279902458191, -1.8411917686462402, 0.9238916712921936], [-0.21152819693088531, -1.2659265995025635, 1.034752368927002, 1.6809719800949097, -1.1728465557098389, -1.8415732383728027, 0.9238916712921936], [-0.21152819693088531, -1.27927827835083, 1.0343708992004395, 1.6752498149871826, -1.1724650859832764, -1.8415732383728027, 0.9236439636775426], [-0.21229113638401031, -1.2899595499038696, 1.0343708992004395, 1.6649500131607056, -1.1709392070770264, -1.8404288291931152, 0.9236439636775426], [-0.21229113638401031, -1.2975890636444092, 1.0343708992004395, 1.6512168645858765, -1.1686503887176514, -1.8347066640853882, 0.9236439636775426], [-0.212672621011734, -1.3044556379318237, 1.0343708992004395, 1.6386282444000244, -1.1667429208755493, -1.8301289081573486, 0.9236439636775426], [-0.212672621011734, -1.3128480911254883, 1.0343708992004395, 1.6302357912063599, -1.1648355722427368, -1.8247883319854736, 0.9236439636775426], [-0.212672621011734, -1.3227664232254028, 1.033989429473877, 1.6237506866455078, -1.1636911630630493, -1.8175402879714966, 0.9236439636775426], [-0.212672621011734, -1.334210753440857, 1.0343708992004395, 1.6191729307174683, -1.1572060585021973, -1.8148698806762695, 0.9236439636775426], [-0.2134355753660202, -1.3471808433532715, 1.033989429473877, 1.6142138242721558, -1.1488136053085327, -1.813725471496582, 0.9238916712921936], [-0.2134355753660202, -1.362821340560913, 1.033989429473877, 1.6115434169769287, -1.1404211521148682, -1.8102922439575195, 0.9199282720491484], [-0.2134355753660202, -1.3780803680419922, 1.033989429473877, 1.6103990077972412, -1.1385138034820557, -1.809147834777832, 0.8619638387258951], [-0.2134355753660202, -1.3906691074371338, 1.033989429473877, 1.6111619472503662, -1.1358433961868286, -1.8076218366622925, 0.6719691954649888], [-0.2134355753660202, -1.3952468633651733, 1.034752368927002, 1.6111619472503662, -1.1366063356399536, -1.806477427482605, 0.5674349565010567], [-0.2134355753660202, -1.3960098028182983, 1.0385671854019165, 1.6100175380706787, -1.1369879245758057, -1.798466444015503, 0.5674349565010567], [-0.21114671230316162, -1.3891432285308838, 1.0465781688690186, 1.6073472499847412, -1.1415655612945557, -1.7885481119155884, 0.5669395412717547], [-0.21152819693088531, -1.3757915496826172, 1.0538262128829956, 1.6077287197113037, -1.1449989080429077, -1.7828259468078613, 0.5565356666391547], [-0.21152819693088531, -1.357480764389038, 1.0576409101486206, 1.6058213710784912, -1.1552987098693848, -1.7805371284484863, 0.5562879590245037], [-0.21152819693088531, -1.3368810415267944, 1.0610742568969727, 1.6020065546035767, -1.1564431190490723, -1.7790112495422363, 0.5562879590245037], [-0.21152819693088531, -1.3147554397583008, 1.0629816055297852, 1.5985733270645142, -1.1572060585021973, -1.7774853706359863, 0.5562879590245037], [-0.21152819693088531, -1.2956817150115967, 1.0660333633422852, 1.596665859222412, -1.1491950750350952, -1.7778668403625488, 0.5562879590245037], [-0.21152819693088531, -1.28233003616333, 1.0767147541046143, 1.5955214500427246, -1.1461433172225952, -1.7790112495422363, 0.5560402514098527], [-0.21152819693088531, -1.2739375829696655, 1.0915923118591309, 1.595902919769287, -1.1442358493804932, -1.7797741889953613, 0.5560402514098527], [-0.21152819693088531, -1.268596887588501, 1.1095216274261475, 1.5970473289489746, -1.1434729099273682, -1.7801556587219238, 0.5560402514098527], [-0.21152819693088531, -1.266308069229126, 1.1289769411087036, 1.597428798675537, -1.1392767429351807, -1.7801556587219238, 0.5560402514098527], [-0.21152819693088531, -1.2659265995025635, 1.1503394842147827, 1.5978103876113892, -1.1358433961868286, -1.7805371284484863, 0.5560402514098527], [-0.21152819693088531, -1.271267294883728, 1.176279902458191, 1.5985733270645142, -1.1324101686477661, -1.7805371284484863, 0.5560402514098527], [-0.21152819693088531, -1.2842373847961426, 1.2075608968734741, 1.6016250848770142, -1.1335545778274536, -1.7805371284484863, 0.5560402514098527], [-0.21152819693088531, -1.3025482892990112, 1.2403677701950073, 1.6084916591644287, -1.1362248659133911, -1.7805371284484863, 0.5560402514098527], [-0.21152819693088531, -1.3273441791534424, 1.272793173789978, 1.6157397031784058, -1.1430914402008057, -1.7793927192687988, 0.5560402514098527], [-0.21152819693088531, -1.355954885482788, 1.3052185773849487, 1.6210802793502808, -1.1465247869491577, -1.7725261449813843, 0.5557925437952018], [-0.21152819693088531, -1.3879988193511963, 1.3361181020736694, 1.6271839141845703, -1.1533913612365723, -1.7656595706939697, 0.5560402514098527], [-0.21152819693088531, -1.4215686321258545, 1.3654917478561401, 1.6317616701126099, -1.1625467538833618, -1.7610818147659302, 0.5557925437952018], [-0.21190966665744781, -1.4532310962677002, 1.3933393955230713, 1.6351948976516724, -1.1686503887176514, -1.7542153596878052, 0.5557925437952018], [-0.21152819693088531, -1.484130620956421, 1.4158464670181274, 1.6371023654937744, -1.1804760694503784, -1.7484931945800781, 0.5557925437952018], [-0.21152819693088531, -1.5108338594436646, 1.434920310974121, 1.6386282444000244, -1.1854352951049805, -1.743533968925476, 0.5557925437952018], [-0.21190966665744781, -1.5360113382339478, 1.4463645219802856, 1.6393911838531494, -1.1919203996658325, -1.7381932735443115, 0.5557925437952018], [-0.21152819693088531, -1.5596628189086914, 1.4539940357208252, 1.639772653579712, -1.201838731765747, -1.737048864364624, 0.5557925437952018], [-0.21152819693088531, -1.580643892288208, 1.4593347311019897, 1.6401541233062744, -1.2090867757797241, -1.735522985458374, 0.5557925437952018], [-0.21152819693088531, -1.5985733270645142, 1.4616235494613647, 1.6401541233062744, -1.2190051078796387, -1.7351415157318115, 0.5557925437952018], [-0.21190966665744781, -1.6081101894378662, 1.4642938375473022, 1.6393911838531494, -1.2201495170593262, -1.7343785762786865, 0.5587650738753283], [-0.21190966665744781, -1.6134508848190308, 1.4658198356628418, 1.6363393068313599, -1.2174792289733887, -1.728274941444397, 0.7039239422067419], [-0.21152819693088531, -1.6138323545455933, 1.4669642448425293, 1.6306172609329224, -1.2113755941390991, -1.7240787744522095, 0.9377635299385368], [-0.21190966665744781, -1.6130692958831787, 1.4669642448425293, 1.6241321563720703, -1.2067978382110596, -1.71950101852417, 0.980369858927541], [-0.21152819693088531, -1.6065843105316162, 1.4677271842956543, 1.6191729307174683, -1.204127550125122, -1.7160677909851074, 0.9798744436982391], [-0.21152819693088531, -1.5978103876113892, 1.4677271842956543, 1.6161211729049683, -1.200312852859497, -1.7160677909851074, 0.9796267360835881], [-0.21152819693088531, -1.5882734060287476, 1.4665827751159668, 1.6229877471923828, -1.2029831409454346, -1.7183566093444824, 0.9563418332632486], [-0.20962081849575043, -1.575303316116333, 1.4612420797348022, 1.639009714126587, -1.206416368484497, -1.7320897579193115, 0.7720445812522592], [-0.1993209719657898, -1.559281349182129, 1.4467459917068481, 1.6519798040390015, -1.204890489578247, -1.7565041780471802, 0.6759325560037192], [-0.1817730963230133, -1.5348668098449707, 1.4230945110321045, 1.658846378326416, -1.188105583190918, -1.7790112495422363, 0.6694920806141643], [-0.15850308537483215, -1.5070191621780396, 1.3921949863433838, 1.663805603981018, -1.1633096933364868, -1.7965590953826904, 0.5959217966376962], [-0.13218127191066742, -1.4745937585830688, 1.3586251735687256, 1.6664758920669556, -1.1339360475540161, -1.8102922439575195, 0.5221037663422623], [-0.10547798871994019, -1.4417868852615356, 1.3204776048660278, 1.6680018901824951, -1.1015106439590454, -1.8198291063308716, 0.42004668093346936], [-0.07877469807863235, -1.4085984230041504, 1.278515338897705, 1.6687648296356201, -1.0664149522781372, -1.8270771503448486, 0.1406282341325438], [-0.053215838968753815, -1.3757915496826172, 1.2323567867279053, 1.6691462993621826, -1.027885913848877, -1.8331807851791382, 0.028662684482413454], [-0.029182879254221916, -1.3418402671813965, 1.185053825378418, 1.6702907085418701, -0.9897382855415344, -1.8343251943588257, 0.02593786201693795], [-0.008201723918318748, -1.3071259260177612, 1.1392767429351807, 1.6714351177215576, -0.953498125076294, -1.8366140127182007, 0.02593786201693795], [0.009346150793135166, -1.2708858251571655, 1.0938811302185059, 1.6729609966278076, -0.9233615398406982, -1.8377584218978882, 0.02593786201693795], [0.02079041674733162, -1.2346456050872803, 1.0496299266815186, 1.6744868755340576, -0.8951323628425598, -1.8389028310775757, 0.02593786201693795], [0.02727550081908703, -1.19611656665802, 1.0027084350585938, 1.6752498149871826, -0.8657587766647339, -1.8392843008041382, 0.02593786201693795], [0.03185320645570755, -1.1541543006896973, 0.951209306716919, 1.6748683452606201, -0.8337147831916809, -1.8350881338119507, 0.02593786201693795], [0.03528648987412453, -1.1110475063323975, 0.8997100591659546, 1.6748683452606201, -0.7974746227264404, -1.8205920457839966, 0.02593786201693795], [0.03795681521296501, -1.0694667100906372, 0.8512626886367798, 1.6752498149871826, -0.7658121585845947, -1.801899790763855, 0.02593786201693795], [0.039101243019104004, -1.0328450202941895, 0.8100633025169373, 1.6741054058074951, -0.7375829815864563, -1.7801556587219238, 0.02593786201693795], [0.0394827201962471, -1.0030899047851562, 0.7734416723251343, 1.6718165874481201, -0.7230868935585022, -1.7626078128814697, 0.02593786201693795], [0.0398641936480999, -0.9809643626213074, 0.7417792081832886, 1.6718165874481201, -0.7074463963508606, -1.7530708312988281, 0.02593786201693795], [0.04100862145423889, -0.9649423956871033, 0.7131685614585876, 1.6721980571746826, -0.698291003704071, -1.7408636808395386, 0.02593786201693795], [0.04100862145423889, -0.9538795948028564, 0.691805899143219, 1.6741054058074951, -0.6845578551292419, -1.7305638790130615, 0.02593786201693795], [0.04100862145423889, -0.9473945498466492, 0.6715877056121826, 1.6775387525558472, -0.6834134459495544, -1.7248417139053345, 0.02593786201693795], [0.04139009863138199, -0.9424353241920471, 0.6563286781311035, 1.6828793287277222, -0.6803616285324097, -1.718738079071045, 0.02593786201693795], [0.04177157208323479, -0.9401465058326721, 0.6422140598297119, 1.6870756149291992, -0.6845578551292419, -1.7133973836898804, 0.02593786201693795], [0.042153049260377884, -0.9378576278686523, 0.6292439103126526, 1.6908903121948242, -0.6857023239135742, -1.7111085653305054, 0.02593786201693795], [0.042153049260377884, -0.9367132186889648, 0.6162737607955933, 1.6947051286697388, -0.6868467330932617, -1.7095826864242554, 0.02593786201693795], [0.042153049260377884, -0.9355688095092773, 0.6063553690910339, 1.6996643543243408, -0.6857023239135742, -1.7088197469711304, 0.02593786201693795], [0.042153049260377884, -0.9355688095092773, 0.5998703241348267, 1.7053864002227783, -0.6876096725463867, -1.7084382772445679, 0.02593786201693795], [0.042153049260377884, -0.9351872801780701, 0.5956740379333496, 1.7103456258773804, -0.6864652633666992, -1.7080568075180054, 0.02593786201693795], [0.042153049260377884, -0.9351872801780701, 0.5930037498474121, 1.71492338180542, -0.692568838596344, -1.7076753377914429, 0.02593786201693795], [0.04177157208323479, -0.9344243407249451, 0.5910963416099548, 1.7206454277038574, -0.6960021257400513, -1.7069122791290283, 0.02593786201693795], [0.04177157208323479, -0.9344243407249451, 0.5899519324302673, 1.7294193506240845, -0.7001983523368835, -1.7061493396759033, 0.02593786201693795], [0.04177157208323479, -0.9344243407249451, 0.5891889929771423, 1.741245150566101, -0.699816882610321, -1.7061493396759033, 0.02593786201693795], [0.04177157208323479, -0.9344243407249451, 0.5891889929771423, 1.7515449523925781, -0.699053943157196, -1.7061493396759033, 0.02593786201693795], [0.04177157208323479, -0.9344243407249451, 0.5880445837974548, 1.7580300569534302, -0.6986724734306335, -1.7061493396759033, 0.02593786201693795], [0.04177157208323479, -0.9344243407249451, 0.5880445837974548, 1.7618448734283447, -0.698291003704071, -1.7061493396759033, 0.02593786201693795], [0.04177157208323479, -0.9344243407249451, 0.5880445837974548, 1.7645151615142822, -0.6986724734306335, -1.7061493396759033, 0.02593786201693795], [0.04177157208323479, -0.9344243407249451, 0.5880445837974548, 1.7668039798736572, -0.6994354128837585, -1.7061493396759033, 0.02593786201693795], [0.04177157208323479, -0.9344243407249451, 0.5880445837974548, 1.7690927982330322, -0.7120240926742554, -1.7061493396759033, 0.02593786201693795], [0.04177157208323479, -0.9344243407249451, 0.5895704627037048, 1.7736705541610718, -0.732623815536499, -1.7069122791290283, 0.02593786201693795], [0.04177157208323479, -0.9287022352218628, 0.5914778113365173, 1.7858778238296509, -0.7452124953269958, -1.7248417139053345, 0.02593786201693795], [0.0398641936480999, -0.9081025123596191, 0.5918593406677246, 1.8068588972091675, -0.7570382356643677, -1.7542153596878052, 0.02593786201693795], [0.0398641936480999, -0.8688105344772339, 0.5910963416099548, 1.8343251943588257, -0.763523280620575, -1.7771037817001343, 0.02593786201693795], [0.040245670825242996, -0.8104447722434998, 0.5895704627037048, 1.8591210842132568, -0.7734416723251343, -1.7900739908218384, 0.02593786201693795], [0.04100862145423889, -0.7387273907661438, 0.5888075232505798, 1.875905990600586, -0.778782308101654, -1.795414686203003, 0.02593786201693795], [0.04100862145423889, -0.6609063744544983, 0.5880445837974548, 1.8865872621536255, -0.7890821695327759, -1.7950332164764404, 0.02593786201693795], [0.04100862145423889, -0.580033540725708, 0.5876630544662476, 1.8930723667144775, -0.8001449704170227, -1.7915998697280884, 0.02593786201693795], [0.04139009863138199, -0.5086976289749146, 0.5872815847396851, 1.8938353061676025, -0.8089188933372498, -1.7900739908218384, 0.02593786201693795], [0.04139009863138199, -0.44613564014434814, 0.5872815847396851, 1.889639139175415, -0.8176928162574768, -1.7885481119155884, 0.02593786201693795], [0.04177157208323479, -0.39806973934173584, 0.5869001150131226, 1.8835355043411255, -0.8207446336746216, -1.7881666421890259, 0.02593786201693795], [0.042153049260377884, -0.3614480793476105, 0.5869001150131226, 1.880865216255188, -0.8211261034011841, -1.7809185981750488, 0.02593786201693795], [0.04177157208323479, -0.33627068996429443, 0.5872815847396851, 1.877431869506836, -0.8215075731277466, -1.7751964330673218, 0.02593786201693795], [0.042153049260377884, -0.31795987486839294, 0.5880445837974548, 1.8709467649459839, -0.8207446336746216, -1.7698558568954468, 0.02593786201693795]]\n", + "[[-0.10204470902681351, -1.0816738605499268, 1.2235828638076782, 1.6962310075759888, -1.3323034048080444, -1.7862592935562134, 0.0014595724983109987, 0.0], [-0.10204470902681351, -1.0816738605499268, 1.2235828638076782, 1.6966124773025513, -1.3361181020736694, -1.7908369302749634, 0.0009035449485882571, 0.0], [-0.10204470902681351, -1.0816738605499268, 1.2235828638076782, 1.6973754167556763, -1.339551329612732, -1.7973220348358154, 0.0010425518572293898, 0.0], [-0.10204470902681351, -1.0816738605499268, 1.2235828638076782, 1.7011902332305908, -1.343747615814209, -1.799229383468628, 0.0013205656745116552, 0.0], [-0.10204470902681351, -1.0816738605499268, 1.2235828638076782, 1.715686321258545, -1.3609139919281006, -1.8156328201293945, 0.009243959551898008, 0.0], [-0.10204470902681351, -1.0816738605499268, 1.2235828638076782, 1.721789836883545, -1.3731212615966797, -1.8221179246902466, 0.48311852392062954, 0.0], [-0.10204470902681351, -1.0816738605499268, 1.2235828638076782, 1.720263957977295, -1.3704508543014526, -1.8339437246322632, 0.9298866877388547, 0.0], [-0.10204470902681351, -1.0816738605499268, 1.2235828638076782, 1.7214083671569824, -1.3677805662155151, -1.8430991172790527, 0.9286356446504871, 0.0], [-0.10204470902681351, -1.0816738605499268, 1.2232013940811157, 1.7278934717178345, -1.3685435056686401, -1.8526359796524048, 0.9315548320680038, 0.0], [-0.10204470902681351, -1.0812923908233643, 1.2193865776062012, 1.7305638790130615, -1.3681620359420776, -1.8617913722991943, 0.9308597212520295, 0.0], [-0.10204470902681351, -1.0812923908233643, 1.1892499923706055, 1.7286564111709595, -1.3624398708343506, -1.874380111694336, 0.9308597212520295, 0.0], [-0.10204470902681351, -1.0793850421905518, 1.1369879245758057, 1.7263675928115845, -1.3269627094268799, -1.889639139175415, 0.9311378177052145, 0.0], [-0.10204470902681351, -1.0687037706375122, 1.0885404348373413, 1.731708288192749, -1.2388418912887573, -1.894598364830017, 0.931276822492811, 0.0], [-0.10204470902681351, -1.0503928661346436, 1.046959638595581, 1.731708288192749, -1.1686503887176514, -1.8972686529159546, 0.9308597212520295, 0.0], [-0.10204470902681351, -1.0305562019348145, 1.0027084350585938, 1.7313268184661865, -1.1240177154541016, -1.9148164987564087, 0.931276822492811, 0.0], [-0.10204470902681351, -1.0049973726272583, 0.9557870030403137, 1.735522985458374, -1.0828183889389038, -1.9232089519500732, 0.9311378177052145, 0.0], [-0.10204470902681351, -0.9725719094276428, 0.918402373790741, 1.739719271659851, -1.0351338386535645, -1.9323643445968628, 0.9311378177052145, 0.0], [-0.10204470902681351, -0.9435797929763794, 0.8928435444831848, 1.7607003450393677, -1.0061417818069458, -1.9514381885528564, 0.9308597212520295, 0.0], [-0.10166323184967041, -0.9306095838546753, 0.8802548050880432, 1.7744334936141968, -1.0103379487991333, -1.966315746307373, 0.9304427068892404, 0.0], [-0.10166323184967041, -0.9309910535812378, 0.8730067610740662, 1.7790112495422363, -1.022926688194275, -1.9659342765808105, 0.9307207164644331, 0.0], [-0.10166323184967041, -0.9309910535812378, 0.8585107326507568, 1.7809185981750488, -1.0172045230865479, -1.9659342765808105, 0.9304427068892404, 0.0], [-0.10166323184967041, -0.9309910535812378, 0.8398184180259705, 1.7839703559875488, -0.9927901029586792, -1.9659342765808105, 0.9307207164644331, 0.0], [-0.10166323184967041, -0.9309910535812378, 0.8203631639480591, 1.7847332954406738, -0.9657053351402283, -1.9659342765808105, 0.9308597212520295, 0.0], [-0.10166323184967041, -0.9309910535812378, 0.8012893795967102, 1.7832074165344238, -0.9393835067749023, -1.967841625213623, 0.9303037021016439, 0.0], [-0.10166323184967041, -0.9309910535812378, 0.7860303521156311, 1.7847332954406738, -0.9054322242736816, -1.9712748527526855, 0.9301646973140475, 0.0], [-0.10166323184967041, -0.9313725233078003, 0.7703898549079895, 1.7927442789077759, -0.8756771087646484, -1.97356379032135, 0.9298866877388547, 0.0], [-0.10166323184967041, -0.9313725233078003, 0.7589455842971802, 1.803425669670105, -0.8607995510101318, -1.978904366493225, 0.9303037021016439, 0.0], [-0.10166323184967041, -0.9378576278686523, 0.7562752962112427, 1.812199592590332, -0.8615625500679016, -1.9811933040618896, 0.9298866877388547, 1.0], [-0.09365224838256836, -0.9477760195732117, 0.7562752962112427, 1.8270771503448486, -0.8630884289741516, -1.9811933040618896, 0.9293306685884691, 1.0], [-0.06618601083755493, -0.959220290184021, 0.7562752962112427, 1.8205920457839966, -0.8588922023773193, -1.9811933040618896, 0.92891365422568, 1.0], [-0.027656977996230125, -0.9798199534416199, 0.7562752962112427, 1.80113685131073, -0.840199887752533, -1.964408278465271, 0.9290526590132764, 1.0], [0.004386968910694122, -1.0023269653320312, 0.7562752962112427, 1.7679483890533447, -0.804341197013855, -1.9209201335906982, 0.9283576350752943, 1.0], [0.01735713705420494, -1.0275044441223145, 0.7562752962112427, 1.740482211112976, -0.776493489742279, -1.8842984437942505, 0.9276626111373123, 1.0], [0.016975661739706993, -1.052681803703308, 0.7562752962112427, 1.7374303340911865, -0.7745860815048218, -1.875905990600586, 0.9278016159249087, 1.0], [0.01430533267557621, -1.0717555284500122, 0.7562752962112427, 1.7214083671569824, -0.7852674126625061, -1.8690394163131714, 0.927523606349716, 1.0], [0.01430533267557621, -1.0725184679031372, 0.7562752962112427, 1.7183566093444824, -0.7871748208999634, -1.8694208860397339, 0.9129278430181171, 1.0], [0.01430533267557621, -1.0664149522781372, 0.7562752962112427, 1.718738079071045, -0.7841230034828186, -1.8675135374069214, 0.9145959873472662, 1.0], [0.01430533267557621, -1.0648889541625977, 0.7562752962112427, 1.7130159139633179, -0.7883192300796509, -1.8675135374069214, 0.7655805093381347, 1.0], [0.01430533267557621, -1.0648889541625977, 0.7562752962112427, 1.6973754167556763, -0.7925154566764832, -1.8533989191055298, 0.50522058922143, 1.0], [0.01430533267557621, -1.0648889541625977, 0.7562752962112427, 1.6882200241088867, -0.7928969264030457, -1.8324178457260132, 0.13518421928981497, 1.0], [0.01430533267557621, -1.0648889541625977, 0.7566567659378052, 1.6893644332885742, -0.7890821695327759, -1.8247883319854736, -0.010912042116224444, 1.0], [0.01430533267557621, -1.0648889541625977, 0.7650492191314697, 1.6882200241088867, -0.7867932915687561, -1.8251698017120361, -0.010912042116224444, 1.0], [0.01430533267557621, -1.0648889541625977, 0.7921339869499207, 1.6954680681228638, -0.7963302135467529, -1.8244068622589111, -0.011051048940023787, 1.0], [0.01430533267557621, -1.0648889541625977, 0.8283741474151611, 1.7103456258773804, -0.811589241027832, -1.821736454963684, -0.011190056442557444, 1.0], [0.01430533267557621, -1.0648889541625977, 0.8615625500679016, 1.725223183631897, -0.8276112079620361, -1.821736454963684, -0.011190056442557444, 1.0], [0.01430533267557621, -1.0652704238891602, 0.8924620151519775, 1.731708288192749, -0.838674008846283, -1.8213549852371216, -0.010912042116224444, 2.0], [0.01430533267557621, -1.0652704238891602, 0.9203097820281982, 1.7359044551849365, -0.8443961143493652, -1.8183032274246216, -0.010912042116224444, 2.0], [0.01430533267557621, -1.0652704238891602, 0.9431982636451721, 1.7401007413864136, -0.8447775840759277, -1.817921757698059, -0.01035601482102707, 2.0], [0.01430533267557621, -1.0671778917312622, 0.959983229637146, 1.7446783781051636, -0.8421072959899902, -1.817921757698059, -0.010634028468625756, 2.0], [0.01430533267557621, -1.0679408311843872, 0.9733348488807678, 1.745822787284851, -0.8333333134651184, -1.8167773485183716, -0.010912042116224444, 2.0], [0.01430533267557621, -1.0679408311843872, 0.9866865277290344, 1.7465858459472656, -0.8173113465309143, -1.812962532043457, -0.010217007997227726, 2.0], [0.01430533267557621, -1.0683223009109497, 0.9996566772460938, 1.7462043762207031, -0.8047226667404175, -1.8102922439575195, -0.009660980023296038, 2.0], [0.01430533267557621, -1.0736628770828247, 1.0141527652740479, 1.745822787284851, -0.8020523190498352, -1.809910774230957, -0.00034751727160283174, 2.0], [0.01430533267557621, -1.101129174232483, 1.0393301248550415, 1.7439154386520386, -0.8249408602714539, -1.8068588972091675, -0.00020851036296169905, 2.0], [0.01430533267557621, -1.1419470310211182, 1.0702296495437622, 1.744296908378601, -0.8497368097305298, -1.8068588972091675, -0.00034751727160283174, 2.0], [0.01430533267557621, -1.1839094161987305, 1.0946440696716309, 1.7526893615722656, -0.8550774455070496, -1.7980849742889404, -0.00034751727160283174, 2.0], [0.01430533267557621, -1.2228199243545532, 1.1125733852386475, 1.7526893615722656, -0.8562218546867371, -1.7847332954406738, -0.00048652418024396445, 2.0], [0.01430533267557621, -1.256008267402649, 1.1198214292526245, 1.7534523010253906, -0.8524070978164673, -1.7847332954406738, -0.00048652418024396445, 2.0], [0.01430533267557621, -1.2865263223648071, 1.1198214292526245, 1.7523078918457031, -0.8436331748962402, -1.7854963541030884, -0.00034751727160283174, 2.0], [0.01430533267557621, -1.3132295608520508, 1.119439959526062, 1.7481117248535156, -0.8352407217025757, -1.7870222330093384, -0.00048652418024396445, 2.0], [0.01430533267557621, -1.338025450706482, 1.119439959526062, 1.7484931945800781, -0.8287556171417236, -1.7893110513687134, 6.950345432056634e-05, 2.0], [0.01430533267557621, -1.3601510524749756, 1.119439959526062, 1.7500190734863281, -0.8287556171417236, -1.7893110513687134, 0.0007645380399471244, 2.0], [0.01430533267557621, -1.3731212615966797, 1.119439959526062, 1.7500190734863281, -0.8299000263214111, -1.7893110513687134, 0.0011815587658705225, 2.0], [0.01430533267557621, -1.3757915496826172, 1.119439959526062, 1.7500190734863281, -0.8268482685089111, -1.796177625656128, 0.11627927496348071, 2.0], [0.01430533267557621, -1.3712139129638672, 1.1198214292526245, 1.7488746643066406, -0.8180742859840393, -1.796177625656128, 0.856769040049249, 2.0], [0.01430533267557621, -1.3704508543014526, 1.1198214292526245, 1.7488746643066406, -0.8199816942214966, -1.796177625656128, 0.9435094175572787, 2.0], [0.01430533267557621, -1.3704508543014526, 1.1198214292526245, 1.740482211112976, -0.8226520419120789, -1.796177625656128, 0.9435094175572787, 3.0], [0.01430533267557621, -1.3704508543014526, 1.1198214292526245, 1.7385748624801636, -0.8253223299980164, -1.7957961559295654, 0.9430924031944895, 3.0], [0.01430533267557621, -1.3681620359420776, 1.119439959526062, 1.738956332206726, -0.8287556171417236, -1.7923628091812134, 0.9418412732281296, 3.0], [0.01430533267557621, -1.3563363552093506, 1.119439959526062, 1.737811803817749, -0.8291370868682861, -1.7923628091812134, 0.9414242588653404, 3.0], [0.01430533267557621, -1.3273441791534424, 1.1198214292526245, 1.728274941444397, -0.8245593905448914, -1.7919813394546509, 0.9415632636529369, 3.0], [0.01430533267557621, -1.283092975616455, 1.119439959526062, 1.7160677909851074, -0.8218890428543091, -1.7915998697280884, 0.9417022684405333, 3.0], [0.01430533267557621, -1.2399863004684448, 1.119439959526062, 1.7072938680648804, -0.8264667987823486, -1.7805371284484863, 0.9418412732281296, 3.0], [0.01430533267557621, -1.2014572620391846, 1.119439959526062, 1.6977568864822388, -0.846684992313385, -1.7767223119735718, 0.941980278015726, 4.0], [0.01430533267557621, -1.1690318584442139, 1.119439959526062, 1.6809719800949097, -0.8794918656349182, -1.7767223119735718, 0.9415632636529369, 4.0], [0.01430533267557621, -1.1446174383163452, 1.119439959526062, 1.6569390296936035, -0.926413357257843, -1.7690927982330322, 0.9417022684405333, 4.0], [0.01430533267557621, -1.1278324127197266, 1.119439959526062, 1.6214618682861328, -0.9847791194915771, -1.7492561340332031, 0.9426753888317003, 4.0], [0.01430533267557621, -1.1190584897994995, 1.1182955503463745, 1.5844587087631226, -1.0488669872283936, -1.7336156368255615, 0.9428143936192966, 4.0], [0.01430533267557621, -1.1152437925338745, 1.116388201713562, 1.5482184886932373, -1.1015106439590454, -1.723697304725647, 0.9432314079820859, 4.0], [0.01430533267557621, -1.1152437925338745, 1.116388201713562, 1.5222781896591187, -1.1545357704162598, -1.7095826864242554, 0.9430924031944895, 4.0], [0.013923857361078262, -1.1152437925338745, 1.116388201713562, 1.507400631904602, -1.192301869392395, -1.7015717029571533, 0.9430924031944895, 4.0], [0.013923857361078262, -1.1152437925338745, 1.116388201713562, 1.492141604423523, -1.2209124565124512, -1.6966124773025513, 0.9423973792565075, 4.0], [0.013923857361078262, -1.1152437925338745, 1.116388201713562, 1.4715418815612793, -1.2403677701950073, -1.6882200241088867, 0.941980278015726, 4.0], [0.013923857361078262, -1.1152437925338745, 1.116388201713562, 1.4517052173614502, -1.2525749206542969, -1.6847867965698242, 0.8887406624643746, 4.0], [0.013923857361078262, -1.1152437925338745, 1.116388201713562, 1.4360647201538086, -1.255245327949524, -1.6847867965698242, 0.8917988546694876, 4.0], [0.013923857361078262, -1.1175326108932495, 1.116388201713562, 1.435683250427246, -1.258297085762024, -1.6882200241088867, 0.8926328833950661, 4.0], [0.013542382046580315, -1.117914080619812, 1.1095216274261475, 1.433012843132019, -1.2602044343948364, -1.6966124773025513, 0.8962470078725724, 4.0], [-0.01735713705420494, -1.1182955503463745, 1.0912108421325684, 1.434920310974121, -1.255245327949524, -1.7038605213165283, 0.9175150878867906, 4.0], [-0.07724879682064056, -1.117914080619812, 1.0687037706375122, 1.4562828540802002, -1.2460898160934448, -1.7198824882507324, 0.9175150878867906, 4.0], [-0.13790340721607208, -1.117914080619812, 1.0496299266815186, 1.518463373184204, -1.2270160913467407, -1.7492561340332031, 0.9170980735240014, 4.0], [-0.17643244564533234, -1.117914080619812, 1.041237473487854, 1.6100175380706787, -1.2014572620391846, -1.793125867843628, 0.9173760830991943, 4.0], [-0.1985580176115036, -1.1182955503463745, 1.0351338386535645, 1.6466392278671265, -1.1884870529174805, -1.8244068622589111, 0.9170980735240014, 4.0], [-0.21114671230316162, -1.124399185180664, 1.0343708992004395, 1.6451133489608765, -1.1846723556518555, -1.8278400897979736, 0.916959068736405, 4.0], [-0.212672621011734, -1.1400396823883057, 1.0343708992004395, 1.650072455406189, -1.1846723556518555, -1.8354696035385132, 0.9168200639488087, 4.0], [-0.21229113638401031, -1.1633096933364868, 1.0343708992004395, 1.667620301246643, -1.1846723556518555, -1.8423361778259277, 0.916959068736405, 4.0], [-0.212672621011734, -1.1900129318237305, 1.0343708992004395, 1.6832607984542847, -1.1846723556518555, -1.8461508750915527, 0.9177930974619835, 4.0], [-0.212672621011734, -1.2148088216781616, 1.0343708992004395, 1.6817349195480347, -1.1839094161987305, -1.8457694053649902, 0.917654092674387, 4.0], [-0.212672621011734, -1.2361714839935303, 1.034752368927002, 1.6824978590011597, -1.179331660270691, -1.8453879356384277, 0.9175150878867906, 4.0], [-0.212672621011734, -1.254482388496399, 1.034752368927002, 1.6939421892166138, -1.1709392070770264, -1.8461508750915527, 0.917654092674387, 4.0], [-0.212672621011734, -1.274319052696228, 1.034752368927002, 1.6992828845977783, -1.1694133281707764, -1.8461508750915527, 0.9177930974619835, 4.0], [-0.212672621011734, -1.2926298379898071, 1.0343708992004395, 1.6874570846557617, -1.1686503887176514, -1.8457694053649902, 0.9173760830991943, 4.0], [-0.212672621011734, -1.3033112287521362, 1.034752368927002, 1.6641870737075806, -1.1686503887176514, -1.8415732383728027, 0.9173760830991943, 4.0], [-0.212672621011734, -1.3071259260177612, 1.034752368927002, 1.644350290298462, -1.1675058603286743, -1.8308918476104736, 0.9173760830991943, 4.0], [-0.212672621011734, -1.3109407424926758, 1.0343708992004395, 1.6260395050048828, -1.1655985116958618, -1.824025273323059, 0.9168200639488087, 5.0], [-0.212672621011734, -1.3132295608520508, 1.034752368927002, 1.6210802793502808, -1.1617838144302368, -1.8148698806762695, 0.9172370783115978, 5.0], [-0.212672621011734, -1.3220034837722778, 1.034752368927002, 1.6134508848190308, -1.1617838144302368, -1.8148698806762695, 0.916959068736405, 5.0], [-0.212672621011734, -1.3353551626205444, 1.0343708992004395, 1.6054397821426392, -1.1610208749771118, -1.809147834777832, 0.9164030495860195, 5.0], [-0.212672621011734, -1.348706841468811, 1.0343708992004395, 1.6050583124160767, -1.1476691961288452, -1.8076218366622925, 0.9154300160728446, 5.0], [-0.212672621011734, -1.3616769313812256, 1.0343708992004395, 1.6081101894378662, -1.1331731081008911, -1.8068588972091675, 0.9147349921348626, 5.0], [-0.212672621011734, -1.3811322450637817, 1.0343708992004395, 1.6077287197113037, -1.125162124633789, -1.8060959577560425, 0.8881846433139889, 5.0], [-0.212672621011734, -1.3990615606307983, 1.0343708992004395, 1.6081101894378662, -1.128213882446289, -1.8038071393966675, 0.8544059586601103, 5.0], [-0.212672621011734, -1.41165030002594, 1.0343708992004395, 1.6088731288909912, -1.1335545778274536, -1.8038071393966675, 0.6160090990566097, 5.0], [-0.21152819693088531, -1.4101243019104004, 1.034752368927002, 1.6107804775238037, -1.1366063356399536, -1.8030441999435425, 0.43293701369639886, 5.0], [-0.21152819693088531, -1.4009689092636108, 1.0400930643081665, 1.6088731288909912, -1.1404211521148682, -1.7881666421890259, 0.38484061872511033, 5.0], [-0.21152819693088531, -1.3860913515090942, 1.0553520917892456, 1.6065843105316162, -1.1465247869491577, -1.7729076147079468, 0.3826164986845718, 5.0], [-0.21152819693088531, -1.3651102781295776, 1.0664149522781372, 1.6069657802581787, -1.1640726327896118, -1.7702373266220093, 0.18592174866443123, 5.0], [-0.21152819693088531, -1.3368810415267944, 1.0664149522781372, 1.6027694940567017, -1.1648355722427368, -1.7706187963485718, 0.0006255310888850971, 5.0], [-0.21152819693088531, -1.3101778030395508, 1.0664149522781372, 1.594377040863037, -1.1614023447036743, -1.7710002660751343, 0.00048652418024396445, 5.0], [-0.21152819693088531, -1.2850003242492676, 1.0664149522781372, 1.5917067527770996, -1.1511024236679077, -1.7736705541610718, 0.00048652418024396445, 5.0], [-0.21152819693088531, -1.2659265995025635, 1.0683223009109497, 1.592088222503662, -1.1354619264602661, -1.7828259468078613, 0.0011815587658705225, 5.0], [-0.21152819693088531, -1.2579156160354614, 1.0831998586654663, 1.592088222503662, -1.1331731081008911, -1.7820630073547363, 0.0007645380399471244, 6.0], [-0.21152819693088531, -1.258297085762024, 1.1072328090667725, 1.5962843894958496, -1.1392767429351807, -1.7816815376281738, 0.0011815587658705225, 6.0], [-0.21152819693088531, -1.258297085762024, 1.1308842897415161, 1.6000992059707642, -1.1369879245758057, -1.7816815376281738, 0.0009035449485882571, 6.0], [-0.21152819693088531, -1.259822964668274, 1.1537728309631348, 1.6000992059707642, -1.1327916383743286, -1.7816815376281738, 0.0013205656745116552, 6.0], [-0.21152819693088531, -1.2628748416900635, 1.1766613721847534, 1.6000992059707642, -1.125162124633789, -1.7816815376281738, 0.0014595724983109987, 6.0], [-0.21152819693088531, -1.272793173789978, 1.206416368484497, 1.5997177362442017, -1.124399185180664, -1.7816815376281738, 0.0009035449485882571, 6.0], [-0.21152819693088531, -1.2933928966522217, 1.2445639371871948, 1.6035324335098267, -1.1339360475540161, -1.7809185981750488, 0.0009035449485882571, 6.0], [-0.21152819693088531, -1.3212405443191528, 1.28233003616333, 1.6191729307174683, -1.1449989080429077, -1.7797741889953613, 0.0007645380399471244, 6.0], [-0.21152819693088531, -1.3536659479141235, 1.3170443773269653, 1.6302357912063599, -1.1507209539413452, -1.7729076147079468, 0.0009035449485882571, 6.0], [-0.21152819693088531, -1.3902876377105713, 1.3490883111953735, 1.6309987306594849, -1.1564431190490723, -1.7591744661331177, 0.0011815587658705225, 6.0], [-0.21152819693088531, -1.4280537366867065, 1.3788433074951172, 1.6378653049468994, -1.1663614511489868, -1.7572671175003052, 0.0011815587658705225, 6.0], [-0.21152819693088531, -1.4639123678207397, 1.406691074371338, 1.642824411392212, -1.1739909648895264, -1.7500190734863281, 0.0011815587658705225, 6.0], [-0.21152819693088531, -1.498626708984375, 1.434157371520996, 1.642824411392212, -1.188868522644043, -1.739719271659851, 0.0010425518572293898, 6.0], [-0.21152819693088531, -1.5268558263778687, 1.4536125659942627, 1.642824411392212, -1.199549913406372, -1.7343785762786865, 0.0011815587658705225, 6.0], [-0.21152819693088531, -1.5508888959884644, 1.4654383659362793, 1.6416800022125244, -1.203364610671997, -1.732471227645874, 0.0015985794917939206, 6.0], [-0.21152819693088531, -1.5714884996414185, 1.4688715934753418, 1.6416800022125244, -1.203364610671997, -1.7328526973724365, 0.0011815587658705225, 6.0], [-0.21152819693088531, -1.592851161956787, 1.4684901237487793, 1.642061471939087, -1.2174792289733887, -1.732471227645874, 0.0011815587658705225, 6.0], [-0.21152819693088531, -1.6119248867034912, 1.4684901237487793, 1.640535593032837, -1.2285419702529907, -1.7320897579193115, 0.0010425518572293898, 7.0], [-0.21152819693088531, -1.6279468536376953, 1.4684901237487793, 1.6401541233062744, -1.2357900142669678, -1.732471227645874, 0.0006255310888850971, 7.0], [-0.21152819693088531, -1.6287097930908203, 1.4681086540222168, 1.637483835220337, -1.2293049097061157, -1.7320897579193115, 0.047748872142548505, 7.0], [-0.21152819693088531, -1.6248950958251953, 1.4688715934753418, 1.6329060792922974, -1.2098497152328491, -1.7206454277038574, 0.6881537132330405, 7.0], [-0.21152819693088531, -1.6195544004440308, 1.4688715934753418, 1.6191729307174683, -1.201075792312622, -1.7095826864242554, 1.0078695898723267, 7.0], [-0.21152819693088531, -1.6130692958831787, 1.4684901237487793, 1.6145952939987183, -1.1964980363845825, -1.7099641561508179, 1.008008594659923, 7.0], [-0.21152819693088531, -1.6023880243301392, 1.4684901237487793, 1.6062028408050537, -1.19459068775177, -1.7107270956039429, 1.0071745659343447, 7.0], [-0.21152819693088531, -1.58865487575531, 1.4681086540222168, 1.6081101894378662, -1.1980239152908325, -1.71492338180542, 0.9700596795001601, 7.0], [-0.21152819693088531, -1.576066255569458, 1.4654383659362793, 1.6252765655517578, -1.2045090198516846, -1.72255277633667, 0.967557593323425, 7.0], [-0.20733195543289185, -1.5634775161743164, 1.4600976705551147, 1.6603723764419556, -1.2178606986999512, -1.7572671175003052, 0.6884317228082334, 7.0], [-0.19436179101467133, -1.5424963235855103, 1.4383535385131836, 1.6866941452026367, -1.204127550125122, -1.797703504562378, 0.6435324813906582, 7.0], [-0.1668955534696579, -1.5108338594436646, 1.4002059698104858, 1.6783016920089722, -1.1652170419692993, -1.8274586200714111, 0.6436714861782545, 7.0], [-0.1340886503458023, -1.4730678796768188, 1.357480764389038, 1.6702907085418701, -1.1160067319869995, -1.8347066640853882, 0.5473396914480811, 7.0], [-0.09975585341453552, -1.434157371520996, 1.3174258470535278, 1.6706721782684326, -1.0748074054718018, -1.8419547080993652, 0.48117241345528383, 7.0], [-0.06923781335353851, -1.3990615606307983, 1.273556113243103, 1.6718165874481201, -1.0355154275894165, -1.8415732383728027, 0.43126891280624596, 7.0], [-0.04139009863138199, -1.3647288084030151, 1.2258716821670532, 1.6718165874481201, -0.996604859828949, -1.8419547080993652, 0.03885242998951601, 8.0], [-0.016212711110711098, -1.3307774066925049, 1.1732280254364014, 1.6714351177215576, -0.951209306716919, -1.8415732383728027, 0.004378717664616574, 8.0], [0.005531395319849253, -1.2975890636444092, 1.121347427368164, 1.6721980571746826, -0.9107728600502014, -1.8415732383728027, 0.004517724488415918, 8.0], [0.02384222112596035, -1.261730432510376, 1.0751888751983643, 1.6725795269012451, -0.8806362748146057, -1.8411917686462402, 0.0041007036776507305, 8.0], [0.03681239113211632, -1.2251087427139282, 1.0343708992004395, 1.6752498149871826, -0.8588922023773193, -1.8408102989196777, 0.004239710840817231, 8.0], [0.04177157208323479, -1.187342643737793, 0.9920271635055542, 1.6779202222824097, -0.8398184180259705, -1.8408102989196777, 0.004239710840817231, 8.0], [0.04177157208323479, -1.1457618474960327, 0.9412909150123596, 1.6771572828292847, -0.8093003630638123, -1.8404288291931152, 0.004378717664616574, 8.0], [0.04139009863138199, -1.0999847650527954, 0.8863584399223328, 1.6756312847137451, -0.7673380374908447, -1.8270771503448486, 0.004378717664616574, 8.0], [0.04139009863138199, -1.0530632734298706, 0.8291370868682861, 1.6752498149871826, -0.7272831201553345, -1.794651746749878, 0.004517724488415918, 8.0], [0.04139009863138199, -1.0107194185256958, 0.7818341255187988, 1.6744868755340576, -0.6940947771072388, -1.7595559358596802, 0.004517724488415918, 8.0], [0.04139009863138199, -0.9779125452041626, 0.7471198439598083, 1.6714351177215576, -0.6795986890792847, -1.7416266202926636, 0.004656731312215261, 8.0], [0.04177157208323479, -0.9561684727668762, 0.7196536064147949, 1.6680018901824951, -0.6830319762229919, -1.7271305322647095, 0.0041007036776507305, 8.0], [0.04177157208323479, -0.9420538544654846, 0.6940947771072388, 1.6695277690887451, -0.6830319762229919, -1.724460244178772, 0.004378717664616574, 8.0], [0.04177157208323479, -0.9367132186889648, 0.6731135845184326, 1.6752498149871826, -0.6742580533027649, -1.7214083671569824, 0.004517724488415918, 8.0], [0.04177157208323479, -0.9340428709983826, 0.655184268951416, 1.6763943433761597, -0.6612878441810608, -1.7103456258773804, 0.004378717664616574, 8.0], [0.04177157208323479, -0.9344243407249451, 0.6425955891609192, 1.6844053268432617, -0.6662470698356628, -1.7061493396759033, 0.004517724488415918, 8.0], [0.04177157208323479, -0.9344243407249451, 0.6334401369094849, 1.6905088424682617, -0.6826505064964294, -1.7057678699493408, 0.004239710840817231, 8.0], [0.04177157208323479, -0.9344243407249451, 0.6227588057518005, 1.6973754167556763, -0.6906614899635315, -1.7065308094024658, 0.004656731312215261, 8.0], [0.04177157208323479, -0.9344243407249451, 0.6101701259613037, 1.6985198259353638, -0.689517080783844, -1.7057678699493408, 0.004239710840817231, 8.0], [0.04177157208323479, -0.9344243407249451, 0.5983443856239319, 1.7000458240509033, -0.6883726119995117, -1.7061493396759033, 0.004239710840817231, 8.0], [0.04177157208323479, -0.9340428709983826, 0.5907148718833923, 1.7069122791290283, -0.6876096725463867, -1.7061493396759033, 0.003961696853851387, 8.0], [0.04177157208323479, -0.9344243407249451, 0.5880445837974548, 1.7153048515319824, -0.6868467330932617, -1.7061493396759033, 0.0035446760430861996, 8.0], [0.04177157208323479, -0.9344243407249451, 0.5880445837974548, 1.720263957977295, -0.6891355514526367, -1.7065308094024658, 0.001876593309076186, 8.0], [0.04177157208323479, -0.9344243407249451, 0.5880445837974548, 1.725223183631897, -0.699053943157196, -1.7069122791290283, 0.0006255310888850971, 8.0], [0.04177157208323479, -0.9344243407249451, 0.5880445837974548, 1.7286564111709595, -0.7066834568977356, -1.7065308094024658, 0.00048652418024396445, 8.0], [0.04177157208323479, -0.9344243407249451, 0.5880445837974548, 1.7401007413864136, -0.7066834568977356, -1.7061493396759033, 0.0006255310888850971, 8.0], [0.04177157208323479, -0.9344243407249451, 0.5880445837974548, 1.7641336917877197, -0.699816882610321, -1.7061493396759033, 0.00020851036296169905, 8.0], [0.04177157208323479, -0.9344243407249451, 0.5880445837974548, 1.7717632055282593, -0.698291003704071, -1.7065308094024658, 0.00020851036296169905, 8.0], [0.04177157208323479, -0.9344243407249451, 0.5880445837974548, 1.7717632055282593, -0.6979095339775085, -1.7065308094024658, 0.0006255310888850971, 8.0], [0.04177157208323479, -0.9344243407249451, 0.5880445837974548, 1.7717632055282593, -0.6979095339775085, -1.7065308094024658, 0.00034751727160283174, 8.0], [0.04177157208323479, -0.9344243407249451, 0.5880445837974548, 1.7710002660751343, -0.6979095339775085, -1.7065308094024658, 0.00020851036296169905, 8.0], [0.04177157208323479, -0.9344243407249451, 0.5880445837974548, 1.7717632055282593, -0.7001983523368835, -1.7061493396759033, 0.00020851036296169905, 8.0], [0.04177157208323479, -0.9344243407249451, 0.5880445837974548, 1.7725261449813843, -0.727664589881897, -1.7061493396759033, 0.00048652418024396445, 8.0], [0.04139009863138199, -0.9340428709983826, 0.5918593406677246, 1.7790112495422363, -0.7681010365486145, -1.7069122791290283, 0.00034751727160283174, 8.0], [0.04177157208323479, -0.9298466444015503, 0.5949110984802246, 1.797703504562378, -0.778019368648529, -1.742008090019226, 0.00048652418024396445, 8.0], [0.04177157208323479, -0.8989471197128296, 0.5945296287536621, 1.8377584218978882, -0.7825970649719238, -1.8110551834106445, 0.00048652418024396445, 8.0], [0.04177157208323479, -0.8352407217025757, 0.5914778113365173, 1.880865216255188, -0.7818341255187988, -1.8278400897979736, 0.0006255310888850971, 8.0], [0.04177157208323479, -0.7482643127441406, 0.5869001150131226, 1.9102388620376587, -0.7818341255187988, -1.8263142108917236, 0.00048652418024396445, 8.0], [0.04177157208323479, -0.6528953909873962, 0.5869001150131226, 1.9148164987564087, -0.7932783961296082, -1.809910774230957, 0.0009035449485882571, 8.0], [0.04177157208323479, -0.5582894682884216, 0.5869001150131226, 1.9106203317642212, -0.8047226667404175, -1.7900739908218384, 0.0006255310888850971, 8.0], [0.04177157208323479, -0.4732204079627991, 0.5869001150131226, 1.9094758033752441, -0.8192187547683716, -1.7847332954406738, 0.0006255310888850971, 8.0], [0.04177157208323479, -0.4022659659385681, 0.5869001150131226, 1.9018462896347046, -0.8287556171417236, -1.7847332954406738, 0.0006255310888850971, 8.0], [0.04177157208323479, -0.35152971744537354, 0.5869001150131226, 1.8835355043411255, -0.8299000263214111, -1.7847332954406738, 6.950345432056634e-05, 8.0], [0.04177157208323479, -0.31910428404808044, 0.5869001150131226, 1.8690394163131714, -0.8283741474151611, -1.7847332954406738, 0.0006255310888850971, 8.0], [0.04177157208323479, -0.30041199922561646, 0.5872815847396851, 1.8724727630615234, -0.8180742859840393, -1.7717632055282593, 0.00034751727160283174, 8.0], [0.04177157208323479, -0.2920195460319519, 0.5884260535240173, 1.8717098236083984, -0.8203631639480591, -1.7591744661331177, -6.950345432056634e-05, 8.0], [0.04139009863138199, -0.28515297174453735, 0.5899519324302673, 1.8636988401412964, -0.8184558153152466, -1.7591744661331177, 6.950345432056634e-05, 8.0], [0.04177157208323479, -0.28477150201797485, 0.5899519324302673, 1.8495842218399048, -0.8192187547683716, -1.7591744661331177, 0.00020851036296169905, 8.0]]\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n" + ] + } + ], + "source": [ + "# get all low_dim data (head&spine velocity control)\n", + "raw_dir = \"../demonstrations/raw/put_objects_into_bowl_2\"\n", + "data = crd.raw_to_dict(\n", + " raw_dir,\n", + " [\"records.json\"],\n", + " video_file_names=None,\n", + " flatten_mode=\"hdf5\",\n", + " concatenater={\n", + " \"/observations/qpos\": (\n", + " \"/observations/pos_f\",\n", + " \"/observations/endpos_f\",\n", + "\n", + " ),\n", + " \"/action\": (\n", + " \"/observations/pos_t\",\n", + " \"/observations/endpos_t\",\n", + " \"/observations/stage\",\n", + "\n", + " ),\n", + " },\n", + " key_filter=[\n", + " \"/observations/eef_pose_f\",\n", + " \"/observations/eef_pose_t\",\n", + " \"/observations/eff_f\",\n", + " \"/observations/eff_t\",\n", + " \"/observations/vel_f\",\n", + " \"/observations/vel_t\", \n", + " ],\n", + "\n", + " #eff_f是力反馈,endpos是末端夹爪位置,pos_f是臂的关节数据,eef是末端关节位姿(x,y,z加四元数)vel_t是电流值测定的力反馈,不太准所以不合适加入\n", + " # name_converter={\n", + " # \"//observations/eef_pose_f_left\": \"/observations/qpos\", #注意格式!!!key中有两个//!\n", + " # \"//observations/eef_pose_f_right\": \"/action\",\n", + " # }, #concatenater中已经包含改名的操作,所以这里不需要了\n", + "\n", + ")\n", + "print(data[\"0\"][\"/observations/qpos\"])\n", + "print(data[\"0\"][\"/action\"])\n", + "#此时返回的data是一个字典\n", + "# data = {\n", + "# \"1\": {\n", + "# \"/observations/qpos\": [\n", + "# [0, 1, 2],\n", + "# [3, 4, 5]\n", + "# ]\n", + "# },\n", + "# # 其他键值对...\n", + "#}" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Number of episodes: 50\n" + ] + } + ], + "source": [ + "ep_number = len(data)\n", + "print(f\"Number of episodes: {ep_number}\")" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "['/observations/time', '/observations/qpos', '/action']\n", + "[-0.00019073777366429567, -0.7661936283111572, 0.7032501697540283, 1.5360113382339478, -0.9653238654136658, -1.5779736042022705, 0.03386462663675283]\n", + "[0.04177157208323479, -0.28477150201797485, 0.5899519324302673, 1.8495842218399048, -0.8192187547683716, -1.7591744661331177, 0.00020851036296169905, 8.0]\n" + ] + } + ], + "source": [ + "print(list(data[\"0\"].keys()))\n", + "print(list(data[\"1\"][\"/observations/qpos\"][0]))\n", + "print(list(data[\"0\"][\"/action\"][199]))" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Max episode length: 200\n", + "All episodes: ['24', '13', '12', '44', '47', '19', '4', '40', '1', '8', '38', '46', '16', '10', '39', '23', '41', '43', '14', '5', '18', '9', '17', '28', '35', '45', '49', '11', '31', '48', '22', '0', '7', '6', '27', '34', '21', '29', '32', '2', '36', '33', '15', '25', '20', '37', '42', '30', '26', '3']\n", + "episode number: 50\n" + ] + } + ], + "source": [ + "import os\n", + "import cv2\n", + "from concurrent.futures import ThreadPoolExecutor\n", + "\n", + "# merge high_dim data and save\n", + "raw_dir\n", + "video_names = [\"0.avi\"]\n", + "target_dir = f\"../data/hdf5/put_objects_into_bowl_2_with_stage/\"\n", + "low_dim_data = data\n", + "name_converter = {\"0\": \"/observations/images/0\"}\n", + "target_namer = lambda i: f\"episode_{i}.hdf5\"\n", + "\n", + "compresser = crd.Compresser(\"jpg\", [int(cv2.IMWRITE_JPEG_QUALITY), 50], True)\n", + "\n", + "os.makedirs(target_dir, exist_ok=True)\n", + "\n", + "# get max episode length\n", + "episode_lens = []\n", + "for low_d in low_dim_data.values():\n", + " episode_lens.append(len(list(low_d.values())[0]))\n", + "max_pad_lenth = max(episode_lens)\n", + "\n", + "episode_names = list(low_dim_data.keys())\n", + "print(f\"Max episode length: {max_pad_lenth}\")\n", + "print(f\"All episodes: {episode_names}\")\n", + "print(f\"episode number: {len(episode_names)}\")" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "DEBUG:root:compressed_len_list: [[12317, 12287, 12329, 12308, 12285, 12387, 12306, 12246, 12258, 12326, 12252, 12287, 12441, 12557, 12629, 12685, 12736, 12778, 12746, 12917, 13073, 13110, 13602, 13765, 13709, 13648, 14048, 14006, 13498, 13376, 12863, 12872, 12654, 12579, 12887, 12640, 12750, 12816, 13149, 13129, 13053, 13028, 12990, 13099, 13188, 13220, 13442, 13689, 13998, 14490, 15077, 15501, 16294, 16664, 16591, 16199, 15840, 15737, 14644, 14129, 13555, 13243, 13067, 12888, 12489, 12323, 12232, 12082, 11864, 11957, 11898, 11903, 11903, 11876, 11859, 11816, 11865, 11832, 11833, 11861, 11873, 11861, 11872, 11960, 12073, 12211, 12325, 12422, 12427, 12531, 12674, 12726, 12783, 12904, 13054, 13092, 13358, 13663, 13866, 13877, 13914, 14084, 14072, 14372, 14160, 14308, 14339, 13848, 13888, 13634, 13497, 13167, 12732, 12498, 12494, 12496, 12463, 12349, 12260, 12370, 12236, 12156, 12176, 12144, 12089, 12068, 12094, 12386, 12808, 13020, 13200, 13321, 13801, 13496, 14097, 14269, 14265, 14308, 14614, 14601, 14339, 13520, 13375, 13088, 12737, 12782, 12886, 12770, 12644, 12756, 12752, 12749, 12486, 12324, 12381, 12509, 12332, 12144, 12146, 12255, 12187, 12120, 12047, 12040, 12037, 12042, 12044, 12286, 12160, 12214, 12264, 12312, 12261, 12223, 12235, 12203, 12162, 12161, 12131, 12096, 12094, 12143, 12083, 12115, 12159, 12133, 12127, 12172, 12169, 12172, 12170, 12188, 12192, 12174, 12186, 12172, 12165, 12176, 12172, 12162]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12231, 12197, 12251, 12196, 12230, 12197, 12189, 12243, 12223, 12205, 12115, 12139, 12186, 12227, 12218, 12241, 12194, 12205, 12197, 12235, 12246, 12263, 12258, 12273, 12262, 12292, 12333, 12405, 12462, 12588, 12748, 12875, 13074, 13276, 13453, 13540, 13600, 13872, 13658, 13423, 13746, 13633, 13289, 13346, 13027, 12782, 12330, 12459, 12319, 12334, 12512, 12690, 12496, 12440, 12479, 12702, 12916, 12859, 12870, 12998, 12997, 13017, 13175, 13051, 12997, 13355, 13901, 14424, 14611, 14534, 14962, 14913, 15320, 15375, 15654, 16135, 16107, 15471, 15241, 14400, 14452, 14229, 14027, 13715, 13346, 13603, 13199, 13141, 13116, 12898, 12903, 12745, 12658, 12690, 12647, 12715, 12683, 12705, 12472, 12577, 12589, 12698, 12860, 12949, 12800, 12982, 13113, 13192, 13152, 13286, 13682, 13914, 14131, 14353, 14393, 14253, 14439, 14526, 14770, 14901, 14483, 14791, 14805, 14727, 14238, 14425, 14060, 14240, 14136, 14020, 13791, 13478, 13382, 13177, 13025, 12902, 13053, 13064, 12962, 12898, 12921, 12881, 12837, 12975, 13337, 13517, 13705, 13999, 13820, 14534, 15294, 15039, 14574, 14870, 15357, 14509, 14190, 13863, 13477, 13556, 13278, 13480, 13447, 13171, 13440, 13394, 13391, 13265, 13169, 12862, 12776, 12645, 12606, 12761, 12722, 12693, 12618, 12576, 12535, 12536, 12562, 12590, 12598, 12596, 12629, 12584, 12573, 12561, 12560, 12557, 12565, 12561, 12497, 12559, 12551, 12572, 12545, 12552, 12549, 12591]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12243, 12246, 12275, 12273, 12235, 12195, 12104, 12181, 12112, 12217, 12178, 12197, 12270, 12317, 12379, 12496, 12515, 12585, 12711, 12731, 12803, 12923, 13167, 13460, 13713, 13587, 13488, 13701, 13691, 13464, 12954, 12589, 12402, 12346, 12281, 12370, 12297, 12045, 12105, 11882, 12293, 12197, 12214, 12623, 12161, 12825, 12522, 13024, 13231, 13165, 13403, 13760, 13967, 15264, 15255, 15042, 15478, 16103, 16309, 16371, 15459, 15129, 14441, 13979, 13848, 13487, 13265, 12979, 12659, 12438, 12172, 12098, 12118, 12208, 12264, 12194, 12204, 12309, 12273, 12224, 12351, 12371, 12329, 12343, 12433, 12434, 12595, 12690, 12804, 12930, 13062, 13286, 13560, 13835, 14168, 14161, 14377, 14271, 14361, 14111, 14228, 13971, 14194, 14368, 14129, 14323, 14015, 13722, 13641, 13436, 13253, 12785, 12565, 12497, 12499, 12350, 12247, 11996, 11844, 11812, 11704, 11666, 11696, 11746, 11561, 11452, 11292, 11261, 11374, 11934, 12343, 12361, 12350, 12560, 12959, 12960, 12892, 12976, 13074, 13681, 13807, 13831, 13697, 13502, 13671, 13847, 13861, 13690, 13650, 13486, 13290, 13156, 12828, 12318, 11978, 12197, 12647, 12675, 12792, 12501, 12146, 12149, 12119, 12108, 12107, 12096, 12304, 12330, 12194, 12277, 12297, 12232, 12226, 12186, 12232, 12175, 12115, 12061, 12233, 12253, 12279, 12310, 12306, 12315, 12282, 12264, 12245, 12191, 12157, 12087, 12085, 12037, 12023, 12063, 12008, 12039, 12029, 12040, 12051, 12031]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12250, 12201, 12248, 12189, 12218, 12120, 12148, 12214, 12212, 12181, 12193, 12218, 12224, 12225, 12206, 12249, 12266, 12309, 12404, 12485, 12600, 12724, 12843, 12880, 12904, 12955, 13032, 13162, 13507, 13572, 13528, 13337, 13776, 13824, 13226, 12870, 12639, 12352, 12329, 12259, 12387, 12255, 12341, 12345, 12428, 12330, 12453, 12540, 12792, 12789, 13009, 13244, 13694, 13914, 14694, 14954, 15852, 15733, 15336, 15156, 14341, 13897, 13446, 13013, 12745, 12535, 12245, 12075, 11938, 11914, 11899, 11938, 11904, 11882, 11893, 11894, 11903, 11911, 11955, 11908, 11933, 11909, 12021, 12078, 12201, 12342, 12381, 12430, 12553, 12633, 12710, 12805, 12923, 12994, 13165, 13443, 13595, 13706, 13737, 13766, 13769, 13785, 13775, 13780, 13752, 13832, 13796, 13924, 13988, 14169, 14072, 14141, 14002, 14263, 13935, 14198, 14106, 13821, 13863, 13699, 13651, 13361, 13151, 12923, 12839, 12638, 12450, 12317, 12274, 12313, 12376, 12495, 12362, 12544, 12547, 12548, 12566, 12547, 12484, 12836, 13339, 13470, 13782, 14240, 14018, 14591, 15006, 15169, 14653, 14523, 14294, 14246, 13898, 13416, 12788, 12700, 12559, 12516, 12672, 12495, 12512, 12331, 12187, 12067, 12021, 12076, 11996, 12023, 11871, 11911, 11972, 11967, 12023, 12111, 12184, 12229, 12065, 11993, 11984, 12006, 11981, 11977, 12071, 11953, 12016, 11937, 11998, 11962, 11957, 11992, 11979, 11955, 11984, 11987, 11933, 11934, 11963, 11930, 11946, 11909]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12465, 12495, 12481, 12485, 12467, 12488, 12473, 12419, 12432, 12435, 12469, 12475, 12431, 12416, 12480, 12380, 12332, 12312, 12373, 12328, 12357, 12406, 12559, 12558, 12611, 12710, 12800, 12869, 13027, 13077, 13146, 13405, 13537, 13884, 13988, 14195, 14398, 14233, 13815, 13897, 13926, 13610, 12921, 12835, 12466, 12535, 12431, 12514, 12355, 12364, 12278, 12380, 12433, 12367, 12454, 12484, 12660, 12962, 13214, 13242, 13355, 13216, 13045, 13083, 13101, 13692, 13942, 14685, 15118, 16007, 15041, 15595, 15079, 14473, 13943, 13711, 13447, 13014, 12728, 12517, 12712, 12595, 12477, 12377, 12583, 12386, 12160, 12218, 12403, 12439, 12442, 12304, 12321, 12422, 12349, 12318, 12387, 12418, 12378, 12392, 12489, 12420, 12523, 12486, 12578, 12708, 12807, 12999, 13143, 13241, 13303, 13342, 13568, 13605, 13675, 13727, 13902, 14046, 14276, 14437, 14639, 14876, 14932, 15025, 15040, 15073, 15061, 15045, 14967, 15035, 14872, 15090, 15222, 14964, 14526, 14596, 14184, 13857, 13448, 13248, 13251, 13116, 13182, 12875, 12937, 12671, 12557, 12415, 12400, 12392, 12368, 12369, 12337, 12382, 12585, 13110, 13569, 13618, 13840, 13806, 14056, 14148, 14124, 13997, 14516, 14461, 14322, 14092, 14060, 14148, 14118, 14039, 13674, 13395, 12962, 12921, 12958, 13050, 12972, 12962, 12832, 12795, 12686, 12677, 12779, 12575, 12449, 12519, 12842, 12572, 12863, 12567, 12586, 12689, 12619, 12619, 12496, 12496, 12520, 12408]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12207, 12240, 12202, 12215, 12213, 12201, 12193, 12212, 12178, 12181, 12177, 12128, 12202, 12242, 12336, 12414, 12513, 12564, 12599, 12706, 12801, 12907, 13003, 13120, 13150, 13220, 13301, 13498, 13745, 14028, 13528, 13532, 13794, 13266, 12941, 12574, 12378, 12342, 12331, 12235, 12255, 12110, 12202, 12177, 12156, 12362, 12393, 12585, 12609, 12809, 12847, 13108, 13450, 13786, 14343, 14981, 14975, 15401, 15561, 15394, 16000, 15305, 14877, 14630, 13696, 13166, 12809, 12625, 12252, 12067, 11811, 11960, 12001, 11922, 11932, 11918, 11968, 12030, 12158, 12273, 12382, 12493, 12647, 12790, 12909, 12978, 13136, 13268, 13495, 13685, 13890, 14115, 14279, 14223, 14196, 14220, 14176, 14449, 14481, 14599, 14535, 14634, 14124, 14217, 14471, 13868, 13790, 13755, 13555, 13150, 12978, 12522, 12561, 12645, 12433, 12656, 12507, 12598, 12621, 12468, 12518, 12448, 12890, 13362, 13466, 13620, 13625, 13588, 13296, 13511, 13625, 14213, 13914, 14240, 14582, 14359, 14106, 13671, 13553, 13665, 13602, 13214, 12694, 12254, 12511, 12354, 12213, 12123, 11946, 11851, 11929, 11961, 11967, 11929, 11922, 12034, 11947, 12064, 12191, 12084, 12079, 12176, 12201, 12229, 12235, 12312, 12251, 12208, 12305, 12173, 12143, 12121, 12108, 12071, 12030, 12004, 12043, 12014, 11990, 12006, 12006, 11963, 11975, 11955, 11952, 11950, 11950, 11935, 11927, 11954, 11947, 11918, 11909, 11929, 11917, 11939, 11935, 11949, 11936, 11928]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12357, 12338, 12338, 12360, 12311, 12341, 12377, 12334, 12315, 12281, 12256, 12272, 12362, 12428, 12430, 12420, 12495, 12578, 12604, 12713, 12774, 12856, 12921, 13094, 13147, 13312, 13496, 13736, 13772, 13909, 13874, 13586, 13904, 13914, 13643, 13364, 13268, 12625, 12736, 12652, 12596, 12382, 12439, 12563, 12363, 12702, 12729, 12948, 12936, 12947, 13132, 13088, 13090, 13411, 13893, 14449, 14877, 15137, 15405, 15522, 15540, 16158, 16151, 15443, 15055, 14567, 14306, 13827, 13110, 13047, 12777, 12518, 12430, 12438, 12388, 12206, 12074, 12051, 12102, 12086, 12110, 12097, 12045, 12049, 12055, 12064, 12006, 12070, 12026, 12111, 12126, 12174, 12368, 12441, 12494, 12493, 12566, 12630, 12633, 12694, 12797, 12877, 12979, 13028, 13274, 13584, 13771, 13900, 14068, 14095, 14211, 14249, 14272, 14417, 14517, 14639, 14212, 14031, 13713, 13680, 13480, 13254, 12828, 12671, 12547, 12346, 12226, 12203, 12054, 12118, 12034, 11921, 12018, 12078, 12108, 12091, 12123, 12362, 12821, 13083, 13191, 13233, 13547, 13529, 13884, 14172, 14089, 13665, 13664, 13439, 13541, 13495, 13004, 12456, 12258, 12227, 12370, 12359, 12466, 12307, 12298, 12048, 12054, 11956, 11901, 12031, 12049, 12151, 12194, 12221, 12021, 12089, 12015, 11967, 11990, 11997, 12080, 12160, 12140, 12214, 12267, 12282, 12303, 12240, 12216, 12201, 12208, 12172, 12200, 12155, 12183, 12148, 12144, 12096, 12120, 12130, 12110, 12109, 12128, 12112]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12110, 12116, 12126, 12073, 12089, 12121, 12059, 12072, 11973, 12029, 12077, 12086, 12072, 12067, 12137, 12160, 12219, 12322, 12405, 12560, 12626, 12717, 12797, 12995, 13316, 13524, 13749, 13781, 13501, 13766, 13822, 13697, 12857, 12653, 12526, 12218, 12081, 11921, 12155, 11858, 11678, 11596, 11617, 11546, 11582, 11745, 12038, 12323, 12530, 12785, 12686, 12999, 13262, 13639, 14298, 14889, 14642, 15479, 14756, 14807, 14265, 13805, 13679, 13356, 12911, 12825, 12813, 12422, 12308, 12192, 12210, 12106, 11957, 11943, 12071, 12064, 11998, 12036, 11970, 11979, 12045, 12151, 12254, 12348, 12411, 12600, 12753, 12892, 12829, 13013, 13052, 13143, 13216, 13311, 13329, 13450, 13445, 13622, 13846, 13952, 13996, 14071, 13974, 13898, 13826, 13696, 13688, 13466, 13820, 13345, 13453, 12949, 12584, 12203, 12481, 12310, 11756, 11601, 11685, 11736, 11709, 11948, 12114, 12390, 12470, 12729, 12828, 13064, 13577, 14513, 14960, 15261, 15152, 15260, 15450, 15632, 15652, 15866, 16000, 15400, 15722, 15977, 15214, 15123, 14441, 14346, 14296, 13614, 13044, 12379, 12769, 12862, 12703, 12589, 12324, 12244, 12109, 12013, 12057, 12041, 12005, 11963, 11900, 11997, 12019, 12140, 12031, 11979, 12005, 12007, 11999, 12016, 11961, 11983, 12068, 12152, 12142, 12148, 12086, 12116, 12150, 12128, 12088, 12074, 12087, 12168, 12112, 12078, 12028, 12022, 12018, 12024, 12019, 12030, 12051, 12007, 12006, 12012, 12028, 12025]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12124, 12128, 12115, 12137, 12136, 12118, 12103, 12135, 12067, 12097, 12092, 12105, 12160, 12139, 11966, 12276, 12389, 12427, 12440, 12396, 12437, 12376, 12384, 12343, 12420, 12422, 12369, 12302, 12275, 12312, 12371, 12536, 12611, 12700, 12756, 12831, 12883, 12927, 13020, 13294, 13588, 13709, 13882, 13563, 13910, 13920, 13778, 13611, 12964, 12702, 12304, 12380, 12332, 12477, 12311, 12199, 12080, 11956, 12204, 12251, 12281, 12341, 12500, 12772, 12578, 12344, 12555, 12906, 12822, 13288, 14237, 14527, 15035, 14570, 14815, 14911, 15070, 15158, 14580, 14439, 13592, 13394, 13359, 12915, 12891, 12633, 12760, 12728, 12472, 12366, 12344, 12445, 12525, 12520, 12521, 12702, 12747, 12693, 12886, 13159, 13193, 13344, 13332, 13554, 13649, 13876, 13923, 14181, 14343, 14602, 14896, 14838, 15103, 14858, 14926, 14906, 15126, 15075, 15363, 14850, 15258, 15214, 14860, 14486, 14734, 14400, 14403, 14039, 13666, 13470, 13339, 13360, 13312, 13028, 12745, 12848, 12849, 12663, 12616, 12591, 12530, 12495, 12510, 12624, 12651, 12800, 13197, 13644, 13727, 14024, 14569, 14665, 14603, 14954, 14948, 14960, 14648, 14511, 14439, 14766, 14965, 14735, 14650, 14471, 14066, 13801, 13403, 13416, 13302, 13125, 12859, 12985, 12871, 12987, 13116, 13106, 13021, 12909, 13046, 13073, 13091, 13178, 13312, 13636, 13427, 13099, 12953, 13046, 12848, 12775, 12830, 12817, 12841, 12728, 12765, 12741, 12752, 12684, 12724, 12718]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12302, 12341, 12322, 12297, 12344, 12341, 12342, 12332, 12356, 12322, 12236, 12237, 12340, 12254, 12208, 12284, 12389, 12370, 12427, 12560, 12638, 12650, 12725, 12725, 12789, 12826, 12879, 12920, 13052, 13122, 13249, 13370, 13499, 13826, 13921, 13733, 14138, 14190, 14019, 13447, 13412, 12944, 12707, 12530, 12615, 12571, 12369, 12275, 12117, 12214, 11931, 12091, 12349, 12229, 12240, 12368, 12603, 12519, 12998, 13023, 13054, 13212, 13677, 14456, 14918, 15329, 15594, 15746, 16125, 16275, 15623, 15817, 16182, 15991, 15397, 15083, 14966, 14632, 13972, 13346, 13186, 13048, 12931, 12728, 12603, 12244, 12162, 12183, 11989, 12009, 12030, 12007, 12010, 12012, 12022, 12031, 12031, 11992, 12044, 12021, 12033, 11997, 11989, 12033, 12146, 12284, 12455, 12503, 12554, 12690, 12775, 12898, 12942, 13019, 13122, 13185, 13236, 13311, 13443, 13590, 13843, 14150, 14111, 14107, 14200, 14288, 14168, 14195, 14172, 14169, 14114, 14265, 14289, 14259, 14229, 14299, 14384, 14515, 14685, 14544, 14361, 14104, 14019, 13721, 13580, 13598, 13202, 13016, 13002, 12914, 12952, 12827, 12620, 12750, 12356, 12234, 12300, 12728, 12505, 12576, 12682, 12825, 13391, 13901, 14274, 14492, 14649, 14653, 14860, 14648, 14270, 14508, 14776, 14752, 14739, 14596, 14425, 14315, 14406, 14339, 14296, 13938, 13396, 13073, 12872, 12842, 12695, 12881, 12397, 12264, 12194, 12205, 12052, 12003, 11999, 11978, 12074, 12029, 12036, 12170]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[11988, 11964, 12002, 11992, 12000, 11964, 11918, 11981, 12041, 12061, 12006, 12028, 12095, 12146, 12178, 12280, 12337, 12409, 12483, 12502, 12495, 12647, 12760, 12765, 12939, 13201, 13433, 13623, 13547, 13713, 13764, 14049, 14053, 14076, 13536, 14147, 14188, 14168, 14048, 14018, 13289, 13349, 12984, 12890, 12831, 12676, 12564, 12370, 12469, 12408, 12292, 12383, 12572, 12424, 12512, 12505, 12637, 12720, 12635, 12732, 12925, 13256, 13658, 14003, 14280, 15110, 15046, 15817, 15531, 15673, 16082, 15922, 16458, 16364, 15436, 15350, 15049, 14425, 13945, 13834, 13560, 13269, 13194, 13105, 12919, 12815, 12597, 12353, 12183, 12186, 12309, 12260, 12282, 12237, 12354, 12380, 12453, 12512, 12671, 12700, 12803, 12867, 12957, 13020, 13083, 13161, 13379, 13341, 13590, 13926, 14155, 14292, 14395, 14427, 14419, 14479, 14542, 14504, 14510, 14608, 14831, 14387, 14831, 14811, 14750, 14461, 14174, 14203, 14147, 14055, 13786, 13491, 13374, 13450, 13398, 13412, 13415, 13319, 13399, 13552, 13768, 14111, 14214, 14556, 14766, 15028, 15307, 15101, 15653, 16083, 15979, 16005, 15708, 14985, 16122, 15737, 15953, 15597, 15340, 15007, 14677, 14480, 14197, 13846, 13657, 13617, 13500, 13516, 13208, 12968, 12695, 12743, 12970, 12848, 12763, 12854, 13021, 13408, 13475, 13446, 13312, 12988, 12756, 12576, 12677, 12725, 12731, 12557, 12628, 12497, 12591, 12386, 12462, 12380, 12435, 12362, 12384, 12413, 12446, 12410]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12181, 12199, 12258, 12188, 12240, 12250, 12230, 12183, 12148, 12124, 12172, 12187, 12181, 12205, 12238, 12263, 12328, 12360, 12476, 12515, 12594, 12668, 12803, 12819, 13091, 13426, 13657, 13737, 14022, 14057, 13816, 14245, 14288, 14231, 13977, 13220, 13362, 12702, 12655, 12385, 12649, 12395, 12305, 12193, 12542, 12581, 12368, 12453, 12411, 12616, 12720, 12821, 13022, 12979, 12664, 12792, 13400, 14291, 14573, 14800, 15673, 15758, 15529, 15634, 15227, 15213, 15872, 15661, 15944, 15545, 15482, 15200, 14415, 13843, 13420, 13311, 12821, 12738, 12633, 12655, 12328, 12314, 12190, 12117, 12248, 12252, 12265, 12259, 12265, 12254, 12273, 12267, 12270, 12280, 12295, 12252, 12238, 12322, 12474, 12622, 12492, 12570, 12795, 12756, 12723, 12558, 12752, 13048, 12803, 13002, 13174, 13178, 13534, 13525, 13918, 14240, 14400, 14517, 14477, 14675, 14456, 14430, 14432, 14517, 14666, 14711, 14700, 14263, 14726, 14489, 14428, 14244, 14238, 13990, 13867, 13942, 13725, 13436, 13255, 12985, 12568, 12469, 12732, 12464, 12291, 12456, 12699, 12860, 12796, 12617, 12666, 12895, 12909, 12909, 12946, 13254, 13662, 14208, 14274, 14382, 14293, 14384, 14746, 14953, 14605, 14955, 15060, 15049, 15135, 15172, 14809, 14694, 14499, 14455, 14276, 14391, 14182, 13508, 13002, 12948, 12808, 12713, 12662, 12488, 12392, 12266, 12287, 12274, 12269, 12327, 12334, 12423, 12391, 12380, 12361, 12292, 12297, 12257, 12299, 12292]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12234, 12277, 12238, 12243, 12288, 12274, 12280, 12239, 12174, 12177, 12256, 12239, 12181, 12213, 12318, 12400, 12520, 12620, 12654, 12746, 12837, 12891, 12960, 13096, 13174, 13572, 13850, 13577, 14054, 13964, 13184, 13206, 12743, 12402, 12226, 12506, 12215, 12274, 12198, 12406, 12498, 12610, 12633, 12824, 12943, 13134, 13394, 13712, 13958, 14351, 14741, 15599, 15670, 15385, 15643, 16189, 15544, 15144, 14415, 14033, 13625, 13464, 13120, 13028, 12838, 12576, 12249, 12143, 12006, 11921, 12112, 12100, 12073, 12091, 12092, 12124, 12102, 12132, 12162, 12226, 12351, 12429, 12428, 12536, 12618, 12678, 12725, 12786, 12903, 12991, 13187, 13406, 13495, 13547, 13628, 13677, 13712, 13692, 13502, 13794, 13812, 13415, 13385, 13197, 13101, 12795, 12641, 12530, 12472, 12536, 12443, 12421, 12358, 12616, 12555, 12482, 12511, 12541, 12627, 12655, 12730, 12904, 12914, 13055, 13199, 13461, 14080, 14455, 14861, 15428, 16012, 16098, 15709, 15354, 15820, 15450, 15391, 15040, 14552, 14044, 13570, 13201, 13283, 12953, 12552, 12630, 12600, 12889, 12786, 12768, 12337, 12361, 12750, 12552, 12716, 12576, 12585, 12615, 12379, 12531, 12492, 12448, 12425, 12404, 12318, 12397, 12411, 12395, 12378, 12339, 12407, 12328, 12281, 12270, 12237, 12162, 12182, 12152, 12166, 12142, 12148, 12143, 12179, 12133, 12128, 12154, 12174, 12127, 12172, 12170, 12191, 12213, 12147, 12181, 12208, 12260, 12216, 12240, 12206, 12211]]\n", + "DEBUG:root:compressed_len_list: [[12200, 12197, 12210, 12233, 12196, 12218, 12160, 12165, 12180, 12061, 12151, 12229, 12233, 12308, 12340, 12512, 12617, 12648, 12712, 12818, 12859, 12993, 13045, 13122, 13194, 13378, 13581, 13762, 13920, 13948, 13586, 14159, 14293, 14273, 13858, 13309, 13313, 12872, 12763, 12636, 12778, 12652, 12553, 12319, 12372, 12233, 12231, 12384, 12402, 12482, 12426, 12716, 12821, 12877, 12987, 13067, 13301, 13378, 13741, 14425, 14763, 15011, 14812, 14891, 15176, 15633, 15769, 15646, 14628, 15053, 15635, 14898, 15300, 14561, 14946, 14614, 13869, 13456, 13001, 12801, 12725, 12453, 12271, 12068, 12060, 12149, 12269, 12324, 12278, 12213, 12210, 12352, 12456, 12413, 12230, 12276, 12486, 12530, 12661, 12702, 12878, 13001, 13051, 13135, 13318, 13637, 13804, 13995, 14195, 14106, 14012, 14077, 13897, 14085, 14278, 14429, 14157, 14428, 14458, 14514, 13975, 13907, 13743, 13462, 13471, 13170, 12834, 12732, 12751, 12761, 12508, 12571, 12264, 12247, 12314, 12462, 12582, 12639, 12489, 12559, 12532, 12446, 12449, 12374, 12732, 13379, 13503, 13980, 13879, 13849, 13870, 13680, 13946, 13834, 13931, 13990, 14087, 14130, 14253, 13877, 13847, 13888, 13914, 13945, 13938, 13552, 13246, 12789, 12333, 12206, 12189, 11821, 11887, 11923, 12027, 12379, 12180, 11989, 12032, 12314, 12231, 12052, 11988, 12101, 12178, 12196, 12139, 12219, 12069, 12124, 12077, 12103, 11994, 11962, 11968, 11959, 11945, 11939, 11950, 11988]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12028, 11975, 12010, 12050, 11989, 12047, 12009, 11951, 11980, 11899, 11903, 11968, 11965, 11996, 12056, 12076, 12121, 12158, 12208, 12349, 12557, 12590, 12722, 12908, 13254, 13522, 13588, 13425, 13850, 14004, 13431, 12937, 12544, 12172, 12208, 12065, 12206, 11941, 12034, 12047, 12163, 12059, 12186, 12419, 12629, 12748, 13011, 13105, 13210, 13301, 13538, 13685, 13875, 14673, 15015, 15154, 14540, 14948, 14302, 14148, 13483, 13405, 13436, 13171, 13289, 12849, 12232, 12427, 11918, 12075, 12279, 12081, 12129, 12302, 12117, 12253, 12502, 12441, 12432, 12516, 12777, 12881, 12927, 13036, 13215, 13306, 13341, 13521, 13764, 13922, 14201, 14614, 14735, 14859, 14976, 14831, 14687, 14476, 14561, 14500, 14819, 14275, 14705, 14520, 14154, 13811, 13655, 13425, 12910, 12758, 12609, 12609, 12421, 12445, 12365, 12369, 12288, 12239, 12084, 11857, 11885, 11973, 11900, 11921, 11960, 12008, 12095, 12270, 12545, 12742, 12785, 12784, 12973, 13285, 13354, 13379, 13454, 14043, 13630, 13477, 13190, 13256, 13171, 12911, 12837, 12639, 12613, 12638, 12629, 12485, 12273, 12588, 12568, 12474, 12669, 12522, 12701, 13133, 12755, 12544, 12453, 12328, 12501, 12573, 12569, 12643, 12640, 12591, 12584, 12661, 12469, 12430, 12363, 12426, 12372, 12408, 12283, 12251, 12251, 12291, 12219, 12209, 12213, 12145, 12194, 12208, 12198, 12223, 12218, 12263, 12259, 12271, 12294, 12298, 12287, 12273, 12263, 12281, 12288, 12290]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12195, 12182, 12199, 12191, 12162, 12196, 12198, 12119, 12086, 12054, 12164, 12315, 12328, 12416, 12461, 12588, 12582, 12630, 12698, 12773, 12826, 12900, 13046, 13109, 13271, 13513, 13243, 13409, 13488, 13346, 12688, 12743, 12599, 12464, 12539, 12633, 12524, 12540, 12646, 12628, 12374, 12397, 12887, 12910, 12879, 12837, 12815, 12820, 12861, 13021, 12979, 13433, 13753, 14366, 14914, 14477, 13897, 14632, 14216, 14297, 13799, 13433, 13519, 13246, 13018, 12918, 12744, 12385, 12407, 12359, 12179, 12104, 12143, 12235, 12210, 12195, 12227, 12258, 12336, 12326, 12294, 12299, 12381, 12427, 12445, 12654, 12693, 12749, 12750, 12916, 13091, 13169, 13167, 13222, 13273, 13416, 13447, 13643, 13795, 13926, 13913, 14037, 14107, 14196, 14171, 14175, 14029, 14078, 14561, 14216, 14486, 14484, 14350, 14023, 14150, 14050, 13796, 13733, 13404, 13246, 13000, 13026, 12923, 12622, 12636, 12492, 12608, 12680, 12618, 12676, 12660, 12661, 12545, 12451, 12575, 13083, 13738, 13982, 14344, 14927, 15130, 14791, 15692, 15752, 15810, 15396, 14924, 14972, 14558, 14464, 14008, 13494, 13063, 12672, 12729, 12703, 12790, 12916, 12877, 12724, 12551, 12507, 12590, 12613, 12554, 12552, 12413, 12474, 12515, 12525, 12374, 12407, 12448, 12441, 12398, 12419, 12393, 12366, 12302, 12336, 12285, 12291, 12212, 12266, 12290, 12236, 12297, 12279, 12278, 12240, 12248, 12273, 12305, 12297, 12304, 12318, 12266, 12299, 12275, 12309]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12356, 12343, 12324, 12358, 12363, 12370, 12380, 12391, 12314, 12374, 12274, 12264, 12340, 12383, 12383, 12487, 12472, 12594, 12656, 12687, 12713, 12856, 12843, 12872, 12956, 13212, 13449, 13770, 14048, 13695, 13896, 14350, 14386, 14117, 13407, 13650, 13200, 12864, 12565, 12842, 12747, 12429, 12420, 12498, 12445, 12068, 12135, 11989, 12237, 12119, 12289, 12529, 12835, 13081, 13026, 13168, 13069, 13576, 13986, 15008, 15830, 15002, 15746, 15977, 16383, 16003, 14941, 14797, 14060, 13124, 13049, 12847, 12870, 12856, 12652, 12401, 12365, 12380, 12273, 12134, 12183, 12324, 12196, 12215, 12294, 12249, 12280, 12336, 12584, 12482, 12621, 12732, 12704, 12825, 12807, 13001, 13053, 13251, 13169, 13323, 13486, 13722, 13999, 14145, 14236, 14550, 14406, 14480, 14486, 14565, 14485, 14379, 14452, 14325, 14715, 14777, 14700, 14236, 14202, 14172, 14007, 13811, 13544, 13331, 13131, 13000, 12937, 12562, 12491, 12449, 12553, 12571, 12619, 12773, 12801, 12842, 12893, 12896, 12854, 12824, 12966, 13315, 13799, 14135, 14284, 14687, 14735, 15351, 15367, 15070, 15464, 15669, 15547, 15289, 15335, 15171, 15342, 15274, 14858, 14729, 14812, 14335, 13957, 13583, 14274, 13993, 13380, 13451, 13388, 12924, 12946, 13062, 13058, 12759, 12596, 12883, 13084, 12631, 12608, 12666, 12737, 13267, 13071, 12977, 12852, 12816, 12810, 12768, 12821, 12899, 12835, 12727, 12787, 12776, 12646, 12664, 12625, 12700, 12684, 12660]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12217, 12277, 12247, 12224, 12203, 12246, 12241, 12210, 12156, 12255, 12233, 12277, 12258, 12333, 12406, 12519, 12646, 12679, 12763, 12905, 12964, 13169, 13447, 13398, 13140, 13673, 13773, 13424, 12864, 12543, 12269, 12098, 12234, 12086, 12433, 12070, 12392, 12274, 12473, 12483, 12556, 12670, 12753, 12833, 12935, 13015, 13367, 13994, 14281, 15360, 15539, 15220, 16068, 15841, 14985, 14444, 13681, 13300, 12966, 12909, 12777, 12600, 12415, 12158, 11996, 12026, 11910, 11908, 11909, 11920, 11891, 11888, 11906, 11933, 11854, 11877, 11884, 11870, 11869, 11851, 11968, 12088, 12281, 12385, 12496, 12548, 12567, 12547, 12632, 12790, 12818, 12899, 13073, 12979, 13097, 13043, 13075, 13101, 13046, 13295, 13524, 13735, 13935, 14060, 14216, 13931, 14027, 13940, 13981, 13935, 13940, 14207, 14166, 14079, 14285, 14223, 13819, 13861, 13777, 13781, 13581, 13452, 12899, 12667, 12418, 12324, 12404, 12427, 12400, 12318, 12306, 12251, 12155, 12238, 12581, 13211, 13245, 13352, 13852, 14127, 14195, 13886, 14437, 14002, 14160, 13934, 13925, 13902, 13959, 14061, 13391, 12906, 12607, 12392, 12476, 12230, 12000, 11820, 11735, 11736, 11980, 12168, 12107, 12232, 12126, 12314, 12253, 12195, 12311, 12244, 12290, 12287, 12318, 12260, 12289, 12328, 12235, 12273, 12265, 12262, 12200, 12195, 12135, 12169, 12148, 12130, 12142, 12136, 12111, 12153, 12151, 12148, 12141, 12166, 12137, 12196, 12142, 12152, 12134, 12154]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12413, 12402, 12417, 12460, 12442, 12456, 12534, 12543, 12509, 12540, 12419, 12511, 12679, 12692, 12791, 12806, 12848, 12929, 12952, 13008, 13047, 13171, 13298, 13710, 14036, 13797, 13775, 14350, 14277, 13408, 13361, 12943, 12763, 12619, 12825, 12770, 12395, 12299, 12483, 12694, 12625, 12568, 12822, 12839, 12850, 13034, 13172, 12719, 12798, 13672, 13207, 12894, 12770, 13025, 12889, 12691, 12121, 11882, 12014, 12182, 12179, 12272, 12451, 12308, 12337, 12449, 12502, 12566, 12572, 12688, 12794, 12851, 13051, 13246, 13539, 13906, 14150, 14269, 14381, 14373, 14435, 14195, 14243, 14745, 14148, 13846, 13604, 13375, 12994, 13015, 12479, 12627, 12561, 12670, 12541, 12708, 12804, 12755, 12600, 12530, 12496, 13275, 14176, 14041, 14877, 14832, 15084, 14878, 14095, 13959, 13400, 12678, 12744, 12765, 12538, 12504, 12172, 11973, 12012, 12049, 11955, 11958, 12061, 12184, 12380, 12494, 12423, 12389, 12379, 12256, 12369, 12269, 12336, 12299, 12145, 12111, 12081, 12032, 12074, 12101, 12115, 12083, 12034, 12017, 12012, 12025, 12013, 12033, 12007, 11998, 12035, 12022, 11998, 12044, 12061, 12038, 12058, 12053, 12029, 12047, 12033, 12018, 12049, 12047, 12044, 12054, 12040, 12043, 12014, 12081, 12058, 12039, 12025, 12064, 12044, 12057, 12062, 12022, 12037, 12051, 12028, 12042, 12045, 12067, 12077, 12063, 12046, 12021, 12055, 12003, 12035, 12098, 12023, 12084, 12020, 12060, 12032, 12091, 12049, 12042]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12356, 12336, 12395, 12351, 12367, 12360, 12401, 12436, 12394, 12310, 12307, 12280, 12387, 12542, 12605, 12710, 12717, 12825, 12819, 12988, 12790, 12731, 13039, 12813, 12994, 13101, 13044, 13028, 12911, 13139, 13268, 13544, 13805, 14030, 14129, 14494, 14031, 13972, 13437, 13007, 12648, 12335, 12438, 12285, 12244, 12114, 12078, 12392, 12472, 12268, 12507, 12627, 12687, 12803, 12805, 13221, 13342, 13512, 14032, 13951, 14634, 15360, 15868, 15735, 15931, 16666, 16377, 15157, 14726, 14102, 14094, 13823, 13669, 13451, 13342, 13249, 13110, 13031, 12874, 12813, 12621, 12607, 12573, 12516, 12507, 12504, 12466, 12436, 12302, 12276, 12247, 12297, 12275, 12282, 12315, 12311, 12281, 12288, 12338, 12540, 12628, 12664, 12798, 12867, 13005, 13147, 13104, 13240, 13389, 13588, 13787, 14152, 14199, 14371, 14350, 14425, 14373, 14420, 14340, 14347, 14351, 14349, 14609, 14510, 14049, 14288, 14092, 14053, 13658, 13481, 13228, 13171, 13010, 12876, 12883, 12610, 12515, 12394, 12289, 12208, 12063, 12185, 12086, 12099, 12056, 12148, 12414, 13096, 13466, 13440, 13351, 13145, 13399, 13621, 13502, 13667, 14242, 14336, 13944, 13789, 13528, 13768, 13848, 14039, 14049, 13935, 13552, 13140, 12930, 12834, 12985, 13015, 13059, 13194, 13156, 12870, 12758, 12597, 12808, 12791, 12623, 12669, 12597, 12602, 12620, 12563, 12485, 12392, 12457, 12441, 12457, 12418, 12380, 12404, 12437, 12412, 12417, 12438, 12401, 12447]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12156, 12134, 12169, 12173, 12148, 12189, 12175, 12138, 12152, 12088, 12101, 12166, 12161, 12345, 12381, 12441, 12545, 12657, 12751, 12889, 13081, 13388, 13713, 13915, 14006, 13820, 14363, 14166, 13224, 13084, 12863, 12430, 12203, 12272, 12525, 12440, 12516, 12514, 12576, 12627, 12657, 12778, 12925, 13078, 13396, 13136, 13423, 14321, 14264, 14463, 15446, 14535, 15351, 15029, 14495, 13883, 13340, 13573, 13491, 13143, 12795, 12607, 12410, 12182, 12305, 11990, 11956, 12090, 12035, 12040, 12027, 12113, 12135, 12092, 12164, 12332, 12325, 12483, 12664, 12867, 12913, 13118, 13130, 13383, 13465, 13765, 13975, 14213, 13844, 13746, 13791, 14307, 14235, 14600, 14493, 14623, 14441, 14402, 14688, 14758, 14091, 13901, 13756, 13764, 13351, 12974, 12548, 12493, 12514, 12690, 12514, 12475, 12671, 12850, 12770, 12781, 12945, 13575, 14248, 14503, 14863, 15129, 15145, 15273, 15784, 15795, 15858, 15902, 15668, 15478, 15140, 14937, 14770, 13912, 13602, 13164, 13255, 12990, 12844, 12726, 12740, 12669, 12630, 12552, 12493, 12530, 12357, 12367, 12334, 12344, 12544, 12442, 12347, 12262, 12395, 12479, 12477, 12354, 12417, 12431, 12401, 12403, 12315, 12370, 12351, 12333, 12366, 12366, 12380, 12377, 12401, 12401, 12377, 12403, 12391, 12436, 12420, 12391, 12426, 12430, 12394, 12428, 12377, 12417, 12404, 12432, 12393, 12411, 12380, 12412, 12425, 12412, 12380, 12422, 12404, 12390, 12371, 12410, 12410, 12409]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[11983, 11986, 11994, 12018, 11991, 11984, 11961, 12012, 11970, 11923, 11917, 12003, 12063, 12001, 12037, 12126, 12137, 12195, 12248, 12349, 12427, 12387, 12472, 12460, 12512, 12512, 12640, 12748, 12846, 13063, 13413, 13507, 13713, 13690, 13722, 13448, 13282, 13367, 13618, 13636, 13432, 13016, 12719, 12538, 12562, 12377, 12444, 12404, 12849, 12622, 12542, 12584, 12800, 12736, 12705, 12812, 12880, 13122, 13344, 13782, 14206, 15069, 13715, 15085, 15403, 14900, 13954, 13410, 12805, 12960, 13023, 12894, 12741, 12638, 12515, 12482, 12458, 12483, 12539, 12155, 12297, 12515, 12262, 12267, 12474, 12490, 12439, 12624, 12681, 12626, 12767, 12791, 12803, 12966, 13129, 13353, 13744, 13929, 14150, 14280, 14371, 14439, 14522, 14486, 14786, 14667, 14634, 14861, 14913, 14863, 14804, 14196, 14431, 14166, 14151, 14361, 14289, 14097, 14084, 13844, 13591, 13374, 13102, 12943, 13315, 13336, 13198, 13214, 13260, 13095, 13199, 13187, 13532, 13854, 14562, 15319, 15402, 15699, 15395, 15920, 16053, 16164, 16182, 15396, 15223, 15027, 14767, 14562, 14268, 13905, 13386, 13039, 13296, 13197, 13051, 12640, 12492, 12281, 12247, 12296, 12183, 12129, 12197, 12243, 12397, 12445, 12525, 12563, 12553, 12535, 12498, 12487, 12447, 12397, 12350, 12227, 12195, 12182, 12212, 12154, 12163, 12217, 12147, 12169, 12141, 12136, 12097, 12084, 12081, 12130, 12132, 12092, 12116, 12123, 12153, 12139, 12137, 12161, 12155, 12141]]\n", + "DEBUG:root:compressed_len_list: [[12252, 12209, 12249, 12259, 12280, 12266, 12188, 12150, 12171, 12159, 12248, 12378, 12435, 12462, 12533, 12556, 12657, 12768, 12804, 12918, 13061, 13159, 13368, 13706, 13887, 14039, 14137, 13971, 13136, 13842, 13829, 13735, 13474, 13091, 12827, 12614, 12506, 12637, 12455, 12325, 12332, 12245, 12203, 12143, 12364, 12215, 12391, 12367, 12446, 12480, 12541, 12726, 12900, 12924, 13054, 13456, 13969, 14626, 15316, 15713, 16007, 16280, 16301, 16483, 15983, 15806, 16108, 15996, 15544, 15020, 14171, 13686, 13087, 12816, 12722, 12293, 12180, 12023, 11893, 12023, 12042, 12036, 11981, 12006, 12059, 12010, 11986, 11956, 12069, 12081, 12265, 12372, 12526, 12635, 12713, 12800, 12913, 12926, 13082, 13329, 13613, 13811, 14025, 14180, 14241, 14344, 14373, 14406, 14135, 14262, 14349, 14497, 13946, 14347, 14196, 13772, 13694, 13579, 13484, 13291, 12727, 12577, 12699, 12841, 12485, 12341, 12517, 12676, 12539, 12477, 12497, 12651, 12629, 12640, 12662, 12648, 12685, 13383, 13920, 14159, 14635, 14660, 15074, 14868, 14887, 15057, 14625, 14821, 14427, 15064, 14884, 15001, 14872, 14799, 14758, 14611, 14492, 14217, 13622, 13464, 13185, 12787, 12531, 12575, 12474, 12368, 12132, 12294, 12303, 12261, 12332, 12344, 12293, 12248, 12278, 12277, 12220, 12200, 12293, 12292, 12294, 12285, 12272, 12321, 12297, 12271, 12260, 12228, 12220, 12194, 12221, 12178, 12149, 12178, 12104, 12081, 12065, 12059, 12079, 12050]]\n", + "DEBUG:root:compressed_len_list: [[12272, 12245, 12263, 12269, 12270, 12255, 12265, 12238, 12265, 12273, 12269, 12215, 12242, 12244, 12175, 12146, 12129, 12223, 12211, 12184, 12135, 12132, 12149, 12221, 12319, 12317, 12348, 12449, 12656, 12763, 12876, 12961, 13236, 13436, 13259, 13263, 13657, 13226, 12913, 12549, 12327, 12367, 12348, 12442, 12399, 12804, 12898, 12716, 12641, 12620, 12820, 12903, 13178, 13362, 13817, 14337, 14568, 14606, 15290, 15924, 15354, 14879, 14399, 13732, 13203, 12987, 12876, 12742, 12600, 12321, 12327, 12249, 12284, 12116, 12044, 12050, 12053, 12014, 12178, 12240, 12276, 12291, 12264, 12421, 12562, 12634, 12637, 12540, 12715, 12695, 12656, 12884, 12988, 13045, 13202, 13714, 13826, 13826, 13914, 14122, 14156, 13752, 14116, 13942, 13938, 14074, 14042, 13846, 13427, 13243, 13013, 12830, 12727, 12661, 12616, 12491, 12463, 12573, 12937, 13464, 13952, 14352, 14692, 14702, 14686, 14443, 14853, 14447, 14306, 14390, 14092, 13981, 13581, 12968, 12542, 12611, 12652, 12372, 12230, 12107, 12054, 12156, 12269, 12116, 12098, 12048, 12171, 12293, 12287, 12266, 12240, 12196, 12282, 12302, 12280, 12332, 12381, 12296, 12266, 12253, 12292, 12218, 12222, 12178, 12155, 12168, 12128, 12119, 12115, 12128, 12111, 12128, 12129, 12116, 12135, 12134, 12121, 12160, 12167, 12146, 12202, 12150, 12187, 12173, 12181, 12179, 12188, 12156, 12167, 12183, 12165, 12139, 12163, 12195, 12200, 12177, 12161, 12178, 12197, 12187]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12191, 12171, 12197, 12187, 12159, 12186, 12150, 12163, 12210, 12144, 12094, 12179, 12208, 12224, 12246, 12331, 12464, 12478, 12499, 12671, 12943, 13008, 13070, 13365, 13647, 13817, 13875, 14071, 14368, 14157, 13551, 14349, 14378, 14035, 13564, 13187, 13112, 12970, 12941, 12850, 12792, 12793, 12535, 12698, 12961, 12803, 12657, 12719, 12679, 12683, 12843, 13064, 13554, 14146, 14688, 16275, 16137, 15714, 15917, 16768, 17013, 16290, 16639, 16048, 14989, 14407, 14318, 13960, 13419, 12891, 12745, 12620, 12746, 12397, 12330, 12701, 12648, 12568, 12767, 12847, 12687, 12873, 13015, 12899, 13048, 13251, 13318, 13425, 13566, 13423, 13854, 14014, 14024, 14142, 14354, 14547, 14710, 14618, 14728, 14754, 14873, 15064, 15353, 14942, 15300, 15313, 15141, 14806, 14718, 14902, 14797, 14731, 14692, 14580, 13907, 13768, 13704, 13522, 13535, 13373, 13238, 13310, 13179, 13271, 13493, 13886, 14507, 14916, 15341, 15626, 16099, 15732, 15744, 15768, 15938, 15730, 15616, 15624, 15348, 15240, 14846, 14944, 14782, 14286, 13876, 13729, 13198, 12772, 12763, 13243, 13027, 12932, 13191, 12869, 12863, 12896, 12844, 12785, 12719, 12778, 12851, 12724, 12668, 12643, 12618, 12621, 12620, 12617, 12467, 12503, 12459, 12471, 12456, 12518, 12466, 12484, 12475, 12474, 12500, 12468, 12502, 12465, 12484, 12510, 12486, 12502, 12443, 12532, 12546, 12558, 12553, 12638, 12666, 12642, 12647, 12671, 12667, 12601, 12529, 12493]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12245, 12266, 12306, 12285, 12272, 12327, 12229, 12151, 12234, 12212, 12313, 12282, 12351, 12328, 12401, 12367, 12439, 12460, 12523, 12624, 12727, 12834, 12941, 13000, 12993, 13060, 13222, 13305, 13577, 13730, 13977, 13629, 13404, 13914, 13840, 13805, 13577, 13375, 13380, 13168, 12806, 12747, 12619, 12655, 12741, 12671, 12506, 12414, 12305, 12064, 12112, 12525, 12310, 12365, 12463, 12530, 12694, 12668, 12840, 12935, 13290, 13955, 14675, 14920, 15339, 15325, 16033, 16075, 16251, 16201, 16171, 15645, 15218, 15548, 14994, 14686, 13818, 13442, 13036, 12824, 12509, 12293, 12182, 12014, 12056, 12056, 12051, 12077, 12104, 12105, 12248, 12392, 12503, 12540, 12520, 12648, 12716, 12827, 12871, 12951, 13041, 13051, 13167, 13634, 13794, 13964, 13894, 14034, 13808, 14071, 13897, 14034, 14049, 14272, 14265, 14132, 14555, 14654, 14426, 13911, 13973, 13635, 13398, 13051, 12819, 12922, 12903, 13028, 13076, 13119, 12890, 12928, 12695, 12913, 13032, 12939, 12917, 12869, 12843, 12787, 12768, 12740, 12569, 12758, 13305, 13754, 13852, 14276, 14495, 14306, 14695, 14684, 14453, 14897, 14718, 14739, 14842, 14754, 14471, 14357, 14074, 14448, 13824, 13784, 13578, 13297, 13329, 13098, 13060, 12662, 12444, 12046, 12022, 12145, 12502, 12054, 12273, 12382, 12167, 12306, 12138, 12245, 12239, 12191, 12281, 12261, 12407, 12279, 12337, 12308, 12417, 12283, 12310, 12235, 12190, 12129, 12108, 12095, 12127, 12154]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12345, 12366, 12372, 12384, 12363, 12385, 12342, 12341, 12289, 12312, 12327, 12361, 12347, 12331, 12374, 12352, 12477, 12539, 12571, 12521, 12562, 12580, 12594, 12624, 12703, 12750, 12885, 12899, 13016, 13072, 13232, 13305, 13440, 13451, 13454, 13484, 13634, 13800, 13889, 14134, 14388, 14660, 14810, 14874, 14961, 14371, 14585, 14607, 14590, 14453, 13807, 13539, 13323, 13113, 12814, 12741, 12590, 12395, 12423, 12297, 12457, 12404, 12521, 12662, 12745, 12868, 12878, 12923, 12931, 13115, 13361, 13852, 14081, 14215, 14400, 14847, 15323, 15843, 15345, 16187, 16015, 15056, 15011, 14208, 13727, 13698, 13450, 13142, 12970, 12855, 12689, 12561, 12423, 12291, 12255, 12201, 12186, 12162, 12130, 12140, 12147, 12131, 12158, 12120, 12112, 12078, 12069, 12077, 12073, 12072, 12082, 12057, 12119, 12232, 12313, 12464, 12519, 12733, 12815, 12942, 13008, 13094, 13212, 13248, 13259, 13357, 13547, 13620, 13762, 13824, 14030, 14109, 14295, 14198, 14039, 14224, 14142, 14439, 14392, 13865, 14106, 14166, 13995, 13677, 13788, 13568, 13343, 13080, 12929, 12895, 12855, 12650, 12674, 12552, 12375, 12277, 12588, 12632, 12582, 12600, 12504, 12432, 12170, 11988, 11869, 11788, 11889, 12091, 12410, 12894, 12950, 14050, 13861, 13204, 13059, 12909, 12788, 12891, 12868, 12502, 12406, 12486, 12959, 12819, 12536, 12237, 12311, 12330, 12457, 12465, 12528, 12321, 12439, 12373, 12442, 12321, 12359, 12384, 12343, 12255]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12087, 12047, 12115, 12054, 12121, 12055, 12033, 12028, 12093, 12012, 11967, 12116, 12056, 12059, 12107, 12089, 12079, 12115, 12117, 12105, 12149, 12199, 12250, 12393, 12446, 12600, 12721, 12878, 13256, 13531, 13716, 13417, 13740, 13747, 13783, 13263, 12694, 12758, 12297, 12149, 12008, 12284, 12232, 12176, 11990, 11972, 11918, 11603, 11736, 11773, 11865, 12066, 12257, 12550, 12621, 12616, 12943, 13294, 13596, 14478, 14964, 14484, 15395, 15818, 15588, 14585, 14456, 13656, 13543, 13299, 13013, 12873, 12495, 12256, 12239, 12009, 12225, 12266, 12220, 12187, 12220, 12171, 12318, 12569, 12464, 12709, 12809, 12970, 13060, 13213, 13141, 13300, 13628, 13779, 13828, 13997, 14083, 14091, 14052, 14097, 14176, 14255, 13865, 14190, 14112, 14118, 14096, 13559, 13515, 13384, 13328, 12616, 12569, 12379, 12286, 12247, 12030, 11959, 11961, 12275, 12171, 12048, 11896, 11840, 11767, 11805, 11818, 11738, 11794, 11923, 12160, 12420, 12554, 12537, 12619, 12578, 12783, 12885, 12983, 12797, 12935, 12935, 13034, 13191, 13045, 13072, 12850, 12876, 13123, 13358, 13736, 13082, 12538, 12393, 12652, 13122, 12918, 12864, 12628, 12355, 12454, 12464, 12491, 12399, 12363, 12394, 12397, 12381, 12328, 12244, 12270, 12250, 12235, 12196, 12197, 12198, 12171, 12186, 12185, 12143, 12164, 12131, 12121, 12103, 12172, 12158, 12150, 12136, 12126, 12150, 12127, 12187, 12175, 12172, 12189, 12175, 12174, 12183, 12192, 12183]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12333, 12276, 12305, 12324, 12330, 12326, 12282, 12267, 12318, 12289, 12256, 12222, 12301, 12347, 12299, 12318, 12460, 12496, 12554, 12619, 12676, 12716, 12808, 12938, 13016, 13173, 13253, 13309, 13463, 13647, 13806, 14079, 14177, 14270, 14308, 14310, 13207, 14011, 14043, 13993, 13874, 13700, 13438, 12939, 12700, 12610, 12580, 12404, 12575, 12478, 12302, 12182, 12216, 12176, 12228, 12381, 12429, 12395, 12520, 12634, 12723, 12838, 12934, 12886, 12921, 13009, 13312, 13801, 14446, 15124, 15287, 16082, 15445, 15499, 16159, 15283, 15014, 14222, 13853, 13442, 13198, 13020, 12733, 12463, 12322, 12119, 12229, 12229, 12249, 12226, 12235, 12239, 12322, 12427, 12513, 12653, 12781, 12933, 13080, 13000, 13181, 13526, 13738, 14044, 14164, 14361, 14301, 14394, 14433, 14257, 14128, 14323, 14264, 14160, 14484, 14478, 14251, 14434, 14150, 14151, 13858, 13819, 13377, 13151, 12971, 12744, 12581, 12479, 12441, 12266, 12450, 12319, 12234, 12223, 12186, 12109, 12112, 12025, 11997, 12191, 12923, 13407, 13697, 13786, 13847, 13819, 14230, 14578, 14830, 14459, 14503, 14626, 14431, 13872, 13893, 13896, 14024, 13839, 13903, 13461, 13048, 12629, 12818, 12747, 12683, 12576, 12519, 12252, 12244, 12208, 12126, 12252, 12251, 12230, 12183, 12325, 12380, 12257, 12309, 12282, 12278, 12222, 12138, 12229, 12264, 12310, 12222, 12222, 12301, 12291, 12228, 12216, 12193, 12256, 12254, 12278, 12275, 12278, 12285, 12273]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12158, 12132, 12175, 12171, 12166, 12190, 12128, 12126, 12154, 12008, 12132, 12176, 12147, 12220, 12253, 12333, 12375, 12491, 12597, 12658, 12714, 12829, 12918, 12958, 13106, 13296, 13563, 13783, 13794, 13288, 13913, 13604, 13065, 12900, 12396, 12378, 12231, 12249, 12126, 12244, 12470, 12520, 12580, 12625, 12781, 12837, 12916, 12968, 13118, 13472, 13708, 14514, 15053, 15888, 16376, 15799, 16192, 15626, 15171, 14104, 13833, 13329, 13316, 12905, 13411, 13471, 12970, 12888, 12888, 12928, 12737, 12683, 12653, 12637, 12537, 12531, 12561, 12582, 12486, 12538, 12526, 12518, 12532, 12562, 12582, 12703, 12773, 12846, 13005, 12986, 13105, 12950, 13321, 13071, 13314, 13301, 13458, 13743, 14085, 14228, 14398, 14664, 14644, 14762, 14796, 14928, 14886, 14963, 14957, 14916, 14908, 14907, 14818, 14722, 14539, 14449, 14441, 14472, 14511, 14597, 14668, 14277, 14449, 14534, 14117, 14149, 14023, 14239, 14150, 13913, 13808, 13620, 13563, 13408, 13390, 13253, 13112, 13231, 13320, 13143, 13181, 13214, 13187, 13053, 13027, 12873, 12795, 12986, 13571, 14240, 14804, 14777, 14912, 15148, 15668, 15770, 15663, 15426, 15665, 15589, 15295, 15815, 15852, 15712, 15701, 15436, 15321, 14964, 14480, 14028, 13756, 13567, 13302, 13321, 13326, 13357, 13241, 13130, 12960, 12882, 12966, 12946, 12853, 12914, 12922, 12865, 12883, 12880, 12856, 12847, 12949, 12869, 12830, 12915, 12901, 12871, 12898, 12891, 12908, 12931]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12275, 12291, 12294, 12283, 12263, 12276, 12327, 12293, 12290, 12245, 12180, 12232, 12159, 12281, 12285, 12270, 12295, 12357, 12341, 12445, 12513, 12527, 12649, 12725, 12724, 12823, 12960, 13014, 13330, 13593, 13725, 13553, 13780, 13940, 13930, 13516, 12926, 12968, 12647, 12614, 12306, 12626, 12553, 12252, 12281, 12278, 12697, 12457, 12477, 12459, 12590, 12804, 12703, 13038, 12991, 13144, 13353, 13393, 13804, 14494, 15021, 15601, 15640, 15566, 16614, 16574, 16079, 15681, 15553, 15407, 14599, 14038, 13380, 13216, 13097, 13163, 12953, 12690, 12510, 12483, 12372, 12327, 12172, 12038, 12205, 12263, 12249, 12213, 12226, 12212, 12193, 12155, 12197, 12289, 12265, 12372, 12408, 12459, 12514, 12572, 12656, 12772, 12870, 12957, 12943, 12816, 13070, 13134, 13055, 13299, 13235, 13458, 13561, 13644, 13803, 13918, 13936, 14048, 14158, 14135, 14217, 14197, 14266, 14308, 14472, 14638, 14820, 14418, 14579, 14719, 14199, 14228, 13789, 13612, 13557, 13308, 13124, 13203, 13065, 12877, 12913, 12831, 12655, 12519, 12700, 12639, 12484, 12461, 12459, 12500, 12417, 12433, 12460, 12635, 12922, 13249, 13551, 13645, 13564, 13712, 13686, 13946, 14024, 14107, 14002, 13858, 13874, 14120, 14475, 14568, 14725, 14344, 14247, 14142, 14323, 13966, 14021, 13821, 13683, 13737, 13752, 14012, 14110, 14429, 13991, 13767, 13569, 13219, 13052, 12276, 12434, 12456, 12347, 12431, 12319, 12309, 12241, 12270, 12203, 12198]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12096, 12147, 12109, 12143, 12132, 12105, 12124, 12063, 12002, 12106, 12132, 12152, 12182, 12264, 12295, 12395, 12444, 12515, 12598, 12640, 12763, 12798, 12840, 12940, 13127, 13354, 13681, 13518, 13219, 13994, 13980, 13913, 13877, 13955, 13854, 13154, 12624, 12778, 12654, 12460, 12264, 12714, 12559, 12550, 12177, 12310, 12229, 12397, 12319, 12278, 12484, 12630, 12571, 12644, 12685, 12862, 13222, 13701, 14303, 14768, 15268, 15337, 15992, 16309, 15767, 14788, 14671, 13875, 12981, 12821, 12794, 13001, 12904, 12808, 12944, 12646, 12523, 12359, 12414, 12427, 12372, 12487, 12429, 12301, 12398, 12340, 12466, 12620, 12574, 12603, 12606, 12662, 12808, 12858, 12910, 13027, 13089, 13135, 13251, 13509, 13736, 14030, 14275, 14457, 14568, 14657, 14606, 14596, 14497, 14471, 14346, 14485, 14514, 14518, 14123, 14326, 14456, 14333, 14045, 14086, 13767, 13842, 13470, 13315, 13133, 13096, 13035, 13027, 12847, 12844, 12946, 13093, 13097, 13050, 13073, 12985, 13020, 12926, 12898, 12999, 13337, 14095, 14641, 15031, 15277, 15424, 15618, 15567, 15323, 15574, 15630, 15386, 15385, 15337, 15003, 15152, 14839, 14456, 13904, 13445, 13386, 13362, 13247, 13006, 12809, 12708, 12739, 12629, 12734, 12776, 12776, 12814, 12921, 12992, 13161, 12987, 12995, 12950, 12762, 12772, 12888, 13008, 12838, 12717, 12776, 12794, 12772, 12722, 12687, 12685, 12703, 12660, 12666, 12645, 12651, 12623, 12631, 12613, 12642, 12619]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12403, 12407, 12437, 12419, 12414, 12395, 12411, 12404, 12431, 12428, 12291, 12333, 12396, 12412, 12408, 12432, 12451, 12512, 12505, 12512, 12508, 12518, 12581, 12710, 12854, 12963, 13066, 13182, 13243, 13304, 13374, 13565, 13738, 13887, 13959, 14211, 14282, 14685, 14623, 14643, 14530, 14020, 13087, 13287, 13021, 13006, 12619, 12913, 12884, 12807, 12474, 12482, 12619, 12733, 12716, 12460, 12471, 12515, 12328, 12190, 12216, 12491, 12810, 13420, 14045, 14705, 15008, 15289, 14977, 15691, 16558, 16376, 15944, 15544, 14649, 14175, 13713, 13612, 13507, 13317, 12932, 12702, 12516, 12373, 12362, 12497, 12510, 12651, 12510, 12461, 12528, 12605, 12639, 12696, 12693, 12723, 12815, 12958, 12941, 13250, 13498, 13675, 13823, 13827, 13912, 13782, 13989, 13963, 13880, 13817, 14212, 14208, 14180, 13584, 13783, 13326, 13275, 12935, 12752, 12706, 12725, 12737, 12831, 12815, 12676, 12634, 12332, 12583, 12665, 12520, 12572, 12621, 12749, 12763, 12791, 12975, 13079, 13639, 14276, 14504, 15162, 15258, 15996, 16000, 16147, 16805, 16494, 16643, 17207, 17264, 16482, 16245, 15581, 15305, 15016, 14718, 14270, 13931, 13386, 13807, 13557, 13324, 13377, 13050, 12965, 12820, 12714, 12813, 12771, 12766, 12715, 12760, 12727, 12349, 12326, 12322, 12411, 12404, 12399, 12348, 12346, 12284, 12280, 12313, 12385, 12362, 12382, 12383, 12339, 12347, 12319, 12292, 12330, 12362, 12344, 12357, 12324, 12324, 12323, 12345]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12244, 12218, 12219, 12209, 12193, 12160, 12150, 12134, 12122, 12141, 12127, 12149, 12188, 12165, 12236, 12350, 12472, 12627, 12717, 12799, 13007, 13367, 13774, 13970, 13603, 13955, 13978, 13533, 13332, 12755, 12474, 12680, 12641, 12736, 12546, 12949, 12765, 12966, 12764, 12795, 12964, 12991, 13203, 13372, 13325, 12802, 12851, 12811, 13417, 14347, 14584, 14856, 15166, 15227, 14661, 14866, 14877, 14599, 14153, 14002, 13421, 13500, 12913, 12724, 12443, 12379, 12232, 12031, 12123, 12023, 12068, 12034, 12025, 12038, 12168, 12290, 12439, 12510, 12576, 12879, 12918, 13027, 13137, 13405, 13603, 13829, 13960, 13993, 13920, 14021, 13749, 13754, 14215, 14315, 13951, 13928, 13725, 13820, 13759, 13466, 13036, 12816, 12668, 12379, 12249, 12181, 12411, 12422, 12379, 12491, 12574, 12413, 12459, 12759, 13437, 13959, 15092, 14844, 15270, 16047, 15470, 15949, 15699, 15151, 15694, 15228, 15022, 14650, 14437, 14148, 13735, 13368, 13039, 13106, 13131, 12871, 12975, 12838, 12792, 12390, 12405, 12564, 12794, 12682, 12372, 12465, 12729, 12476, 12439, 12590, 12573, 12491, 12384, 12435, 12401, 12463, 12377, 12352, 12310, 12334, 12278, 12310, 12256, 12324, 12321, 12304, 12315, 12287, 12251, 12273, 12310, 12268, 12276, 12242, 12294, 12308, 12255, 12271, 12294, 12311, 12272, 12269, 12296, 12281, 12284, 12304, 12342, 12318, 12300, 12295, 12340, 12274, 12271, 12275, 12291, 12303, 12279, 12322, 12289, 12309]]\n", + "DEBUG:root:compressed_len_list: [[11918, 11929, 11897, 11912, 11930, 11944, 11903, 11937, 11909, 11943, 11966, 11914, 11917, 11888, 11947, 11949, 12010, 12035, 12073, 12177, 12192, 12214, 12226, 12286, 12357, 12402, 12498, 12527, 12654, 12640, 12731, 12435, 12489, 12760, 13160, 13302, 13894, 13958, 14275, 13675, 13243, 13766, 13845, 13744, 13319, 13068, 12457, 12266, 12339, 12533, 12421, 12592, 12705, 12760, 12806, 12862, 12985, 12951, 12717, 12844, 12665, 12704, 13172, 13877, 14639, 15010, 14731, 15907, 16269, 16261, 16393, 15519, 14808, 14000, 13277, 12880, 12614, 12816, 12820, 12753, 12762, 12652, 12629, 12542, 12448, 12433, 12429, 12451, 12454, 12405, 12342, 12576, 12763, 12710, 12824, 12759, 12896, 13104, 12977, 13200, 13288, 13720, 14002, 14002, 14144, 14009, 14336, 14389, 14444, 14254, 14289, 14379, 14285, 14252, 14620, 14601, 14210, 14402, 13983, 14344, 13997, 14048, 13808, 13803, 13393, 13240, 13013, 13154, 13201, 13119, 13091, 13113, 13132, 13154, 13305, 13746, 14041, 14250, 14671, 14458, 15299, 15515, 15129, 15856, 15828, 15278, 15575, 14523, 14312, 14272, 14423, 14500, 14043, 14173, 13966, 13344, 13301, 13068, 13417, 13295, 13122, 12932, 12951, 12913, 12885, 12841, 12965, 13040, 12951, 12970, 13140, 13313, 13412, 13448, 13635, 13800, 13887, 13965, 14006, 14062, 14071, 14074, 14119, 14093, 14075, 14113, 14116, 14063, 13883, 13526, 12993, 12654, 12587, 12601, 12562, 12464, 12531, 12484, 12505, 12484]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[11986, 11982, 11940, 11945, 11950, 11982, 11962, 11861, 11876, 11948, 11970, 11998, 11916, 11939, 11956, 11959, 11996, 12060, 12139, 12165, 12253, 12378, 12451, 12610, 12923, 13332, 13060, 13302, 13521, 13484, 13270, 13040, 12914, 12783, 12452, 12284, 12401, 12379, 12132, 12222, 12326, 12498, 12318, 12311, 12507, 12672, 12742, 12599, 12730, 12733, 12605, 12672, 12767, 12980, 13387, 13606, 13925, 13841, 14125, 14163, 13826, 14227, 15116, 13821, 13548, 13469, 12711, 12615, 12583, 12371, 12284, 12003, 11976, 11819, 11793, 11887, 11841, 11864, 11870, 11855, 11954, 11962, 11922, 11913, 11931, 11883, 11889, 12107, 12220, 12370, 12502, 12568, 12530, 12488, 12537, 12596, 12603, 12652, 12771, 12857, 13288, 13352, 13403, 13456, 13339, 13200, 13168, 13330, 13405, 13455, 13475, 13531, 13558, 13741, 13962, 14034, 14087, 14120, 14053, 13970, 14001, 14046, 14147, 14155, 13939, 13867, 13897, 14110, 14178, 13962, 14230, 13765, 13521, 13306, 12997, 12747, 12517, 12305, 12171, 12187, 11987, 11884, 11775, 11852, 11926, 11913, 12064, 12241, 12388, 12715, 12815, 12892, 13004, 13204, 13352, 13612, 13974, 14304, 14694, 14741, 14765, 15178, 15308, 16142, 15656, 16028, 15690, 15038, 15324, 15133, 15085, 14494, 14054, 13848, 13404, 13280, 12855, 12637, 12520, 12641, 12600, 12614, 12644, 12769, 13203, 13108, 13019, 12855, 12818, 12766, 12750, 12768, 12757, 12637, 12676, 12627, 12565, 12623, 12565, 12554]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[11995, 12004, 11969, 11965, 11994, 12003, 11974, 11947, 11976, 11905, 11891, 11970, 11965, 12019, 12088, 12104, 12113, 12275, 12271, 12258, 12317, 12378, 12405, 12511, 12599, 12585, 12804, 13088, 13273, 13468, 12987, 13238, 13228, 12666, 12454, 12199, 12172, 12024, 12222, 12009, 12365, 12057, 12287, 12259, 12277, 12366, 12447, 12454, 12636, 13069, 13873, 13668, 13944, 14659, 14144, 13281, 12662, 12693, 12720, 12473, 12189, 12091, 12010, 11930, 11911, 11759, 11759, 11768, 11845, 11952, 12053, 12127, 12304, 12263, 12287, 12228, 12317, 12340, 12297, 12299, 12336, 12484, 12497, 12612, 12667, 12836, 13141, 13370, 13453, 13602, 13652, 13736, 13849, 14034, 14024, 14068, 14132, 14050, 13713, 14095, 14099, 14052, 13539, 13537, 13506, 13248, 13228, 12965, 12816, 12611, 12544, 12426, 12448, 12484, 12476, 12468, 12467, 12509, 12610, 12713, 12747, 12871, 13200, 13473, 13965, 14017, 14268, 14418, 14575, 14771, 15166, 15301, 14552, 14603, 14820, 14918, 14447, 14257, 14403, 14085, 13969, 13882, 14096, 14063, 13930, 13873, 13957, 14254, 14397, 14023, 14148, 13738, 13762, 13139, 12974, 12856, 12773, 12762, 12588, 12684, 12659, 12665, 12666, 12637, 12639, 12641, 12669, 12558, 12470, 12333, 12498, 12466, 12476, 12471, 12495, 12457, 12334, 12285, 12265, 12260, 12213, 12205, 12237, 12211, 12226, 12226, 12196, 12240, 12208, 12246, 12222, 12259, 12249, 12236, 12298, 12262, 12289, 12267, 12281, 12268]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12430, 12411, 12403, 12406, 12413, 12396, 12376, 12372, 12375, 12394, 12349, 12314, 12278, 12301, 12238, 12268, 12176, 12233, 12154, 12264, 12252, 12332, 12340, 12442, 12477, 12556, 12602, 12683, 12728, 12869, 12976, 13068, 13084, 13121, 13317, 13455, 13638, 13846, 13734, 13677, 13722, 14087, 14078, 14099, 14061, 13677, 13095, 12880, 12712, 12486, 12256, 12280, 12598, 12376, 12147, 12024, 12281, 12313, 12224, 12216, 12495, 12507, 12530, 12760, 12842, 12943, 13167, 13436, 13416, 13790, 14329, 14690, 15241, 15274, 14701, 14617, 15740, 14886, 14321, 13771, 13370, 13209, 13016, 13063, 12876, 12840, 12765, 12457, 12296, 12327, 12237, 12302, 12225, 12377, 12359, 12292, 12370, 12450, 12526, 12510, 12549, 12602, 12700, 12757, 12921, 12839, 13015, 13170, 13287, 13456, 13702, 13916, 14096, 14116, 14213, 14313, 14417, 14416, 14492, 14705, 14618, 14002, 14428, 14458, 13818, 13950, 13626, 13568, 13243, 12878, 12939, 12842, 12828, 12685, 12568, 12602, 12521, 12587, 12508, 12687, 12822, 12929, 13031, 13116, 13212, 13340, 13698, 14257, 14764, 15249, 15358, 15734, 15467, 15824, 16408, 16347, 15800, 15644, 15379, 14957, 14610, 14404, 14062, 13530, 13411, 12860, 12876, 12936, 12645, 12644, 12596, 12575, 12529, 12698, 12774, 12581, 12644, 12458, 12527, 12427, 12326, 12362, 12371, 12409, 12275, 12328, 12284, 12306, 12332, 12295, 12349, 12331, 12313, 12320, 12322, 12284, 12332, 12280, 12327, 12300]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12054, 12085, 12053, 12047, 12055, 12071, 12077, 12031, 12006, 12024, 12013, 12067, 12060, 11926, 11999, 11970, 11952, 12100, 12085, 12146, 12176, 12175, 12234, 12276, 12424, 12435, 12584, 12664, 12679, 12757, 12808, 12869, 12935, 13033, 13192, 13377, 13525, 13831, 14102, 13635, 13425, 13922, 13914, 13869, 13584, 13039, 13163, 12855, 12268, 12111, 12606, 12708, 12600, 12464, 12811, 12815, 12754, 12862, 12895, 12827, 13012, 12393, 12335, 13257, 12954, 13502, 13697, 13724, 14047, 13378, 13594, 13963, 13568, 13467, 13203, 12707, 12249, 12590, 12465, 12245, 12117, 12128, 12114, 12111, 12151, 12124, 12146, 12204, 12199, 12188, 12157, 12167, 12188, 12129, 12073, 12097, 12075, 12104, 12307, 12462, 12710, 12894, 13065, 13361, 13643, 13796, 13962, 13944, 14051, 14094, 14013, 14008, 14202, 13769, 14169, 14205, 14149, 14117, 13650, 13706, 13344, 13402, 12775, 12703, 12418, 12360, 12522, 12466, 12420, 12413, 12497, 12771, 12822, 12955, 12966, 13158, 13384, 13893, 14588, 15292, 15682, 16011, 15468, 15791, 16338, 16299, 15623, 15517, 15167, 14856, 14461, 14033, 13765, 13649, 13491, 13267, 13289, 13257, 13366, 13420, 13200, 13140, 12949, 13210, 13077, 12666, 12820, 12978, 12699, 12807, 12664, 12684, 12559, 12596, 12660, 12482, 12518, 12478, 12588, 12555, 12644, 12555, 12610, 12530, 12541, 12493, 12454, 12412, 12412, 12371, 12371, 12346, 12320, 12340, 12325, 12322, 12327, 12268, 12283, 12270]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12510, 12490, 12485, 12491, 12465, 12474, 12490, 12479, 12449, 12407, 12409, 12429, 12462, 12448, 12452, 12506, 12499, 12477, 12471, 12514, 12620, 12702, 12844, 12949, 13078, 13140, 13251, 13317, 13349, 13378, 13398, 13395, 13383, 13467, 13477, 13683, 13836, 13964, 14254, 14526, 14698, 14688, 14410, 14604, 14587, 14417, 14351, 14359, 13918, 13857, 13938, 13724, 13349, 13066, 13121, 13078, 13084, 12809, 12976, 13248, 13353, 13265, 13256, 13267, 13231, 13506, 13887, 14719, 15158, 15438, 15479, 16333, 16563, 16704, 16434, 16752, 17004, 16418, 16091, 15847, 15179, 15317, 14815, 14487, 13956, 13673, 13450, 13478, 13387, 13200, 12942, 12840, 12798, 12659, 12586, 12527, 12678, 12564, 12429, 12388, 12385, 12339, 12434, 12436, 12478, 12490, 12625, 12672, 12812, 12882, 13026, 13108, 13232, 13309, 13389, 13419, 13564, 13983, 14147, 14288, 14524, 14511, 14361, 14404, 14377, 14422, 14253, 14531, 14744, 14814, 14526, 14762, 14771, 14754, 14778, 14013, 14146, 13816, 14040, 13859, 14121, 13590, 13684, 13541, 13574, 13504, 13443, 13331, 13182, 13264, 13148, 13279, 13310, 13174, 13230, 13181, 13072, 13156, 13051, 13148, 13352, 13731, 14291, 14462, 14802, 14741, 15041, 15022, 15417, 15842, 15100, 15582, 15694, 15688, 15796, 16066, 16117, 15957, 15649, 15310, 14952, 14403, 13972, 13464, 13420, 12976, 12121, 12160, 12477, 12704, 12910, 13326, 12979, 12761, 12920, 13044, 12986, 12774, 12727, 13016]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12132, 12140, 12177, 12161, 12159, 12193, 12163, 12134, 12063, 12069, 12157, 12194, 12204, 12184, 12185, 12228, 12269, 12325, 12425, 12461, 12530, 12617, 12699, 12760, 13033, 13304, 13543, 13309, 13313, 13660, 13520, 12875, 12805, 12891, 12482, 12132, 12176, 12372, 12430, 12419, 12443, 12710, 12639, 12518, 12549, 12707, 12805, 12827, 13132, 13491, 13841, 14166, 14632, 15613, 15741, 15559, 15890, 15839, 15297, 15263, 14899, 15225, 14206, 13833, 13096, 12777, 12667, 12363, 12196, 12030, 11974, 11949, 11954, 11970, 11952, 11987, 11933, 11956, 11961, 12075, 12174, 12296, 12464, 12547, 12660, 12724, 12740, 12906, 12958, 13088, 13216, 13290, 13270, 13446, 13561, 13832, 13913, 13924, 13905, 14012, 14074, 14214, 14037, 14444, 14510, 13936, 13941, 13719, 13338, 13052, 12853, 12685, 12537, 12361, 12126, 12223, 12180, 12170, 12066, 11960, 11883, 12019, 12312, 12672, 12867, 12895, 12810, 13066, 13457, 14075, 13542, 13291, 13485, 13864, 14327, 13647, 13431, 13419, 13610, 13652, 13236, 12574, 12256, 12220, 12330, 12432, 12521, 12544, 12473, 12491, 12518, 12610, 12571, 12533, 12536, 12504, 12532, 12473, 12365, 12121, 12070, 11975, 12126, 12164, 12049, 12052, 12015, 12156, 12024, 12196, 12055, 12035, 12124, 12051, 12243, 12088, 12112, 12106, 12136, 12141, 12011, 12010, 12019, 12014, 11991, 11990, 11970, 11967, 11958, 11982, 11985, 11992, 11983, 12002, 12021, 12017, 12001, 12064, 12037, 12075]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12277, 12316, 12297, 12313, 12290, 12306, 12317, 12283, 12265, 12314, 12227, 12249, 12272, 12378, 12387, 12415, 12435, 12492, 12498, 12592, 12723, 12797, 12850, 12957, 13131, 13399, 13625, 13420, 13416, 13678, 13689, 13256, 13015, 12717, 12601, 12429, 12583, 12551, 12426, 12541, 12635, 12685, 12565, 12615, 12803, 12667, 12786, 12854, 12964, 13075, 13345, 13670, 13047, 13177, 13849, 13354, 13366, 13020, 13089, 13130, 12814, 12706, 12606, 12596, 12388, 12349, 12413, 12240, 12287, 12226, 12303, 12303, 12320, 12406, 12455, 12554, 12638, 12625, 12868, 12962, 13096, 13220, 13554, 13895, 14135, 14252, 14308, 14523, 14568, 14642, 14362, 14841, 14700, 13940, 13713, 13601, 13257, 13030, 12870, 12814, 12819, 12453, 12590, 12702, 12811, 12771, 12647, 12876, 12804, 12857, 12797, 12669, 12892, 13367, 14069, 14463, 14193, 15080, 15188, 15353, 15335, 15060, 14516, 14383, 13738, 13441, 12922, 12907, 12908, 12772, 12562, 12441, 12477, 12495, 12457, 12407, 12421, 12452, 12373, 12342, 12589, 12535, 12621, 12695, 12584, 12562, 12480, 12399, 12390, 12410, 12335, 12306, 12333, 12334, 12343, 12385, 12365, 12341, 12314, 12317, 12329, 12327, 12390, 12351, 12392, 12369, 12362, 12376, 12368, 12370, 12372, 12366, 12343, 12368, 12376, 12393, 12358, 12393, 12372, 12383, 12378, 12358, 12365, 12372, 12403, 12366, 12366, 12400, 12385, 12387, 12396, 12407, 12361, 12412, 12354, 12360, 12364, 12370, 12383, 12389]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12138, 12119, 12123, 12107, 12131, 12108, 12114, 12138, 12160, 12127, 11973, 12030, 12116, 12192, 12167, 12180, 12208, 12266, 12338, 12425, 12493, 12576, 12639, 12759, 12826, 13003, 13423, 13678, 13916, 13591, 13881, 13419, 13117, 12604, 12312, 12260, 12040, 12030, 12089, 12063, 12046, 11978, 12064, 12189, 12260, 12302, 12416, 12693, 12898, 13076, 13423, 13659, 13886, 14533, 14656, 15177, 14637, 15448, 15573, 15337, 14464, 14356, 13933, 13509, 13806, 13538, 13282, 13200, 12865, 12409, 12420, 12209, 12161, 12285, 12306, 12197, 12312, 12426, 12399, 12368, 12425, 12537, 12519, 12424, 12436, 12546, 12745, 12862, 12948, 13058, 13092, 13162, 13521, 13716, 13865, 13853, 14090, 14192, 14279, 14410, 14404, 14527, 14564, 14521, 14496, 14443, 14386, 13895, 14232, 14244, 14084, 13854, 13730, 13597, 13131, 12701, 12600, 12607, 12539, 12251, 12103, 11937, 11860, 11915, 12120, 12021, 12052, 12115, 12254, 12459, 12691, 12748, 12775, 12580, 12682, 12915, 13797, 14120, 14592, 15044, 15123, 15437, 15573, 14670, 14698, 14829, 14841, 14207, 13852, 13586, 13398, 13217, 13070, 12986, 13075, 12977, 12855, 12737, 12780, 12675, 12525, 12456, 12499, 12403, 12477, 12481, 12508, 12647, 12728, 12762, 12578, 12629, 12616, 12624, 12636, 12562, 12538, 12440, 12483, 12488, 12475, 12510, 12488, 12498, 12509, 12560, 12525, 12492, 12462, 12467, 12481, 12476, 12465, 12437, 12459, 12440, 12496, 12423, 12468, 12501]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12074, 12071, 12100, 12110, 12100, 12110, 12110, 12099, 12005, 12034, 12001, 12051, 12009, 12060, 11981, 12064, 12102, 12072, 12149, 12197, 12312, 12433, 12555, 12675, 12694, 12861, 12986, 13237, 13309, 13505, 13864, 13416, 13361, 13662, 12994, 12771, 12440, 12440, 12130, 12119, 12177, 12548, 12369, 12667, 12596, 12712, 12634, 12688, 12963, 13098, 13134, 13400, 13303, 13739, 14143, 15337, 14751, 15623, 15001, 14393, 13864, 13582, 13578, 13427, 13413, 12768, 12581, 12606, 12310, 12189, 12058, 12150, 12328, 12406, 12234, 12357, 12455, 12419, 12428, 12503, 12602, 12427, 12469, 12543, 12745, 12725, 12653, 12862, 13302, 13357, 13714, 14002, 14327, 14410, 14386, 14367, 14551, 14511, 14656, 14524, 14209, 14249, 14524, 14650, 14616, 14516, 14845, 13807, 13476, 13420, 12992, 12614, 12299, 12225, 12506, 12345, 12552, 12594, 12646, 12713, 12711, 12843, 13280, 13996, 14567, 14595, 15174, 15201, 15797, 15853, 15274, 15571, 15736, 15597, 15403, 15401, 15500, 15278, 14966, 14493, 13781, 13150, 12824, 12967, 12814, 12845, 12773, 12983, 12905, 12760, 12638, 12942, 12673, 12734, 12671, 12687, 12602, 12579, 12586, 12480, 12450, 12437, 12404, 12395, 12382, 12288, 12284, 12263, 12284, 12264, 12316, 12286, 12241, 12297, 12288, 12292, 12281, 12295, 12321, 12301, 12315, 12295, 12326, 12295, 12321, 12337, 12310, 12285, 12346, 12326, 12309, 12312, 12324, 12333, 12350, 12344, 12295, 12299, 12301, 12317]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12215, 12222, 12250, 12217, 12209, 12189, 12180, 12212, 12129, 12129, 12225, 12214, 12195, 12293, 12373, 12485, 12600, 12735, 12826, 12957, 13298, 13614, 13384, 13177, 14130, 14150, 13751, 12667, 12861, 12672, 12444, 12374, 12218, 12748, 12495, 12373, 11986, 12259, 12290, 12243, 12401, 12597, 12573, 12878, 12987, 12881, 13216, 13382, 13906, 14365, 14897, 15607, 15064, 15549, 16017, 15605, 15030, 14491, 14372, 14089, 13940, 13666, 13392, 13173, 12994, 12751, 12494, 12145, 12037, 12224, 12255, 12219, 12249, 12284, 12244, 12192, 12313, 12355, 12310, 12316, 12413, 12445, 12574, 12680, 12865, 12855, 13093, 13346, 13500, 13641, 13728, 14016, 14084, 14377, 14448, 14578, 14458, 14500, 14480, 14373, 14323, 14530, 14591, 14525, 14499, 14236, 14597, 14593, 14515, 14155, 14197, 13998, 13846, 13849, 13630, 13399, 13081, 12978, 12823, 12866, 12854, 12876, 12824, 12828, 12729, 12760, 12889, 12794, 12772, 12824, 12797, 12761, 12815, 13158, 13565, 13809, 14067, 14289, 14561, 14906, 14973, 15025, 15455, 15601, 15626, 15815, 15760, 15237, 15222, 15109, 14888, 14440, 14336, 13862, 13483, 13036, 13029, 12758, 12616, 12562, 12459, 12369, 12363, 12549, 12572, 12431, 12300, 12387, 12297, 12271, 12265, 12312, 12283, 12329, 12346, 12309, 12335, 12333, 12359, 12354, 12336, 12380, 12363, 12374, 12358, 12352, 12353, 12399, 12416, 12382, 12378, 12406, 12398, 12393, 12428, 12413, 12438, 12463, 12489, 12485]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12370, 12390, 12396, 12396, 12369, 12428, 12450, 12428, 12443, 12369, 12303, 12366, 12433, 12460, 12468, 12517, 12562, 12640, 12719, 12797, 12863, 12849, 12934, 12939, 13002, 13013, 13241, 13517, 13797, 13566, 13714, 13930, 13026, 12889, 12609, 12457, 12662, 12544, 12871, 12650, 12982, 12882, 12994, 12899, 13076, 13116, 13169, 13449, 13212, 13381, 13689, 14486, 15310, 15500, 14667, 13782, 13300, 12984, 12546, 12384, 12051, 12286, 12299, 12381, 12395, 12339, 12377, 12321, 12318, 12309, 12380, 12554, 12644, 12783, 12915, 13062, 13129, 13195, 13269, 13333, 13514, 13806, 13844, 13953, 14047, 14202, 14000, 14538, 14428, 13755, 14136, 13569, 13580, 13050, 12802, 12646, 12705, 12791, 12644, 12584, 12565, 12584, 12509, 12526, 12852, 13308, 13591, 13789, 14044, 14347, 14472, 14987, 15081, 14492, 14503, 14376, 13794, 13115, 12693, 12844, 12749, 12760, 12565, 12445, 12555, 12529, 12373, 12418, 12553, 12553, 12559, 12459, 12422, 12521, 12594, 12528, 12529, 12480, 12474, 12471, 12438, 12399, 12385, 12422, 12432, 12419, 12414, 12451, 12422, 12418, 12431, 12445, 12465, 12436, 12466, 12396, 12427, 12414, 12418, 12407, 12395, 12416, 12374, 12439, 12406, 12406, 12409, 12413, 12421, 12415, 12416, 12386, 12404, 12390, 12393, 12403, 12393, 12381, 12386, 12443, 12437, 12414, 12428, 12416, 12410, 12383, 12371, 12417, 12403, 12383, 12417, 12416, 12392, 12403, 12401, 12374, 12376, 12439, 12414, 12387]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12289, 12289, 12345, 12300, 12335, 12272, 12283, 12319, 12243, 12310, 12239, 12250, 12355, 12411, 12504, 12502, 12578, 12631, 12629, 12660, 12703, 12728, 12742, 12850, 12871, 12984, 13066, 13163, 13544, 13693, 13879, 14035, 13614, 13496, 13778, 13739, 13294, 13049, 12650, 12592, 12499, 12519, 12360, 12350, 12272, 12176, 11956, 11861, 11758, 11810, 11780, 11891, 11934, 12068, 12278, 12486, 12618, 12789, 12873, 12990, 13455, 14176, 15070, 14873, 15215, 15930, 14697, 14344, 13734, 13019, 12726, 12647, 12582, 12360, 12219, 12118, 12086, 12051, 12106, 12155, 12153, 12049, 12038, 12042, 12054, 12202, 12334, 12452, 12450, 12330, 12311, 12381, 12571, 12394, 12350, 12515, 12545, 12608, 12572, 12742, 12720, 12867, 12983, 13046, 12869, 12997, 13427, 13559, 13741, 13872, 13763, 13934, 13842, 13985, 13910, 14006, 14082, 14072, 14077, 14203, 14273, 13728, 13636, 13810, 13748, 13558, 13190, 13068, 12897, 12850, 12465, 12624, 12578, 12630, 12706, 12703, 12733, 12643, 12726, 12975, 13429, 13671, 13801, 14350, 14722, 14649, 14591, 14984, 14690, 15203, 14844, 14419, 14207, 14283, 13953, 13790, 13372, 12727, 12557, 12430, 12442, 12387, 12376, 12412, 12457, 12458, 12289, 12093, 12166, 11941, 11965, 11908, 11878, 11862, 12089, 12013, 12004, 12216, 12199, 12096, 12242, 12254, 12204, 12121, 12195, 12136, 12206, 12173, 12147, 12170, 12208, 12221, 12170, 12152, 12214, 12165, 12204, 12180, 12143, 12204]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[11996, 11985, 11985, 11994, 11990, 11981, 11970, 12023, 12012, 12001, 11930, 11954, 12085, 12075, 12062, 12064, 12147, 12299, 12325, 12431, 12569, 12695, 12741, 12978, 13119, 13319, 13515, 13566, 13796, 13859, 13851, 13617, 14269, 14342, 14319, 14073, 13748, 12870, 13311, 12926, 12826, 12354, 12464, 12336, 12213, 12214, 12267, 12414, 12136, 12514, 12466, 12595, 12512, 12574, 12716, 12797, 12967, 12746, 12978, 13374, 13979, 14563, 15246, 15273, 15640, 16218, 15394, 14908, 14583, 14030, 13289, 12961, 12770, 12634, 12761, 12617, 12441, 12417, 12233, 12235, 12190, 12164, 12170, 12165, 12192, 12214, 12216, 12224, 12224, 12261, 12324, 12388, 12464, 12546, 12699, 12794, 12955, 12951, 13170, 13307, 13558, 13890, 14116, 14262, 14289, 14302, 14359, 14302, 14435, 14486, 14737, 14741, 14813, 14788, 14860, 14506, 14591, 14698, 14626, 14605, 14205, 14111, 13934, 13941, 13875, 13737, 13687, 13304, 13322, 13154, 13164, 12904, 13065, 13146, 13055, 13074, 12969, 12951, 12942, 13040, 13324, 13571, 14263, 14669, 14726, 15376, 15454, 15856, 15754, 15834, 15331, 15368, 14731, 14800, 14377, 14091, 13883, 14042, 13677, 13360, 13109, 12914, 12926, 12675, 12660, 12633, 12290, 12308, 12346, 12489, 12226, 12269, 12189, 12226, 12260, 12336, 12285, 12367, 12283, 12252, 12239, 12213, 12191, 12166, 12146, 12177, 12166, 12173, 12186, 12195, 12196, 12228, 12177, 12208, 12226, 12232, 12218, 12246, 12248, 12197]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12150, 12151, 12164, 12164, 12181, 12226, 12158, 12137, 12086, 12110, 12157, 12125, 12100, 12108, 12277, 12321, 12400, 12497, 12588, 12654, 12657, 12811, 12911, 13121, 13367, 13316, 13354, 13847, 13750, 13265, 12788, 12816, 12504, 12330, 12083, 12307, 12002, 12046, 12105, 12466, 12270, 12326, 12574, 12709, 12797, 12789, 12965, 13301, 13612, 14376, 15263, 15735, 15636, 16193, 15383, 14675, 13868, 13614, 13250, 13056, 12854, 12660, 12422, 12376, 12106, 11964, 12013, 12035, 11938, 11968, 11968, 11980, 11995, 11972, 12001, 12001, 12017, 12071, 12246, 12377, 12462, 12605, 12804, 12921, 13022, 13093, 13003, 13134, 13069, 13143, 13179, 13281, 13436, 13663, 13763, 13798, 13846, 13885, 13763, 13845, 13846, 13865, 14028, 13747, 14024, 13573, 13640, 13464, 13605, 13062, 12834, 12726, 12668, 12418, 12297, 12341, 12492, 12387, 12381, 12452, 12493, 12447, 12460, 12783, 13475, 13923, 14381, 14564, 14878, 14586, 14884, 15278, 15052, 15251, 15120, 14851, 14811, 14534, 14394, 13995, 13318, 12954, 12298, 12585, 12850, 12701, 12367, 12149, 12108, 12252, 12308, 12106, 12121, 12067, 12014, 12074, 12077, 12096, 12083, 12119, 12124, 12069, 12110, 12096, 12119, 12122, 12118, 12139, 12121, 12143, 12124, 12119, 12104, 12164, 12143, 12162, 12157, 12138, 12139, 12123, 12094, 12122, 12149, 12149, 12143, 12103, 12094, 12126, 12126, 12117, 12132, 12131, 12123, 12165, 12179, 12146, 12137, 12142, 12165, 12162]]\n", + "DEBUG:root:compressed_len\n", + "DEBUG:root:compressed_len_list: [[12413, 12451, 12404, 12412, 12404, 12406, 12315, 12357, 12317, 12407, 12368, 12327, 12467, 12511, 12495, 12547, 12630, 12749, 12784, 12916, 12961, 13226, 13431, 13757, 13965, 13629, 13788, 13531, 12993, 12925, 12461, 12423, 12318, 12467, 12420, 12788, 12789, 12784, 13054, 13099, 13087, 13249, 13764, 14564, 15916, 15772, 16354, 15902, 14948, 14057, 13322, 12904, 13070, 12649, 12344, 12567, 12629, 12403, 12314, 12361, 12396, 12481, 12495, 12497, 12607, 12731, 12665, 12853, 12946, 12898, 12918, 13123, 12976, 13270, 13103, 13297, 13455, 13600, 13618, 14066, 14170, 14337, 14305, 14250, 14212, 14390, 14258, 14121, 14601, 14016, 14162, 13886, 13729, 13333, 13027, 12826, 12730, 12906, 13046, 13017, 12884, 12880, 12903, 12855, 12771, 12718, 12837, 13295, 13539, 13782, 14018, 14510, 14832, 14510, 14374, 14331, 14190, 13979, 13617, 13407, 13060, 12972, 13026, 13252, 13141, 13028, 12894, 12787, 12716, 12681, 12701, 12801, 12859, 13033, 13042, 12922, 12998, 12963, 12893, 12929, 12949, 12936, 12875, 12795, 12806, 12767, 12730, 12784, 12815, 12782, 12717, 12684, 12739, 12717, 12706, 12707, 12761, 12697, 12711, 12702, 12712, 12704, 12685, 12683, 12727, 12725, 12729, 12702, 12716, 12698, 12705, 12723, 12729, 12770, 12755, 12793, 12786, 12760, 12751, 12759, 12751, 12700, 12717, 12736, 12700, 12754, 12745, 12730, 12720, 12718, 12742, 12701, 12735, 12750, 12771, 12731, 12775, 12769, 12761, 12739]]\n", + "DEBUG:root:compressed_len\n" + ] + } + ], + "source": [ + "# save all data\n", + "futures = []\n", + "with ThreadPoolExecutor(max_workers=25) as executor:\n", + "\n", + " def save_one(index, ep_name):\n", + " crd.merge_video_and_save(\n", + " low_dim_data[ep_name],\n", + " f\"{raw_dir}/{ep_name}\",\n", + " video_names,\n", + " crd.save_dict_to_hdf5,\n", + " name_converter,\n", + " compresser,\n", + " f\"{target_dir}/\" + target_namer(index),\n", + " max_pad_lenth,\n", + " )\n", + " data.pop(ep_name)\n", + "\n", + " for index, ep_name in enumerate(episode_names):\n", + " futures.append(executor.submit(save_one, index, ep_name))\n", + "#执行到这里,所有数据已经保存完毕" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# fix action\n", + "import json\n", + "import numpy as np\n", + "\n", + "for i in range(49, 50):\n", + " with open(f\"demonstrations/raw/mmk_pick_grape/{i}/low_dim.json\", \"r\") as f:\n", + " data = json.load(f)\n", + " action = data[\"action\"][\"spine\"][\"joint_position\"]\n", + " obs = data[\"observation\"][\"spine\"][\"joint_position\"]\n", + " # change action\n", + " delta = np.array(obs[1:]) - np.array(obs[:-1])\n", + " # > 0 -> 1, < 0 -> -1\n", + " action = np.sign(delta)\n", + " # 获取不为0的值的index\n", + " index_not0 = np.where(action != 0)\n", + " first_not0 = index_not0[0][0]\n", + " last_not0 = index_not0[0][-1]\n", + " # 从第一个不为0的值开始,到最后一个不为0的值结束,将中间的值设为1\n", + " action[first_not0:last_not0] = 1\n", + " action = action.tolist()\n", + " action.append(action[-1])\n", + " data[\"action\"][\"spine\"] = {\"joint_velocity\": action}\n", + " with open(f\"demonstrations/raw/mmk_pick_grape/{i}/low_dim.json\", \"w\") as f:\n", + " json.dump(data, f)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# rename\n", + "import json\n", + "\n", + "for i in range(50):\n", + " with open(f\"demonstrations/raw/mmk_pick_grape/{i}/low_dim.json\", \"r\") as f:\n", + " data = json.load(f)\n", + " data[\"action\"][\"head\"] = {\"joint_velocity\": data[\"action\"][\"head\"][\"joint_velocity\"][\"joint_position\"]}\n", + " with open(f\"demonstrations/raw/mmk_pick_grape/{i}/low_dim.json\", \"w\") as f:\n", + " json.dump(data, f)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Position Control" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# add head and spine to joint_position action\n", + "import json\n", + "\n", + "for i in range(58):\n", + " with open(f\"demonstrations/raw/mmk_pick_grape/{i}/low_dim.json\", \"r\") as f:\n", + " data = json.load(f)\n", + " obs_spine = data[\"observation\"][\"spine\"][\"joint_position\"]\n", + " obs_head = data[\"observation\"][\"head\"][\"joint_position\"]\n", + " data[\"action\"][\"head\"][\"joint_position\"] = obs_head[1:] + [obs_head[-1]]\n", + " data[\"action\"][\"spine\"][\"joint_position\"] = obs_spine[1:] + [obs_spine[-1]]\n", + " with open(f\"demonstrations/raw/mmk_pick_grape/{i}/low_dim.json\", \"w\") as f:\n", + " json.dump(data, f)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# get all low_dim data (head&spine position control)\n", + "import convert_all as crd\n", + "raw_dir = \"demonstrations/raw/mmk_pick_grape\"\n", + "data = crd.raw_to_dict(\n", + " raw_dir,\n", + " [\"low_dim.json\"],\n", + " video_file_names=None,\n", + " flatten_mode=\"hdf5\",\n", + " concatenater={\n", + " \"/observations/qpos\": (\n", + " \"/observation/arm/left/joint_position\",\n", + " \"/observation/eef/left/joint_position\",\n", + " \"/observation/arm/right/joint_position\",\n", + " \"/observation/eef/right/joint_position\",\n", + " \"/observation/head/joint_position\",\n", + " \"/observation/spine/joint_position\"\n", + " ),\n", + " \"/action\": (\n", + " \"/action/arm/left/joint_position\",\n", + " \"/action/eef/left/joint_position\",\n", + " \"/action/arm/right/joint_position\",\n", + " \"/action/eef/right/joint_position\",\n", + " \"/action/head/joint_position\",\n", + " \"/action/spine/joint_position\"\n", + " ),\n", + " },\n", + " key_filter=[\n", + " \"/observation/arm/left/joint_velocity\",\n", + " \"/observation/arm/right/joint_velocity\",\n", + " \"/observation/arm/left/joint_torque\",\n", + " \"/observation/arm/right/joint_torque\",\n", + " \"/action/head/joint_velocity\",\n", + " \"/action/spine/joint_velocity\"\n", + " ],\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "ep_number = len(data)\n", + "print(f\"Number of episodes: {ep_number}\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# 将spine的observation和action[-120000, 0]缩放到[-2pi, 0]\n", + "import numpy as np\n", + "for i in range(ep_number):\n", + " qpos_obs = np.array(data[str(i)][\"/observations/qpos\"])\n", + " qpos_act = np.array(data[str(i)][\"/action\"])\n", + " qpos_obs[:, -1] = 2 * np.pi * qpos_obs[:, -1] / 120000\n", + " qpos_act[:, -1] = 2 * np.pi * qpos_act[:, -1] / 120000\n", + " data[str(i)][\"/observations/qpos\"] = qpos_obs.tolist()\n", + " data[str(i)][\"/action\"] = qpos_act.tolist()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "imitall", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.10" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/data_process/test_convert_mujoco.ipynb b/data_process/test_convert_mujoco.ipynb index 617b399..f5f2526 100644 --- a/data_process/test_convert_mujoco.ipynb +++ b/data_process/test_convert_mujoco.ipynb @@ -12,26 +12,105 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "DEBUG:h5py._conv:Creating converter from 7 to 5\n", + "DEBUG:h5py._conv:Creating converter from 5 to 7\n", + "DEBUG:h5py._conv:Creating converter from 7 to 5\n", + "DEBUG:h5py._conv:Creating converter from 5 to 7\n" + ] + } + ], "source": [ "import convert_all as crd" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "metadata": {}, "outputs": [], + "source": [ + "#如果左右臂数据采集反了,交换前7个和后7个数据\n", + "import h5py\n", + "import os\n", + "\n", + "def print_hdf5_structure(hdf5_file_path):\n", + " with h5py.File(hdf5_file_path, 'r') as f:\n", + " def print_attrs(name, obj):\n", + " print(name)\n", + " f.visititems(print_attrs)\n", + "\n", + "def swap_data(hdf5_file_path):\n", + " with h5py.File(hdf5_file_path, 'r+') as f:\n", + " # 读取 action 和 qpos 数据\n", + " action_data = f['/action'][:]\n", + " qpos_data = f['observations/qpos'][:]\n", + " \n", + " # 交换 action 数据的前 7 个和后 7 个数据\n", + " action_data[:, :7], action_data[:, -7:] = action_data[:, -7:], action_data[:, :7].copy()\n", + " \n", + " # 交换 qpos 数据的前 7 个和后 7 个数据\n", + " qpos_data[:, :7], qpos_data[:, -7:] = qpos_data[:, -7:], qpos_data[:, :7].copy()\n", + " \n", + " # 将交换后的数据写回文件\n", + " f['/action'][:] = action_data\n", + " f['observations/qpos'][:] = qpos_data\n", + "# 文件路径模板\n", + "# file_template = '/home/qiuzhi/IMITATION_LEARNING/Imitate-All/demonstrations/hdf5/dual_put_two_cups_to_bowl/episode_{:02d}.hdf5'\n", + "\n", + "# # 遍历指定范围内的所有文件\n", + "# for episode in range(30, 50):\n", + "# hdf5_file_path = file_template.format(episode)\n", + "# if os.path.exists(hdf5_file_path):\n", + "# print(f\"Processing {hdf5_file_path}\")\n", + "# swap_data(hdf5_file_path)\n", + "# else:\n", + "# print(f\"File {hdf5_file_path} does not exist\")\n", + "# print_hdf5_structure(hdf5_file_path)\n", + "hdf5_file_path = '/home/qiuzhi/IMITATION_LEARNING/Imitate-All/demonstrations/hdf5/dual_put_two_cups_to_bowl/episode_40.hdf5'\n", + "swap_data(hdf5_file_path)" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Data Converting: 0%| | 0/50 [00:00 5\u001b[0m data \u001b[38;5;241m=\u001b[39m \u001b[43mcrd\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mraw_to_dict\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 6\u001b[0m \u001b[43m \u001b[49m\u001b[43mraw_dir\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 7\u001b[0m \u001b[43m \u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mrecords.json\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 8\u001b[0m \u001b[43m \u001b[49m\u001b[43mvideo_file_names\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\u001b[43m,\u001b[49m\n\u001b[1;32m 9\u001b[0m \u001b[43m \u001b[49m\u001b[43mflatten_mode\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mhdf5\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 10\u001b[0m \u001b[43m \u001b[49m\u001b[43mname_converter\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43m{\u001b[49m\n\u001b[1;32m 11\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43m/obs/jq\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43m/observations/qpos\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 12\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43m/act\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43m/action\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 13\u001b[0m \u001b[43m \u001b[49m\u001b[43m}\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 14\u001b[0m \u001b[43m \u001b[49m\u001b[43mpre_process\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mNone\u001b[39;49;00m\n\u001b[1;32m 15\u001b[0m \u001b[43m)\u001b[49m\n", + "File \u001b[0;32m~/IMITATION_LEARNING/Imitate-All/data_process/convert_all.py:336\u001b[0m, in \u001b[0;36mraw_to_dict\u001b[0;34m(raw_dir, state_file_names, video_file_names, flatten_mode, name_converter, pre_process, concatenater, key_filter)\u001b[0m\n\u001b[1;32m 332\u001b[0m data_flat\u001b[38;5;241m.\u001b[39mpop(key, \u001b[38;5;28;01mNone\u001b[39;00m)\n\u001b[1;32m 333\u001b[0m \u001b[38;5;66;03m# if raw_data.pop(key, None) is None:\u001b[39;00m\n\u001b[1;32m 334\u001b[0m \u001b[38;5;66;03m# print(f\"Key {key} is not found in {state_file}.\")\u001b[39;00m\n\u001b[1;32m 335\u001b[0m \u001b[38;5;66;03m# flatten the sub list\u001b[39;00m\n\u001b[0;32m--> 336\u001b[0m lenths \u001b[38;5;241m=\u001b[39m \u001b[43mflatten_sublist_in_flat_dict\u001b[49m\u001b[43m(\u001b[49m\u001b[43mdata_flat\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 337\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m key, value \u001b[38;5;129;01min\u001b[39;00m lenths\u001b[38;5;241m.\u001b[39mcopy()\u001b[38;5;241m.\u001b[39mitems():\n\u001b[1;32m 338\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m value \u001b[38;5;241m==\u001b[39m \u001b[38;5;241m0\u001b[39m:\n\u001b[1;32m 339\u001b[0m \u001b[38;5;66;03m# remove not used keys\u001b[39;00m\n\u001b[1;32m 340\u001b[0m \u001b[38;5;66;03m# print(f\"Remove not used key: {key}\")\u001b[39;00m\n", + "File \u001b[0;32m~/IMITATION_LEARNING/Imitate-All/data_process/convert_all.py:62\u001b[0m, in \u001b[0;36mflatten_sublist_in_flat_dict\u001b[0;34m(d)\u001b[0m\n\u001b[1;32m 60\u001b[0m trajs_lenth \u001b[38;5;241m=\u001b[39m {}\n\u001b[1;32m 61\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m key, traj \u001b[38;5;129;01min\u001b[39;00m d\u001b[38;5;241m.\u001b[39mitems():\n\u001b[0;32m---> 62\u001b[0m traj_lenth \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mlen\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43mtraj\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 63\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m traj_lenth \u001b[38;5;241m>\u001b[39m \u001b[38;5;241m0\u001b[39m:\n\u001b[1;32m 64\u001b[0m point \u001b[38;5;241m=\u001b[39m traj[\u001b[38;5;241m0\u001b[39m]\n", + "\u001b[0;31mTypeError\u001b[0m: object of type 'int' has no len()" + ] + } + ], "source": [ "# get all low_dim data\n", - "task_name = \"mujoco_stack_cups\"\n", + "task_name = \"example_task\"\n", "raw_root_dir = \"../demonstrations/raw\"\n", "raw_dir = f\"{raw_root_dir}/{task_name}\"\n", "data = crd.raw_to_dict(\n", " raw_dir,\n", - " [\"obs_action.json\"],\n", + " [\"records.json\"],\n", " video_file_names=None,\n", " flatten_mode=\"hdf5\",\n", " name_converter={\n", @@ -44,9 +123,21 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "metadata": {}, - "outputs": [], + "outputs": [ + { + "ename": "NameError", + "evalue": "name 'data' is not defined", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[5], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;28mlen\u001b[39m(\u001b[38;5;28mlist\u001b[39m(\u001b[43mdata\u001b[49m\u001b[38;5;241m.\u001b[39mkeys())))\n\u001b[1;32m 2\u001b[0m \u001b[38;5;28mprint\u001b[39m(data\u001b[38;5;241m.\u001b[39mkeys())\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28mprint\u001b[39m(data[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m000\u001b[39m\u001b[38;5;124m'\u001b[39m]\u001b[38;5;241m.\u001b[39mkeys())\n", + "\u001b[0;31mNameError\u001b[0m: name 'data' is not defined" + ] + } + ], "source": [ "print(len(list(data.keys())))\n", "print(data.keys())\n", diff --git a/policies/act/act.py b/policies/act/act.py index 175939c..8a5dc05 100644 --- a/policies/act/act.py +++ b/policies/act/act.py @@ -61,6 +61,7 @@ def __call__(self, qpos, image, actions=None, is_pad=None): else: a_hat_one = self.temporal_ensembler.update(a_hat) a_hat[0][0] = a_hat_one + return a_hat def configure_optimizers(self): diff --git a/policies/common/maker.py b/policies/common/maker.py index 6c4ac4c..f28acbc 100644 --- a/policies/common/maker.py +++ b/policies/common/maker.py @@ -6,10 +6,11 @@ def make_policy( config, stage=None ): # TODO: remove this function and use the config file - policy_maker = config["policy_maker"] + policy_maker = config["policy_maker"] policy = policy_maker(config, stage) assert policy is not None, "Please use the make_policy function in the config file" - return policy + return policy + #now policy is a function def post_init_policies(policies: List[torch.nn.Module], stage, ckpt_paths) -> None: diff --git a/policy_evaluate.py b/policy_evaluate.py index deacb35..bad6ae7 100644 --- a/policy_evaluate.py +++ b/policy_evaluate.py @@ -52,7 +52,9 @@ def eval_bc(config, ckpt_name, env: CommonEnv): # remove other not general processing code outside in policy and env maker # 显式获得配置 ckpt_dir = config["ckpt_dir"] + stats_path = config["stats_path"] + save_dir = config["save_dir"] max_timesteps = config["max_timesteps"] camera_names = config["camera_names"] @@ -75,27 +77,42 @@ def eval_bc(config, ckpt_name, env: CommonEnv): # TODO: remove this ckpt_path = get_ckpt_path(ckpt_dir, ckpt_name, stats_path) policy_config["ckpt_path"] = ckpt_path + policy_config["stats_path"] = stats_path + + if "ckpt_dir" in config and "stats_path" in config: + print(f"the number of model is : {len(config['ckpt_dir_n'])}") + for i in range(len(config["ckpt_dir_n"])): + ckpt_dir_n = config["ckpt_dir_n"][i] + stats_path_n = config["stats_path_n"][i] + ckpt_path = get_ckpt_path(ckpt_dir_n, ckpt_name, stats_path_n) + policy_config[f"ckpt_path_{i}"] = ckpt_path # make and configure policies policies: Dict[str, list] = {} - if ensemble is None: - logging.info("policy_config:", policy_config) - # if ensemble is not None: - policy_config["max_timesteps"] = max_timesteps # TODO: remove this - policy = make_policy(policy_config, "eval") - policies["Group1"] = (policy,) - else: - logging.info("ensemble config:", ensemble) - ensembler = ensemble.pop("ensembler") - for gr_name, gr_cfgs in ensemble.items(): - policies[gr_name] = [] - for index, gr_cfg in enumerate(gr_cfgs): - - policies[gr_name].append( - make_policy( - gr_cfg["policies"][index]["policy_class"], - ) - ) + logging.info("policy_config:", policy_config) + # if ensemble is None: + policy_config["max_timesteps"] = max_timesteps # TODO: remove this + policy = make_policy(policy_config, "eval") + #move to policy maker + + # if ensemble is None: + # logging.info("policy_config:", policy_config) + # # if ensemble is None: + # policy_config["max_timesteps"] = max_timesteps # TODO: remove this + # policy = make_policy(policy_config, "eval") + # policies["Group1"] = (policy,) + # else: + # logging.info("ensemble config:", ensemble) + # ensembler = ensemble.pop("ensembler") + # for gr_name, gr_cfgs in ensemble.items(): + # policies[gr_name] = [] + # for index, gr_cfg in enumerate(gr_cfgs): + + # policies[gr_name].append( + # make_policy( + # gr_cfg["policies"][index]["policy_class"], + # ) + # ) # add action filter # TODO: move to policy maker as wrappers @@ -124,12 +141,12 @@ def eval_bc(config, ckpt_name, env: CommonEnv): post_process = lambda a: a # evaluation loop - if hasattr(policy, "eval"): policy.eval() + if hasattr(policy, "eval"): policy.eval() #method from torch.nn.Module env_max_reward = 0 episode_returns = [] highest_rewards = [] policy_sig = inspect.signature(policy).parameters - for rollout_id in range(num_rollouts): + for rollout_id in range(num_rollouts): #start one evaluation # evaluation loop all_time_actions = torch.zeros( @@ -137,11 +154,12 @@ def eval_bc(config, ckpt_name, env: CommonEnv): ).cuda() qpos_history = torch.zeros((1, max_timesteps, state_dim)).cuda() + all_time_stage = [] image_list = [] # for visualization qpos_list = [] action_list = [] rewards = [] - with torch.inference_mode(): + with torch.inference_mode():#禁用梯度计算 logging.info("Reset environment...") env.reset(sleep_time=1) logging.info(f"Current rollout: {rollout_id} for {ckpt_name}.") @@ -150,7 +168,7 @@ def eval_bc(config, ckpt_name, env: CommonEnv): break ts = env.reset() if hasattr(policy, "reset"): policy.reset() - try: + try: #start evaluation for t in tqdm(range(max_timesteps)): start_time = time.time() image_list.append(ts.observation["images"]) @@ -179,12 +197,14 @@ def eval_bc(config, ckpt_name, env: CommonEnv): # wrap policy target_t = t % num_queries if temporal_agg or target_t == 0: + #start = time.time() # (1, chunk_size, 7) for act + # (1, chunk_size, 8) for with stage all_actions: torch.Tensor = policy(qpos, curr_image) + #print(f"prediction time: {time.time() - start}") all_time_actions[[t], t : t + num_queries] = all_actions index = 0 if temporal_agg else target_t raw_action = all_actions[:, index] - # post-process predicted action # dim: (1,7) -> (7,) raw_action = ( @@ -196,7 +216,7 @@ def eval_bc(config, ckpt_name, env: CommonEnv): if filter_type is not None: # filt action for i, filter in enumerate(filters): action[i] = filter(action[i], time.time()) - + #print("The predict stage is", action[-1]) # step the environment sleep_time = max(0, dt - (time.time() - start_time)) ts = env.step(action, sleep_time=sleep_time, arm_vel=arm_velocity) @@ -394,10 +414,20 @@ def eval_bc(config, ckpt_name, env: CommonEnv): "-ts", "--time_stamp", action="store", + nargs="+", #直接通过空格分隔的多个参数 type=str, help="time_stamp", required=False, ) + # parser.add_argument( + # "-ts_1", + # "--time_stamp_1", + # action="store", + # type=str, + # help="time_stamp_1", + # required=False, + # ) + # save parser.add_argument( "-sd", "--save_dir", action="store", type=str, help="save_dir", required=False @@ -410,7 +440,8 @@ def eval_bc(config, ckpt_name, env: CommonEnv): parser.add_argument( "-ft", "--filter", action="store", type=str, help="filter_type", required=False ) - + # environment + parser.add_argument('-et', "--environment", action='store', type=str, help='environment', required=False) args = parser.parse_args() args_dict = vars(args) # TODO: put unknown key-value pairs into args_dict diff --git a/task_configs/config_tools/basic_configer.py b/task_configs/config_tools/basic_configer.py index 50e31c2..a33e308 100644 --- a/task_configs/config_tools/basic_configer.py +++ b/task_configs/config_tools/basic_configer.py @@ -187,13 +187,27 @@ def get_all_config(args: dict, stage: str): elif stage == "eval": # 评估时需要将自动根据当前时间戳生成的ckpt_dir和stats_path替换为指定时间戳的路径(save_dir不需要替换) if args.get("time_stamp", None): - time_stamp = args["time_stamp"] - all_config["ckpt_dir"] = replace_timestamp( - all_config["ckpt_dir"], time_stamp - ) - all_config["stats_path"] = replace_timestamp( - all_config["stats_path"], time_stamp - ) + time_stamps = args["time_stamp"] + n = len(time_stamps) + + # 初始化两个 n 维数组 + all_config["ckpt_dir_n"] = [None] * n + all_config["stats_path_n"] = [None] * n + + # 将每一个 time_stamp 都传入相应的位置 + all_config["ckpt_dir"] = replace_timestamp(all_config["ckpt_dir"], time_stamps[0]) + all_config["stats_path"] = replace_timestamp(all_config["stats_path"], time_stamps[0]) + for i in range(n): + all_config["ckpt_dir_n"][i] = replace_timestamp(all_config["ckpt_dir"], time_stamps[i]) + all_config["stats_path_n"][i] = replace_timestamp(all_config["stats_path"], time_stamps[i]) + # if args.get("time_stamp_1", None): + # time_stamp_1 = args["time_stamp_1"] + # all_config["ckpt_dir_1"] = replace_timestamp( + # all_config["ckpt_dir"], time_stamp_1 + # ) + # all_config["stats_path_1"] = replace_timestamp( + # all_config["stats_path"], time_stamp_1 + # ) # 检查路径(支持task_name/ts/task_name/ts两级嵌套和仅task_name/ts一级两种目录结构) stats_dir, stats_path = get_stats_path(all_config["stats_path"], all_config["task_name"]) all_config["stats_path"] = stats_path diff --git a/task_configs/dual_put_cups_to_bowl.py b/task_configs/dual_put_cups_to_bowl.py new file mode 100755 index 0000000..972750b --- /dev/null +++ b/task_configs/dual_put_cups_to_bowl.py @@ -0,0 +1,108 @@ +from concurrent.futures import ThreadPoolExecutor +from policies.common.maker import post_init_policies +from task_configs.template import ( + get_task_name, + replace_task_name, + set_paths, + activator, + TASK_CONFIG_DEFAULT, +) + +# def policy_maker(config:dict, stage=None): +# from policies.act.act import ACTPolicy +# from policies.common.maker import post_init_policies +# import logging +# import torch +# # TODO: add stage param to the policy class for convenience and simplicity +# # that is, do the following in the policy class __init__ method. +# policy = ACTPolicy(config) +# post_init_policies([policy], stage, [config["ckpt_path"]]) +# return policy +def policy_maker(config:dict, stage=None): + from policies.act.act import ACTPolicy + from policies.traditionnal.cnnmlp import CNNMLPPolicy + # from policies.diffusion.diffusion_policy import DiffusionPolicy + import logging + import torch + policy = ACTPolicy(config) + post_init_policies([policy], stage, [config["ckpt_path"]]) + + if "ckpt_path_1" in config: + policy_1 = CNNMLPPolicy(config) + post_init_policies([policy_1], stage, [config["ckpt_path_1"]]) + + if stage == "train": + return policy + + elif stage == "eval": + if TASK_CONFIG_DEFAULT["eval"]["ensemble"] == None: + return policy + else: + ckpt_path = config["ckpt_path"] + assert ckpt_path is not None, "ckpt_path must exist for loading policy" + # TODO: all policies should load the ckpt (policy maker should return a class) + + policy.cuda() + policy.eval() + policy_1.cuda() + policy_1.eval() + + def ensemble_policy(*args, **kwargs): + #TODO:转换为并行操作 + actions = policy(*args, **kwargs) + actions_2 = policy_1(*args, **kwargs) + # average the actions + actions = (actions + actions_2) / 2 + return actions + + return ensemble_policy + + +def environment_maker(config:dict): + from envs.make_env import make_environment + env_config = config["environments"] + # TODO: use env_config only + return make_environment(config) + +@activator(False) +def augment_images(image): + from task_configs.config_augmentation.image.basic import color_transforms_1 + return color_transforms_1(image) + +# auto replace the task name in the default paths accoring to the file name +TASK_NAME = get_task_name(__file__) +replace_task_name(TASK_NAME, stats_name="dataset_stats.pkl", time_stamp="now") +# but we also show how to set the whole paths manually +# DATA_DIR = f"./data/hdf5/{TASK_NAME}" +# CKPT_DIR = f"./my_ckpt/{TASK_NAME}/ckpt" +# STATS_PATH = f"./my_ckpt/{TASK_NAME}/dataset_stats.pkl" +# set_paths(DATA_DIR, CKPT_DIR, STATS_PATH) # replace the default data and ckpt paths + +chunk_size = 25 +joint_num = 7 +robot_num = 2 +TASK_CONFIG_DEFAULT["common"]["camera_names"] = ["0"] +TASK_CONFIG_DEFAULT["common"]["state_dim"] = joint_num * robot_num +TASK_CONFIG_DEFAULT["common"]["action_dim"] = joint_num * robot_num +TASK_CONFIG_DEFAULT["common"]["policy_config"]["temporal_agg"] = False +TASK_CONFIG_DEFAULT["common"]["policy_config"]["chunk_size"] = chunk_size +TASK_CONFIG_DEFAULT["common"]["policy_config"]["num_queries"] = chunk_size +TASK_CONFIG_DEFAULT["common"]["policy_config"]["kl_weight"] = 10 +TASK_CONFIG_DEFAULT["common"]["policy_config"]["policy_maker"] = policy_maker + +TASK_CONFIG_DEFAULT["train"]["num_episodes"] = "ALL" +TASK_CONFIG_DEFAULT["train"]["num_epochs"] = 8000 +TASK_CONFIG_DEFAULT["train"]["batch_size"] = 16 +TASK_CONFIG_DEFAULT["train"]["learning_rate"] = 3e-5 +TASK_CONFIG_DEFAULT["train"]["pretrain_ckpt_path"] = "" +TASK_CONFIG_DEFAULT["train"]["pretrain_epoch_base"] = "AUTO" + +TASK_CONFIG_DEFAULT["eval"]["robot_num"] = 2 +TASK_CONFIG_DEFAULT["eval"]["joint_num"] = joint_num +TASK_CONFIG_DEFAULT["eval"]["start_joint"] = "AUTO" +TASK_CONFIG_DEFAULT["eval"]["max_timesteps"] = 400 +TASK_CONFIG_DEFAULT["eval"]["ensemble"] = None +TASK_CONFIG_DEFAULT["eval"]["environments"]["environment_maker"] = environment_maker + +# final config +TASK_CONFIG = TASK_CONFIG_DEFAULT diff --git a/task_configs/mujoco_stack_cups.py b/task_configs/mujoco_stack_cups.py new file mode 100755 index 0000000..2d99b95 --- /dev/null +++ b/task_configs/mujoco_stack_cups.py @@ -0,0 +1,129 @@ +from concurrent.futures import ThreadPoolExecutor +from multiprocessing import Pool + +import torch +from policies.common.maker import post_init_policies +from task_configs.template import ( + get_task_name, + replace_task_name, + set_paths, + activator, + TASK_CONFIG_DEFAULT, +) + + +def policy_maker(config:dict, stage=None): + from policies.act.act import ACTPolicy + from policies.traditionnal.cnnmlp import CNNMLPPolicy + # from policies.diffusion.diffusion_policy import DiffusionPolicy + with torch.inference_mode():#禁用梯度计算 + policy = ACTPolicy(config) + post_init_policies([policy], stage, [config["ckpt_path"]]) + + if "ckpt_path_1" in config: + policy_1 = CNNMLPPolicy(config) + post_init_policies([policy_1], stage, [config["ckpt_path_1"]]) + + if stage == "train": + return policy + + elif stage == "eval": + if TASK_CONFIG_DEFAULT["eval"]["ensemble"] == None: + return policy + else: + ckpt_path = config["ckpt_path"] + assert ckpt_path is not None, "ckpt_path must exist for loading policy" + # TODO: all policies should load the ckpt (policy maker should return a class) + + policy.cuda() + policy.eval() + policy_1.cuda() + policy_1.eval() + + + # def ensemble_policy(*args, **kwargs): + # #TODO:转换为并行操作 + # actions = policy(*args, **kwargs) + # actions_2 = policy_1(*args, **kwargs) + # # average the actions + # actions = (actions + actions_2) / 2 + # return actions + + def run_policy(policy, *args, **kwargs): + with torch.inference_mode(): + a_hat = policy(*args, **kwargs) + a_hat = a_hat.clone() # 在更新之前克隆 + return policy.temporal_ensembler.update(a_hat) + + def ensemble_policy(*args, **kwargs): + with ThreadPoolExecutor(max_workers=2) as executor: + future_policy = executor.submit(run_policy, policy, *args, **kwargs) + + future_policy_1 = executor.submit(run_policy, policy_1, *args, **kwargs) + + actions = future_policy.result() + actions_2 = future_policy_1.result() + + # average the actions + actions = (actions + actions_2) / 2 + return actions + + # 定义 reset 方法 + def reset(): + if hasattr(policy, "reset"): + policy.reset() + if hasattr(policy_1, "reset"): + policy_1.reset() + + # 将 reset 方法绑定到 ensemble_policy 函数上 + ensemble_policy.reset = reset + + return ensemble_policy + +def environment_maker(config:dict): + from envs.make_env import make_environment + env_config = config["environments"] + # TODO: use env_config only + return make_environment(config) + +@activator(False) +def augment_images(image): + from task_configs.config_augmentation.image.basic import color_transforms_1 + return color_transforms_1(image) + +# auto replace the task name in the default paths accoring to the file name +TASK_NAME = get_task_name(__file__) +replace_task_name(TASK_NAME, stats_name="dataset_stats.pkl", time_stamp="now") +# but we also show how to set the whole paths manually +# DATA_DIR = f"./data/hdf5/{TASK_NAME}" +# CKPT_DIR = f"./my_ckpt/{TASK_NAME}/ckpt" +# STATS_PATH = f"./my_ckpt/{TASK_NAME}/dataset_stats.pkl" +# set_paths(DATA_DIR, CKPT_DIR, STATS_PATH) # replace the default data and ckpt paths + +chunk_size = 25 +joint_num = 7 +TASK_CONFIG_DEFAULT["common"]["camera_names"] = ["0"] +TASK_CONFIG_DEFAULT["common"]["state_dim"] = joint_num +TASK_CONFIG_DEFAULT["common"]["action_dim"] = joint_num +TASK_CONFIG_DEFAULT["common"]["policy_config"]["temporal_agg"] = True +TASK_CONFIG_DEFAULT["common"]["policy_config"]["chunk_size"] = chunk_size +TASK_CONFIG_DEFAULT["common"]["policy_config"]["num_queries"] = chunk_size +TASK_CONFIG_DEFAULT["common"]["policy_config"]["kl_weight"] = 10 +TASK_CONFIG_DEFAULT["common"]["policy_config"]["policy_maker"] = policy_maker + +TASK_CONFIG_DEFAULT["train"]["num_episodes"] = "ALL" +TASK_CONFIG_DEFAULT["train"]["num_epochs"] = 8000 +TASK_CONFIG_DEFAULT["train"]["batch_size"] = 16 +TASK_CONFIG_DEFAULT["train"]["learning_rate"] = 2e-5 +TASK_CONFIG_DEFAULT["train"]["pretrain_ckpt_path"] = "" +TASK_CONFIG_DEFAULT["train"]["pretrain_epoch_base"] = "AUTO" + +TASK_CONFIG_DEFAULT["eval"]["robot_num"] = 1 +TASK_CONFIG_DEFAULT["eval"]["joint_num"] = joint_num +TASK_CONFIG_DEFAULT["eval"]["start_joint"] = "AUTO" +TASK_CONFIG_DEFAULT["eval"]["max_timesteps"] = 100 +TASK_CONFIG_DEFAULT["eval"]["ensemble"] = True +TASK_CONFIG_DEFAULT["eval"]["environments"]["environment_maker"] = environment_maker + +# final config +TASK_CONFIG = TASK_CONFIG_DEFAULT diff --git a/task_configs/put_objects_into_bowl_2_with_stage.py b/task_configs/put_objects_into_bowl_2_with_stage.py new file mode 100755 index 0000000..4531b89 --- /dev/null +++ b/task_configs/put_objects_into_bowl_2_with_stage.py @@ -0,0 +1,398 @@ +from concurrent.futures import ThreadPoolExecutor +import logging +import pickle +from PIL import Image +import numpy as np +import torch +from collections import Counter +from policies.common.maker import post_init_policies +from task_configs.template import ( + replace_task_name, + TASK_CONFIG_DEFAULT, + set_paths, + activator, +) +from task_configs.config_augmentation.image.basic import color_transforms_2 + +import os +import base64 +import openai +from io import BytesIO +from openai import OpenAI + +def policy_maker(config:dict, stage=None): + from policies.act.act import ACTPolicy + from policies.traditionnal.cnnmlp import CNNMLPPolicy + # from policies.diffusion.diffusion_policy import DiffusionPolicy + with torch.inference_mode(): # 禁用梯度计算 + policies = [] + for key in config: + if key.startswith("ckpt_path_"): + policy = ACTPolicy(config) + post_init_policies([policy], stage, [config[key]]) + policies.append(policy) + logging.info(len(policies)) + + if stage == "train": + return policy + + elif stage == "eval": + if TASK_CONFIG_DEFAULT["eval"]["ensemble"] == None: + return policy + else: + ckpt_path = config["ckpt_path"] + stats_path = config["stats_path"] + + assert ckpt_path is not None, "ckpt_path must exist for loading policy" + # TODO: all policies should load the ckpt (policy maker should return a class)、 + + for policy in policies: + policy.cuda() + policy.eval() + + #串行推理 + # def ensemble_policy(*args, **kwargs): + # actions = policy(*args, **kwargs) + # actions_2 = policy_1(*args, **kwargs) + # # average the actions + # actions = (actions + actions_2) / 2 + # return actions + + #并行推理 + def run_policy(policy, *args, **kwargs): + with torch.inference_mode(): + a_hat = policy(*args, **kwargs) + #a_hat = a_hat.clone() # 在更新之前克隆 + return a_hat + + def check_stage_error(all_time_stage): + """ + 检查 all_time_stage 中每个模型的 stage, 返回list of bool,表示每个模型是否有问题,True 表示有问题,False 表示正常。 + 如果当前的 stage 小于上一次的 stage, 则认为该模型有问题。 + + """ + valid_transitions = { + 0: [0,1], + 1: [0,1,2], + 2: [1,2,3], + 3: [0,1,3,4], + 4: [4,5], + 5: [4,5,6], + 6: [5,6,7], + 7: [4,5,7,8], + 8: [0,1,2,3,4,5,6,7,8] + } + # 定义每个 stage 的最大允许次数 + stage_limits = { + 0: 50, + 1: 50, + 2: 50, + 3: 50, + 4: 50, + 5: 50, + 6: 50, + 7: 50, + 8: 50 + } + error_signals = [] + + for model_stages in all_time_stage: + + has_error = False + if len(model_stages) > 2: + curr_stage = model_stages[-1] + prev_stage = model_stages[-2] + if curr_stage not in valid_transitions.get(prev_stage, []): + has_error = True + else: + same_stage_count = 0 + for i in range(len(model_stages)-1, -1, -1): + if model_stages[i] == curr_stage: + same_stage_count += 1 + else: + break + + if same_stage_count > stage_limits[curr_stage]: + has_error = True + + error_signals.append(has_error) + + return error_signals + + def ensemble_policy(*args, **kwargs): + if not hasattr(ensemble_policy, 'all_time_stage'): + ensemble_policy.all_time_stage = [[] for _ in range(len(policies))] + if not hasattr(ensemble_policy, 'all_time_action'): + ensemble_policy.all_time_action = [] + if not hasattr(ensemble_policy, 'skip_gpt_analysis'): + ensemble_policy.skip_gpt_analysis = False + + stage_descriptions = { + 0: "移动到胶水上方", + 1: "抓胶水", + 2: "将胶水移动到蓝色碗上方", + 3: "放置胶水", + 4: "移动到物块上方", + 5: "抓物块", + 6: "将物块移动到粉色碗上方", + 7: "放置物块", + 8: "移动到初始位置" + } + with ThreadPoolExecutor(max_workers=len(policies)) as executor: + futures = [] + for policy in policies: + future = executor.submit(run_policy, policy, *args, **kwargs) + futures.append(future) + + with open(stats_path, "rb") as f: + stats = pickle.load(f) + + post_process = lambda a: a * stats["action_std"][-1] + stats["action_mean"][-1] + + results = [future.result() for future in futures] + last_elements = [round(post_process(result[0,0,-1].item())) for result in results] # 获取每个模型的stage + for i, last_element in enumerate(last_elements): + ensemble_policy.all_time_stage[i].append(last_element) + # size of all_time_stage : [ + # [stage_1_time_1, stage_1_time_2, ..., stage_1_time_t], # 模型1的stage输出 + # [stage_2_time_1, stage_2_time_2, ..., stage_2_time_t], # 模型2的stage输出 + # ... + # [stage_n_time_1, stage_n_time_2, ..., stage_n_time_t] # 模型n的stage输出 + # ] + + error_signals = check_stage_error(ensemble_policy.all_time_stage) + + # 计算异常模型的比例 + num_policies = len(policies) + num_errors = sum(error_signals) + error_ratio = num_errors / num_policies + print(f"error ratio: {error_ratio}") + + valid_results = [result for i, result in enumerate(results) if not error_signals[i]] + counter = Counter([round(post_process(result[0,0,-1].item())) for result in valid_results]) # 统计每个最后一位的出现次数 + most_common_last_element, count = counter.most_common(1)[0] # 找到出现次数最多的 stage + curr_stage = most_common_last_element + if error_ratio <= 0.5: + if error_ratio >= 0.3:print("Warning: 0.3 < error_ratio <= 0.5") + + stage_description = stage_descriptions.get(curr_stage, "unknow stage") + print(f"{curr_stage}: {stage_description}") + + # 过滤出最后一位是多数的结果 + filtered_results = [result for result in results if round(post_process(result[0,0,-1].item())) == most_common_last_element] + + actions_sum = torch.zeros_like(filtered_results[0]) + #actions_sum = torch.zeros((1, 50, 8)) + for result in filtered_results: + actions_sum += result + + actions_avg = actions_sum / len(filtered_results) + + ensemble_policy.all_time_action.append(actions_avg[0,0,0:7]) + + return actions_avg #return size: (1, chunksize, 8) + + else : + # 异常模型超过50%,GPT analysis + print("error_ratio > 50%, GPT analysis is called") + if ensemble_policy.skip_gpt_analysis: + # 直接返回最后一个模型的输出 + result = results[-1] + handled_action = torch.zeros_like(result) + handled_action[0, 0, 0:7] = result[0, 0, 0:7] + ensemble_policy.all_time_action.append(handled_action[0, 0, 0:7]) + return handled_action + image_tensor = args[1] + output = handle_exceptions_with_gpt(image_tensor) + handled_action = torch.zeros_like(results[0]) + if output == 0: + # 状态0:没抓住物体,重现到上一个状态 + last_stage = curr_stage - 1 + print(f"now turn to last stage: {last_stage}", stage_descriptions[last_stage]) + for i, stages in enumerate(ensemble_policy.all_time_stage): + index = stages.index(last_stage) + corresponding_action = ensemble_policy.all_time_action[index] + handled_action[0, 0, 0:7] = corresponding_action + ensemble_policy.all_time_stage.append(handled_action[0, 0, 0:7]) + break + + return handled_action + elif output == 1: + # 状态1:图像中杂物太多,需要换到另一个带杂物的ACT + # 假设最后一个模型是杂物模型 + result = results[-1] + handled_action[0, 0, 0:7] = result[0, 0, 0:7] + ensemble_policy.all_time_action.append(handled_action[0, 0, 0:7]) + # 设置标志,之后不再进入GPT分析 + ensemble_policy.skip_gpt_analysis = True + return handled_action + else: + # 状态2:物体错误/不存在 + # 需要人为干预 + input("Please adjust the object in the scene and press Enter to continue.") + print(f"now turn to stage:{curr_stage}") + filtered_results = [result for result in results if round(post_process(result[0,0,-1].item())) == most_common_last_element] + + actions_sum = torch.zeros_like(filtered_results[0]) + #actions_sum = torch.zeros((1, 50, 8)) + for result in filtered_results: + actions_sum += result + actions_avg = actions_sum / len(filtered_results) + ensemble_policy.all_time_action.append(actions_avg[0,0,0:7]) + return actions_avg + + + def handle_exceptions_with_gpt(image_tensor): + if image_tensor.numel() == 0: + raise ValueError("No image provided in args") + #print(image_tensor) + # 调用外部函数获取GPT响应数据 + response_data = get_gpt_response(image_tensor) + print(f"THE GPT RESPOND: {response_data}") + # 假设GPT返回的状态在response_data中 + gpt_status = response_data + + if "0" in gpt_status: + return 0 + elif "1" in gpt_status: + return 1 + elif "2" in gpt_status: + return 2 + else: + return 3 + + + def get_gpt_response(image_tensor): + # Set up proxy if needed + os.environ["http_proxy"] = "http://localhost:7890" + os.environ["https_proxy"] = "http://localhost:7890" + + def tensor_to_base64_image(tensor): + # 检查张量的形状 + if tensor.ndimension() == 5: + # 假设张量的形状是 (1, 1, C, H, W) + tensor = tensor.squeeze(0).squeeze(0) # 去掉前两个维度 + elif tensor.ndimension() == 4: + # 假设张量的形状是 (1, C, H, W) + tensor = tensor.squeeze(0) # 去掉第一个维度 + elif tensor.ndimension() == 3: + # 假设张量的形状是 (C, H, W) + pass + else: + raise ValueError("Unsupported tensor shape: {}".format(tensor.shape)) + + # 转置张量的轴顺序 + tensor = tensor.cpu().numpy() + tensor = np.transpose(tensor, (1, 2, 0)) # 转置为 (H, W, C) + + # 将张量转换为图像 + tensor = (tensor * 255).astype(np.uint8) + image = Image.fromarray(tensor) + + # 将图像编码为 base64 + buffer = BytesIO() + image.save(buffer, format="JPEG") + base64_image = base64.b64encode(buffer.getvalue()).decode('utf-8') + return base64_image + + # Getting the base64 string + base64_image = tensor_to_base64_image(image_tensor) + client = openai.OpenAI() + + response = client.chat.completions.create( + model="gpt-4o", + messages=[ + { + "role": "user", + "content": [ + {"type": "text", "text": ( + "Our task is to use a robotic arm to place a yellow glue stick into a blue bowl " + "and a wooden block into a pink bowl. Based on the image, please tell me the current situation. " + "Return a number: If the gripper is not gripping the object, return 0; " + "if there are many other distracting items in the scene, return 1; " + "if there is no yellow glue stick or no wooden block, return 2; " + + )}, + { + "type": "image_url", + "image_url": { + "url": f"data:image/jpeg;base64,{base64_image}", + }, + }, + ], + } + ], + max_tokens=300, + ) + + #print(response.choices[0]) + return response.choices[0].message.content + + # 定义 reset 方法 + def reset(): + for policy in policies: + if hasattr(policy, "reset"):policy.reset() + # 重置 all_time_stage 和 all_time_action + if hasattr(ensemble_policy, 'all_time_stage'): + ensemble_policy.all_time_stage = [[] for _ in range(len(policies))] + if hasattr(ensemble_policy, 'all_time_action'): + ensemble_policy.all_time_action = [] + + # 将 reset 方法绑定到 ensemble_policy 函数上 + ensemble_policy.reset = reset + + return ensemble_policy + +def environment_maker(config:dict): + from envs.make_env import make_environment + env_config = config["environments"] + # TODO: use env_config only + return make_environment(config) + +@activator(False) +def augment_images(image): + return color_transforms_2(image) + +# replace the task name in the default paths when using the default paths such as this example +# auto replace by the file name +TASK_NAME = __file__.split("/")[-1].replace(".py", "") +replace_task_name(TASK_NAME, stats_name="dataset_stats.pkl", time_stamp="now") +# but we also show how to replace the paths manually +# DATA_DIR = f"./data/hdf5/{TASK_NAME}" +# CKPT_DIR = f"./my_ckpt/{TASK_NAME}/ckpt" +# STATS_PATH = f"./my_ckpt/{TASK_NAME}/dataset_stats.pkl" +# replace_paths(DATA_DIR, CKPT_DIR, STATS_PATH) # replace the default data and ckpt paths + + +chunk_size = 25 +joint_num = 7 + +TASK_CONFIG_DEFAULT["common"]["camera_names"] = ["0"] +TASK_CONFIG_DEFAULT["common"]["robot_num"] = 1 +TASK_CONFIG_DEFAULT["common"]["policy_config"]["temporal_agg"] = True + +TASK_CONFIG_DEFAULT["common"]["policy_config"]["policy_maker"] = policy_maker + +TASK_CONFIG_DEFAULT["common"]["state_dim"] = joint_num +TASK_CONFIG_DEFAULT["common"]["action_dim"] = joint_num + 1 +TASK_CONFIG_DEFAULT["common"]["policy_config"]["chunk_size"] = chunk_size +TASK_CONFIG_DEFAULT["common"]["policy_config"]["num_queries"] = chunk_size +TASK_CONFIG_DEFAULT["common"]["policy_config"]["kl_weight"] = 10 + + +TASK_CONFIG_DEFAULT["train"]["num_episodes"] = (200, 299) +TASK_CONFIG_DEFAULT["train"]["num_epochs"] = 7000 +TASK_CONFIG_DEFAULT["train"]["learning_rate"] = 2e-5 +TASK_CONFIG_DEFAULT["train"]["pretrain_ckpt_path"] = "/home/ghz/airbot_play/act/my_ckpt/stack_cups/20240621-022635/stack_cups/policy_best.ckpt" +TASK_CONFIG_DEFAULT["train"]["pretrain_epoch_base"] = "AUTO" +TASK_CONFIG_DEFAULT["train"]["batch_size"] = 16 + +TASK_CONFIG_DEFAULT["eval"]["robot_num"] = 1 +TASK_CONFIG_DEFAULT["eval"]["joint_num"] = joint_num +TASK_CONFIG_DEFAULT["eval"]["start_joint"] = [0, -0.766, 0.704, 1.537, -0.965, -1.576, 0.710] +TASK_CONFIG_DEFAULT["eval"]["max_timesteps"] = 400 +TASK_CONFIG_DEFAULT["eval"]["ensemble"] = True +TASK_CONFIG_DEFAULT["eval"]["environments"]["environment_maker"] = environment_maker + +# final config +TASK_CONFIG = TASK_CONFIG_DEFAULT diff --git a/task_configs/stack_cups.py b/task_configs/stack_cups.py new file mode 100755 index 0000000..ab5087c --- /dev/null +++ b/task_configs/stack_cups.py @@ -0,0 +1,154 @@ +from concurrent.futures import ThreadPoolExecutor +import logging +import torch +from collections import Counter +from policies.common.maker import post_init_policies +from task_configs.template import ( + replace_task_name, + TASK_CONFIG_DEFAULT, + set_paths, + activator, +) +from task_configs.config_augmentation.image.basic import color_transforms_2 + + +def policy_maker(config:dict, stage=None): + from policies.act.act import ACTPolicy + from policies.traditionnal.cnnmlp import CNNMLPPolicy + # from policies.diffusion.diffusion_policy import DiffusionPolicy + with torch.inference_mode(): # 禁用梯度计算 + policies = [] + for key in config: + if key.startswith("ckpt_path_"): + policy = ACTPolicy(config) + post_init_policies([policy], stage, [config[key]]) + policies.append(policy) + logging.info(len(policies)) + + if stage == "train": + return policy + + elif stage == "eval": + if TASK_CONFIG_DEFAULT["eval"]["ensemble"] == None: + return policy + else: + ckpt_path = config["ckpt_path"] + assert ckpt_path is not None, "ckpt_path must exist for loading policy" + # TODO: all policies should load the ckpt (policy maker should return a class)、 + + for policy in policies: + policy.cuda() + policy.eval() + + #串行推理 + # def ensemble_policy(*args, **kwargs): + # actions = policy(*args, **kwargs) + # actions_2 = policy_1(*args, **kwargs) + # # average the actions + # actions = (actions + actions_2) / 2 + # return actions + + #并行推理 + def run_policy(policy, *args, **kwargs): + with torch.inference_mode(): + a_hat = policy(*args, **kwargs) + #a_hat = a_hat.clone() # 在更新之前克隆 + return a_hat + + + def ensemble_policy(*args, **kwargs): + with ThreadPoolExecutor(max_workers=len(policies)) as executor: + futures = [] + for policy in policies: + future = executor.submit(run_policy, policy, *args, **kwargs) + futures.append(future) + + results = [future.result() for future in futures] + # 获取每个结果的最后一位 + last_elements = [round(result[0,0,-1].item()) for result in results] + + # 统计每个最后一位的出现次数 + counter = Counter(last_elements) + + # 找到出现次数最多的最后一位 + most_common_last_element, count = counter.most_common(1)[0] + + print("Most common last element:", most_common_last_element, "Count:", count) + # 过滤出最后一位是多数的结果 + filtered_results = [result for result in results if round(result[0,0,-1].item()) == most_common_last_element] + + actions_sum = torch.zeros_like(filtered_results[0]) + print("actions_sum",actions_sum.shape) + + for result in filtered_results: + actions_sum += result + + actions_avg = actions_sum / len(filtered_results) + + return actions_avg + #return size: (1, chunksize, 7) + + # 定义 reset 方法 + def reset(): + for policy in policies: + if hasattr(policy, "reset"):policy.reset() + + + # 将 reset 方法绑定到 ensemble_policy 函数上 + ensemble_policy.reset = reset + + return ensemble_policy + +def environment_maker(config:dict): + from envs.make_env import make_environment + env_config = config["environments"] + # TODO: use env_config only + return make_environment(config) + +@activator(False) +def augment_images(image): + return color_transforms_2(image) + +# replace the task name in the default paths when using the default paths such as this example +# auto replace by the file name +TASK_NAME = __file__.split("/")[-1].replace(".py", "") +replace_task_name(TASK_NAME, stats_name="dataset_stats.pkl", time_stamp="now") +# but we also show how to replace the paths manually +# DATA_DIR = f"./data/hdf5/{TASK_NAME}" +# CKPT_DIR = f"./my_ckpt/{TASK_NAME}/ckpt" +# STATS_PATH = f"./my_ckpt/{TASK_NAME}/dataset_stats.pkl" +# replace_paths(DATA_DIR, CKPT_DIR, STATS_PATH) # replace the default data and ckpt paths + + +chunk_size = 25 +joint_num = 7 + +TASK_CONFIG_DEFAULT["common"]["camera_names"] = ["0"] +TASK_CONFIG_DEFAULT["common"]["robot_num"] = 1 +TASK_CONFIG_DEFAULT["common"]["policy_config"]["temporal_agg"] = True + +TASK_CONFIG_DEFAULT["common"]["policy_config"]["policy_maker"] = policy_maker + +TASK_CONFIG_DEFAULT["common"]["state_dim"] = joint_num +TASK_CONFIG_DEFAULT["common"]["action_dim"] = joint_num +TASK_CONFIG_DEFAULT["common"]["policy_config"]["chunk_size"] = chunk_size +TASK_CONFIG_DEFAULT["common"]["policy_config"]["num_queries"] = chunk_size +TASK_CONFIG_DEFAULT["common"]["policy_config"]["kl_weight"] = 10 + + +TASK_CONFIG_DEFAULT["train"]["num_episodes"] = (200, 299) +TASK_CONFIG_DEFAULT["train"]["num_epochs"] = 7000 +TASK_CONFIG_DEFAULT["train"]["learning_rate"] = 2e-5 +TASK_CONFIG_DEFAULT["train"]["pretrain_ckpt_path"] = "/home/ghz/airbot_play/act/my_ckpt/stack_cups/20240621-022635/stack_cups/policy_best.ckpt" +TASK_CONFIG_DEFAULT["train"]["pretrain_epoch_base"] = "AUTO" +TASK_CONFIG_DEFAULT["train"]["batch_size"] = 16 + +TASK_CONFIG_DEFAULT["eval"]["robot_num"] = 1 +TASK_CONFIG_DEFAULT["eval"]["joint_num"] = joint_num +TASK_CONFIG_DEFAULT["eval"]["start_joint"] = "AUTO" +TASK_CONFIG_DEFAULT["eval"]["max_timesteps"] = 400 +TASK_CONFIG_DEFAULT["eval"]["ensemble"] = True +TASK_CONFIG_DEFAULT["eval"]["environments"]["environment_maker"] = environment_maker + +# final config +TASK_CONFIG = TASK_CONFIG_DEFAULT diff --git a/use_api.py b/use_api.py new file mode 100644 index 0000000..ee10999 --- /dev/null +++ b/use_api.py @@ -0,0 +1,164 @@ +import requests +import cv2 +import base64 +import re +import time + +# Read text from .txt file +def read_text_from_file(file_path): + with open(file_path, "r") as file: + text = file.read() + return text + +# Capture the image from the camera +def capture_image(camera_index): + cap = cv2.VideoCapture(camera_index) + ret, frame = cap.read() + cap.release() + if not ret: + raise ValueError("Failed to capture image") + _, buffer = cv2.imencode('.jpg', frame) + base64_image = base64.b64encode(buffer).decode('utf-8') + return base64_image + +# Call gpt4 api for plans and instructions +def call_gpt4_for_planning(initial_prompt = None, image_base64 = None, instruction = None): + + api_url = "https://api.openai.com/v1/chat/completions" + headers = { + "Content-Type": "application/json", + "Authorization": f"Bearer {api_key}" + } + payload = { + "model": "gpt-4o", + "messages": [ + { + "role": "system", + "role": "user", + "content": [ + { + "type": "text", + "text": initial_prompt + }, + { + "type": "image_url", + "image_url": { + "url": f"data:image/jpeg;base64,{image_base64}" + } + }, + { + "type": "text", + "text": instruction + } + ] + } + ] + } + response = requests.post(api_url, json=payload, headers=headers) + return response.json() + +# Call gpt4 api for plans and instructions +def call_gpt4_for_judgement(prompt = None, image_base64 = None): + + api_url = "https://api.openai.com/v1/chat/completions" + headers = { + "Content-Type": "application/json", + "Authorization": f"Bearer {api_key}" + } + + payload = { + "model": "gpt-4o", + "messages": [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": prompt + }, + { + "type": "image_url", + "image_url": { + "url": f"data:image/jpeg;base64,{image_base64}" + } + } + ] + } + ] + } + response = requests.post(api_url, json=payload, headers=headers) + return response.json() + +# Simulate actions of the robot arm +def delay(seconds, step_command): + print(f"Executing:{step_command}") + time.sleep(seconds) + print("Delay completed") + +# Extract steps +def extract_steps(text): + lines = text.split('\n') + steps = [] + step_pattern = re.compile(r'^\d+\..*') + + for line in lines: + if step_pattern.match(line.strip()): + steps.append(line.strip()) + + return steps + +# Extract objects +def extract_objects(text): + objects_part = re.search(r"Objects:\s*", text) + if not objects_part: + return "No objects section found." + + objects_text = text[objects_part.end():] + object_lists = re.findall(r"\[\d+\](.*?)(?=\n\[\d+\]|$)", objects_text) + objects = [obj.strip().split(',') for obj in object_lists if obj.strip()] + + return objects + +def main(): + initial_prompt_path = "/home/dyh/OCIA/initial_prompt.txt" + initial_prompt = read_text_from_file(initial_prompt_path) + instruction_path = "/home/dyh/OCIA/pass_me_the_fruit.txt" + instrucntion = read_text_from_file(instruction_path) + steps = [] # This will be filled after the initial API call + objects = [] + camera_index = 2 + + # Initial call to get the plan + initial_image_base64 = capture_image(camera_index) + plan_response = call_gpt4_for_planning(initial_prompt, initial_image_base64, instrucntion) + print( plan_response) + plan_text = plan_response['choices'][0]['message']['content'] + steps = extract_steps(plan_text) + objects = extract_objects(plan_text) + + # Execute the steps according to the plan + for step in steps: + print(step) + if "Done" in step: + print("Task completed successfully.") + break + + while True: + delay(5, step_command = step) + current_image_base64 = capture_image(camera_index) + step_prompt = f"Here is the image after executing {step}. Is it done correctly? The format of your answer should only be one word: correct or false." + verification_response = call_gpt4_for_judgement(prompt = step_prompt, image_base64 = current_image_base64) + print(verification_response) + verification_text = verification_response['choices'][0]['message']['content'] + print(verification_text) + if "correct" in verification_text: + print("Step completed correctly.") + break + if "Correct" in verification_text: + print("Step completed correctly.") + break + else: + print("Step not completed correctly, retrying...") + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/video_check_stage.py b/video_check_stage.py new file mode 100644 index 0000000..9baf1bb --- /dev/null +++ b/video_check_stage.py @@ -0,0 +1,141 @@ +import time +import cv2 +import tkinter as tk +from tkinter import ttk +from threading import Thread +import os +import numpy as np +import json + +# 视频路径 +video_folder = 'demonstrations/raw/put_objects_into_bowl_2/35/' +video_path = video_folder + '0.avi' +json_path = video_folder + 'records.json' + +class VideoPlayer: + def __init__(self, root, video_path, json_path): + self.root = root + self.video_path = video_path + self.json_path = json_path + self.cap = cv2.VideoCapture(video_path) + self.frame_count = int(self.cap.get(cv2.CAP_PROP_FRAME_COUNT)) + self.fps = self.cap.get(cv2.CAP_PROP_FPS) + self.duration = self.frame_count / self.fps + + self.current_frame = 0 + self.is_playing = True + self.is_running = True + + # 从 JSON 文件中读取标记数组 + self.mark_array = self.load_mark_array_from_json() + + # Tkinter window settings + self.root.title("Video Player") + self.root.protocol("WM_DELETE_WINDOW", self.on_close) + + # Create video display window + self.video_label = tk.Label(self.root) + self.video_label.pack() + + # Create progress bar + self.progress = tk.IntVar() + self.progress_bar = ttk.Scale(self.root, from_=0, to=self.frame_count, variable=self.progress, orient='horizontal') + self.progress_bar.pack(fill=tk.X, padx=10, pady=5) + + # Create Play/Pause button + self.play_pause_button = tk.Button(self.root, text="Pause", command=self.toggle_play_pause) + self.play_pause_button.pack() + + # Bind keyboard events + self.root.bind("", self.on_key_press) + + # Create thread to play video + self.play_thread = Thread(target=self.play_video) + self.play_thread.start() + + # Bind progress bar change event + self.progress_bar.bind('', self.on_progress_change) + + def load_mark_array_from_json(self): + """从 JSON 文件中读取标记数组""" + if not os.path.exists(self.json_path): + print(f"File {self.json_path} not found.") + return np.zeros(self.frame_count, dtype=int) + + try: + with open(self.json_path, 'r') as f: + data = json.load(f) + return np.array(data["/observations/stage"], dtype=int) + except Exception as e: + print(f"Failed to load JSON: {e}") + return np.zeros(self.frame_count, dtype=int) + + def toggle_play_pause(self): + # Play/pause the video + if self.is_playing: + self.is_playing = False + self.play_pause_button.config(text="Play") + else: + self.is_playing = True + self.play_pause_button.config(text="Pause") + + def play_video(self): + while self.is_running and self.cap.isOpened(): + if self.is_playing: + ret, frame = self.cap.read() + if not ret: + break + + # 获取当前帧的索引,并确保它不会超出边界 + self.current_frame = int(self.cap.get(cv2.CAP_PROP_POS_FRAMES)) + + # 防止当前帧超出标记数组的边界 + if self.current_frame >= len(self.mark_array): + self.current_frame = len(self.mark_array) - 1 + + # 获取当前帧的标记值 + mark_value = self.mark_array[self.current_frame] + + # Update the frame in the progress bar + self.progress.set(self.current_frame) + + # Convert the frame to display in tkinter + frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB) + img = cv2.resize(frame, (800, 600)) + img = cv2.cvtColor(img, cv2.COLOR_RGB2BGR) + + # 在帧上显示标记值 + cv2.putText(img, f"Mark: {mark_value}", (10, 30), cv2.FONT_HERSHEY_SIMPLEX, 1, (255, 0, 0), 2, cv2.LINE_AA) + + self.photo = tk.PhotoImage(data=cv2.imencode('.png', img)[1].tobytes()) + self.video_label.config(image=self.photo) + + time.sleep(0.1) + + self.root.update_idletasks() + + def on_progress_change(self, event): + # Seek to the selected frame + new_frame = int(self.progress.get()) + self.cap.set(cv2.CAP_PROP_POS_FRAMES, new_frame) + + def on_key_press(self, event): + # 绑定空格键来暂停和播放视频 + if event.keysym == 'space': + self.toggle_play_pause() + + def on_close(self): + # Stop the video and close the window + self.is_running = False + self.cap.release() + self.root.destroy() + +if __name__ == "__main__": + # Check if video file exists + if not os.path.exists(video_path): + print(f"Video file {video_path} not found!") + else: + # Start the video player + root = tk.Tk() + player = VideoPlayer(root, video_path, json_path) + root.mainloop() \ No newline at end of file diff --git a/video_marking_stage.py b/video_marking_stage.py new file mode 100644 index 0000000..5675859 --- /dev/null +++ b/video_marking_stage.py @@ -0,0 +1,154 @@ +import time +import cv2 +import tkinter as tk +from tkinter import ttk +from threading import Thread +import os +import numpy as np +import json + +# 视频路径 +video_folder = 'demonstrations/raw/put_objects_into_bowl_2/20/' +video_path = video_folder + '0.avi' +json_path = video_folder + 'records.json' + +class VideoPlayer: + def __init__(self, root, video_path): + self.root = root + self.video_path = video_path + self.json_path = json_path + self.cap = cv2.VideoCapture(video_path) + self.frame_count = int(self.cap.get(cv2.CAP_PROP_FRAME_COUNT)) + self.fps = self.cap.get(cv2.CAP_PROP_FPS) + self.duration = self.frame_count / self.fps + + self.current_frame = 0 + self.is_playing = True + self.is_running = True + + # 初始化标记数组 + self.mark_array = np.zeros(self.frame_count, dtype=int) + # 初始化 current_mark + self.current_mark = 0 + + # Tkinter window settings + self.root.title("Video Player") + self.root.protocol("WM_DELETE_WINDOW", self.on_close) + + # Create video display window + self.video_label = tk.Label(self.root) + self.video_label.pack() + + # Create progress bar + self.progress = tk.IntVar() + self.progress_bar = ttk.Scale(self.root, from_=0, to=self.frame_count, variable=self.progress, orient='horizontal') + self.progress_bar.pack(fill=tk.X, padx=10, pady=5) + + # Create Play/Pause button + self.play_pause_button = tk.Button(self.root, text="Pause", command=self.toggle_play_pause) + self.play_pause_button.pack() + + # Bind keyboard events + self.root.bind("", self.on_key_press) + + # Create thread to play video + self.play_thread = Thread(target=self.play_video) + self.play_thread.start() + + # Bind progress bar change event + self.progress_bar.bind('', self.on_progress_change) + + def toggle_play_pause(self): + # Play/pause the video + if self.is_playing: + self.is_playing = False + self.play_pause_button.config(text="Play") + else: + self.is_playing = True + self.play_pause_button.config(text="Pause") + + def play_video(self): + while self.is_running and self.cap.isOpened(): + if self.is_playing: + ret, frame = self.cap.read() + if not ret: + break + + # 获取当前帧的索引,并确保它不会超出边界 + self.current_frame = int(self.cap.get(cv2.CAP_PROP_POS_FRAMES)) + + # 防止当前帧超出标记数组的边界 + if self.current_frame >= len(self.mark_array): + self.current_frame = len(self.mark_array) - 1 + + # 标记当前帧的标记值 + self.mark_array[self.current_frame] = self.current_mark + + # Update the frame in the progress bar + self.progress.set(self.current_frame) + + # Convert the frame to display in tkinter + frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB) + img = cv2.resize(frame, (800, 600)) + img = cv2.cvtColor(img, cv2.COLOR_RGB2BGR) + + self.photo = tk.PhotoImage(data=cv2.imencode('.png', img)[1].tobytes()) + self.video_label.config(image=self.photo) + + time.sleep(0.1) + + self.root.update_idletasks() + + def on_progress_change(self, event): + # Seek to the selected frame + new_frame = int(self.progress.get()) + self.cap.set(cv2.CAP_PROP_POS_FRAMES, new_frame) + + def on_key_press(self, event): + # Update mark based on key press (0-9) + if event.char.isdigit(): + self.current_mark = int(event.char) + print(f"Marked all frames from now with: {self.current_mark}") + + def on_close(self): + # Stop the video and close the window + self.is_running = False + self.cap.release() + self.root.destroy() + print(f"Mark array size: {len(self.mark_array)}") + print(f"Mark array values: {self.mark_array}") + + self.save_mark_array_to_json() + + def save_mark_array_to_json(self): + """保存标记数组到 JSON 文件""" + if not os.path.exists(self.json_path): + print(f"File {self.json_path} not found.") + return + + try: + # 读取 JSON 文件 + with open(self.json_path, 'r') as f: + data = json.load(f) + + # 添加键值对 "/observations/stage": [标记数组] + data["/observations/stage"] = self.mark_array.tolist() + + # 写回 JSON 文件 + with open(self.json_path, 'w') as f: + json.dump(data, f, indent=4) + + print(f"Successfully updated {self.json_path} with the mark array.") + + except Exception as e: + print(f"Failed to update JSON: {e}") + +if __name__ == "__main__": + # Check if video file exists + if not os.path.exists(video_path): + print(f"Video file {video_path} not found!") + else: + # Start the video player + root = tk.Tk() + player = VideoPlayer(root, video_path) + root.mainloop()