Skip to content

Commit 733c923

Browse files
committed
priyanka_review_update
1 parent 9fb0c30 commit 733c923

File tree

1 file changed

+36
-38
lines changed

1 file changed

+36
-38
lines changed

guide/14-deep-learning/how_PSETAE_works.ipynb

Lines changed: 36 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"# How PSETAE model works"
8+
]
9+
},
310
{
411
"cell_type": "markdown",
512
"metadata": {},
613
"source": [
714
"## Table of Contents\n",
815
"\n",
9-
"* [Satellite Image Time-Series](#Satellite-Image-Time-Series)\n",
10-
"* [Training Labels and Time-Series Satellite Imagery](#Training-Labels-and-Time-Series-Satellite-Imagery)\n",
11-
"* [Time-Series Classification](#Time-Series-Classification)\n",
12-
" * [Pixel-Set Encoder](#Pixel-Set-Encoder)\n",
13-
" * [Temporal Attention Encoder](#Temporal-Attention-Encoder)\n",
16+
"* [Satellite image time series](#Satellite-image-time-series)\n",
17+
"* [Prepare training data for satellite image time series](#Prepare-training-data-for-satellite-image-time-series)\n",
18+
"* [Architecture](#Architecture)\n",
19+
" * [Pixel-set encoder](#Pixel-set-encoder)\n",
20+
" * [Temporal attention encoder](#Temporal-attention-encoder)\n",
1421
" * [Spectro-temporal classifier](#Spectro-temporal-classifier)\n",
1522
"* [Implementation in arcgis.learn](#Implementation-in-arcgis.learn) \n",
1623
"* [Summary](#Summary)\n",
@@ -21,14 +28,14 @@
2128
"cell_type": "markdown",
2229
"metadata": {},
2330
"source": [
24-
"## Satellite Image Time-Series"
31+
"## Satellite image time series"
2532
]
2633
},
2734
{
2835
"cell_type": "markdown",
2936
"metadata": {},
3037
"source": [
31-
"Earth observation data cube or time-series is referred to as collection of satellite images of a location from different time-periods, stacked vertically resulting in a 3-dimensional structure. The collection have a common projection and a consistent timeline. Each location in the space-time is a vector of values across a timeline as shown in figure 1."
38+
"Earth observation time series is referred to as collection of satellite images of a location from different time-periods, stacked vertically resulting in a 3-dimensional structure. The collection has a common projection and a consistent timeline. Each location in the space-time is a vector of values across a timeline as shown in figure 1:"
3239
]
3340
},
3441
{
@@ -42,35 +49,35 @@
4249
"cell_type": "markdown",
4350
"metadata": {},
4451
"source": [
45-
"<center> Figure 1. Time-series of satellite imagery </center>"
52+
"<center> Figure 1. Time-series of satellite imagery. [2] </center>"
4653
]
4754
},
4855
{
4956
"cell_type": "markdown",
5057
"metadata": {},
5158
"source": [
52-
"Combination of temporal component with spectral information allow for detection and classification of complex pattern in various applications such as crop type and condition classification, mineral and land-cover mapping etc"
59+
"Combination of temporal component with spectral information allow for detection and classification of complex pattern in various applications such as crop type and condition classification, mineral and land-cover mapping etc."
5360
]
5461
},
5562
{
5663
"cell_type": "markdown",
5764
"metadata": {},
5865
"source": [
59-
"In this guide, we will focus on PSETAE, a transformer based deep learning model originally developed by [Garnot et al](https://openaccess.thecvf.com/content_CVPR_2020/papers/Garnot_Satellite_Image_Time_Series_Classification_With_Pixel-Set_Encoders_and_Temporal_CVPR_2020_paper.pdf) for agricultural parcels classification into different crop types in satellite image time-series."
66+
"In this guide, we will focus on `PSETAE`, a transformer based deep learning model originally developed by [Garnot et al](https://openaccess.thecvf.com/content_CVPR_2020/papers/Garnot_Satellite_Image_Time_Series_Classification_With_Pixel-Set_Encoders_and_Temporal_CVPR_2020_paper.pdf) for agricultural parcels classification into different crop types in satellite image time-series."
6067
]
6168
},
6269
{
6370
"cell_type": "markdown",
6471
"metadata": {},
6572
"source": [
66-
"## Training Labels and Time-Series Satellite Imagery"
73+
"## Prepare training data for satellite image time series"
6774
]
6875
},
6976
{
7077
"cell_type": "markdown",
7178
"metadata": {},
7279
"source": [
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",
80+
"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) tool 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",
7481
"\n",
7582
"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 into different classes, based on the available information. Labelling of different crop types are shown in the figure. "
7683
]
@@ -93,30 +100,23 @@
93100
"cell_type": "markdown",
94101
"metadata": {},
95102
"source": [
96-
"## Time-Series Classification"
103+
"## Architecture"
97104
]
98105
},
99106
{
100107
"cell_type": "markdown",
101108
"metadata": {},
102109
"source": [
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",
110+
"`PSETAE` model 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",
104111
"\n",
105-
"The architecture of PSETAE consists of a pixel-set encoder, temporal attention encoder and, classifier. The components are briefly described in following sections."
112+
"The architecture of `PSETAE` model consists of a pixel-set encoder, temporal attention encoder and, classifier. The components are briefly described in following sections."
106113
]
107114
},
108115
{
109116
"cell_type": "markdown",
110117
"metadata": {},
111118
"source": [
112-
"## Model architecture"
113-
]
114-
},
115-
{
116-
"cell_type": "markdown",
117-
"metadata": {},
118-
"source": [
119-
"### Pixel-Set Encoder"
119+
"### Pixel-set encoder"
120120
]
121121
},
122122
{
@@ -139,14 +139,14 @@
139139
"cell_type": "markdown",
140140
"metadata": {},
141141
"source": [
142-
"<center> Figure 3. Pixel-Set Encoder </center> "
142+
"<center> Figure 3. Pixel-Set Encoder. [1] </center> "
143143
]
144144
},
145145
{
146146
"cell_type": "markdown",
147147
"metadata": {},
148148
"source": [
149-
"### Temporal Attention Encoder"
149+
"### Temporal attention encoder"
150150
]
151151
},
152152
{
@@ -171,7 +171,7 @@
171171
"cell_type": "markdown",
172172
"metadata": {},
173173
"source": [
174-
"<center> Figure 4. Temporal Attention Encoder </center> "
174+
"<center> Figure 4. Temporal Attention Encoder. [1] </center> "
175175
]
176176
},
177177
{
@@ -194,7 +194,7 @@
194194
"cell_type": "markdown",
195195
"metadata": {},
196196
"source": [
197-
"## Implementation in `arcgis.learn`"
197+
"## Implementation in `arcgis.learn`"
198198
]
199199
},
200200
{
@@ -203,19 +203,17 @@
203203
"source": [
204204
"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",
205205
"\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-
"\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",
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`. 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",
209207
"\n",
210208
"`data = prepare_data(path=r\"path/to/exported/data\", n_temporal, min_points, batch_size, n_temporal_dates, dataset_type=\"PSETAE\")`\n",
211209
" \n",
212210
"where,\n",
213211
"\n",
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 date strings in YYYY-MM-DD format*.\n",
218-
"* `dataset_type` - required. *type of dataset in-sync with the model*"
212+
"- `n_temporal` - Optional for multi-dimensional, required for composite raster. Number of temporal observations or time steps or number of composited rasters. \n",
213+
"- `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",
214+
"- `batch_size` - Optional. Suggested batch size for this model is around 128.\n",
215+
"- `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 date strings in YYYY-MM-DD format.\n",
216+
"- `dataset_type` - Required. Type of dataset in-sync with the model."
219217
]
220218
},
221219
{
@@ -224,7 +222,7 @@
224222
"source": [
225223
"By default, initialization of the `PSETAE` object as shown below:\n",
226224
"\n",
227-
"`model = arcgis.learn.PSETAE(data=data)`\n",
225+
"`model = arcgis.learn.PSETAE(data)`\n",
228226
"\n",
229227
"model parameters that can be passed using keyword arguments:\n",
230228
"\n",
@@ -262,7 +260,7 @@
262260
],
263261
"metadata": {
264262
"kernelspec": {
265-
"display_name": "Python 3",
263+
"display_name": "Python 3 (ipykernel)",
266264
"language": "python",
267265
"name": "python3"
268266
},
@@ -276,7 +274,7 @@
276274
"name": "python",
277275
"nbconvert_exporter": "python",
278276
"pygments_lexer": "ipython3",
279-
"version": "3.7.11"
277+
"version": "3.9.15"
280278
},
281279
"toc": {
282280
"base_numbering": 1,

0 commit comments

Comments
 (0)