Create config and perform basic setup.
(config_file, weights)
| 46 | raise NotImplementedError("Evaluator type is not supported") |
| 47 | |
| 48 | def setup(config_file, weights): |
| 49 | """ |
| 50 | Create config and perform basic setup. |
| 51 | """ |
| 52 | cfg = get_cfg() |
| 53 | cfg.merge_from_file(config_file) |
| 54 | cfg.merge_from_list(["MODEL.WEIGHTS", weights]) |
| 55 | cfg.freeze() |
| 56 | return cfg |
| 57 | |
| 58 | def main(args): |
| 59 | # Set up Detectron 2 config and build evaluator. |