Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add motion energy scripts to litpose directory #107

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions deploy/serverpc/litpose/run_motion.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import argparse
from pathlib import Path

from iblvideo.motion_energy import motion_energy


if __name__ == "__main__":

parser = argparse.ArgumentParser(description='Run motion energy for mp4 file and pose outputs')
parser.add_argument('file_mp4', help='mp4 file to compute motion energy from')
parser.add_argument('pose_result', help='pose pqt file to compute motion energy from')
args = parser.parse_args()

file_mp4 = Path(args.file_mp4)
pose_result = Path(args.pose_result)

me_result, me_roi = motion_energy(file_mp4, pose_result)
5 changes: 5 additions & 0 deletions deploy/serverpc/litpose/run_motion.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
set -e

source $1
python `dirname "$0"`/run_motion.py $2 $3