| 24 | |
| 25 | |
| 26 | def parse_args(in_args=None): |
| 27 | parser = argparse.ArgumentParser(description="Visualize ground-truth data") |
| 28 | parser.add_argument( |
| 29 | "--source", |
| 30 | choices=["annotation", "dataloader"], |
| 31 | required=True, |
| 32 | help="visualize the annotations or the data loader (with pre-processing)", |
| 33 | ) |
| 34 | parser.add_argument("--config-file", metavar="FILE", help="path to config file") |
| 35 | parser.add_argument("--output-dir", default="./", help="path to output directory") |
| 36 | parser.add_argument("--show", action="store_true", help="show output in a window") |
| 37 | parser.add_argument( |
| 38 | "opts", |
| 39 | help="Modify config options using the command-line", |
| 40 | default=None, |
| 41 | nargs=argparse.REMAINDER, |
| 42 | ) |
| 43 | return parser.parse_args(in_args) |
| 44 | |
| 45 | |
| 46 | if __name__ == "__main__": |