This repository contains the official artifact for the paper "Wandatch: Infrastructure-Free Point-to-Command with Smartwatches and Speakers".
To ensure the code runs correctly, the folders must be organized as follows:
.
├── dataset/
│ └── gesture/
│ └── indoor-localization/
├── exps/
│ └── gesture/
│ └── indoor-localization/
└── README.md
dataset/: This directory contains all the data files required for the experiments.
exps/: This directory contains the source code and scripts files used to run the experiments.
Matlab:
- Version: R2022b.
- Required Toolboxes (Critical):
- Signal Processing Toolbox: Required for signal filtering and transformation.
- Statistics and Machine Learning Toolbox: Required for cdfplot and statistical analysis.
Note for Standalone Execution: If you do not have a MATLAB license, we provide a standalone
.exefor the MATLAB (localization and single-stroke recognition). This requires the free MATLAB Runtime (R2022b).
Python:
Creating an environment based on Anaconda by running the following commands:
conda create -n wandatch python=3.10
conda activate wandatch
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu126
pip install scikit-learn numba fastdtwImportant: You must set the MATLAB working directory to the folder containing the script (e.g., <root>/exps/indoor-localization/) before running. This ensures relative paths for util/ and dataset/ are resolved correctly.
Fig. 18: Run the script exps/indoor-localization/Fig18.m with Matlab.
Fig. 19: Run the script exps/indoor-localization/Fig19.m with Matlab.
Run the script exps/micro/run.py with Python:
cd exps/micro
conda activate wandatch
python run.py --trainingThe console will display the accuracy, false alarm rate (FAR), and F1 Score.
Important: You must set the MATLAB working directory to the folder containing the script (e.g., <root>/exps/single-stroke/) before running. This ensures relative paths for util/ and dataset/ are resolved correctly.
Run the script exps/single-stroke/SingleStroke.m with Matlab.
The console will display the average accuracy and the confusion matrix.
Run the script exps/multi-stroke/run.py with Python:
cd exps/multi-stroke
conda activate wandatch
python main.py --training