|
70 | 70 | "cell_type": "markdown",
|
71 | 71 | "metadata": {},
|
72 | 72 | "source": [
|
73 |
| - "The `Export Training Data for Deep Learning` is used to export training data for the model. The input satellite time-series is a `composite` of rasters from the required time periods or time steps. \n", |
| 73 | + "The [Export Training Data for Deep Learning](https://pro.arcgis.com/en/pro-app/latest/tool-reference/image-analyst/export-training-data-for-deep-learning.htm) is used to export training data for the model. The input satellite time-series is a [composite](https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/composite-bands.htm) of rasters or [multi-dimensional raster](https://pro.arcgis.com/en/pro-app/latest/help/data/imagery/an-overview-of-multidimensional-raster-data.htm) from the required time periods or time steps. Here are the [steps](https://www.youtube.com/watch?v=HFbTFTnsMWM), to create multi-dimensional raster from collection of images. \n", |
74 | 74 | "\n",
|
75 |
| - "Training labels can be created using the `Label objects for deep learning` tool available inside `Classification Tools`. Pixels are labelled with class based on the available information. As shown in figure are labelling of different crop types. " |
| 75 | + "Training labels can be created using the [Label objects for deep learning](https://pro.arcgis.com/en/pro-app/latest/help/analysis/image-analyst/label-objects-for-deep-learning.htm#:~:text=The%20Label%20Objects%20for%20Deep,is%20divided%20into%20two%20parts.) tool available inside `Classification Tools`. Pixels are labelled with class based on the available information. As shown in figure are labelling of different crop types. " |
76 | 76 | ]
|
77 | 77 | },
|
78 | 78 | {
|
|
102 | 102 | "source": [
|
103 | 103 | "PSETAE architecure is based on transfomers, originally developed for sequence-to-sequence modeling. The proposed architecture encodes time-series of multi-spectral images. The pixels under each class label is given by spectro-temporal tensor of size T x C x N, where T the number of temporal observation, C the number of spectral channels, and N the number of pixels. \n",
|
104 | 104 | "\n",
|
105 |
| - "The architecture of pse-tae consists of a pixel-set encoder, temporal attention encoder and, classifier. The components are briefly described in following sections" |
| 105 | + "The architecture of pse-tae consists of a pixel-set encoder, temporal attention encoder and, classifier. The components are briefly described in following sections." |
106 | 106 | ]
|
107 | 107 | },
|
108 | 108 | {
|
|
153 | 153 | "cell_type": "markdown",
|
154 | 154 | "metadata": {},
|
155 | 155 | "source": [
|
156 |
| - "This component is based on the state of the art transformer used originally for dealing with sequential data from [Vaswani et al.](https://proceedings.neurips.cc/paper/2017/file/3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf). After multi-channel spectral embedding at time t by pse, the temporal attention encoder (tae) tries to find embedding for each class time-series. The authors made the following changes to original transformers:\n", |
| 156 | + "This component is based on the state-of-the-art transformer used originally for dealing with sequential data from [Vaswani et al.](https://proceedings.neurips.cc/paper/2017/file/3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf). After multi-channel spectral embedding at time t by pse, the temporal attention encoder (tae) tries to find embedding for each class time-series. The authors made the following changes to original transformers:\n", |
157 | 157 | "\n",
|
158 | 158 | "- The pre-trained word embedding model used in the original mode is replaced by PSE's spectral embedding.\n",
|
159 | 159 | "- The positional encoder uses the first obervation or date to calculate number of days to other dates. This helps the model to take in account the variance in temporal observations.\n",
|
|
187 | 187 | "source": [
|
188 | 188 | "Shared PSE embeds all input time-series rasters in parallel and resulting embedded sequence is processed by temporal encoder. The resulting embedding is processed by an mlp to produice class logits. Spectro-temporal classifier combines PSE and TAE with a final MLP layer to produce class logits. \n",
|
189 | 189 | "\n",
|
190 |
| - "For further information on the model's architecture, refer to paper" |
| 190 | + "For further information on the model's architecture, refer to paper." |
191 | 191 | ]
|
192 | 192 | },
|
193 | 193 | {
|
|
201 | 201 | "cell_type": "markdown",
|
202 | 202 | "metadata": {},
|
203 | 203 | "source": [
|
204 |
| - "Input Raster - Initially, time-series raster is created using `Composite Bands` tool \n", |
| 204 | + "Input Raster - time-series raster is a [composite](https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/composite-bands.htm) or [multi-dimensional](https://pro.arcgis.com/en/pro-app/latest/help/data/imagery/an-overview-of-multidimensional-raster-data.htm) raster from the required time periods or time steps. \n", |
205 | 205 | "\n",
|
206 |
| - "Export - use the composited raster as input raster to export the raster chips in `RCNN Masks` metadata format using `Export Training data for deep learning` tool available in `ArcGIS Pro`.\n", |
| 206 | + "Export - use the input raster to export the raster chips in `RCNN Masks` metadata format using [Export Training Data for Deep Learning](https://pro.arcgis.com/en/pro-app/latest/tool-reference/image-analyst/export-training-data-for-deep-learning.htm) tool available in `ArcGIS Pro`.\n", |
207 | 207 | "\n",
|
208 |
| - "The resulting path is provided to `prepare_data` function in `arcgis.learn` to create a databunch.\n", |
| 208 | + "The resulting path from from export tool is provided to [prepare_data](https://developers.arcgis.com/python/api-reference/arcgis.learn.toc.html#prepare-data) function in `arcgis.learn` to create a databunch.\n", |
209 | 209 | "\n",
|
210 | 210 | "`data = prepare_data(path=r\"path/to/exported/data\", n_temporal, min_points, batch_size, n_temporal_dates, dataset_type=\"PSETAE\")`\n",
|
211 | 211 | " \n",
|
212 | 212 | "where,\n",
|
213 | 213 | "\n",
|
214 |
| - "* n_temporal - *Number of temporal observations or time steps or number of composited rasters*.\n", |
215 |
| - "* min_points - *Number of pixels equal to or multiples of 64 to sample from the each labelled region of training data i.e. 64, 128 etc*\n", |
216 |
| - "* batch_size - *suggested batch size for this model is around 128*\n", |
217 |
| - "* n_temporal_dates - *The dates of the observations will be used for the positional encoding and should be stored as a list of dates strings in YYYY-MM-DD format. For example, If we have stacked imagery of n bands each from two dates then, ['YYYY-MM-DD','YYYY-MM-DD'].*" |
| 214 | + "* `n_temporal` - optional for multi-dimensional, required for composite raster. *Number of temporal observations or time steps or number of composited rasters*. \n", |
| 215 | + "* `min_points` - optional. *Number of pixels equal to or multiples of 64 to sample from the each labelled region of training data i.e. 64, 128 etc*\n", |
| 216 | + "* `batch_size` - optional. *suggested batch size for this model is around 128*\n", |
| 217 | + "* `n_temporal_dates` - optional for multi-dimensional, required for composite raster. *The dates of the observations will be used for the positional encoding and should be stored as a list of dates strings in YYYY-MM-DD format. For example, If we have stacked imagery of n bands each from two dates then, ['YYYY-MM-DD','YYYY-MM-DD'].*\n", |
| 218 | + "* `dataset_type` - required. *type of dataset in-sync with the model*" |
218 | 219 | ]
|
219 | 220 | },
|
220 | 221 | {
|
|
225 | 226 | "\n",
|
226 | 227 | "`model = arcgis.learn.PSETAE(data=data)`\n",
|
227 | 228 | "\n",
|
| 229 | + "Default values for optimal performance are set for model's hyperparmeters. \n", |
| 230 | + "\n", |
228 | 231 | "Here data is the object returned from `prepare_data` function.\n",
|
229 | 232 | "\n",
|
230 | 233 | "Than, the basic `arcgis.learn` workflow can be followed.\n",
|
231 | 234 | "\n",
|
232 |
| - "For more information about the API & model applications, please go to the [API reference](https://developers.arcgis.com/python/api-reference/arcgis.learn.toc.html)." |
| 235 | + "For more information about the API & modify model's keyword arguments, please go to the [API reference](https://developers.arcgis.com/python/api-reference/arcgis.learn.toc.html)." |
233 | 236 | ]
|
234 | 237 | },
|
235 | 238 | {
|
|
243 | 246 | "cell_type": "markdown",
|
244 | 247 | "metadata": {},
|
245 | 248 | "source": [
|
246 |
| - "In this guide, we learned about the various details of the psetae model, its working and how we can initialize the model in `arcgis.learn`" |
| 249 | + "In this guide, we learned about the various details of the psetae model, its working and how we can initialize the model in `arcgis.learn`." |
247 | 250 | ]
|
248 | 251 | },
|
249 | 252 | {
|
|
278 | 281 | "name": "python",
|
279 | 282 | "nbconvert_exporter": "python",
|
280 | 283 | "pygments_lexer": "ipython3",
|
281 |
| - "version": "3.8.13" |
| 284 | + "version": "3.7.11" |
282 | 285 | },
|
283 | 286 | "toc": {
|
284 | 287 | "base_numbering": 1,
|
|
0 commit comments