ValueError for Arcpy Script using Detect Objects Using Deep Learning

136
0
02-05-2024 10:20 AM
Labels (2)
jbrower
New Contributor II

I'm trying to use Detect Objects using Deep Learning in a python toolbox script. Unfortunately, I'm running into a bit of an error. 

ValueError: Variable cnn_l1weights already exists, disallowed. Did you mean to set reuse=True or reuse=tf.AUTO_REUSE in VarScope?
Python Raster Function's .vectorize() method returned nothing.
Failed to execute (DetectObjectsUsingDeepLearning)

 arcpy.CheckOutExtension("ImageAnalyst")
with arcpy.EnvManager(scratchWorkspace=export_gdb):
arcpy.ia.DetectObjectsUsingDeepLearning(
in_raster="Final_Raster",
out_detected_objects="Road_Centerlines",
in_model_definition="model_item_in_portal",
arguments="batch_size 4",
run_nms="NO_NMS",
confidence_score_field="Confidence",
class_value_field="Class",
max_overlap_ratio=0,
processing_mode="PROCESS_AS_MOSAICKED_IMAGE"
)

Utilizing this particular code with model_item_in_portal referencing the Road Extraction - Global uploaded to my enterprise portal. Is there any kind of workaround for this so I can include this in my python tool?

0 Kudos
0 Replies