I currently have ArcGIS pro version 3.1.3, and followed the steps at esri and github and installed the deep learning frame work v3.1 for Arcgis pro. I then proceeded to download the SAR image of the harbor of Aberdeen from copernicus. I then proceeded to use the Arcgis model to detect ship from the SAR image as show on the ArcGis website (see screenshots), However I keep receiving this error code: "
Traceback (most recent call last): File "C:\Users\23470\Documents\ArcGIS\Projects\MyProject23\DetectShipsFromSAR.py", line 64, in <module> out_raster = arcpy.management.Clip(in_raster, "#", "#", in_mask, "65536", "ClippingGeometry", "NO_MAINTAIN_EXTENT") File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 20983, in Clip raise e File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 20980, in Clip retval = convertArcObjectToPythonObject(gp.Clip_management(*gp_fixargs((in_raster, rectangle, out_raster, in_template_dataset, nodata_value, clipping_geometry, maintain_clipping_extent), True))) File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 512, in <lambda> return lambda *args: val(*gp_fixargs(args, True)) arcgisscripting.ExecuteError: ERROR 001566: Failed to create raster dataset. The reason could be: The clip feature is outside the raster extent.ERROR 001566: Failed to create raster dataset. The reason could be: The clip feature is outside the raster extent. Failed to execute (Clip).
Failed script Detect Ships using SAR data...
Failed to execute (DetectShipsUsingSARData).
Failed at Wednesday, 25 October 2023 12:44:31 (Elapsed Time: 5.26 seconds)
"
Here are screen shots, Kindly assist, I wan t to detect ships at the harbor of Aberdeen
I think you may be missing a parameter - the Input Water polygon (listed as AOI) in the documents. I believe this serves as the clipping polygon for the deep learning package. I'd recommend creating an AOI polygon feature class for your area of interest and run the GP tool again.
I really don't know how to do that, how can I create an AOI?
First, you will need to create a polygon feature class in your project geodatabase. Then you need to digitize/create a new polygon feature in your polygon feature class. Lastly save the edit session and then use that newly created feature as input for the geoprocessing tool. If you've never done this before, there's a quick start tutorial here that follows the editing workflow for creating a point - just substitute the polygon concept for the point concept.
Thanks, I did follow the tutorial you provided (see screenshot), unfortunately I still get this error code:
"Detect Ships using SAR data
=====================
Parameters
Input Raster C:\Users\23470\Desktop\ArcGIswork\Images\S1A_IW_SLC__1SDV_20230916T063025_20230916T063052_050349_060FCD_0481.SAFE\measurement\s1a-iw2-slc-vv-20230916t063027-20230916t063052-050349-060fcd-005.tiff
Output Detected Ships C:\Users\23470\Documents\ArcGIS\Projects\MyProject25\MyProject25.gdb\s1aiw2slcvv20230916t06302720230916t063052050349060fcd005_DetectShipsUsingSARData
Input Water Polygon Aberdeen Harbor Latest 2
Model Definition C:\Users\23470\Desktop\ArcGIswork\SARShipDetection.dlpk
Model Arguments padding 56;batch_size 4;threshold 0.4;tile_size 512
Non Maximum Suppression false
Confidence Score Field Confidence
Class Value Field Class
Maximum Overlap Ratio 0.2
Processor Type CPU
GPU ID 0
Cell Size 6.66299810375457E-05
previous_raster C:\Users\23470\Desktop\ArcGIswork\Images\S1A_IW_SLC__1SDV_20230916T063025_20230916T063052_050349_060FCD_0481.SAFE\measurement\s1a-iw2-slc-vv-20230916t063027-20230916t063052-050349-060fcd-005.tiff
=====================
Messages
Start Time: Thursday, 26 October 2023 13:09:16
Clipping the raster...
Traceback (most recent call last):
File "C:\Users\23470\Documents\ArcGIS\Projects\MyProject25\DetectShipsFromSAR.py", line 64, in <module>
out_raster = arcpy.management.Clip(in_raster, "#", "#", in_mask, "65536", "ClippingGeometry", "NO_MAINTAIN_EXTENT")
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 20983, in Clip
raise e
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 20980, in Clip
retval = convertArcObjectToPythonObject(gp.Clip_management(*gp_fixargs((in_raster, rectangle, out_raster, in_template_dataset, nodata_value, clipping_geometry, maintain_clipping_extent), True)))
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 512, in <lambda>
return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: ERROR 000446: Output file format with specified pixel type or number of bands or colormap is not supported. Refer to the 'Technical specifications for raster dataset formats' help section in Desktop Help.
The table was not found. [s1aiw2slcvv20230916t063_Clip]
The table was not found. [s1aiw2slcvv20230916t063_Clip]
ERROR 000446: Output file format with specified pixel type or number of bands or colormap is not supported. Refer to the 'Technical specifications for raster dataset formats' help section in Desktop Help.
Failed to execute (Clip).
Failed script Detect Ships using SAR data...
Failed to execute (DetectShipsUsingSARData).
Failed at Thursday, 26 October 2023 13:09:22 (Elapsed Time: 5.81 seconds)"
Added an input water polygon
Any idea?
Thank you for the screen grab and the error messages. One thing that stands out is your out put raster dataset - C:\Users\23470\Documents\ArcGIS\Projects\MyProject25\MyProject25.gdb\s1aiw2slcvv20230916t06302720230916t063052050349060fcd005_DetectShipsUsingSARData - has a SUPER long name! That could be the issue. I would change the output name to be C:\Users\23470\Documents\ArcGIS\Projects\MyProject25\MyProject25.gdb\DetectedShipsUsingSARData or something even shorter. Run the tool again. What is the output or error message?
Hey Aminu,
Were you able to run the Detect Ships using SAR data tool?
The tool ran successfully at my end.