Skip to content

Commit

Permalink
fix(cli): correct import path for #75
Browse files Browse the repository at this point in the history
  • Loading branch information
AmitMY committed Feb 11, 2024
1 parent 0f4c73d commit 106cae4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/python/pose_format/bin/directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import argparse
import os

from pose_format.bin.bin import pose_video
from pose_format.bin.pose_estimation import pose_video
from tqdm import tqdm


Expand Down
4 changes: 4 additions & 0 deletions src/python/pose_format/bin/pose_estimation.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python
import argparse
import os

import cv2
from pose_format.utils.holistic import load_holistic
Expand Down Expand Up @@ -53,4 +54,7 @@ def main():

args = parser.parse_args()

if not os.path.exists(args.i):
raise FileNotFoundError(f"Video file {args.i} not found")

pose_video(args.i, args.o, args.format)
8 changes: 6 additions & 2 deletions src/python/pose_format/bin/pose_visualizer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python

import argparse
import os

from pose_format import Pose
from pose_format.pose_visualizer import PoseVisualizer
Expand All @@ -17,9 +18,12 @@ def visualize_pose(pose_path: str, video_path: str):

def main():
parser = argparse.ArgumentParser()
parser.add_argument('-i', required=True, type=str, help='path to input video file')
parser.add_argument('-o', required=True, type=str, help='path to output pose file')
parser.add_argument('-i', required=True, type=str, help='path to input pose file')
parser.add_argument('-o', required=True, type=str, help='path to output video file')

args = parser.parse_args()

if not os.path.exists(args.i):
raise FileNotFoundError(f"Pose file {args.i} not found")

visualize_pose(args.i, args.o)

0 comments on commit 106cae4

Please sign in to comment.