Commit a7729135 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Added some bugfixing code.

parent 0a5df2db
Pipeline #3178 failed with stage
in 18 minutes and 7 seconds
......@@ -1600,7 +1600,8 @@ class RSImage_ClusterPredictor(object):
print('Total classification time: %s' % time.strftime("%H:%M:%S", time.gmtime(time.time() - t0)))
else:
self.classif_map = np.full((image.rows, image.cols), classifier.cluster_pixVals[0], np.int8)
# GeoArray(self.classif_map).save('/home/gfz-fe/scheffler/temp/classif_map__%s_%s.bsq'
# % (classifier.src_satellite, classifier.src_sensor))
# adjust classifier
if CPUs is None or CPUs > 1:
# FIXME does not work -> parallelize with https://github.com/ajtulloch/sklearn-compiledtrees?
......@@ -1623,14 +1624,17 @@ class RSImage_ClusterPredictor(object):
image_predicted[rS:rE + 1, cS:cE + 1] = im_tile_pred
print('Total prediction time: %s' % time.strftime("%H:%M:%S", time.gmtime(time.time()-t0)))
# image_predicted.save('/home/gfz-fe/scheffler/temp/image_predicted_before_nodata__%s_%s.bsq'
# % (classifier.src_satellite, classifier.src_sensor))
# re-apply nodata values to predicted result
if image.nodata is not None:
image_predicted[image.mask_nodata[:] == 0] = image.nodata
image.mask_nodata.save('/home/gfz-fe/scheffler/temp/mask_nodata__%s_%s.bsq'
% (classifier.src_satellite, classifier.src_sensor))
# copy mask_nodata
image_predicted.mask_nodata = image.mask_nodata
# image_predicted.save('/home/gfz-fe/scheffler/temp/image_predicted_after_nodata__%s_%s.bsq'
# % (classifier.src_satellite, classifier.src_sensor))
# GeoArray(image_predicted).save(
# '/home/gfz-fe/scheffler/temp/SPECHOM_py/image_predicted_QRclust1_MinDist_noB9.bsq')
# GeoArray(self.classif_map).save(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment