I have COCOEvaluator implemented into my Detectron2 network, however I need to output the evaluation metrics (AP) into variable so I can work with it further. I cant figure out how to do that, or what to call? The only thing that "works" is reading the cell output, but that is clumsy and very time ineffective.
I am calling the evaluator by:
evaluator = COCOEvaluator("test_dataset", output_dir="/content/output")
val_loader = build_detection_test_loader(cfg, "test_dataset")
print(inference_on_dataset(predictor.model, val_loader, evaluator))
which outputs metrics as:
I need to output the AP values to variables that could be called in future code. Anyone knows how? Thanks!