| 16 | |
| 17 | |
| 18 | def parse_args(): |
| 19 | parser = argparse.ArgumentParser(description='MMDet benchmark a model') |
| 20 | parser.add_argument('config', help='test config file path') |
| 21 | parser.add_argument('--checkpoint', default=None, help='checkpoint file') |
| 22 | parser.add_argument('--samples', default=2000, help='samples to benchmark') |
| 23 | parser.add_argument( |
| 24 | '--log-interval', default=50, help='interval of logging') |
| 25 | parser.add_argument( |
| 26 | '--fuse-conv-bn', |
| 27 | action='store_true', |
| 28 | help='Whether to fuse conv and bn, this will slightly increase' |
| 29 | 'the inference speed') |
| 30 | args = parser.parse_args() |
| 31 | return args |
| 32 | |
| 33 | |
| 34 | def main(): |