The problem occured when i used the multiresolution-object-detection-with-text-sam, it says error like this, how can i fix it?
Starting execution
Clearing CUDA cache...
CUDA cache cleared.
'Detect Objects Using Deep Learning' will run 5 times.
Processing cell size: 0.1
Processing cell size: 0.15
Processing cell size: 0.2
Repairing geometry...
Geometry repaired.
Deleting rows with areas < 15 and areas > 4500
Rows deleted.
Running Pairwise Buffer...
Running Pairwise Dissolve...
Pairwise Dissolve completed.
Running Spatial Join...
Spatial Join completed.
Running Pairwise Dissolve - Mean Confidence...
Pairwise Dissolve - Mean Confidence completed.
Running feature classification by area...
Running Regularizing Rectangular Footprints with tolerance 0.5...
Regularizing Rectangular Footprints with tolerance 0.5...
Regularizing Rectangular Footprints with tolerance 0.5 completed.
Running Regularizing Rectangular Footprints with tolerance 1...
Regularizing Rectangular Footprints with tolerance 1...
Regularizing Rectangular Footprints with tolerance 1 completed.
Running Regularizing Rectangular Footprints with tolerance 1.5...
Regularizing Rectangular Footprints with tolerance 1.5...
Regularizing Rectangular Footprints with tolerance 1.5 completed.
Running Regularizing Rectangular Footprints with tolerance 2.5...
Regularizing Rectangular Footprints with tolerance 2.5...
Regularizing Rectangular Footprints with tolerance 2.5 completed.
Running Regularizing Rectangular Footprints with tolerance 3.5...
Regularizing Rectangular Footprints with tolerance 3.5...
Regularizing Rectangular Footprints with tolerance 3.5 completed.
Running Regularizing Rectangular Footprints with tolerance 5...
Regularizing Rectangular Footprints with tolerance 5...
Regularizing Rectangular Footprints with tolerance 5 completed.
Deleting temporary outputs...
Temporary outputs deleted.
Running Merge...
Running Merge for ['C:\\Users\\USER\\Documents\\ArcGIS\\Projects\\Kerja Kerja Kerja\\Kerja Kerja Kerja.gdb\\sds_20_50', 'C:\\Users\\USER\\Documents\\ArcGIS\\Projects\\Kerja Kerja Kerja\\Kerja Kerja Kerja.gdb\\sds_20_100', 'C:\\Users\\USER\\Documents\\ArcGIS\\Projects\\Kerja Kerja Kerja\\Kerja Kerja Kerja.gdb\\sds_20_150', 'C:\\Users\\USER\\Documents\\ArcGIS\\Projects\\Kerja Kerja Kerja\\Kerja Kerja Kerja.gdb\\sds_20_250', 'C:\\Users\\USER\\Documents\\ArcGIS\\Projects\\Kerja Kerja Kerja\\Kerja Kerja Kerja.gdb\\sds_20_350', 'C:\\Users\\USER\\Documents\\ArcGIS\\Projects\\Kerja Kerja Kerja\\Kerja Kerja Kerja.gdb\\sds_20_500']...
Merge completed.
Processing cell size: 0.25
Processing extent: 1435233,7007148 9426028,69129479 1435778,57441159 9426483,61758766 PROJCS["DGN_1995_UTM_Zone_49S",GEOGCS["GCS_DGN_1995",DATUM["D_Datum_Geodesi_Nasional_1995",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",10000000.0],PARAMETER["Central_Meridian",111.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]
Detecting objects using deep learning...
Traceback (most recent call last):
File "<string>", line 371, in execute
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\ia\Functions.py", line 4197, in DetectObjectsUsingDeepLearning
return Wrapper(
^^^^^^^^
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\sa\Utils.py", line 45, in swapper
result = wrapper(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\ia\Functions.py", line 4182, in Wrapper
result = arcpy.gp.DetectObjectsUsingDeepLearning_ia(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 532, 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.
Python raster function is unable to vectorize the data. [Failed to generate table]
Python raster function is unable to vectorize the data.
Traceback (most recent call last):
File "C:\Users\USER\AppData\Local\Temp\ArcGISProTemp9596\TextSAM.dlpk\TextSAM.py", line 476, in vectorize
masks, _, _ = self.mask_generator.predict_torch(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\USER\AppData\Local\Temp\ArcGISProTemp9596\TextSAM.dlpk\segment-anything\segment_anything\predictor.py", line 229, in predict_torch
low_res_masks, iou_predictions = self.model.mask_decoder(
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\USER\AppData\Local\Temp\ArcGISProTemp9596\TextSAM.dlpk\segment-anything\segment_anything\modeling\mask_decoder.py", line 94, in forward
masks, iou_pred = self.predict_masks(
^^^^^^^^^^^^^^^^^^^
File "C:\Users\USER\AppData\Local\Temp\ArcGISProTemp9596\TextSAM.dlpk\segment-anything\segment_anything\modeling\mask_decoder.py", line 127, in predict_masks
src=src + dense_prompt_embeddings
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 10.60 GiB (GPU 0; 6.00 GiB total capacity; 11.87 GiB already allocated; 0 bytes free; 11.94 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
Python Raster Function's .vectorize() method returned nothing.
Failed to execute (DetectObjectsUsingDeepLearning).
Failed to execute (MultiScaleDL).
Solved! Go to Solution.
Hi @PPRTDUA ,
Generally, out-of-memory issues occur when the batch size exceeds your GPU's capacity. Could you try running the tool with a lower batch size and check if any other processes are utilizing the GPU on your machine?
Hi @PPRTDUA ,
Generally, out-of-memory issues occur when the batch size exceeds your GPU's capacity. Could you try running the tool with a lower batch size and check if any other processes are utilizing the GPU on your machine?
Hi @PPRTDUA ,
There could be multiple ways to avoid that error.
1- As @ShivaniPathak suggested please try to decrease your batch size
2- I would try to run the tool with less resolutions or a smaller extent. Currently I see that you are processing 4 different resolutions and that could be utilizing lots of gpu memory.
Also what version of ArcGIS Pro are you currently running?