Dzaky Zakiyal Fawwaz

Center for IoT Innovation (CITI), NTUST, Taiwan · 2018

Human Activity Recognition for Security Check & Hand Washing

AI Research Intern (two-person team)

Human Activity Recognition for Security Check & Hand Washing

Problem

Industries rely on safety and cleanliness checks, but there is no guarantee every employee performs them to the standard, and placing an expert to watch everyone does not scale. A computer can check automatically, but it first has to recognize the motion. Frame-level features from a 2D CNN miss the temporal pattern of an activity.

Approach

Instead of feeding whole frames to the model, we turned each frame into OpenPose keypoints: 25 body points for security check, and 21 points per hand for hand washing, each with x, y, and a confidence value. The keypoints are flattened, stacked into 20-frame sequences with a frame lag of 2, and classified by an LSTM (256 units) followed by dense layers. We recorded our own 1080p, 30 FPS dataset: 150 security-check videos and 240 hand-washing videos from 5 people across 7 activities.

Architecture

Hover a component to trace its connections · drag to pan · use + / − to zoom

  • Source
  • Processing
  • Model
  • Output

How It Works

  1. RecordActivity videos at 1920×1080 and 30 FPS, one person per clip.
  2. Extract poseOpenPose gives body keypoints (security check) or both hands’ keypoints (hand wash) per frame.
  3. Build sequencesFlatten the keypoints into 20-frame sequences. A frame lag of 2 adds the previous frames to each step, giving a 3D input (samples × timesteps × features).
  4. ClassifyLSTM (256) → dense 128 → 64 → 32 (ReLU) → softmax over the activities.
  5. EvaluateRandom 80:20 train/test split made after building the frame-lag sequences, RMSProp with cross-entropy for 100 epochs, then tests on video and a live camera.

What I Built

  • Two self-recorded datasets: security check (rub head, rub left hand, rub right hand, rub feet) and hand washing (rub hands, rub backhand, splash hands).
  • An OpenPose keypoint pipeline that turns raw video into flattened, frame-lagged pose sequences.
  • An LSTM activity classifier per use case, trained and tested in Keras/TensorFlow.
  • A demo that recognizes activities from recorded video and a live camera.

Impact

The model reached 98% test accuracy on security check and 63% on hand washing, showing that pose keypoints are enough to recognize full-body routines. Hand washing was harder because not every keypoint carries a major movement. Our recommendations were feature selection, better camera angles, more varied data, and checking that the water is actually flowing.

Screenshots & Figures

System flowchart from video to recognized activity
End to end: extract pose points, flatten, build frame-lag sequences, split, train the LSTM, then recognize.
OpenPose skeletons for the four security-check activities
Security check: rub head, rub left hand, rub right hand, and rub feet, with body keypoints from OpenPose.
OpenPose skeletons with hand keypoints for hand washing
Hand wash: rub hands, rub backhand, and splash hands, using the 21 keypoints of each hand.
Training and validation accuracy curves for both use cases
Security check converges cleanly; hand-wash validation accuracy swings, which pointed to feature selection and more data as next steps.

Key Metrics

98%Security-check test accuracy
63%Hand-wash test accuracy
390Self-recorded videos (5 people)
7Activities recognized
20Frames per input sequence

Tech Stack

PythonOpenPoseKerasTensorFlowLSTMOpenCV