Select to view content in your preferred language

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

536
5
03-28-2024 02:39 AM
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). 

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.

Please find below the error message and screenshots.
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-1711618697986.png

 

Thanks

0 Kudos
5 Replies
DanPatterson
MVP Esteemed Contributor

Do you meet the requirements?

Introduction to the model—ArcGIS pretrained models | Documentation


... sort of retired...
0 Kudos
Remya_Ravikumar
New Contributor II

Hi Dan!
Yes, it meets the necessary requirements specified in the documentation.

0 Kudos
DanPatterson
MVP Esteemed Contributor

it is this error message that seems to be the issue

Found no NVIDIA driver on your system


... sort of retired...
0 Kudos
Ntokozo_Mnikathi
New Contributor

Hey Remya 

Did you find a solution to this? I am experiencing the same problem

0 Kudos
CordulaGöke
Occasional Contributor

I guess it is as written before a missing GPU or the driver for the GPU. Should the GPU be correctly set up, do you have the Deep Learning Libraries installed? https://github.com/Esri/deep-learning-frameworks?tab=readme-ov-file

0 Kudos