InGesture: An Eight-Class Inertial Sensor Dataset for Fluid Intake and Hand-Gesture Recognition

Published: 29 April 2025| Version 1 | DOI: 10.17632/fdxst56tcj.1
Contributors:
Pedro Daniel Gohl, Amanda Nicole Spellen, Laura Isabelle Queiroz, Eduardo James Souto

Description

Data are organized into a hierarchical folder structure designed for easy access and efficient use. At the top level, the dataset is divided into subject-specific folders labeled sequentially (e.g., Subject01, Subject02). Each subject folder contains data collected across one or more sessions, organized systematically. Within each session folder, there are two primary data formats: segmented gesture instances and continuous full-session recordings. Segmented gesture instance CSV files contain data corresponding exclusively to individual gestures. Each file features columns for timestamp (time of data capture), three-axis accelerometer readings (x, y, z), and gyroscope readings (gx, gy, gz). These files isolate gesture events from continuous recordings, capturing only the precise interval of each gesture. File naming conventions include critical metadata: gesture type, occurrence number, segment length, subject identifier, dominant hand, and container type used (e.g., fluid_intake_1_900.csv, answering_phone_1_800.csv). Approximately 5400 segmented files result from this structure (four occurrences of each of the eight gesture types across 65 sessions). The continuous full-session CSV files provide comprehensive raw sensor data annotated over approximately ten-minute recording periods. Each continuous file includes columns for timestamp, accelerations (accX, accY, accZ), angular velocities (asX, asY, asZ), magnetometer readings (hX, hY, hZ), and explicit gesture labels. Labels range from 0 to 7: 0 represents free activity (no gesture), 1 is fluid intake, 2 answering the phone, 3 scratching the head, 4 passing hand over face, 5 adjusting glasses, 6 holding the chin, and 7 stretching hands behind the neck. This labeling enables precise identification of intervals for each gesture occurrence. Annotations for continuous data were collected in real-time via a synchronized application marking the exact start and end of gestures. Hence, continuous session files accurately represent gesture sequences as performed, including natural transitions and variations in duration. A typical session begins in a free state (label 0), progressing sequentially through multiple gestures as defined by the experimental protocol.

Files

Steps to reproduce

All the scripts are within the dataset_utils.ipynb (python notebook) Set base_dir to the root of your dataset directory (the folder containing your subject subfolders), for example: base_dir = "./InGesture/" Compute summary statistics (number of gestures per subject, raw file counts, total samples, etc.) In the final cells you can call: • summarize_dataset(base_dir) – prints a table with counts per subject • subject = os.path.join(base_dir, "subject_1") (to target Subject01 or change to another folder) • plot_gesture(subject, 'fluid_intake') – plots every “fluid intake” occurrence for that subject • plot_raw_data(subject) – shows the full continuous recording with colored background per label DEPENDENCIES Make sure you have pandas, numpy and matplotlib installed. For example, in your shell run: pip install pandas numpy matplotlib SUMMARY STATISTICS The summarize_dataset function walks through each subject folder, counts how many files exist for each gesture name, how many raw recordings there are, and totals up all samples. It returns a DataFrame you can view or export. PLOTTING FUNCTIONS • plot_gesture(subject_folder, gesture_name): looks for files named gesture_name__*.csv and plots x/y/z and gx/gy/gz vs. sample index at 200 Hz. • plot_raw_data(subject_folder): loads each full-length CSV (those without "__"), splits by the label column into contiguous segments, shades the background by label, and plots accX/Y/Z and asX/Y/Z vs. sample index. EXAMPLE USAGE – Print the overall summary: summarize_dataset(base_dir) – Plot each gesture for Subject01: plot_gesture(subject, 'adjusting_glasses') plot_gesture(subject, 'answering_phone') plot_gesture(subject, 'fluid_intake') … – Plot the raw continuous recording (with label shading): plot_raw_data(subject)

Institutions

  • Universidade Federal do Amazonas

Categories

Gesture Recognition

Licence