Select to view content in your preferred language

Fine-Tuning "High Resolution Land Cover Classification - USA" Deep Learning Model

205
1
Jump to solution
04-18-2025 01:56 PM
BrendanOConnor
New Contributor

Hello I am trying to fine tune the "High Resolution Land Cover Classification - USA" deep learning model for a region of interest in Kentucky. I'm using NAIP imagery from 2022 and I've created a polygon feature class to create the Training data using the "Export Training Data for Deep Learning" tool.  But when I run the "Train Deep Learning Model" too I get these errors:

"Error:Error(s) in loading state_dict for DynamicUnet:
size mismatch for layers.11.0.weight: copying a param with shape torch.Size([10, 99, 1, 1]) from checkpoint, the shape in current model is torch.Size([7, 99, 1, 1]).
size mismatch for layers.11.0.bias: copying a param with shape torch.Size([10]) from checkpoint, the shape in current model is torch.Size([7])..Training was not successful."

I've figured out that's because  I am not using enough classes in my training data has 7 (I was using the less detailed classes) and the model was trained on 10 according to the error. But reading the description from the model's item page I see this: 

"Training data

This model has been trained on the Chesapeake Bay high-resolution 7 class 2013/2014 NAIP Landcover dataset (produced by Chesapeake Conservancy with their partners University of Vermont Spatial Analysis Lab (UVM SAL), and Worldview Solutions, Inc. (WSI)) and other high resolution imagery. Find more information about the dataset here."

Unfortunately this link is broken and I cannot find more about the training dataset. Is there more information I am missing somewhere?

My guess would be 1 Water, 2 Wetlands, 3 Tree Canopy, 4 Shrubland, 5 Low vegetation, 6 Barren, 7 Structures, 8 Impervious surfaces, 9 Impervious Roads, and 10 No data?

Would the "Train Deep Learning Model" tool work if I have the classes in the polygon feature class but no actual feature relating to that class value?

0 Kudos
1 Solution

Accepted Solutions
BrendanOConnor
New Contributor

Apologies, I did not realize it adds the No Data class automatically.

 

So you do need just those 9 classes (Water, Wetlands, Tree Canopy, Shrubland, Low Vegetation, Barren, Structures, Impervious Surfaces, Impervious Roads) in your training data if anyone else is trying to fine tune this model.

View solution in original post

1 Reply
BrendanOConnor
New Contributor

Apologies, I did not realize it adds the No Data class automatically.

 

So you do need just those 9 classes (Water, Wetlands, Tree Canopy, Shrubland, Low Vegetation, Barren, Structures, Impervious Surfaces, Impervious Roads) in your training data if anyone else is trying to fine tune this model.