<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SSD model trained on colab got errors on ArcGIS Pro in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/ssd-model-trained-on-colab-got-errors-on-arcgis/m-p/1043655#M5882</link>
    <description>&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-New-Contributor lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;Thanks for sharing your experience.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-New-Contributor lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;I tried as you suggested but getting same error.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-New-Contributor lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;I set epochs =100 and use early_stopping to get the best model in all trainings. T&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-New-Contributor lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;he model can detect palm trees on sub_set of image (about 1200 x 600) &lt;STRONG&gt;on the colab&lt;/STRONG&gt; but miss a lot. It either did not work on ArcGIS Pro.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Apr 2021 05:12:54 GMT</pubDate>
    <dc:creator>KyawNaingWin</dc:creator>
    <dc:date>2021-04-07T05:12:54Z</dc:date>
    <item>
      <title>SSD model trained on colab got errors on ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/ssd-model-trained-on-colab-got-errors-on-arcgis/m-p/1041426#M5830</link>
      <description>&lt;P&gt;I am following a &lt;A href="https://learn.arcgis.com/en/projects/use-deep-learning-to-assess-palm-tree-health/" target="_blank" rel="noopener"&gt;use-deep-learning-to-assess-palm-tree-health&lt;/A&gt; tutorial. Since I do not have GPU on my computer, I used colab to train the SSD model with arcgis.learn and it was successfully completed.&lt;/P&gt;&lt;P&gt;When I use the trained model (either .emd or dlpk) in "Detect Objects Using Deep Learning" tool, i got error right after model definition selection.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;EM&gt;ERROR 002667 Unable to initialize python raster function with scalar arguments. [D:\ESRI_DL\palm_tree_health\ImageChips\models\palmtree_detector_ssd25\ArcGISObjectDetector.py]&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;EM&gt;Traceback (most recent call last):&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;EM&gt;File "C:\Users\Kyaw\AppData\Local\Temp\ArcGISProTemp21936\palmtree_detector_ssd25.dlpk\ArcGISObjectDetector.py", line 166, in initialize&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;EM&gt;self.child_object_detector.initialize(model, model_as_file)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;EM&gt;File "C:\Users\Kyaw\AppData\Local\ESRI\conda\envs\arcgispro-py3-dl\Lib\site-packages\arcgis\learn\models\_inferencing\_DynamicSSD.py", line 195, in initialize&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;EM&gt;self.ssd = SingleShotDetector.from_emd(data=None, emd_path=model)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;EM&gt;File "C:\Users\Kyaw\AppData\Local\ESRI\conda\envs\arcgispro-py3-dl\Lib\site-packages\arcgis\learn\models\_ssd.py", line 346, in from_emd&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;EM&gt;ssd = cls(data, emd['Grids'], emd['Zooms'], emd['Ratios'], pretrained_path=str(model_file), backend=backend, backbone=backbone, ssd_version=ssd_version)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;EM&gt;File "C:\Users\Kyaw\AppData\Local\ESRI\conda\envs\arcgispro-py3-dl\Lib\site-packages\arcgis\learn\models\_ssd.py", line 228, in __init__&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;EM&gt;self.load(pretrained_path) &lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;EM&gt;File "C:\Users\Kyaw\AppData\Local\ESRI\conda\envs\arcgispro-py3-dl\Lib\site-packages\arcgis\learn\models\_arcgis_model.py", line 1300, in load&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;EM&gt;raise e&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;EM&gt;File "C:\Users\Kyaw\AppData\Local\ESRI\conda\envs\arcgispro-py3-dl\Lib\site-packages\arcgis\learn\models\_arcgis_model.py", line 1298, in load&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;EM&gt;self.learn.load(name, purge=False)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;EM&gt;File "C:\Users\Kyaw\AppData\Local\ESRI\conda\envs\arcgispro-py3-dl\Lib\site-packages\fastai\basic_train.py", line 269, in load&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;EM&gt;state = torch.load(source, map_location=device)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;EM&gt;File "C:\Users\Kyaw\AppData\Local\ESRI\conda\envs\arcgispro-py3-dl\Lib\site-packages\torch\serialization.py", line 527, in load&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;EM&gt;with _open_zipfile_reader(f) as opened_zipfile:&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;EM&gt;File "C:\Users\Kyaw\AppData\Local\ESRI\conda\envs\arcgispro-py3-dl\Lib\site-packages\torch\serialization.py", line 224, in __init__&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;EM&gt;super(_open_zipfile_reader, self).__init__(torch._C.PyTorchFileReader(name_or_buffer))&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;EM&gt;AttributeError: 'WindowsPath' object has no attribute 'tell'&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;EM&gt;Unable to initialize python raster function with scalar arguments.&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;I tested with the pre-trained model provided on the tutorial page, it works without any problem.&lt;/FONT&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;What could be the problem? Has anybody train SSD on colab for ArcGIS Pro?&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 06:17:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/ssd-model-trained-on-colab-got-errors-on-arcgis/m-p/1041426#M5830</guid>
      <dc:creator>KyawNaingWin</dc:creator>
      <dc:date>2021-03-29T06:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: SSD model trained on colab got errors on ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/ssd-model-trained-on-colab-got-errors-on-arcgis/m-p/1042289#M5854</link>
      <description>&lt;P&gt;I have the same error (also trained my model on Colab). In the past I fixed the error by upgrading my PyTorch package from 1.4.0 to 1.6.0. You could try this, I'm curious if that will work for you. With the pre-trained models from ESRI this upgrade is not necessary, for some reason.. I have no idea why.&amp;nbsp;&lt;/P&gt;&lt;P&gt;See also my post about this:&amp;nbsp;&lt;A href="https://community.esri.com/t5/spatial-data-science-questions/detect-objects-using-deep-learning-error-002667-unable-to/m-p/854211" target="_blank"&gt;Detect Objects Using Deep Learning: ERROR 002667 U... - Esri Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 08:33:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/ssd-model-trained-on-colab-got-errors-on-arcgis/m-p/1042289#M5854</guid>
      <dc:creator>mvandoornik</dc:creator>
      <dc:date>2021-03-31T08:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: SSD model trained on colab got errors on ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/ssd-model-trained-on-colab-got-errors-on-arcgis/m-p/1043655#M5882</link>
      <description>&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-New-Contributor lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;Thanks for sharing your experience.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-New-Contributor lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;I tried as you suggested but getting same error.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-New-Contributor lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;I set epochs =100 and use early_stopping to get the best model in all trainings. T&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-New-Contributor lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;he model can detect palm trees on sub_set of image (about 1200 x 600) &lt;STRONG&gt;on the colab&lt;/STRONG&gt; but miss a lot. It either did not work on ArcGIS Pro.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Apr 2021 05:12:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/ssd-model-trained-on-colab-got-errors-on-arcgis/m-p/1043655#M5882</guid>
      <dc:creator>KyawNaingWin</dc:creator>
      <dc:date>2021-04-07T05:12:54Z</dc:date>
    </item>
    <item>
      <title>Re: SSD model trained on colab got errors on ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/ssd-model-trained-on-colab-got-errors-on-arcgis/m-p/1044107#M5891</link>
      <description>&lt;P&gt;Last week I managed to fix the error again (I'm currently working on a new laptop with ArcGIS Pro 2.7).&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error was solved after upgrading both Torch and Torchvision. It might be the Torchvison upgrade that fixed the error. I used the following command to get a stable CUDA-enabled version of both packages:&lt;/P&gt;&lt;P&gt;python -m pip install torch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 -f &lt;A href="https://download.pytorch.org/whl/torch_stable.html" target="_blank"&gt;https://download.pytorch.org/whl/torch_stable.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Hope this will help you.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 09:03:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/ssd-model-trained-on-colab-got-errors-on-arcgis/m-p/1044107#M5891</guid>
      <dc:creator>mvandoornik</dc:creator>
      <dc:date>2021-04-06T09:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: SSD model trained on colab got errors on ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/ssd-model-trained-on-colab-got-errors-on-arcgis/m-p/1044945#M5904</link>
      <description>&lt;P&gt;Not succeeded yet. Will try again.&lt;/P&gt;&lt;P&gt;Yesterday, I trained the model on AGOL notebook where I can get a pre installed run time with GPU costing 0.5 credit per min.&lt;/P&gt;&lt;P&gt;Used the same codes I had tried on the Colab. All the modules needed for ArcGIS deep learning training are already installed there. The model trained on AGOL notebook work on my ArcGIS Pro. Currently AGOL notebook runtime use Arcgis 1.8.1 module. I have retrieved all the module names of the runtime and will install them on the Colab and test again.&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;</description>
      <pubDate>Thu, 08 Apr 2021 04:31:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/ssd-model-trained-on-colab-got-errors-on-arcgis/m-p/1044945#M5904</guid>
      <dc:creator>KyawNaingWin</dc:creator>
      <dc:date>2021-04-08T04:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: SSD model trained on colab got errors on ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/ssd-model-trained-on-colab-got-errors-on-arcgis/m-p/1047956#M5924</link>
      <description>&lt;P&gt;perhaps related&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/arcgis-python-api/issues/928" target="_blank"&gt;Python api running in google colab · Issue #928 · Esri/arcgis-python-api (github.com)&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 03:23:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/ssd-model-trained-on-colab-got-errors-on-arcgis/m-p/1047956#M5924</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-04-16T03:23:59Z</dc:date>
    </item>
  </channel>
</rss>

