diff --git a/deploy/serverpc/litpose/run_motion.py b/deploy/serverpc/litpose/run_motion.py new file mode 100644 index 0000000..0a38413 --- /dev/null +++ b/deploy/serverpc/litpose/run_motion.py @@ -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) diff --git a/deploy/serverpc/litpose/run_motion.sh b/deploy/serverpc/litpose/run_motion.sh new file mode 100755 index 0000000..100a3fd --- /dev/null +++ b/deploy/serverpc/litpose/run_motion.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e + +source $1 +python `dirname "$0"`/run_motion.py $2 $3 \ No newline at end of file