Hi everyone, I have a problem with Deep Learning Object Detection in ArcGIS Pro 2.3.
Firstly, I'm running through this arcgis lesson, In the step adding emd file to the toolbox as model definition parameter. I got an error said that tensorflow failed to import and Unable to initialize python raster function with scalar arguments. I was trying to figure it out and find this solution . I manage to import tensorflow but the second problem still exist.
Does anyone have the same problem?
Any suggestion would be apreciated
ArcGIS Pro 2.3.2 with installed tensorflow CPU package
The first error you posted I'm pretty sure is coming from Tensorflow. You will see this error when Tensorflow tries to load CUDA dlls and either CUDA isnt installed or the wrong version of CUDA or CuDNN is installed. Could you post exactly how you installed Tensorflow? If it is being installed with a requirements.txt file, look in there and see if the tensorflow line is "tensorflow" or "tensorflow-gpu". If the gpu version is being installed then if will look for CUDA dlls even if the model you are using is being run on the CPU. If you are using a requirements file, one solution is to reinstall everything but remove the "-gpu" from that line. You could also uninstall tensorflow and install the CPU version. From a command line, run:
pip uninstall tensorflow-gpu
pip install tensorflow
Or if you are using Conda, you can install it with:
conda install tensorflow
Note: if you install tensorflow-gpu with Conda, it will automatically install CUDA toolkit and CuDNN for you. This should work whether you run your model on the CPU or the GPU.
As for the second error, I am not entirely sure, but I have a feeling that with a properly installed tensorflow in the arcGIS Pro environment this error might go away. I will look into this a bit more.
I manage to run the tool well,
I assume the problem is the CPU version of tensorflow that does not work with this tool. I was trying in 3 different PCs without GPU and I always got that error. Once I created new environment with Nvidia GPU on it, everything was fine.
Thanks for your advice!
Have you never been able to run the detect object tool with Tensorflow CPU ?
and what Nvidia GPU card was on the machine you used ? Can you tell me a specific kind of it?
I also encountered a problem when setting my parameters for the detect Object using deep learning the model definition I used is the model definition I was provided in the training. Where I was instructed to edit the path to direct it to where the file is located which I did but when I add the file as a parameter there is an error which is giving me a tough time. Please I need your help on this.
Please find the attached screenshot of the error.
I have the same error! but in ArcGIS Pro 2.4. I created news environments, I reinstalled ArcGIS Pro "in clean", then installed tensorflow from ArcGIS Pro Python Packages... then the error still appear. This error showed to the moment when I charge the model file *.emd.
Finally uninstall tensorflow and install it from the command window from python 3, and apparently, it was installed correctly since from the Python window of geoprocessing in ArcGIS Pro, it is working correctly (See screen printing).
The truth is that uninstalling and installing tensorflow and ArcGIS Pro does not solve the problem.
Thank you for your comments!
The issue was related to the competability of tensorflow 1.13 on CPU with ArcGIS 2.3
The tool was not capable of running on CPU with tensorflow 1.13 package added, hence (pip install tensorflow==1.12.0) to install Tensorflow 1.12.0 would fix the issue and run the tool on CPU
Thank you, but this error is happen in Pro 2.4 and I uninstalled tensorflow 1.13.0 and I installed 1.12.0, but the system show the same error (Error 002667) the attach print screen of before.
I have had the same problem when i tried to execute Detect Objects using Deep Learning Tool. I follow this workflow:
- In Pyhton Package Manager > Manage Environments > Clone default
- Add Packages > Search tensorflow and install TensorFlow 1.13.1
After set up this environment, I ran the tool and the error Unable to initialize python raster function with scalar arguments arise.
The solution that works for me: in Pyhton Package Manager > Add Packages > Search tensorflow and install TensorFlow-mkl 1.13.1
I hope it helps.
Hello, I confirm that the installation of TensorFlow-mkl (in my case I installed version 1.14.0) worked for my purposes, since it presented the same error. Thank you very much for the contribution. Greetings from Bogotá, CO.