| 26 | |
| 27 | # Setup Parser |
| 28 | def get_parser(): |
| 29 | parser = ArgumentParser(description="PyTorch Evaluation") |
| 30 | parser.add_argument( |
| 31 | "--base_size", type=int, default=2048, help="based size for scaling" |
| 32 | ) |
| 33 | parser.add_argument( |
| 34 | "--scales", type=float, default=[1.0], nargs="+", help="evaluation scales" |
| 35 | ) |
| 36 | parser.add_argument("--config", type=str, default="config.yaml") |
| 37 | parser.add_argument( |
| 38 | "--model_path", |
| 39 | type=str, |
| 40 | default="checkpoints/psp_best.pth", |
| 41 | help="evaluation model path", |
| 42 | ) |
| 43 | parser.add_argument( |
| 44 | "--save_folder", |
| 45 | type=str, |
| 46 | default="checkpoints/results/", |
| 47 | help="results save folder", |
| 48 | ) |
| 49 | parser.add_argument( |
| 50 | "--names_path", |
| 51 | type=str, |
| 52 | default="../../vis_meta/cityscapes/cityscapesnames.mat", |
| 53 | help="path of dataset category names", |
| 54 | ) |
| 55 | parser.add_argument( |
| 56 | "--crop", action="store_true", default=False, help="whether use crop evaluation" |
| 57 | ) |
| 58 | return parser |
| 59 | |
| 60 | |
| 61 | def get_logger(): |