Select to view content in your preferred language

Error loading PyTorch model definition

624
0
05-04-2020 11:28 PM
MichaelBean
New Contributor

Trying to detect objects (swimming pools) with model provided from:

https://www.arcgis.com/home/item.html?id=16fa8bab78d24832b4a7c2ecac835019 

I get the following error when model definition is validated in Detect Objects Using Deep Learning Tool from Pro 2.5:

ERROR 002667 Unable to initialize python raster function with scalar arguments.
Traceback (most recent call last):
File "c:\users\mike\appdata\local\programs\arcgis\pro\Resources\Raster\Functions\System\DeepLearning\ObjectDetector.py", line 76, in initialize
'{}.{}'.format(framework, self.json_info['ModelConfiguration'])), 'ChildObjectDetector')
File "C:\Users\Mike\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\deeplearning\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "c:\users\mike\appdata\local\programs\arcgis\pro\Resources\Raster\Functions\System\DeepLearning\PyTorch\FastaiSSD.py", line 13, in <module>
import util
File "c:\users\mike\appdata\local\programs\arcgis\pro\Resources\Raster\Functions\System\DeepLearning\PyTorch\util.py", line 12, in <module>
from model import V, A, T, to_np
ImportError: cannot import name 'V'

Unable to initialize python raster function with scalar arguments.

Looks like there is a V function in:

c:\users\mike\appdata\local\programs\arcgis\pro\Resources\Raster\Functions\System\DeepLearning\PyTorch\model.py

Keras sample works fine.  Followed directions to setup from:

GitHub - Esri/raster-deep-learning: ArcGIS built-in python raster functions for deep learning to get... 

Ideas?

Thanks,

Mike

Tags (2)
0 Kudos
0 Replies