museotoolbox.ai.SuperLearner.predict_image

SuperLearner.predict_image(in_image, out_image, confidence_per_class=False, higher_confidence=False, in_image_mask=False, out_nodata=0, compress=True, n_jobs=1)[source]

Predict label from raster using previous learned model. This function will call self.predictArray(X).

Parameters
  • in_image (str.) – A filename or path of a raster file. It could be any file that GDAL can open.

  • out_image (str.) – A geotiff extension filename corresponding to a raster image to create.

  • confidence_per_class (str or bool, optional (default=False)) – A path to a geotiff extension filename to store each confidence per class (one band = one label).

  • higher_confidence (str or bool, optional (default=False)) – A path to a geotiff extension filename to store the max confidence from all classes.

  • in_image_mask (str or False, optional (default=False)) – Path of the raster where 0 is mask and value above are no mask.

  • outNumpyDT (numpy datatype, default will get the datatype according to your maximum class value.) – Get numpy datatype throught : convert_dt(get_gdt_from_minmax_values(maximumClassValue)))

  • out_nodata (int, optional (default=0)) – Value of no data only for the out_image.