Skip to content

Commit 9223370

Browse files
committed
review suggestions addedd
1 parent 8eb18eb commit 9223370

File tree

1 file changed

+23
-35
lines changed

1 file changed

+23
-35
lines changed

guide/14-deep-learning/how_AutoDL_works.ipynb

Lines changed: 23 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,7 @@
5252
"cell_type": "markdown",
5353
"metadata": {},
5454
"source": [
55-
"This guide explains the steps for training and evaluation of multiple network architectures supported by `arcgis.learn` API.\n",
56-
"The `arcgis.learn` API currently supports more than 30 deep learning networks to solve different problems, more specifically for object detetcion task only, API provides 4 deep learning networks along with MMDetection class that in turn supports more than twenty object detection networks. Similarly for pixel classification task, API provides support for 11 deep learning networks in which MMSegmentation class supports more than twenty pixel classification networks.\n",
57-
"\n",
58-
"To train a deep learning network using the `arcgis.learn` API, one must follow the complete pipeline that involves data preprocessing, network selection, hyper parameter tuning and network selection/evaluation based on the performance of the network. This can sometime become a difficult task for a user to iteratively run all the networks to compare the performance and selecting which network works best with the given data. \n",
59-
"\n",
60-
"AutoDL class automatically trains all the supported network with the given data within the provided time limit and comes up with a performance tally of all the networks which will provide a fair idea of the best performing network, the AutoDL class also saves all the networks during the training process which can be used later for fine tuning to enhance the network performance.\n"
55+
"<p>This guide explains the steps for the training and evaluation of multiple network architectures supported by the <code>arcgis.learn</code> API. &nbsp;The <code>arcgis.learn</code> API currently supports more than 30 deep learning networks for object detection. The API provides 4 deep learning networks, along with the <code>MMDetection</code> class, which supports more than twenty object detection networks. Similarly, for pixel classification, the API supports 11 deep learning networks, along with the <code>MMSegmentation</code> class, which supports more than twenty pixel classification networks. </p><p>To train a deep learning network using the <code>arcgis.learn</code> API, you must follow the complete pipeline, which involves data preprocessing, network selection, hyper parameter tuning, and network selection/evaluation based on the performance of the network. </p><p>As it can be difficult to iteratively run and compare all of the different networks, the <code>AutoDL</code> class automatically trains all of the supported networks with the given data within a provided time limit and provides a performance tally for all of the networks. The <code>AutoDL</code> class will also save all of the networks during the training process, allowing them to be used later for fine tuning to enhance the network performance. </p>\n"
6156
]
6257
},
6358
{
@@ -108,7 +103,7 @@
108103
"cell_type": "markdown",
109104
"metadata": {},
110105
"source": [
111-
"Let's see how AutoDL class works with `arcgis.learn`"
106+
"Let's see how `AutoDL` class works with `arcgis.learn`"
112107
]
113108
},
114109
{
@@ -140,7 +135,7 @@
140135
"cell_type": "markdown",
141136
"metadata": {},
142137
"source": [
143-
"Prepare data for AutoDL class using prepare_data() in `arcgis.learn`"
138+
"Prepare data for `AutoDL` class using `prepare_data()` in `arcgis.learn`"
144139
]
145140
},
146141
{
@@ -164,12 +159,12 @@
164159
"cell_type": "markdown",
165160
"metadata": {},
166161
"source": [
167-
"AutoDL class accepts the following paramters:\n",
162+
"`AutoDL` class accepts the following paramters:\n",
168163
"\n",
169164
"- `data` (Required Paramter): Returned data object from `prepare_data` function in the previous step.\n",
170165
" \n",
171166
"- `total_time_limit` (Optional parameter):\n",
172-
" The total time limit in hours for AutoDL to train and evaluate the networks. This parameter becomes important when time is the main constraint to the user. The AutoDL class calculates the number of chips that can be processed in the given time from the prepared databunch.\n",
167+
" The total time limit in hours for `AutoDL` to train and evaluate the networks. This parameter becomes important when time is the main constraint to the user. The `AutoDL` class calculates the number of chips that can be processed in the given time from the prepared databunch.\n",
173168
" \n",
174169
" \n",
175170
"- `mode` (Optional Parameter): Can be \"basic\" or \"advanced\".\n",
@@ -179,7 +174,7 @@
179174
" \n",
180175
"\n",
181176
"- `networks` (Optional Parameter):\n",
182-
" The list of models that will be used in the training process. If the user does not provides the parameter value the AutoDL class selects all the supported networks, however user can select one or multiple networks by passing the network name in a list.\n",
177+
" The list of models that will be used in the training process. If the user does not provides the parameter value the `AutoDL` class selects all the supported networks, however user can select one or multiple networks by passing the network name in a list.\n",
183178
"\n",
184179
" - _Supported Object Detection models_\n",
185180
" - SingleShotDetector, RetinaNet, FasterRCNN, YOLOv3, MMDetection\n",
@@ -204,11 +199,11 @@
204199
"metadata": {},
205200
"source": [
206201
"- **Basic**\n",
207-
" - In this mode we iterate through all the supported networks exactly once with the default backbone, train it with the passed data and calculate the network performance. At the end of each iteration the function will save the model to the disk. Maximum number of epochs to train each network is 20, however if the remaining time left to process the network is less than than the expected time(minimum time required to train the network), the program will automatically calculate the maximum number of epochs to train the network.\n",
202+
" - In this mode we iterate through all of the supported networks once with the default backbone, train it with the passed data, and calculate the network performance. At the end of each iteration, the function will save the model to the disk. The maximum number of epochs to train each network is 20, however, if the remaining time left to process the network is less than than the expected time (minimum time required to train the network), the program will automatically calculate the maximum number of epochs to train the network.\n",
208203
" \n",
209204
" \n",
210205
"- **Advanced**\n",
211-
" - To be used when the user wants to tune hyper parameters of two best performing networks from basic mode.This mode will divide the total time into two halfs. In the first half it works as basic mode where it will iterate through all the supported networks exactly once. In the second half it checks for two best performing networks. The program then trains the selected networks with different supported backbones. At the end of each iteration the function will save the model to the disk. Maximum number of epochs to train each network is 20, however if the remaining time left to process the network is less than the expected time(minimum time required to train the network), the program will automatically calculate the number of epochs to train the network.\n",
206+
" - To be used when the user wants to tune the hyper parameters of two best performing networks from the basic mode. This mode will divide the total time into two halves. In the first half, it works like basic mode, where it will iterate through all of the supported networks once. In the second half, it checks for the two best performing networks. The program then trains the selected networks with different supported backbones. At the end of each iteration, the function will save the model to the disk. The maximum number of epochs to train each network is 20, however, if the remaining time left to process the network is less than the expected time (minimum time required to train the network), the program will automatically calculate the number of epochs to train the network.\n",
212207
" "
213208
]
214209
},
@@ -225,15 +220,7 @@
225220
"cell_type": "markdown",
226221
"metadata": {},
227222
"source": [
228-
"When AutoDL class is initialized, it calculates the number of images that can be processed in the given time and the time required to process the entire data. The output of the cell above can be used to analyze and update the `total_time_limit` and `networks` parameters while initializing the class.\n",
229-
"\n",
230-
"**Here is an example of the output**\n",
231-
"\n",
232-
"- Given time to process the dataset is: 5.0 hours\n",
233-
"- Number of images that can be processed in the given time: 290\n",
234-
"- Time required to process the entire dataset of 3000 images is 52 hours\n",
235-
"\n",
236-
"It explains how many images can be processed to train all the selected network in the selected mode within the given time and also provides an estimate of time that AutoDL will take to train all the selected network with the entire dataset."
223+
"<p>When the <code>AutoDL</code> class is initialized, it calculates the number of images that can be processed in the given time and the time required to process the all of the data. The output of the cell above can then be used to analyze and update the <code>total_time_limit</code> and <code>networks</code> parameters while initializing the class. </p><p><strong>Here is an example of the output</strong> </p><ul><li>Given time to process the dataset is: 5.0 hours</li><li>Number of images that can be processed in the given time: 290</li><li>Time required to process the entire dataset of 3000 images is 52 hours</li></ul><p>This explains how many images can be processed to train all of the selected networks in the selected mode within the given time, as well as provides an estimate of the time that <code>AutoDL</code> will take to train all of the selected networks with the entire dataset.</p>"
237224
]
238225
},
239226
{
@@ -265,7 +252,7 @@
265252
"cell_type": "markdown",
266253
"metadata": {},
267254
"source": [
268-
"The output of this function will be a list of supported pixel classification models by `AutoDL` class"
255+
"The output of this function will be a list of pixel classification models supported by the `AutoDL` class."
269256
]
270257
},
271258
{
@@ -289,7 +276,7 @@
289276
"cell_type": "markdown",
290277
"metadata": {},
291278
"source": [
292-
"The output of this function will be a list of supported object detection models by AutoDL class"
279+
"The output of this function will be a list of object detection models supported by the `AutoDL` class."
293280
]
294281
},
295282
{
@@ -304,7 +291,7 @@
304291
"cell_type": "markdown",
305292
"metadata": {},
306293
"source": [
307-
"The `fit` method will be used to train all the selected networks automatically within the provided time limit"
294+
"The `fit` method will be used to train all of the selected networks automatically within the provided time limit."
308295
]
309296
},
310297
{
@@ -328,7 +315,7 @@
328315
"cell_type": "markdown",
329316
"metadata": {},
330317
"source": [
331-
"This method will return an evaluation report as a dataframe that will include several fields including model's accuracy with train/valid loss, dice(for pixel classification), learning rate used to train the model, train time and backbone."
318+
"This method will return an evaluation report as a dataframe that will include several fields, including the model's accuracy with train/validation loss, dice(for pixel classification), the learning rate used to train the model, train time, and backbone."
332319
]
333320
},
334321
{
@@ -352,7 +339,7 @@
352339
"cell_type": "markdown",
353340
"metadata": {},
354341
"source": [
355-
"This method will display the results for the best performing model"
342+
"This method will display the results for the best performing model."
356343
]
357344
},
358345
{
@@ -424,7 +411,7 @@
424411
"cell_type": "markdown",
425412
"metadata": {},
426413
"source": [
427-
"Once the best performing network is identified it can be further fine tuned using the `ImageryModel` class. This class supports methods that can be used to load, fine-tune and save the model for further use."
414+
"Once the best performing network is identified, it can be further fine tuned using the `ImageryModel` class. This class supports methods that can be used to load, fine-tune, and save the model for further use."
428415
]
429416
},
430417
{
@@ -448,9 +435,9 @@
448435
"cell_type": "markdown",
449436
"metadata": {},
450437
"source": [
451-
"- `load` method is used to load a saved model from the disk using `AutoDL` class, it accepts the following parameters:\n",
438+
"- The load method is used to load a saved model from the disk using the `AutoDL` class. It accepts the following parameters:\n",
452439
" - path: Path to the ESRI Model Definition (.emd) file\n",
453-
" - data: Returned data object from prepare_data function"
440+
" - data: Returned data object from `prepare_data` function"
454441
]
455442
},
456443
{
@@ -466,15 +453,15 @@
466453
"cell_type": "markdown",
467454
"metadata": {},
468455
"source": [
469-
"### Learning rate Load the model\n",
456+
"### Learning rate\n",
470457
"<a id='imLR'></a>"
471458
]
472459
},
473460
{
474461
"cell_type": "markdown",
475462
"metadata": {},
476463
"source": [
477-
"`lr_find` runs the Learning Rate Finder. Helps in choosing the optimum learning rate for training the model."
464+
"The `lr_find` method runs the Learning Rate Finder, which helps in choosing the optimum learning rate for training the model."
478465
]
479466
},
480467
{
@@ -522,7 +509,7 @@
522509
"cell_type": "markdown",
523510
"metadata": {},
524511
"source": [
525-
"This method saves the model weights, creates an Esri Model Definition and Deep Learning Package zip for deployment to Image Server or ArcGIS Pro."
512+
"This method saves the model weights and creates an Esri Model Definition and a Deep Learning Package zip for deployment to Image Server or ArcGIS Pro."
526513
]
527514
},
528515
{
@@ -545,14 +532,15 @@
545532
"cell_type": "markdown",
546533
"metadata": {},
547534
"source": [
548-
"This guide explains how AutoDL class can be used to automate multiple deeplearning models supported by `arcgis.learn` API. For every step in the workflow, we define a function and talk about its usage. This guide can be a starting point for developers to train and evaluate multiple `arcgis.learn` supported model's performace."
535+
"This guide has explained how the `AutoDL` class can be used to automate multiple deep learning models supported by the `arcgis.learn` API. For every step in the workflow, we defined a function and discussed its usage. This guide can be a starting point for developers to train and evaluate multiple `arcgis.learn` supported models' performances.\n",
536+
"\n"
549537
]
550538
},
551539
{
552540
"cell_type": "markdown",
553541
"metadata": {},
554542
"source": [
555-
"For more information about the API, please go to the <a href=\"https://developers.arcgis.com/python/api-reference/arcgis.learn.toc.html#autodl\">API reference</a>"
543+
"For more information about the API, refer to the <a href=\"https://developers.arcgis.com/python/api-reference/arcgis.learn.toc.html#autodl\">API reference</a>"
556544
]
557545
}
558546
],

0 commit comments

Comments
 (0)