| 285 | |
| 286 | |
| 287 | def parse_args() -> argparse.Namespace: |
| 288 | datetime_str = datetime.datetime.now().strftime("%Y-%m-%d_%H-%M-%S") |
| 289 | |
| 290 | parser = argparse.ArgumentParser() |
| 291 | parser.add_argument( |
| 292 | "--data_path", default=Path(__file__).parent.parent / "data", type=Path |
| 293 | ) |
| 294 | parser.add_argument( |
| 295 | "--datasets", |
| 296 | nargs="+", |
| 297 | default=["eth3d", "blended-mvs", "imc2023", "imc2024"], |
| 298 | ) |
| 299 | parser.add_argument( |
| 300 | "--categories", |
| 301 | nargs="+", |
| 302 | default=[], |
| 303 | help="Categories to evaluate, if empty all categories are evaluated.", |
| 304 | ) |
| 305 | parser.add_argument( |
| 306 | "--scenes", |
| 307 | nargs="+", |
| 308 | default=[], |
| 309 | help="Scenes to evaluate, if empty all scenes are evaluated.", |
| 310 | ) |
| 311 | parser.add_argument( |
| 312 | "--progress", |
| 313 | default=None, |
| 314 | action=argparse.BooleanOptionalAction, |
| 315 | help="Show a live progress display of in-flight scenes " |
| 316 | "(default: enabled when stdout is a TTY).", |
| 317 | ) |
| 318 | parser.add_argument( |
| 319 | "--fast", |
| 320 | default=False, |
| 321 | action="store_true", |
| 322 | help="Fast mode: only evaluate the N smallest scenes per category, " |
| 323 | "where N is set by --fast_num_scenes.", |
| 324 | ) |
| 325 | parser.add_argument( |
| 326 | "--fast_num_scenes", |
| 327 | type=int, |
| 328 | default=1, |
| 329 | help="Number of smallest scenes per category to evaluate in --fast " |
| 330 | "mode.", |
| 331 | ) |
| 332 | parser.add_argument( |
| 333 | "--run_path", default=Path(__file__).parent.parent / "runs", type=Path |
| 334 | ) |
| 335 | parser.add_argument("--run_name", default=datetime_str) |
| 336 | parser.add_argument("--report_name", default=f"report-{datetime_str}") |
| 337 | parser.add_argument( |
| 338 | "--overwrite_database", default=False, action="store_true" |
| 339 | ) |
| 340 | parser.add_argument( |
| 341 | "--overwrite_matches", default=False, action="store_true" |
| 342 | ) |
| 343 | parser.add_argument( |
| 344 | "--overwrite_reconstruction", default=False, action="store_true" |