I'm using a dataset in COCO format in order to train a net of type "R_101_FPN_3x". The AP dataset is shown from evaluator in the validation set.
How can I have the AP evaluation on new input images? At the moment I get the predicted boxes on new images doing:
for images in os.listdir(folder_dir):
print("inference on: ", images)
im = cv2.imread(folder_dir+"/"+images)
outputs = predictor(im)
v = Visualizer(im[:, :, ::-1], MetadataCatalog.get(cfg.DATASETS.TRAIN[0]), scale=1.2)
out = v.draw_instance_predictions(outputs["instances"].to("cpu"))
cv2.imwrite("out_inference/"+"out"+images, out.get_image()[:, :, ::-1])
Or, in general, how can I evaluate quality of prediction on new data in a mathematical manner?