The confidence score of the inference model can be calculated by the ImageryInference module of iobjectpy, the example code is showing as below:
imagery_inference = ImageryInference(model_path=model_path, gpus=[0], batch_size=1)
imagery_inference.binary_classify_infer(input_data=dom_path, out_data=out_data,
out_dataset_name=out_dataset_name,
offset=128, result_type='grid', confidence_map=True)
After run this, import the output data to iDesktopX, and the confidence score will be shown as the pixel value.