Unexpected results output from pre-trained models using geotiffs made from images downloaded from Tile Map Server.

238
0
03-13-2024 11:07 AM
AlexDevoid
New Contributor II

When using Parkinglot Classification Model, High Resolution Land Cover Classification Model, and Road Extraction Model, the models output either a solid band across my extent, or zero classifications. 

I’m looking for help on gaining some clarity on appropriate or worthwhile next steps. For example:

  • Is my 3-band imagery multispectral enough? Does my imagery need more bands? if so, could i convert LAS (LiDAR) to Digital Elevation Models and join it with the bands I have? What type of bands should I add? Is my imagery too different from the pre-trained models’ training data? Do I need to fine-tune the models?
  • Or is there a processing step that I am missing? (I have taken steps to retroject imagery when appropriate. I have gone over the guides. And I have extracted and added bands during various attempts. I’m happy to get in to that more, if needed.)
  • Below is a high-level overview of what I have tried, but it’s not exhaustive. For example, these are just examples of model parameters I’ve tried. I’m happy to talk more 🙂.

Imagery

Example for reproducing images (Our client directed us to the bellow tile map service and encouraged us to use it):

git clone git@github.com:gumblex/tms2geotiff.git
cd tms2geotiff
python3 tms2geotiff.py -s <https://svc.pictometry.com/Image/64C00615-F036-D77F-986A-1F6A31A35DDD/wmts/PICT-MOCSPR22-Au6vLBc7oU/default/GoogleMapsCompatible/{z}/{x}/{y}.png> -e=-93.33785017761194,37.12322308013705,-93.27050136874603,37.16145404094455 -z 17 springfield_output_image17.2.tif

All my images worked with can be downloaded here:

springfield_test_area - Google Drive

springfield_output_image17.2.tif

  • Zoom level from the TMS: 17
  • Cell size: 1.19
  • Pixel depth: 8 Bit unsigned
  • 3 bands: RGB

springfield_output_image18.2.tif

  • Zoom level from the TMS: 18
  • Cell size: 0.597
  • Pixel depth: 8 Bit unsigned
  • 3 bands: RGB

google_springfield_output_image18.2.tif

  • Zoom level from the TMS: 18
  • Cell size: 0.597
  • Pixel depth: 8 Bit unsigned
  • 3 bands: RGB

springfield_output_image-3.tif

  • Zoom level from the TMS: 19
  • Cell size: 0.29
  • Pixel depth: 8 Bit unsigned
  • 3 bands: RGB

springfield_output_image20.tif

  • Zoom level from the TMS: 30
  • Cell size: 0.149
  • Pixel depth: 8 Bit unsigned
  • 3 bands: RGB

Parking Lot Classification - USA

Required Input: 8-bit, 3-band high resolution (30 centimeters -1.2 meters) imagery. For detecting small sized parking lots, higher resolution imagery is highly recommended.

*Both outputs were a 1-band raster, showing a solid (black), the size of the image extent.

springfield_output_image-3.tif (.29 meter/pixel)

Classify Pixels Using Deep Learning
=====================
Parameters

Input Raster     springfield_output_image-3.tif
Output Classified Raster     C:\\Users\\GuestUser\\Documents\\ArcGIS\\Projects\\extract_springfieldroad\\v3_roads.gdb\\parking_springfield_image3_Cl
Model Definition     C:\\Users\\GuestUser\\Downloads\\ParkingLotClassification_USA.dlpk
Arguments     padding 100;batch_size 10;predict_background True;test_time_augmentation True
Processing Mode     PROCESS_AS_MOSAICKED_IMAGE
Output Folder     
=====================
Environments

GPU ID     1
Output Coordinate System     PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]
Parallel Processing Factor     90%
Extent     -10388203.4459055 4458875.89868347 -10385663.2119361 4459610.48549814
Cell Size     springfield_output_image-3.tif
Processor Type     GPU
=====================
Messages

Start Time: Tuesday, October 17, 2023 1:36:13 PM
Building Pyramids...
Succeeded at Tuesday, October 17, 2023 1:36:32 PM (Elapsed Time: 19.47 seconds)

springfield_output_image18.2.tif (0.597 meter/pixel):

Classify Pixels Using Deep Learning
=====================
Parameters

Input Raster     springfield_output_image18.tif
Output Classified Raster     C:\\Users\\GuestUser\\Documents\\ArcGIS\\Projects\\extract_springfieldroad\\v3_roads.gdb\\parking_springfield_image3_Cl
Model Definition     C:\\Users\\GuestUser\\Downloads\\ParkingLotClassification_USA.dlpk
Arguments     padding 100;batch_size 20;predict_background True
Processing Mode     PROCESS_AS_MOSAICKED_IMAGE
Output Folder     
=====================
Environments

GPU ID     1
Output Coordinate System     PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]
Snap Raster     springfield_output_image18.tif
Parallel Processing Factor     90%
Extent     -10388203.4459055 4458875.89868347 -10385663.2119361 4459610.48549814
Cell Size     springfield_output_image18.tif
Processor Type     GPU
=====================
Messages

Start Time: Tuesday, October 17, 2023 1:47:01 PM
Building Pyramids...
Succeeded at Tuesday, October 17, 2023 1:47:20 PM (Elapsed Time: 19.05 seconds)

High Resolution Land Cover Classification - USA

Required input: 8-bit, 3-band high-resolution (80 - 100 cm) imagery.

springfield_output_image18.2.tif:

  • original Cell size: 0.597 - No features classified
  • Resampled rater to .8 and 1 cell sizes. Both returned zero classifications.
  • This produced a raster with the appropriate classes but it was empty.
Classify Pixels Using Deep Learning
=====================
Parameters

Input Raster     springfield_output_image18_2_resampled_8
Output Classified Raster     C:\\Users\\GuestUser\\Documents\\ArcGIS\\Projects\\extract_springfieldroad\\v3_roads.gdb\\springfield_output_image18_2_LandCoverClassification
Model Definition     C:\\Users\\GuestUser\\Downloads\\HighResolutionLandCoverClassification_USA.dlpk
Arguments     padding 128;batch_size 4;predict_background True;test_time_augmentation True;tile_size 512;detailed_classes True
Processing Mode     PROCESS_AS_MOSAICKED_IMAGE
Output Folder     
=====================
Environments

GPU ID     1
Output Coordinate System     PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]
Extent     -10390321.9535106 4456296.1558014 -10382824.3535106 4461635.3558014
Cell Size     springfield_output_image18_2_resampled_8
Processor Type     GPU
=====================
Messages

Start Time: Tuesday, January 2, 2024 3:02:34 PM
Building Pyramids...
Succeeded at Tuesday, January 2, 2024 3:02:59 PM (Elapsed Time: 24.10 seconds)

Road Extraction - North America

Required Input: 8-bit, 3-band high resolution (30-50 cm) aerial/satellite imagery

Imagery Zoom Level 19: 0.298582 meters/pixel

*This produced an empty raster with one class.

Classify Pixels Using Deep Learning
=====================
Parameters

Input Raster     springfield_output_image-3.tif
Output Classified Raster     C:\\Users\\GuestUser\\Documents\\ArcGIS\\Projects\\extract_springfieldroad\\v3_roads.gdb\\roads_springfield_image3_Cl
Model Definition     C:\\Users\\GuestUser\\Downloads\\RoadsExtraction_NorthAmerica.dlpk
Arguments     padding 10;batch_size 20;merge_policy max;threshold .05;test_time_augmentation True;merge_policy max
Processing Mode     PROCESS_AS_MOSAICKED_IMAGE
Output Folder     
=====================
Environments

GPU ID     1
Output Coordinate System     PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]
Snap Raster     springfield_output_image-3.tif
Parallel Processing Factor     90%
Extent     -10388203.4459055 4458875.89868347 -10385663.2119361 4459610.48549814
Cell Size     0.3
Processor Type     GPU
=====================
Messages

Start Time: Tuesday, October 17, 2023 2:16:08 PM
Building Pyramids...
Succeeded at Tuesday, October 17, 2023 2:16:27 PM (Elapsed Time: 18.54 seconds)

Building Footprint Extraction - USA

Required input: 8-bit, 3-band high-resolution (10–40 cm) imagery

Imagery Zoom Level 20: 0.149291 meters/pixel

*This model worked for nicely for me as expected

Detect Objects Using Deep Learning
=====================
Parameters

Input Raster     springfield_output_image20.tif
Output Detected Objects     C:\\Users\\GuestUser\\Documents\\ArcGIS\\Projects\\extract_springfieldroad\\v3_roads.gdb\\BuildingsSpringfieldNeighborhoodExtract
Model Definition     C:\\Users\\GuestUser\\Downloads\\usa_building_footprints.dlpk
Arguments     padding 128;batch_size 4;threshold 0.9;return_bboxes False;tile_size 512
Non Maximum Suppression     NO_NMS
Confidence Score Field     Confidence
Class Value Field     Class
Max Overlap Ratio     0
Processing Mode     PROCESS_AS_MOSAICKED_IMAGE
=====================
Environments

GPU ID     0
Output Coordinate System     PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]
Parallel Processing Factor     80%
Extent     -10388203.4459055 4458875.89868347 -10385663.0682562 4459610.48549814
Cell Size     Springfield Neighborhood Extract Bands.tif
Mask     Springfield Neighborhood Extract Bands.tif
Processor Type     GPU
=====================
Messages

Start Time: Tuesday, October 17, 2023 11:31:47 AM
Succeeded at Tuesday, October 17, 2023 11:36:09 AM (Elapsed Time: 4 minutes 21 seconds)

Notes:

  • I ultimately trained my own model using supervised object classification via the image classification wizard. For this I used a combination of bands. I converted LAS (LiDAR) to Digital Elevation Models showing the min point in 0.5971 meter cells, combining it with the bands from springfield_output_image18.2.tif. This helped the model differentiate between roofs and driveways for example.

0 Kudos
0 Replies