Detect Object Using Deep Learning: Unable to initialize python raster function with scalar arguments.

111
1
a month ago
Labels (3)
Remya_Ravikumar
New Contributor II

Hi,
I was trying to use the " Detect objects using Deep learning" tool with pretrained model already available in living atlas. I used Segment Anything Model (SAM) model. My input was a tiff file that I downloaded from EUSI (OR2A 50 cm 4-Band Bundle | Munich, Germany, Imagery, Multispectral, WorldView). 
I am encountering the following error.

A raster error has occurred. The messages that follow will provide more detail.
Unspecified error [Failed to generate table]
[Missing raster: [%s]]
Unable to initialize python raster function with scalar arguments. [C:\Users\Admin\AppData\Local\Temp\ArcGISProTemp29824\SAM.dlpk\SAM.py]
Traceback (most recent call last):
File "C:\Users\Admin\AppData\Local\Temp\ArcGISProTemp29824\SAM.dlpk\SAM.py", line 233, in initialize
torch.cuda.set_device(device)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\torch\cuda\__init__.py", line 261, in set_device
torch._C._cuda_setDevice(device)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\torch\cuda\__init__.py", line 170, in _lazy_init
torch._C._cuda_init()
RuntimeError: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx
Unable to initialize python raster function with scalar arguments.
Unspecified error [Failed to generate table]
[Missing raster: [%s]]
Unable to initialize python raster function with scalar arguments. [C:\Users\Admin\AppData\Local\Temp\ArcGISProTemp29824\SAM.dlpk\SAM.py]
Traceback (most recent call last):
File "C:\Users\Admin\AppData\Local\Temp\ArcGISProTemp29824\SAM.dlpk\SAM.py", line 233, in initialize
torch.cuda.set_device(device)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\torch\cuda\__init__.py", line 261, in set_device
torch._C._cuda_setDevice(device)
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\torch\cuda\__init__.py", line 170, in _lazy_init
torch._C._cuda_init()
RuntimeError: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx
Unable to initialize python raster function with scalar arguments.
Failed to execute (DetectObjectsUsingDeepLearning).

Remya_Ravikumar_0-1711618135295.png


The tool is working fine when the input is a jpeg image. But throws the above error whenever tiff file is used.
I tried with different images, every time the same error is occurring. Only in the case of .jpeg image the tool is running successfully.
Can anyone clarify where I am going wrong and if any kind of processing is needed before using a tiff as input.

Thanks.

0 Kudos
1 Reply
PavanYadav
Esri Contributor

@Remya_Ravikumar in your question I see '4-Band Bundle' can you please check you're using input—8-bit, 3-band imagery. 

The error also shows this, "RuntimeError: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx"

This  is compute-intensive, and a GPU with minimum CUDA compute capability of 6.0 is recommended. This model requires a GPU with at least 8 GB of GPU memory.

See: https://doc.arcgis.com/en/pretrained-models/latest/imagery/introduction-to-segment-anything-model-sa...

0 Kudos