| 72 | |
| 73 | |
| 74 | def parse_args(): |
| 75 | parser = argparse.ArgumentParser() |
| 76 | |
| 77 | parser.add_argument( |
| 78 | "--checkpoint_path", |
| 79 | type = str, |
| 80 | default = None, |
| 81 | help = "Path to local checkpoint file. Auto-downloads from HuggingFace if not set." |
| 82 | ) |
| 83 | parser.add_argument( |
| 84 | "--input_video_path", |
| 85 | type = str, |
| 86 | default = "__assets__/demo_video1.mp4", |
| 87 | help = "Path to the input video path." |
| 88 | ) |
| 89 | parser.add_argument( |
| 90 | "--result_store_path", |
| 91 | type = str, |
| 92 | default = "results.json", |
| 93 | help="Path to save result json." |
| 94 | ) |
| 95 | parser.add_argument( |
| 96 | "--overlap_window_length", |
| 97 | type = int, |
| 98 | default = 20, |
| 99 | help = "Number of overlapped frames between adjacent inference windows." |
| 100 | ) |
| 101 | parser.add_argument( |
| 102 | "--visual_store_folder_path", |
| 103 | type = str, |
| 104 | default = "demo_video_results", |
| 105 | help = "Path to save the visualization results. Set to None to disable." |
| 106 | ) |
| 107 | parser.add_argument( |
| 108 | "--mode", |
| 109 | type = str, |
| 110 | default = "default", |
| 111 | choices = ["default", "clean_shot"], |
| 112 | help = "Output Mode. 'default' means all Intra and Inter label. 'clean_shot' means only General Shot Cut without transitions. " |
| 113 | ) |
| 114 | |
| 115 | return parser.parse_args() |
| 116 | |
| 117 | |
| 118 | |