Select to view content in your preferred language

Classify pixel using deep learning output blank

4274
5
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 Regular 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.  



 

Pavan Yadav
Product Engineer at Esri
AI for Imagery
Connect with me on LinkedIn!
Contact Esri Support Services

View solution in original post

0 Kudos
5 Replies
PavanYadav
Esri Regular 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.  



 

Pavan Yadav
Product Engineer at Esri
AI for Imagery
Connect with me on LinkedIn!
Contact Esri Support Services
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 Regular 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
],

Pavan Yadav
Product Engineer at Esri
AI for Imagery
Connect with me on LinkedIn!
Contact Esri Support Services
0 Kudos
CharpentierColin
New Contributor
Hi everyone,

 

I experienced the same issue as @CodyGoodson, but in my case the cause seems to be different.

 

I trained a deep learning model to classify sidewalks from 20 cm resolution DEM data. Since a public sidewalk dataset is available for Paris (France), I used Paris DEM data and the sidewalk polygons as training data.

 

After training, the model performed well on Bordeaux, but when I applied it to other cities such as Lyon, Pau or Grenoble, the output raster was completely empty, even though the tool completed successfully.

 

After several tests, I started wondering whether the model had learned characteristics that are specific to the area used for training. Paris and Bordeaux are relatively low-elevation areas, whereas Lyon, Pau and Grenoble have significantly different elevation contexts.

 

My question is therefore:

 

When training a model on DEM data, is it necessary to include training samples from a wider range of elevations and terrain types to improve its ability to generalize to other territories?

 

 

I'd be very interested in hearing whether others have encountered similar limitations when training deep learning models on DEM data

0 Kudos
PavanYadav
Esri Regular Contributor

Hi @CharpentierColin 

Your intuition is likely correct. Paris and Bordeaux are relatively low-lying, so the model probably tied absolute elevation values to the presence of sidewalks. In higher cities like Grenoble, the raw values fall outside anything it saw in training — which would explain the empty raster.

That said, using raw DEM data alone for sidewalks is a bit unusual (or, at least I have not explored this approach). Have you considered high-resolution RGB orthophotos? Sidewalks are much easier to distinguish by texture and color than by height alone. The strongest setup is often a combination: RGB bands plus a normalized height layer.

If you need to stick with elevation data, the key might be removing absolute height from the input. One option could be training on derivatives like slope or some form of relative local elevation (height above the surrounding ground) rather than raw elevation — in theory, a sidewalk should look the same on a slope map whether it's in Paris or the mountains. Depending on your workflow, it may also be possible to preprocess the DEM into a local relief raster (e.g., subtracting a focal minimum) so all cities end up in a similar value range before training. I haven't tested this but it seems like a reasonable direction to explore.

Pavan Yadav
Product Engineer at Esri
AI for Imagery
Connect with me on LinkedIn!
Contact Esri Support Services
0 Kudos