ArcGIS Pro 2.3 | Deep Learning Object Detection

1772
8
02-13-2019 07:16 AM
MoahmmedAl_Sulaimani
New Contributor II

Hi All, I'm using ArcGIS Pro 2.3 ,and trying to implement an Object Detection of Wells Sites,  I have exported the Training Samples from Imagery using the Export Training Tool to PASCAL Visual Object Classes, I just stopped at this step as I understand that this model which I'm trying to create need to be trained outside ArcGIS Pro using one of the open source machine learning software, for example Tensorflow or  Microsoft CNTK, is there any document explains the workflow in a clear step by step which I can follow?

Thank you in advance and Best Regards

Reply
0 Kudos
8 Replies
SangeetMathew
Esri Contributor

Hi Mohammed,

    For training there are a no. of open source Frameworks such as Tensorflow , PyTorch , CNTK , etc. One of the them is the Tensorflow object detection api. The ArcGIS API for Python does provide some tools for training using SSD(Single Shot Detector). Here are some links to get started . Here is the API refernce ..https://esri.github.io/arcgis-python-api/apidoc/html/arcgis.learn.html#singleshotdetector) and here is a sample notebook. https://github.com/Esri/arcgis-python-api/blob/master/samples/04_gis_analysts_data_scientists/detect...

FrancisPolignano
New Contributor II

I'm also trying to find a examples of deep learning workflows. Is the workflow different if we use ArcGIS Pro vs the Python API? For example, I see that Pro has "ExportTrainingDataForDeepLearning" documented here https://pro.arcgis.com/en/pro-app/tool-reference/image-analyst/export-training-data-for-deep-learnin... and there is also a similar function offered in the Python API "export_training_data" documented here https://esri.github.io/arcgis-python-api/apidoc/html/arcgis.learn.html#export-training-data 

I'm assuming the first would be used for desktop applications and the second is for portal/server but it appears the workflows are different for the two? Can you offer any insight into this ? From what I can tell the Python API version is more robust/high level in that the deep learning model/algorithm is already picked and configured whereas the Pro version you need to specify that ?

Any information appreciated

Thanks

SangeetMathew
Esri Contributor

Hi Francis , 

   The tool in ArcGIS Pro and the python API are essential the same . The tool may have a couple of new parameters(depending on which version you have ) which may not have found its way tot the API yet but like I said essentially they are the same. 

Reply
0 Kudos
StephanieClark
New Contributor II

Has anyone had any luck with the workflow yet? 

TyHayward
New Contributor II

I have had success with it and also implemented my own dataset

Reply
0 Kudos
StephanieClark
New Contributor II

Do you have a workflow that you could share? 

Reply
0 Kudos
TyHayward
New Contributor II

Hi, 

I assume you have exported the training data for deep learning using the arcpro tool. different models have different chip size requirements (from what i have gathered), so keep that in mind. 

The easiest way to create a deep learning model is to use the arcgis.learn module from the ArcGIS for python API 

arcgis.learn module — arcgis 1.6.2 documentation 

I believe this is the project that the orignal poster was referencing 

arcgis-python-api/object-detection.ipynb at master · Esri/arcgis-python-api · GitHub 

the argis learn module implements the singleshotdetector SSD (i believe it has been modified from the fastai library and made more user friendly) How single-shot detector (SSD) works? | ArcGIS for Developers 

working with this has a few prerequisites (Setting up a new conda environment and downloading a few python packages). ideally be on arcpro 2.4. a semi-decent GPU is also required (which has to be Nvidia) otherwise training the model will be painfully slow. 

Geospatial deep learning with | ArcGIS for Developers 

If you follow this notebook from the 'Data preparation' step to the 'save and load trained models' step then you can then inference the model within ArcPRO using the detect objects for deep learning. Importantly, the parameters of the model need to be fine tuned to your data otherwise the results wont be great. 

I have spent the past few weeks learning about deep learning, and implementation of it within the esri platform. It takes a bit of reading and searching about to get a grasp of the concepts, which in turn help you improve your own model.The developers of arcgis.learn have suggested that i take the Practical Deep Learning for Coders, v3 | fast.ai course v3, from which much of a arcgis.learn module is built around. This course, from what i have read, will get you up to speed and able to implement deep learning outside of the arcgis enivronment. I am planning on completing it.  I am still a beginner at deep learning, but i will try to help out where i can. let me know if you have any more questions. 

Reply
0 Kudos
StephanieClark
New Contributor II

Thanks, Ty- this information is very helpful. I appreciate you taking the time to provide such an in-depth response.  

Reply
0 Kudos