I have a problem using DLPK Super Resolution to apply to a Raster.
ERROR 999999: Something unexpected caused the tool to fail. Contact Esri Technical Support (http://esriurl.com/support) to Report a Bug, and refer to the error help for potential solutions or workarounds.
Unable to read pixels from the python raster function.
Unable to read pixels from the python raster function.
Function Read Error [Raster Function Template]
Unable to read pixels from the python raster function.
Traceback (most recent call last):
File "C:\Users\jpolanco\AppData\Local\Temp\ArcGISProTemp11604\super_resolution.dlpk\ArcGISSuperResolution.py", line 168, in updatePixels
xx = self.child_image_classifier.updatePixels(tlc, shape, props, **pixelBlocks).astype(props['pixelType'], copy=False)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\learn\models\_inferencing\_superres.py", line 215, in updatePixels
superres_prediction = util.pixel_classify_superres_image(
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\learn\models\_inferencing\util.py", line 495, in pixel_classify_superres_image
img_normed = norm(tiles.permute(0, 2, 3, 1)).permute(0, 3, 1, 2)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\learn\models\_inferencing\util.py", line 22, in <lambda>
norm = lambda x: (x - mean) / std
ValueError: operands could not be broadcast together with shapes (4,400,400,4) (3,)
Python raster function's .updatePixels() method returned nothing.
Unable to read pixels from the python raster function.
Unable to read pixels from the python raster function.
Function Read Error [Raster Function Template]
Unable to read pixels from the python raster function.
Traceback (most recent call last):
File "C:\Users\jpolanco\AppData\Local\Temp\ArcGISProTemp11604\super_resolution.dlpk\ArcGISSuperResolution.py", line 168, in updatePixels
xx = self.child_image_classifier.updatePixels(tlc, shape, props, **pixelBlocks).astype(props['pixelType'], copy=False)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\learn\models\_inferencing\_superres.py", line 215, in updatePixels
superres_prediction = util.pixel_classify_superres_image(
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\learn\models\_inferencing\util.py", line 495, in pixel_classify_superres_image
img_normed = norm(tiles.permute(0, 2, 3, 1)).permute(0, 3, 1, 2)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\learn\models\_inferencing\util.py", line 22, in <lambda>
norm = lambda x: (x - mean) / std
ValueError: operands could not be broadcast together with shapes (4,400,400,4) (3,)
Python raster function's .updatePixels() method returned nothing.
Failed to execute (ClassifyPixelsUsingDeepLearning).
Solved! Go to Solution.
@johnpol by any chance your model was trained with 3-band rasters and the above errors was thrown when the model was used against a 4-band raster?
Number of bands (and, other properties should match e.g. you train a model with 100 cm resolution images, it might not give the best results on 10 cm images).
Yes, I found the problem, it was that I used a Raster with 4 bands. I forgot to finish this post, althought thanks for the answer jajaja. Trying to train a model with good results
@johnpol by any chance your model was trained with 3-band rasters and the above errors was thrown when the model was used against a 4-band raster?
Number of bands (and, other properties should match e.g. you train a model with 100 cm resolution images, it might not give the best results on 10 cm images).
Yes, I found the problem, it was that I used a Raster with 4 bands. I forgot to finish this post, althought thanks for the answer jajaja. Trying to train a model with good results
Hello
So if I trained the model with a 3- band raster I won't be able to use it to detect with a 4 band raster? why is that?
I am a newby of arcgis pro. can some one give me a toturial on how to prepare data for this dlpk model?
Use the model—ArcGIS pretrained models | Documentation
i want to try this.