Select to view content in your preferred language

Object detection with ArcGIS API job failed error

3575
19
06-27-2021 01:02 PM
TaehyunYoon1
Emerging Contributor

Purpose: I want to detect and count objects from downloaded map images.

Map data: I use a high-resolution google earth map image with ArcGIS pro.

Model: I used a single-shot detector. I trained the model with a labeled image that I did through ArcGIS pro.

References:

https://developers.arcgis.com/python/sample-notebooks/detecting-swimming-pools-using-satellite-image...

https://developers.arcgis.com/python/guide/object-detection/

Problems and Question (4 questions)

  • When I save my model, the '.zip' file does not appear. The Models folder has (ModelCharacteristics folder, ArcGISobjectDetector python file, model_metrics chrome HTML Document, .dlpk, emd, and .pth files). When I followed the references above, they used the '.zip' file for 'gis.content.add' function.

TaehyunYoon1_0-1624823848411.png

TaehyunYoon1_1-1624823860960.png

TaehyunYoon1_2-1624823881994.png

 

  • Instead of the “.zip” file, I used a “.dlpk” file for “gis.content.add” function.

 

TaehyunYoon1_3-1624823904393.png

 

TaehyunYoon1_4-1624823914606.png

  • I shared the ".tiff" image file to ArcGIS online content from ArcGIS pro web-share 

 

TaehyunYoon1_7-1624824105758.png

 

TaehyunYoon1_6-1624823962095.png

 

  • I followed references, but it did not work. It notices me only “job failed.” I could not figure out what is the problem. 

 

0 Kudos
19 Replies
TaehyunYoon1
Emerging Contributor

TaehyunYoon1_1-1625258282896.pngTaehyunYoon1_2-1625258294362.png

 

0 Kudos
Tim_McGinnes
Frequent Contributor

This could be indicating that your graphics card may not be supported. What model is your card?

There's a fairly long discussion here about the error:

https://github.com/pytorch/pytorch/issues/31285 

0 Kudos
TaehyunYoon1
Emerging Contributor

I work on virtual machine and I use K40. 

I have never met this issue before. 

TaehyunYoon1_1-1625278101258.png

 

0 Kudos
Tim_McGinnes
Frequent Contributor

Have you changed anything in the environment recently? According to the following page, K40 support was removed in pytorch 1.3. The latest versions of ArcGIS are using pytorch 1.4.

https://github.com/pytorch/pytorch/issues/30532# 

Maybe try finding an environment with a newer GPU - you should probably see if there's anyone in your schools IT department who could help. 

0 Kudos
TaehyunYoon1
Emerging Contributor

Hello Tim,
I appreciate that you are willing to help me.
I did not change the environment. I re-install "arcgis_learn" just in case, and I identified the version of PyTorch.

 

https://github.com/pytorch/pytorch/issues/31285

TaehyunYoon1_0-1625346733655.png

 

Do you have an idea of what it means that "build from source"?

0 Kudos
Tim_McGinnes
Frequent Contributor

It means to get the actual source code of pytorch, modify it to add the support for your GPU back in, then recompile it back into a Python module. It sounds difficult to achieve.

0 Kudos
TaehyunYoon1
Emerging Contributor

Tim,

I will have zoom meeting with the developer in our school tomorrow for figuring out GPU and PyTorch problems. 

I have two questions.

1. Can I update or install a specific version of PyTorch on conda-esri environment? 

2. If I purchase ArcGIS Enterprise, it is possible for me just to follow the references above? 

0 Kudos
Tim_McGinnes
Frequent Contributor

1. Yes you should be able to do it via the python command line: conda install -c esri pytorch=<version>. There is no guarantee that this will work however, as the esri python environment is very complicated with numerous modules.

Ask the developer if there is any way to get access to a different GPU that is supported.

Another workaround to consider is to force arcgis.learn to use the CPU instead of the GPU. It will be a lot slower but should work. See here: How force Pytorch to use CPU instead of GPU? 

2. ArcGIS Enterprise + Image Server is very expensive (many thousands of $$) and complicated to setup. It would be much simpler to use ArcGIS Pro with the Image Analyst extension. Find out if your school has a license for Esri products, otherwise you may be able to get a Student License for $100\year: ArcGIS for Student Use 

0 Kudos
TaehyunYoon1
Emerging Contributor

I am already subscribing student License for $100/year. However, since I need to use a high-speed GPU, I have to work on a server offered by my school. I mean, I can work with Jupyter-notebook and ArcGIS python API.
I will ask the account manager of our school whether I can use ArcGIS Enterprise with an institute account.
Does ArcGIS Enterprise contain an Image Server? If I can use ArcGIS Enterprise, can I also use Image Server? or is it separate software?

0 Kudos
TaehyunYoon1
Emerging Contributor

But I still feel it is weird. I have used it in the same environment before Friday morning. I changed nothing, rather I re-installed arcgis_learn. But your suggested link above was posted in 2019. 

0 Kudos