Open ujwalakoriraj opened 3 years ago
Hi @ujwalakoriraj , could you post your emd file here?
Hello, I guess this particular issue I resolved, where the path's '\' character was treated as an escape character, and I placed another '\' character to escape the character itself, '\\'. However, I have run into another error now (please help):
ERROR 002667 Unable to initialize python raster function with scalar arguments. [c:\program files\arcgis\pro\Resources\Raster\Functions\System\DeepLearning\ObjectDetector.py]
Traceback (most recent call last):
File "c:\program files\arcgis\pro\Resources\Raster\Functions\System\DeepLearning\ObjectDetector.py", line 84, in initialize
self.child_object_detector.initialize(model, model_as_file)
File "c:\program files\arcgis\pro\Resources\Raster\Functions\System\DeepLearning\Keras\MaskRCNN.py", line 48, in initialize
self.config = getattr(importlib.import_module(config_module_name), 'config')
File "C:\Users\rajak\AppData\Local\ESRI\conda\envs\test1_DL\Lib\importlib__init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "
Unable to initialize python raster function with scalar arguments.
Please help me if you can.
Please help me if you can.
@ujwalakoriraj can you tell us what Pro version you are using? Also what is the pytorch, tensorflow version your python environment has? You can check this via "settings" -> "Python" -> "installed packages"
Sure. Pro version - 2.6.0 Pytorch version: 1.4.0 tensorflow-gpu version=2.1.0
Sure. Pro version - 2.6.0 Pytorch version: 1.4.0 tensorflow-gpu version=2.1.0
@ujwalakoriraj The dependencies should be good. Did you use the built-in python raster function that comes with Pro 2.6, or did you use the ones in this repo? We have not updated this repo to keep these python raster functions consistent with what Pro has. The ones in Pro should have no problem to do inference. Also Keras version should be 2.3.1.
I used the built-in python raster function in this repo. How do I use the one with Arcgis Pro?
That's right, the Keras version is 2.3.1
I used the built-in python raster function in this repo. How do I use the one with Arcgis Pro?
That's right, the Keras version is 2.3.1
It's under \ArcGIS\Resources\Raster\Functions\System\DeepLearning. The ones in Pro are up-to-date.
I am trying to use the MRCNN sample for Object Detection and Instance Segmentation (Building Footprint detection). In the 'Detect Objects using Deep Learning' tool on Arcgis Pro, I am uploading the .emd file found in the 'examples' of 'MRCNN' folder in the 'Keras' folder. I have edited the .emd file by adding the full paths for "Architecture", 'Config', and 'ModelFile'. However, I have been encountering the error as follows, please help:
ERROR 002667 Unable to initialize python raster function with scalar arguments. [c:\program files\arcgis\pro\Resources\Raster\Functions\System\DeepLearning\ObjectDetector.py] Traceback (most recent call last): File "c:\program files\arcgis\pro\Resources\Raster\Functions\System\DeepLearning\ObjectDetector.py", line 54, in initialize self.json_info = json.load(f) File "C:\Users\rajak\AppData\Local\ESRI\conda\envs\building_project\Lib\json__init__.py", line 299, in load parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw) File "C:\Users\rajak\AppData\Local\ESRI\conda\envs\building_project\Lib\json__init__.py", line 354, in loads return _default_decoder.decode(s) File "C:\Users\rajak\AppData\Local\ESRI\conda\envs\building_project\Lib\json\decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Users\rajak\AppData\Local\ESRI\conda\envs\building_project\Lib\json\decoder.py", line 355, in raw_decode obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Invalid \escape: line 5 column 26 (char 107)
Unable to initialize python raster function with scalar arguments.