Classify pixel using deep learning output blank

1587
3
Jump to solution
01-28-2023 10:59 AM
Labels (2)
CodyGoodson
New Contributor

Hello all,

I have been attempting to classify 0.5 m imagery for my research. Unfortunately, when I go to run the "classify pixels using deep learning tool", I get an output with no errors, but the raster is seemingly blank.

I have collected extensive training points on all of the various land cover/habitat types of interest, exported the training data for deep learning, and trained the deep learning model. The following are my specifications for the "train deep learning model tool"...

CodyGoodson_0-1674931381490.png

I have also run this with the Deeplab model (which is what I initially planned on using) with the same outcome. I subsequently run the "classify pixels using deep learning model" tool, using the .dlpk file that I get as output from the previous tool. The following is the raster info from the image I want to classify...

CodyGoodson_1-1674931622749.png

It appears as though the output raster that is supposed to be my classified image has pixels that have values of either 0 or 255, but when displayed on my map, it seems completely blank.

Other questions I have seen about this say to make sure your image is 8 bit unsigned, which mine is. I must be missing something here, this has been a very "learn as I go" experience, so any help would be much appreciated.

P.S. I'm working with ArcGIS Pro 3.0.3 and have downloaded the required deep learning libraries associated with the tools that I am using. 

0 Kudos
1 Solution

Accepted Solutions
PavanYadav
Esri Contributor

Hi @CodyGoodson 
I wonder if the raster is created right but not its colormap in the attribute table of the raster. Please right click the out raster in the Content pane and open its attribute table. Please see if the values in the table match with the emd file of the model. I am pasting an example from one of my models.

If the attribute table is not correct, you may consider this to workaround: make a copy of your raster, and delete the attribute table by using the tool, and see if the display is correct. This is just a workaround if the colormap is not created correctly but we can look into why it happened. 


Below image shows an example of a model emd file. 

PavanYadav_3-1676665005220.png

 

Output raster and its attribute table for the above model

PavanYadav_1-1676664824515.png

About your second question, it depends on what raster you used to train the model e.g. was it a 3-band raster or 8-band. If the model is trained with 3-band and input for inferencing is an 8-band raster, the tool will return an error related to not finding bands. About pixel depth, I am assuming the training data's values range from 0-255 and so  do your input rasters.  



 

View solution in original post

0 Kudos
3 Replies
PavanYadav
Esri Contributor

Hi @CodyGoodson 
I wonder if the raster is created right but not its colormap in the attribute table of the raster. Please right click the out raster in the Content pane and open its attribute table. Please see if the values in the table match with the emd file of the model. I am pasting an example from one of my models.

If the attribute table is not correct, you may consider this to workaround: make a copy of your raster, and delete the attribute table by using the tool, and see if the display is correct. This is just a workaround if the colormap is not created correctly but we can look into why it happened. 


Below image shows an example of a model emd file. 

PavanYadav_3-1676665005220.png

 

Output raster and its attribute table for the above model

PavanYadav_1-1676664824515.png

About your second question, it depends on what raster you used to train the model e.g. was it a 3-band raster or 8-band. If the model is trained with 3-band and input for inferencing is an 8-band raster, the tool will return an error related to not finding bands. About pixel depth, I am assuming the training data's values range from 0-255 and so  do your input rasters.  



 

0 Kudos
CodyGoodson
New Contributor

Thank you! Upon deleting the attribute table, it was clear that something had gone wrong with the classification because the output raster just looked like a checkerboard of the max and min values. I think the problem was that I did not specify a pixel size and it was set to the default. After specifying I wanted 0.5 m (the resolution of my input imagery) I got a classified output raster. There are some patchy spots that were not classified... I'm assuming better training data can alleviate this somewhat. Is there a parameter in the tool to force it to classify all pixels?

PavanYadav
Esri Contributor

Hi @CodyGoodson 

About the patchy spots, I am guessing they're filled nodata value. Do you happen to have something like below in your model (emd) file? When you model is loaded in the tool, what arguments do you see there? 

{
"Value":0,
"Name":"nodata",
"Color":[0, 0, 0]
},

OR

"ignore_mapped_class": [
0
],

0 Kudos