PanelDetection.testSingle(test_data, test_mask=None, model=None)[source]

This function is used to predict the mask corresponding to a single test image. It takes as input the test_data (a required parameter) and two non-required parameters- test_mask and model. Use this to test a single image.

  • test_data (nparray int or float) – The satellite image. dimension is (640,640,3) or (a,640,640,3)

  • test_mask (nparray int or float) – The ground truth of what the mask should be.

  • model (tf.keras model object) – A custom model can be provided as input or we can use the initialized model


  • test_res (nparray float) – The predicted mask of the single image. The dimension is (640,640 or (a,640,640))

  • accuracy (float) – The accuracy of prediction as compared with the ground truth if provided