Commit ·
ef994e9
1
Parent(s): d90536e
update
Browse files- .codex +0 -0
- LICENSE +21 -0
- README.md +209 -56
- scripts/__pycache__/upload_preview_to_hf.cpython-313.pyc +0 -0
- scripts/upload_preview_to_hf.py +144 -0
.codex
ADDED
|
File without changes
|
LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2026 Omni Instrument Inc.
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE.
|
README.md
CHANGED
|
@@ -1,56 +1,209 @@
|
|
| 1 |
-
---
|
| 2 |
-
language:
|
| 3 |
-
- en
|
| 4 |
-
license: mit
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
-
|
| 9 |
-
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
# Omni Instrument SLAM Project Dataset
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
license: mit
|
| 5 |
+
license_link: LICENSE
|
| 6 |
+
pretty_name: omnislamproject
|
| 7 |
+
task_categories:
|
| 8 |
+
- robotics
|
| 9 |
+
- depth-estimation
|
| 10 |
+
- keypoint-detection
|
| 11 |
+
configs:
|
| 12 |
+
- config_name: default
|
| 13 |
+
data_files:
|
| 14 |
+
- split: stereo
|
| 15 |
+
path: data/stereo-*
|
| 16 |
+
- split: stereoinertial
|
| 17 |
+
path: data/stereoinertial-*
|
| 18 |
+
- split: vio
|
| 19 |
+
path: data/vio-*
|
| 20 |
+
dataset_info:
|
| 21 |
+
features:
|
| 22 |
+
- name: image_left
|
| 23 |
+
dtype: image
|
| 24 |
+
- name: image_right
|
| 25 |
+
dtype: image
|
| 26 |
+
- name: timestamp
|
| 27 |
+
dtype: float64
|
| 28 |
+
- name: gyro
|
| 29 |
+
list: float32
|
| 30 |
+
length: 3
|
| 31 |
+
- name: accel
|
| 32 |
+
list: float32
|
| 33 |
+
length: 3
|
| 34 |
+
- name: sync_dt
|
| 35 |
+
list: float32
|
| 36 |
+
length: 2
|
| 37 |
+
- name: position
|
| 38 |
+
list: float32
|
| 39 |
+
length: 3
|
| 40 |
+
- name: orientation
|
| 41 |
+
list: float32
|
| 42 |
+
length: 4
|
| 43 |
+
splits:
|
| 44 |
+
- name: stereo
|
| 45 |
+
num_bytes: 381314848
|
| 46 |
+
num_examples: 100
|
| 47 |
+
- name: stereoinertial
|
| 48 |
+
num_bytes: 381134104
|
| 49 |
+
num_examples: 100
|
| 50 |
+
- name: vio
|
| 51 |
+
num_bytes: 370323077
|
| 52 |
+
num_examples: 100
|
| 53 |
+
download_size: 1132892975
|
| 54 |
+
dataset_size: 1132772029
|
| 55 |
+
---
|
| 56 |
+
# Omni Instrument SLAM Project Dataset
|
| 57 |
+
|
| 58 |
+
The Omni Instrument SLAM Project Dataset is a compact robotics dataset designed for evaluating stereo, visual-inertial, and visual-inertial odometry (VIO) pipelines.
|
| 59 |
+
|
| 60 |
+
It provides:
|
| 61 |
+
- [x] Stereo Image Pairs
|
| 62 |
+
- [x] Inertial measurements (IMU)
|
| 63 |
+
- [x] Ground-truth 6DoF pose (for VIO)
|
| 64 |
+
- [x] Raw ROS 1 and ROS 2 recordings
|
| 65 |
+
|
| 66 |
+
## Overview
|
| 67 |
+
|
| 68 |
+
The dataset is structured into three splits:
|
| 69 |
+
|
| 70 |
+
| Split | Description |
|
| 71 |
+
| --- | --- |
|
| 72 |
+
| `stereo` | Stereo-only (IMU stationary) |
|
| 73 |
+
| `stereoinertial` | Stereo + IMU |
|
| 74 |
+
| `vio` | Stereo + IMU + ground-truth pose |
|
| 75 |
+
|
| 76 |
+
All splits share the same schema, enabling consistent downstream pipelines.
|
| 77 |
+
|
| 78 |
+
## Data Collection Protocol
|
| 79 |
+
|
| 80 |
+
1. Stereo (Calibration - Static Sensor)
|
| 81 |
+
- Robot body stationary
|
| 82 |
+
- Camera and IMU fixed
|
| 83 |
+
- AprilTag calibration grid moves in front of the camera
|
| 84 |
+
|
| 85 |
+
Purpose:
|
| 86 |
+
- Stereo camera calibration
|
| 87 |
+
- Intrinsics/extrinsics estimation
|
| 88 |
+
|
| 89 |
+
2. Stereo-Inertial (Calibration - Moving Sensor)
|
| 90 |
+
- Robot body moves
|
| 91 |
+
- Camera and IMU move together
|
| 92 |
+
- AprilTag calibration grid stationary
|
| 93 |
+
|
| 94 |
+
Purpose:
|
| 95 |
+
- Camera-IMU extrinsic calibration
|
| 96 |
+
- Temporal synchronization validation
|
| 97 |
+
- Motion-consistent calibration
|
| 98 |
+
|
| 99 |
+
3. VIO (Operational SLAM Sequence)
|
| 100 |
+
- Robot moves freely in the environment
|
| 101 |
+
- No calibration targets (no April grids)
|
| 102 |
+
- Natural scene observations
|
| 103 |
+
|
| 104 |
+
Includes:
|
| 105 |
+
- Stereo images
|
| 106 |
+
- IMU data
|
| 107 |
+
- Ground-truth odometry
|
| 108 |
+
|
| 109 |
+
Purpose:
|
| 110 |
+
- Visual-inertial odometry (VIO)
|
| 111 |
+
- SLAM evaluation
|
| 112 |
+
- Sensor fusion benchmarking
|
| 113 |
+
|
| 114 |
+
## Data Format
|
| 115 |
+
|
| 116 |
+
Each example follows the same top-level schema. Some fields are split-dependent:
|
| 117 |
+
|
| 118 |
+
- `stereo`: images + `timestamp` (IMU is stationary; pose not provided)
|
| 119 |
+
- `stereoinertial`: adds IMU (`gyro`, `accel`) and time offsets (`sync_dt`)
|
| 120 |
+
- `vio`: adds ground-truth pose (`position`, `orientation`)
|
| 121 |
+
|
| 122 |
+
Example record:
|
| 123 |
+
```json
|
| 124 |
+
{
|
| 125 |
+
"image_left": { "path": "left/0.000000.png", "bytes": null },
|
| 126 |
+
"image_right": { "path": "right/0.000000.png", "bytes": null },
|
| 127 |
+
"timestamp": 0.0,
|
| 128 |
+
|
| 129 |
+
"gyro": [0.0, 0.0, 0.0],
|
| 130 |
+
"accel": [0.0, 0.0, 0.0],
|
| 131 |
+
|
| 132 |
+
"sync_dt": [0.0, 0.0],
|
| 133 |
+
|
| 134 |
+
"position": [0.0, 0.0, 0.0],
|
| 135 |
+
"orientation": [0.0, 0.0, 0.0, 1.0]
|
| 136 |
+
}
|
| 137 |
+
```
|
| 138 |
+
|
| 139 |
+
Notes:
|
| 140 |
+
- `gyro` is in rad/s and `accel` is in m/s^2.
|
| 141 |
+
- `sync_dt = [dt_right, dt_imu]` are time offsets (in seconds) relative to `timestamp` (left image):
|
| 142 |
+
- `dt_right = t_right - t_left`
|
| 143 |
+
- `dt_imu = t_imu - t_left`
|
| 144 |
+
|
| 145 |
+
### Sampling Methodology
|
| 146 |
+
|
| 147 |
+
Each split contains 100 randomly sampled, synchronized frames:
|
| 148 |
+
- Uniform sampling across the trajectory
|
| 149 |
+
- Start/end trimmed to remove initialization artifacts
|
| 150 |
+
|
| 151 |
+
Synchronization constraints:
|
| 152 |
+
|
| 153 |
+
| Constraint | Threshold |
|
| 154 |
+
| --- | --- |
|
| 155 |
+
| `|t_left - t_right|` | `<= 5 ms` |
|
| 156 |
+
| `|t_left - t_imu|` | `<= 5 ms` |
|
| 157 |
+
| `|t_left - t_odom|` (VIO only) | `<= 5 ms` |
|
| 158 |
+
|
| 159 |
+
### Missing Data Handling
|
| 160 |
+
|
| 161 |
+
For splits without ground truth (stereo, stereoinertial):
|
| 162 |
+
|
| 163 |
+
```text
|
| 164 |
+
position = [inf, inf, inf]
|
| 165 |
+
orientation = [inf, inf, inf, inf]
|
| 166 |
+
```
|
| 167 |
+
|
| 168 |
+
### ROS Topics
|
| 169 |
+
|
| 170 |
+
#### ROS 1 (Calibration)
|
| 171 |
+
```text
|
| 172 |
+
/stereo/left/color/image_raw
|
| 173 |
+
/stereo/right/color/image_raw
|
| 174 |
+
/imu/data
|
| 175 |
+
```
|
| 176 |
+
|
| 177 |
+
#### ROS 2 (VIO)
|
| 178 |
+
```text
|
| 179 |
+
/stereo/left/color/image_raw
|
| 180 |
+
/stereo/right/color/image_raw
|
| 181 |
+
/imu/data
|
| 182 |
+
/ground_truth/odom
|
| 183 |
+
/tf
|
| 184 |
+
```
|
| 185 |
+
|
| 186 |
+
## Example Usage
|
| 187 |
+
|
| 188 |
+
```python
|
| 189 |
+
from datasets import load_dataset
|
| 190 |
+
import numpy as np
|
| 191 |
+
|
| 192 |
+
ds = load_dataset("OmniInstrument/SLAM_project", split="vio")
|
| 193 |
+
sample = ds[0]
|
| 194 |
+
|
| 195 |
+
img_l = sample["image_left"]
|
| 196 |
+
img_r = sample["image_right"]
|
| 197 |
+
|
| 198 |
+
gyro = sample["gyro"]
|
| 199 |
+
accel = sample["accel"]
|
| 200 |
+
|
| 201 |
+
pos = sample["position"]
|
| 202 |
+
quat = sample["orientation"]
|
| 203 |
+
|
| 204 |
+
if not np.isinf(np.asarray(pos)).any():
|
| 205 |
+
print("Ground truth available")
|
| 206 |
+
```
|
| 207 |
+
|
| 208 |
+
## License
|
| 209 |
+
This software and dataset are released under the [MIT License](LICENSE).
|
scripts/__pycache__/upload_preview_to_hf.cpython-313.pyc
ADDED
|
Binary file (6.53 kB). View file
|
|
|
scripts/upload_preview_to_hf.py
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
|
| 3 |
+
import argparse
|
| 4 |
+
import math
|
| 5 |
+
import os
|
| 6 |
+
|
| 7 |
+
import pandas as pd
|
| 8 |
+
from datasets import Dataset, Features, Image, Sequence, Value
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
def parse_args():
|
| 12 |
+
parser = argparse.ArgumentParser()
|
| 13 |
+
parser.add_argument("--data", required=True, help="Path to preview folder")
|
| 14 |
+
parser.add_argument("--repo", required=True, help="HF dataset repo (e.g. org/name)")
|
| 15 |
+
parser.add_argument("--split", default="preview", help="Dataset split name")
|
| 16 |
+
return parser.parse_args()
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
def _coerce_dt(x: object) -> float:
|
| 20 |
+
"""Coerce merge-produced values (NaN/None/str) into a sane float offset."""
|
| 21 |
+
try:
|
| 22 |
+
v = float(x)
|
| 23 |
+
except (TypeError, ValueError):
|
| 24 |
+
return 0.0
|
| 25 |
+
if math.isnan(v) or math.isinf(v):
|
| 26 |
+
return 0.0
|
| 27 |
+
return v
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
def main():
|
| 31 |
+
args = parse_args()
|
| 32 |
+
|
| 33 |
+
data_dir = args.data
|
| 34 |
+
imu_path = os.path.join(data_dir, "imu.csv")
|
| 35 |
+
odom_path = os.path.join(data_dir, "odom.csv")
|
| 36 |
+
|
| 37 |
+
if not os.path.exists(imu_path):
|
| 38 |
+
raise FileNotFoundError(f"imu.csv not found in {data_dir}")
|
| 39 |
+
|
| 40 |
+
print("Loading IMU data...")
|
| 41 |
+
imu = pd.read_csv(imu_path)
|
| 42 |
+
|
| 43 |
+
# Normalize timestamps (filename-friendly and merge-stable).
|
| 44 |
+
imu["t"] = imu["t"].map(lambda x: f"{float(x):.6f}")
|
| 45 |
+
|
| 46 |
+
has_odom = os.path.exists(odom_path)
|
| 47 |
+
if has_odom:
|
| 48 |
+
print("Loading ODOM data...")
|
| 49 |
+
odom = pd.read_csv(odom_path)
|
| 50 |
+
odom["t"] = odom["t"].map(lambda x: f"{float(x):.6f}")
|
| 51 |
+
df = pd.merge(imu, odom, on="t", how="left")
|
| 52 |
+
else:
|
| 53 |
+
print("No odom.csv found -> filling pose with inf")
|
| 54 |
+
df = imu.copy()
|
| 55 |
+
|
| 56 |
+
print(f"Rows after merge: {len(df)}")
|
| 57 |
+
|
| 58 |
+
left_paths = []
|
| 59 |
+
right_paths = []
|
| 60 |
+
timestamps = []
|
| 61 |
+
gyro = []
|
| 62 |
+
accel = []
|
| 63 |
+
sync_dt = []
|
| 64 |
+
position = []
|
| 65 |
+
orientation = []
|
| 66 |
+
|
| 67 |
+
missing = 0
|
| 68 |
+
for _, row in df.iterrows():
|
| 69 |
+
t = row["t"]
|
| 70 |
+
|
| 71 |
+
l = os.path.join(data_dir, "left", f"{t}.png")
|
| 72 |
+
r = os.path.join(data_dir, "right", f"{t}.png")
|
| 73 |
+
|
| 74 |
+
if not os.path.exists(l) or not os.path.exists(r):
|
| 75 |
+
missing += 1
|
| 76 |
+
continue
|
| 77 |
+
|
| 78 |
+
left_paths.append(l)
|
| 79 |
+
right_paths.append(r)
|
| 80 |
+
timestamps.append(float(t))
|
| 81 |
+
|
| 82 |
+
# IMU
|
| 83 |
+
gyro.append([row["gx"], row["gy"], row["gz"]])
|
| 84 |
+
accel.append([row["ax"], row["ay"], row["az"]])
|
| 85 |
+
|
| 86 |
+
# Sync offsets (seconds) relative to the left-image timestamp.
|
| 87 |
+
dt_r = _coerce_dt(row.get("dt_right", 0.0))
|
| 88 |
+
dt_i = _coerce_dt(row.get("dt_imu", 0.0))
|
| 89 |
+
sync_dt.append([dt_r, dt_i])
|
| 90 |
+
|
| 91 |
+
# ODOM (optional)
|
| 92 |
+
if has_odom:
|
| 93 |
+
position.append([row["px"], row["py"], row["pz"]])
|
| 94 |
+
orientation.append([row["qx"], row["qy"], row["qz"], row["qw"]])
|
| 95 |
+
else:
|
| 96 |
+
position.append([math.inf, math.inf, math.inf])
|
| 97 |
+
orientation.append([math.inf, math.inf, math.inf, math.inf])
|
| 98 |
+
|
| 99 |
+
if not left_paths:
|
| 100 |
+
raise RuntimeError("No valid samples found")
|
| 101 |
+
|
| 102 |
+
if missing:
|
| 103 |
+
print(f"Skipped {missing} rows due to missing images")
|
| 104 |
+
|
| 105 |
+
print(f"Final dataset size: {len(left_paths)}")
|
| 106 |
+
|
| 107 |
+
features = Features(
|
| 108 |
+
{
|
| 109 |
+
"image_left": Image(),
|
| 110 |
+
"image_right": Image(),
|
| 111 |
+
"timestamp": Value("float64"),
|
| 112 |
+
"gyro": Sequence(Value("float32"), length=3),
|
| 113 |
+
"accel": Sequence(Value("float32"), length=3),
|
| 114 |
+
"sync_dt": Sequence(Value("float32"), length=2),
|
| 115 |
+
"position": Sequence(Value("float32"), length=3),
|
| 116 |
+
"orientation": Sequence(Value("float32"), length=4),
|
| 117 |
+
}
|
| 118 |
+
)
|
| 119 |
+
|
| 120 |
+
data = {
|
| 121 |
+
"image_left": left_paths,
|
| 122 |
+
"image_right": right_paths,
|
| 123 |
+
"timestamp": timestamps,
|
| 124 |
+
"gyro": gyro,
|
| 125 |
+
"accel": accel,
|
| 126 |
+
"sync_dt": sync_dt,
|
| 127 |
+
"position": position,
|
| 128 |
+
"orientation": orientation,
|
| 129 |
+
}
|
| 130 |
+
|
| 131 |
+
print("Creating Hugging Face dataset...")
|
| 132 |
+
ds = Dataset.from_dict(data, features=features)
|
| 133 |
+
|
| 134 |
+
print(ds)
|
| 135 |
+
|
| 136 |
+
print(f"Pushing to {args.repo} (split={args.split})...")
|
| 137 |
+
ds.push_to_hub(args.repo, split=args.split)
|
| 138 |
+
|
| 139 |
+
print("Done.")
|
| 140 |
+
|
| 141 |
+
|
| 142 |
+
if __name__ == "__main__":
|
| 143 |
+
main()
|
| 144 |
+
|