|
36 | 36 | "source": [ |
37 | 37 | "## Introduction\n", |
38 | 38 | "\n", |
39 | | - "We can use `arcgis.learn` to train deep learning models that can be deployed on mobile devices using ArcGIS field apps. This enables AI on the edge and simplify jobs of field workers. This is done using TensorFlow which enables us to save trained models to '.tflite' format. A few applications of this workflow are \n", |
| 39 | + "We can use `arcgis.learn` to train deep learning models that can be deployed on mobile devices using ArcGIS field apps. This enables AI on the edge and the simplification of field workers' jobs. This is done using TensorFlow which enables us to save trained models to '.tflite' format. A few applications involved in this workflow are \n", |
40 | 40 | "- Assisted intelligent survey\n", |
41 | 41 | "- Disconnected Decision support\n", |
42 | 42 | "- Automatic feature extraction from street view\n", |
|
61 | 61 | "cell_type": "markdown", |
62 | 62 | "metadata": {}, |
63 | 63 | "source": [ |
64 | | - " In this guide we are going to use street view images from ESRI campus, we have labeled a few fire water hydrants using [labelImg](https://github.com/tzutalin/labelImg). This is an object detection exercise and requires an object detection model to be trained. \n", |
| 64 | + " In this guide we are going to use street view images from the ESRI campus. We have labeled a few fire hydrants using [labelImg](https://github.com/tzutalin/labelImg). This is an object detection exercise and requires an object detection model to be trained. \n", |
65 | 65 | " \n", |
66 | | - " We will be training a SingleShotDetector model in this guide. SingleShotDetector like other common object detection models would predict the class of the objects along with their location (bounding box) in an image, know more about SingleShotDetector [here](https://developers.arcgis.com/python/guide/how-ssd-works/)." |
| 66 | + " We will be training a SingleShotDetector model in this guide. SingleShotDetector like other common object detection models wil predict the class of the objects along with their location (bounding box) in an image. Learn more about SingleShotDetector [here](https://developers.arcgis.com/python/guide/how-ssd-works/)." |
67 | 67 | ] |
68 | 68 | }, |
69 | 69 | { |
|
79 | 79 | "source": [ |
80 | 80 | "## Prerequisites\n", |
81 | 81 | "\n", |
82 | | - "- This workflow is a buildup on top of the basic workflow followed to train deep learning models with `arcgis.learn` module. It is recommended to first have a reading of the basic workflow from [here](https://developers.arcgis.com/python/guide/geospatial-deep-learning/) if not done previously. \n", |
83 | | - "- To train mobile-ready light models [**TensorFlow**](https://www.tensorflow.org/) library needs to be installed in addition to fastai and PyTorch, please refer to the section \"Install deep learning dependencies of arcgis.learn module\" [on this page](https://developers.arcgis.com/python/guide/install-and-set-up/#Install-deep-learning-dependencies-for-arcgis.learn-module) for detailed documentation on the installation of these dependencies.\n" |
| 82 | + "- This workflow builds on the basic workflow followed to train deep learning models with `arcgis.learn` module. It is recommended to have first readt the basic workflow [here](https://developers.arcgis.com/python/guide/geospatial-deep-learning/) if you hvae not done so previously. \n", |
| 83 | + "- To train mobile-ready light models, the [**TensorFlow**](https://www.tensorflow.org/) library needs to be installed in addition to fastai and PyTorch. Please refer to the section \"Install deep learning dependencies of arcgis.learn module\" [on this page](https://developers.arcgis.com/python/guide/install-and-set-up/#Install-deep-learning-dependencies-for-arcgis.learn-module) for detailed documentation on the installation of these dependencies.\n" |
84 | 84 | ] |
85 | 85 | }, |
86 | 86 | { |
|
96 | 96 | "source": [ |
97 | 97 | "Deep learning algorithms are generally compute-intensive and specialized hardware like GPUs are always recommended in deep learning workflows. This makes deployment of deep learning models on mobile a challenging task. \n", |
98 | 98 | "\n", |
99 | | - "TensorFlow Lite is a lightweight solution to this problem. It reduces the overall compute requirement of the model and size of model making it easy to ship on mobile devices. It also supports hardware acceleration that inturn enables low-latency inferencing on mobile devices allowing us to build real-time applications on top of it, know more about TensorFlow Lite [here](https://www.tensorflow.org/lite/) \n", |
| 99 | + "TensorFlow Lite is a lightweight solution to this problem. It reduces the overall compute requirement and size of the model making it easy to ship on mobile devices. It also supports hardware acceleration that inturn enables low-latency inferencing on mobile devices, which allows us to build real-time applications on top of it. Learn more about TensorFlow Lite [here](https://www.tensorflow.org/lite/) \n", |
100 | 100 | "\n", |
101 | | - "With argis.learn we can use export out models to TensorFlow Lite format '.tflite', which can be easily deployed on mobile with ArcGIS field apps check [deployment section](#Deployment) of this guide for more details on deployment. " |
| 101 | + "With argis.learn we can export out models to TensorFlow Lite format '.tflite', which can be easily deployed on mobile with ArcGIS field apps. Check the [deployment section](#Deployment) of this guide for more details on deployment. " |
102 | 102 | ] |
103 | 103 | }, |
104 | 104 | { |
|
124 | 124 | "cell_type": "markdown", |
125 | 125 | "metadata": {}, |
126 | 126 | "source": [ |
127 | | - "This is an **important** step and has to be run in the first cell of the notebook before any imports are made. By default arcgis.learn only works on PyTorch backend, setting this environment variable enables the TensorFlow backend as well, which is required to train a TensorFlow Lite model." |
| 127 | + "This is an **important** step and has to be run in the first cell of the notebook before any imports are made. By default arcgis.learn only works on a PyTorch backend. Setting this environment variable enables the TensorFlow backend as well, which is required to train a TensorFlow Lite model." |
128 | 128 | ] |
129 | 129 | }, |
130 | 130 | { |
|
421 | 421 | "\n", |
422 | 422 | "We can use the `{model}.save()` method to save the model to 'keras_saved_model' format, this format can be used to save and load intermediate models in the training workflow. \n", |
423 | 423 | "\n", |
424 | | - "Note: **Important!** This format is not directly deployable on mobile devices and needs to exported to mobile ready format as explained in [this step](#Exporting-model-to-mobile-ready-format). " |
| 424 | + "Note: **Important!** This format is not directly deployable on mobile devices and needs to be exported to mobile ready format as explained in [this step](#Exporting-model-to-mobile-ready-format). " |
425 | 425 | ] |
426 | 426 | }, |
427 | 427 | { |
|
455 | 455 | "cell_type": "markdown", |
456 | 456 | "metadata": {}, |
457 | 457 | "source": [ |
458 | | - "If you want to load a model save to an intermediate format explained [here](#Save-Model-to-an-intermediate-format) you can use the `{model}.load()` method.\n", |
| 458 | + "If you want to load a model saved to an intermediate format explained [here](#Save-Model-to-an-intermediate-format) you can use the `{model}.load()` method.\n", |
459 | 459 | "\n", |
460 | 460 | "Note: **Important !** Models saved in tflite format explained [here](#Exporting-model-to-mobile-ready-format) cannot be loaded back and trained further as it is an export only format." |
461 | 461 | ] |
|
0 commit comments