Datasets:
Download DATA_DICTIONARY.md from twerdster/HandNet: direct link, hf CLI and curl.
- Browser
- Download file 7.13 kB
-
https://huggingface.co/datasets/twerdster/HandNet/resolve/main/DATA_DICTIONARY.md
- Command line
-
hf download hf://datasets/twerdster/HandNet/DATA_DICTIONARY.md
-
curl -L -o DATA_DICTIONARY.md https://huggingface.co/datasets/twerdster/HandNet/resolve/main/DATA_DICTIONARY.md
HandNet data dictionary
Each Data*.mat example contains images, measured sensor poses and frame metadata. The native image grid is 240 rows by 320 columns. Arrays retain their stored MATLAB shapes when loaded with scipy.io.loadmat; avoid blindly squeezing every array.
The schema below combines the original viewer/preparation code with inspection of seven examples across five ZIP archives. Dtypes can vary across transformations. The original RAR training examples were not individually inspected for this dictionary.
| Field | Observed shape / type | Interpretation |
|---|---|---|
depth |
(240, 320), uint16 |
Depth in millimetres; zero indicates no depth measurement. |
ir |
(240, 320), uint8 |
Monochrome infrared image, not RGB. |
pos |
(3, 6), float32 |
Six measured, placement-adjusted sensor positions in camera-space millimetres. Rows are X, Y, Z. |
rot |
(3, 3, 6), float32 |
Six sensor orientation matrices; columns of each matrix are the sensor's local axes in camera coordinates. |
lbl |
(240, 320), uint8 or uint32 |
Generated pixel labels, with observed IDs 0 through 7. These encode projected hand/fingertip regions, not anatomical joint coordinates. |
hmap |
(240, 320, 6), float32 |
Six generated sensor heatmap channels, following the sensor order below. Typical stored values range from approximately exp(-5) to 1; channels may contain NaNs for out-of-frame sensors. |
segmap |
(240, 320), uint8 |
Hand segmentation mask. Original examples use 0/255 and transformed examples can use 0/1; use segmap != 0. |
handPos |
(3, 1), float32 |
Detected/segmented hand centre in camera-space millimetres, used for centring and cropping. It is not identical to the measured palm sensor. |
bbox |
(1, 4), float32 |
Image-space bounding rectangle [x, y, width, height] as used by the original MATLAB image routines. |
session |
MATLAB character data | Recording-session identifier. |
idx |
(1, 1), observed uint16 |
Frame index within a recording session. |
gidx |
(1, 1), observed uint16 or int32 |
Global frame index; preserve this stored value when tracking chronology. |
angle |
(1, 1), observed float64 |
Angle metadata present in transformed examples; degrees. Do not assume this field exists in original examples. |
Sensor order
| Python index | MATLAB index | Sensor |
|---|---|---|
| 0 | 1 | Thumb |
| 1 | 2 | Index fingertip |
| 2 | 3 | Middle fingertip |
| 3 | 4 | Ring fingertip |
| 4 | 5 | Little fingertip |
| 5 | 6 | Palm / back-of-hand sensor |
For example, pos[:, 5] and rot[:, :, 5] describe the measured palm sensor in Python. No intermediate knuckle positions are supplied by these arrays. Connecting fingertips to the palm is a schematic annotation display, not measured bone geometry.
The first five heatmap channels follow the fingertip ordering and the sixth follows the palm sensor. Direct inspection of original examples confirms the sixth channel's peak at the projected palm location. This stored palm heatmap is distinct from the non-fingertip supervision described for the paper's detector. Do not infer a complete anatomical label taxonomy from numeric label IDs alone; label 7 is left unnamed here.
Camera coordinates and projection
The camera frame has +X to image right, +Y down and +Z away from the camera. Depth and pos use millimetres. For a stored image of width 320 and height 240, use zero-based pixel coordinates u = column, v = row for the original calibration:
fx = 240.30773969018747
fy = 240.07488537862218
cx = 178.29264757987775
cy = 117.9581118815394
Z = depth[v, u]
X = (u - cx) * Z / fx
Y = (v - cy) * Z / fy
# Reproject a camera-space sensor:
u_sensor = fx * X_sensor / Z_sensor + cx
v_sensor = fy * Y_sensor / Z_sensor + cy
Discard zero depth before forming a cloud. A sensor's projection can lie outside the image or behind a visible surface; do not replace measured 3D coordinates with heatmap peaks. The separate calibration.json stores this matrix and its sources. No distortion coefficients are supplied in the original Parameters.mat; the viewer uses the matrix directly.
The historical bounding rectangle belongs to MATLAB image coordinates. Its origin should not be assumed to share the zero-based camera-ray convention. Check a crop against the displayed image when reproducing historical preprocessing.
Masks, heatmaps and preprocessing
Keep the unchanged archive data as the source of truth. Convert masks with segmap.astype(bool) and account for depth == 0. For display, normalize finite heatmap values and map NaNs to zero. Preserve raw arrays if exporting annotations; normalization is a consumer transformation.
The historical HDF5 preparation script centres depth on handPos[2], divides by 125 mm, clips to [-1, 1], and sets missing/background pixels to +1. It produces a 96-by-96 crop and contrast-normalized scales of 96, 48 and 24 pixels, with 18-by-18 heatmap targets. These are processing choices, not the native archive image shape.
Transformations and split identity
DerotGT means orientation normalization using measured ground-truth palm orientation. Perturbed variants apply uniformly sampled in-plane rotations between -90 and +90 degrees. The original rotation routine updates images and sensor poses together around the camera principal point and camera Z axis. A ground-truth transformation does not constitute a learned orientation estimate.
The examples were filtered and shuffled before release. session, idx and gidx carry ordering information. The original project also supplies Indices.mat in its repository; it is linked rather than repackaged in this dataset. Random frame splits are not participant-disjoint splits.
Derived Parquet preview
preview/samples.parquet contains 96 visualization rows, not all 214,971 original frames. Its depth, infrared and labels columns are embedded display PNGs with Hugging Face Image metadata; they are not the native arrays above. Sensor positions are stored as sensor_xyz_mm with shape (6, 3), transposed from the MATLAB pos convention. Each of the six sensor_rotations_rowmajor entries contains nine values that reshape to a 3-by-3 matrix in row-major order. source_archive, source_member and source_mat_sha256 identify the native source. See the preview schema for all fields.
Sources
- Original data viewer and camera-ray convention
- Camera matrix
- Historical HDF5 preparation
- Transformation routine
- DeROT angle computation
- Paper
These links preserve provenance. They do not change the historical source code's license.