Hi, I am trying to do object detection process with standalone script using Arcpy. The arcgis pro version is ArcGIS Pro 3.2.1. I made this script based on model builder and this documentation.
https://pro.arcgis.com/en/pro-app/latest/tool-reference/image-analyst/detect-objects-using-deep-lear...
The script i use is written below.
import arcpy
from arcpy.ia import *
arcpy.CheckOutExtension("ImageAnalyst")
in_models = 'C:/Users/GIS Dev/Documents/Riset_arcpy/model_map_space/model_5_epoch/model_5_epoch.dlpk'
data_raster = 'C:/Users/GIS Dev/Documents/Riset_arcpy.ia/Radarsat-2-4978_I005632_FL01-P008585_Scene_1_2023_08_20_22_01_42/tif'
obj_detection = 'obj.shp'
model_args = "padding 56; threshold 0.5; nms_overlap 0.1; batch_size 64; exclude_pad_detections True; test_time_augmentation False"
run_nms = "NO_NMS"
confidence_score_field = "Confidence"
class_value_field = "Class"
max_overlap_ratio = 0
processing_mode = "PROCESS_AS_MOSAICKED_IMAGE"
arcpy.env.extent = arcpy.Extent(113.7975122046781706, -7.7461582880389077, 114.0177164475001632, -7.4046301537038710)
Output_Classified_Raster = arcpy.ia.DetectObjectsUsingDeepLearning(data_raster,
obj_detection,
in_models,
model_args,
run_nms,
confidence_score_field,
class_value_field,
max_overlap_ratio,
processing_mode)
When i ran this script it shows error like this
Traceback (most recent call last):
File "C:\Users\GIS Dev\Documents\Riset_arcpy.ia\Radarsat-2-4978_I005632_FL01-P008585_Scene_1_2023_08_20_22_01_42\tif\obj.py", line 16, in <module>
Output_Classified_Raster = arcpy.ia.DetectObjectsUsingDeepLearning(data_raster,
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\ia\Functions.py", line 4040, in DetectObjectsUsingDeepLearning
return Wrapper(
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\sa\Utils.py", line 55, in swapper
result = wrapper(*args, **kwargs)
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\ia\Functions.py", line 4029, in Wrapper
result = arcpy.gp.DetectObjectsUsingDeepLearning_ia(
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 520, in <lambda>
return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: A raster error has occurred. The messages that follow will provide more detail.
No raster store is configurated. [No SQL data store]
No raster store is configurated. [No SQL data store]
Failed to execute (DetectObjectsUsingDeepLearning).
I cant figure out the solution for this. With the same scenario it ran without error in ArcGIS Pro.