Skip to content

Commit c8678e4

Browse files
BradNeubergBrad Neuberg
andauthored
Another round of change detection v1 notebook updates. (planetlabs#152)
Feedback from Jonathan Evens originally for the changes. Co-authored-by: Brad Neuberg <[email protected]>
1 parent 1f2106b commit c8678e4

File tree

6 files changed

+22
-15
lines changed

6 files changed

+22
-15
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ In this repository, you'll find a collection of [Jupyter notebooks](http://jupyt
3333
### Analyze and visualize Planet data
3434

3535
* Analytics quickstart:
36-
1. [Summarizing Feeds and Subscriptions](notebooks/jupyter-notebooks/analytics/quickstart/01_checking_available_feeds_and_subscriptions.ipynb)
36+
1. [Summarizing Feeds and Subscriptions](https://github.com/planetlabs/notebooks/blob/master/jupyter-notebooks/analytics/quickstart/01_checking_available_feeds_and_subscriptions.ipynb)
3737
2. [Getting Analytic Feed Results](https://github.com/planetlabs/notebooks/blob/master/jupyter-notebooks/analytics/quickstart/02_fetching_feed_results.ipynb)
3838
3. [Visualizing Raster Results](https://github.com/planetlabs/notebooks/blob/master/jupyter-notebooks/analytics/quickstart/03_visualizing_raster_results.ipynb)
3939
* Analytics user guide:

jupyter-notebooks/analytics/quickstart/01_checking_available_feeds_and_subscriptions.ipynb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7+
"### Planet Analytics API Tutorial\n",
8+
"\n",
79
"# Summarizing Feeds and Subscriptions\n",
810
"This notebook demonstrates how to describe available [Analytics Feeds](https://developers.planet.com/docs/analytics/#analytic-feeds) and [Subscriptions](https://developers.planet.com/docs/analytics/#subscriptions) with the Planet Analytic API."
911
]

jupyter-notebooks/analytics/quickstart/02_fetching_feed_results.ipynb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7+
"### Planet Analytics API Tutorial\n",
8+
"\n",
79
"# Getting Analytic Feed Results\n",
810
"This notebook shows how to paginate through Planet Analytic Feed Results for an existing analytics [Subscription](https://developers.planet.com/docs/analytics/#subscriptions) to construct a combined [geojson](https://geojson.org/) feature collection that can be imported into geospatial analysis tools."
911
]

jupyter-notebooks/analytics/quickstart/03_visualizing_raster_results.ipynb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7+
"### Planet Analytics API Tutorial\n",
8+
"\n",
79
"# Visualizing Raster Results\n",
810
"This notebook shows how to download and visualize [raster results](https://developers.planet.com/docs/analytics/#raster-results) from a Planet Analytics [Subscription](https://developers.planet.com/docs/analytics/#subscriptions)."
911
]

jupyter-notebooks/analytics/user-guide/03_change_detection.ipynb

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"\n",
3636
"In the previous notebook, we took a look at accessing Planet Analytic Feeds Results for both segmentation and object detection, and showed how to visualize Analytic Feeds data with maps and Planet imagery. \n",
3737
"\n",
38-
"In this notebook, we take a closer look at a specific type of change detection: Roads & Buildings Construction feeds. We'll show how to use Analytic Feeds and Subscriptions to get this type of Change Detection result, and we'll show how this data can be visualized."
38+
"In this notebook, we take a closer look at a specific type of change: Road & Building Constructions. We'll show how to use Analytic Feeds and Subscriptions to get this type of Change Detection result, and we'll show how this data can be visualized."
3939
]
4040
},
4141
{
@@ -44,12 +44,12 @@
4444
"source": [
4545
"## 2. Change Detection Results\n",
4646
"\n",
47-
"The semantic change detection product has been built through the following steps:\n",
47+
"Planet's Road & Building Change Detection product has been built through the following steps:\n",
4848
"\n",
4949
"1. Develop a high performing road and building detection model and leverage it to extract roads and buildings from imagery\n",
5050
"2. Run road and building detection over an AOI for an extended period of time, gathering as many data points as possible. From month to month, variations in atmosphere, shadows and other factors cause very small differences in the outputs over time leading to significant noise or “flicker”\n",
51-
"3. We de-noise the results by considering the temporal context of each pixel detected. This leads to a more consistent output, however it does introduce a lag in when we are able to detect change\n",
52-
"4. We then compare the most recent de-noised output with the previous de-noised output, pull out the differences, \"decimate\" the changes to a fixed size, and polygonize them.\n",
51+
"3. We de-noise the results by considering the temporal context of each pixel detected. This leads to a more consistent output, however it does introduce a \"lag\" in when we are able to detect change\n",
52+
"4. We then compare the most recent de-noised output with the previous de-noised output, pull out the differences and vectorize them into polygons, or more specifically into grid cells. This has the benefit of signaling where our model has detected a change.\n",
5353
"\n",
5454
"#### How do we define building and road construction?\n",
5555
"\n",
@@ -61,14 +61,15 @@
6161
"\n",
6262
"#### What does a change detection result represent?\n",
6363
"\n",
64-
"In the building construction feed, a change result contains a geographic polygon that represents the footprint of a contiguous area where we have detected building construction. \n",
65-
"Thus, these polygons represent general built-up area, and may not identify individual buildings. They may be a group of small buildings clumped together, or a new adjacent wing of an existing building.\n",
64+
"In the building construction feed, a change result contains a geographic polygon or grid cell that represents the footprint of a contiguous area where we have detected building construction. Thus, these polygons represent general built-up area, and may not identify individual buildings. They may be a group of small buildings clumped together, or a new adjacent wing of an existing building.\n",
6665
"\n",
67-
"In the case of the road construction feed, the change results contain a linestring, instead of a polygon. This linestring represents the skeleton of a road segment that has been constructed. \n",
66+
"In the case of the road construction feed, the change results also contain a polygon or grid cell. It represents the footprint of a contiguous area where a road segment has been constructed.\n",
6867
"\n",
6968
"#### When did the change actually occur?\n",
7069
"\n",
71-
"Building and road construction is typically detected 3-4 months after the event took place. Our system performs statistical inference on the time series of images at the pixel level, and issues a change detection once there is enough confidence that a true transition occurred. Since we use images from Planet Basemaps, which have a monthly sampling rate, we cannot determine the week or day of an event. \n"
70+
"Building construction is typically detected an average of two months after the event took place, while road construction is detected an average of two and half months after the event took place. Our system performs statistical inference on the time series of images at the pixel level, and issues a change detection once there is enough confidence that a true transition occurred. Currently, we use images from Planet's Monthly Basemaps, which have a monthly sampling rate. This results in an average lag of two to two and half month lag and a monthly cadence. \n",
71+
"\n",
72+
"![Diagram that explains the relationship between when a building or road event happens and when it is actually detected to illustrate cadence/lag](./imgs/cadence_lag_diagram.png)"
7273
]
7374
},
7475
{
@@ -177,8 +178,8 @@
177178
"outputs": [],
178179
"source": [
179180
"# Define the Subscripton UUID\n",
180-
"#subscription_id = \"dd2878b3-eaf0-4cff-b7f9-7a39d6f460a5\" # Monthly Building Construction\n",
181-
"subscription_id = \"dbfcd806-b44d-45d5-b84d-3566a80eca27\" # Monthly Road Construction\n",
181+
"#subscription_id = \"635c57d3-b921-453f-8e79-70929e50a470\" # Monthly Building Construction\n",
182+
"subscription_id = \"8869cf69-9596-47ab-8d94-52b94fcf528e\" # Monthly Road Construction\n",
182183
"\n",
183184
"# Construct the URL for the Subscription\n",
184185
"subscription_url = PAA_BASE_URL + 'subscriptions/' + subscription_id\n",
@@ -188,11 +189,11 @@
188189
"# Make the GET request for Subscriptions list \n",
189190
"subscription = session.get(subscription_url).json()\n",
190191
"\n",
191-
"# Print subscription data\n",
192-
"print(\"{} \\n{}\\nSubscription Id: {}\\n\".format(subscription['title'], subscription['description'], subscription['id']))\n",
193-
"\n",
194192
"# Print the subscription object\n",
195-
"print(json.dumps(subscription, sort_keys=True, indent=4))"
193+
"print(json.dumps(subscription, sort_keys=True, indent=4))\n",
194+
"\n",
195+
"# Print subscription data\n",
196+
"print(\"{} \\n{}\\nSubscription Id: {}\\n\".format(subscription['title'], subscription['description'], subscription['id']))\n"
196197
]
197198
},
198199
{
124 KB
Loading

0 commit comments

Comments
 (0)