| import argparse | |
| from pipeline import extract_coordinates | |
| def main() -> None: | |
| parser = argparse.ArgumentParser(description="Step 1: Extract face/lip coordinates from a video.") | |
| parser.add_argument("--video", required=True, help="Path to input video") | |
| parser.add_argument("--output-dir", default=".", help="Directory to store output pkl files") | |
| parser.add_argument("--face-name", default="face_coords_avg.pkl", help="Output face coordinates filename") | |
| parser.add_argument("--lip-name", default="lip_coords_avg.pkl", help="Output lip coordinates filename") | |
| args = parser.parse_args() | |
| face_path, lip_path, face_bbox, lip_bbox = extract_coordinates( | |
| video_path=args.video, | |
| output_dir=args.output_dir, | |
| face_name=args.face_name, | |
| lip_name=args.lip_name, | |
| ) | |
| print(f"Face coordinates: {face_path} -> {face_bbox}") | |
| print(f"Lip coordinates: {lip_path} -> {lip_bbox}") | |
| if __name__ == "__main__": | |
| main() | |