Related Experiment Video
Updated: Aug 29, 2025

06:49
Evaluation of a Smartphone-based Human Activity Recognition System in a Daily Living Environment
Published on: December 11, 2015
9.0K
Effects of sliding window variation in the performance of acceleration-based human activity recognition using deep
Milagros Jaén-Vargas1, Karla Miriam Reyes Leiva1,2, Francisco Fernandes3
1Bioinstrumentation and Nanomedicine Laboratory, Center for Biomedical Technology, Universidad Politécnica de Madrid, Madrid, Spain.
Peerj. Computer Science
|September 12, 2022
Summary
The optimal sliding window size for human activity recognition using deep learning is 20-25 frames. This window size balances high accuracy with faster processing times, outperforming both smaller and larger windows.
Area of Science:
- Computer Science
- Biomedical Engineering
Background:
- Deep learning (DL) models significantly enhance human activity recognition (HAR) accuracy compared to traditional methods.
- DL models extract features from raw time-series acceleration data, improving HAR performance.
- Sliding windows are a key feature extraction technique for time-series data preprocessing.
Purpose of the Study:
- To determine the optimal sliding window size for HAR using DL models.
- To analyze the impact of window size on accuracy and processing efficiency.
- To compare model performance across different window sizes and data sources (IMU and MOCAP).
Main Methods:
- Four DL models were evaluated: DNN, CNN, LSTM, and CNN-LSTM.
- Sliding window sizes ranged from 5 to 200 frames with fixed overlap.
- Performance was assessed using raw acceleration data from wearable IMU sensors and motion caption systems (MOCAP) for walking, sit-to-stand, and squatting activities.
Main Results:
- An optimal window size of 20-25 frames (0.20-0.25s) was identified for both IMU and MOCAP data, achieving high accuracy (up to 99.07%) and F1-scores (up to 87.08% with CNN-LSTM).
- Larger window sizes (100-200 frames) showed minimal accuracy gains but reduced processing efficiency.
- Smaller windows (below 20 frames) resulted in a decrease in F1-score, indicating a loss of performance.
Conclusions:
- The 20-25 frame sliding window offers the best trade-off between accuracy and processing speed for HAR.
- Deep learning models, particularly CNN-LSTM and LSTM, are effective for HAR with optimized window sizes.
- Efficient preprocessing via optimized sliding windows is crucial for real-time HAR applications.

