Skip to content

mehdigorjian/human-activity-recognition

Repository files navigation

Activity Recognition

Action Recognition Deep Learning Project (recognizing drinking and cooking)

Requirements

pip install -r requirements.txt

Arguments

  • "m", "--model" : path to trained serialized model
  • "-l", "--label-bin": path to label binarizer
  • "-i", "--input": path to our input video (e.g. example_clips/video.mp4)
  • "-o", "--output": path to our output video (e.g. output/myVideo.avi)
  • "-s", "--size": size of queue for averaging (e.g. 128)
  • "-a", "--action": choose a predictive action from this list (drinking, cooking). This name will be used in labeling the JSON file and the output figure y_label.
  • "-f", "--fig": figure name
  • "-j", "--json": JSON file name

Video Samples

Download these two video samples and place them in 'example_clips' folder.

Drinking Video Sample Cooking Video Sample
drinking sample video cooking sample video

Pre-Runing Instruction

  • Create a folder called model, download the pre-trained model and the binarized Labels add place them into the model folder.
  • Create a folder called output for the code output.
  • Create a folder called example_clips and put the above 'video samples' together with your test videos in it.

Running Drinking Activity

python predict_video.py --model model/activity.model --label-bin model/lb.pickle --input example_clips/ VIDEO-NAME --output output/output_video.avi --fig TimeLabel --json TimeLabel --action drinking --size 128

Running Cooking Activity

python predict_video.py --model model/activity.model --label-bin model/lb.pickle --input example_clips/ VIDEO-NAME --output output/output_video.avi --fig TimeLabel --json TimeLabel --action cooking --size 128


About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages