File size: 5,624 Bytes
31c3691 bc43eae |
1 2 3 4 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 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
---
configs:
- config_name: pose_data
data_files: "pose_data/metadata.jsonl"
- config_name: force_data
data_files: "force_data/metadata.jsonl"
- config_name: tacniq_gsmini
data_files: "tacniq_gsmini/metadata.jsonl"
- config_name: xela_9dtact
data_files: "xela_9dtact/metadata.jsonl"
---
# PairTouch 13M Dataset
Multi-modal tactile dataset with pose, force, and tactile sensor data.
## Configs
| Config | Description | Sensors |
|--------|-------------|---------|
| `pose_data` | Pose estimation data | tac02/xela + camera |
| `force_data` | Force measurement data | tac02/xela + gelsight |
| `tacniq_gsmini` | TacNIQ + GSMini data | tacniq + gsmini |
| `xela_9dtact` | XELA + 9DTact data | xela + 9dtact |
## Usage
```python
from datasets import load_dataset
# Load specific config
ds = load_dataset("BorisGuo/pair_touch_13m", "pose_data")
```
## Tactile Sensors
### tac02 / tacniq
- **Taxel layout**: 11 x 6 = 66 taxels
- **Force type**: Z-axis normal force only
- **Dead taxels**: Index 0 (top-left) and 5 (top-right) always read 0, should be ignored
```
Taxel indices:
[ 0][ 1][ 2][ 3][ 4][ 5] <- Row 0 (index 0, 5 are dead)
[ 6][ 7][ 8][ 9][10][11] <- Row 1
...
[60][61][62][63][64][65] <- Row 10
```
### xela
- **Taxel layout**: 4 x 6 = 24 taxels
- **Force type**: 3D force (X, Y, Z axes), total 72 values (24 x 3)
- **Data format**: Flattened as [x0, y0, z0, x1, y1, z1, ..., x23, y23, z23]
## Sampling Frequency
### force_data (1 tactile sample per frame)
| Dataset | Frame Rate | Tactile Sensor |
|---------|------------|----------------|
| 9dtact_force_h5 | ~10 Hz | - |
| gelsight_force_h5 | ~25 Hz | - |
| tac02_force_h5 | ~200 Hz | tac02 |
| xela_force_h5 | ~100 Hz | xela |
### pose_data (multiple tactile samples per frame)
| Dataset | Frame Rate | Samples/Frame | Effective Tactile Rate |
|---------|------------|---------------|------------------------|
| tac02_pose_h5 | ~7.5 Hz | 20 | ~150 Hz |
| xela_pose_h5 | ~7.5 Hz | 10 | ~75 Hz |
| gelsight_pose_h5 | ~7.5 Hz | - | - |
| 9dtact_pose_h5 | ~7.5 Hz | - | - |
### Paired sensor data
| Dataset | Frame Rate | Sensors |
|---------|------------|---------|
| tacniq_gsmini | 10 Hz | tacniq + gsmini |
| xela_9dtact | 10 Hz | xela + 9dtact |
## Data Fields
- `file_name`: Path to image file
- `episode_id`: Episode identifier
- `frame_idx`: Frame index within episode
- `timestamp`: Timestamp
- `rotation`: 3D rotation
- `translation`: 3D translation
- `tactile`: tac02 sensor matrix (11x6 taxels, Z-axis only)
- `xela`: XELA sensor matrix (4x6x3 taxels, 3D force)
- `tacniq`: TacNIQ sensor matrix (same as tac02)
- `video`: Episode video path
## Data Dimensions
- `images`: (N, S, 224, 224, 3) - N frames, S samples per frame
- `tactile` (pose_data): (N, 20, 66) - N frames, 20Hz sampling, 66 taxels (11x6)
- `xela` (pose_data): (N, 10, 72) - N frames, 10Hz sampling, 72 values (4x6x3)
- `tactile/xela` (force_data): (N, 66) or (N, 72) - 1 sample per frame
## Preprocessing
Use `preprocess.py` for data processing:
```bash
# Parse H5 files to JSON/images
python preprocess.py extract
# Check H5 structure (without parsing)
python preprocess.py extract --check
# Update metadata (add heatmap/video paths)
python preprocess.py extract --update
# Generate heatmaps
python preprocess.py heatmap
python preprocess.py heatmap --test # Test mode
python preprocess.py heatmap --type tac02_pose # Specific type
# Generate xela marker flow (point displacement visualization)
python preprocess.py marker_flow
python preprocess.py marker_flow --test
python preprocess.py marker_flow --type xela_pose
# Generate videos
python preprocess.py video
python preprocess.py video --test
# Pack images into tar files (reduce file count for HF upload)
python preprocess.py pack # Pack only
python preprocess.py pack --delete # Pack and delete original PNGs
# Unpack images from tar files
python preprocess.py unpack # Unpack only
python preprocess.py unpack --delete # Unpack and delete tar files
# Clean up (delete all PNGs, keep only videos)
python preprocess.py clean
# Upload to Hugging Face
python preprocess.py upload # 只上传/更新,不删除远端文件
python preprocess.py upload --sync # 同步模式:删除远端存在但本地不存在的文件
# Full pipeline (extract -> heatmap -> video -> update)
python preprocess.py all
```
### Heatmap Types
| Type | Description |
|------|-------------|
| `tac02_pose` | pose_data/tac02_pose_h5 |
| `xela_pose` | pose_data/xela_pose_h5 |
| `pose` | All pose_data |
| `tac02_force` | force_data/tac02_force_h5 |
| `xela_force` | force_data/xela_force_h5 |
| `force` | All force_data |
| `tacniq_gsmini` | tacniq_gsmini |
| `xela_9dtact` | xela_9dtact |
| `all` | Everything |
### Video Types
| Type | Description |
|------|-------------|
| `9dtact_force` | force_data/9dtact_force_h5 |
| `xela_force` | force_data/xela_force_h5 |
| `gelsight_force` | force_data/gelsight_force_h5 |
| `tac02_force` | force_data/tac02_force_h5 |
| `gelsight_pose` | pose_data/gelsight_pose_h5 |
| `9dtact_pose` | pose_data/9dtact_pose_h5 |
| `tac02_pose` | pose_data/tac02_pose_h5 |
| `xela_pose` | pose_data/xela_pose_h5 |
| `xela_pose_flow` | pose_data/xela_pose_h5 marker_flow (video_flow.mp4) |
| `xela_force_flow` | force_data/xela_force_h5 marker_flow (video_flow.mp4) |
| `xela_9dtact_flow` | xela_9dtact marker_flow (video_flow.mp4) |
| `tacniq_gsmini` | tacniq_gsmini (video_gsmini.mp4 + video_tacniq.mp4) |
| `xela_9dtact` | xela_9dtact (video_9dtact.mp4 + video_xela.mp4) |
| `all` | Everything |
|