如何使用Picterra的地理空间平台分析卫星图像

From April-May 2020, Sentinel-Hub had organized the third edition of their custom script competition. The competition was organized in collaboration with the Copernicus EU Earth Observation programme, the European Space Agency and AI4EO consortium.

从2020年4月至5月,Sentinel-Hub组织了第三次自定义脚本竞赛 。 该竞赛是与哥白尼欧盟地球观测计划欧洲航天局AI4EO财团合作组织的

Motive of the competition:

比赛动机:

To look for new, innovative scripts, which enable users to make sense of Earth Observation data. It was designed to find solutions to the huge challenges in the new ‘normal

寻找新的,创新的脚本,使用户能够理解地球观测数据。 它旨在为新的“ 正常 ”情况下的巨大挑战找到解决方案

What was the objective of our submission:

我们提交的目标是什么

Covid-19 has led to many world governments enforcing emergency quarantine measures. What is the impact of such policies on the environment? Can we measure the change in pollution levels? Is there a co-relation to economic activity? And can we build leading indicators which enable us to measure economic activity at a global scale. Through our project, we tried to analyze satellite imagery to identify the answers.

Covid-19导致许多世界政府强制执行紧急隔离措施。 此类政策对环境有何影响? 我们可以衡量污染水平的变化吗? 与经济活动是否有关联? 我们是否可以建立领先的指标,使我们能够在全球范围内衡量经济活动。 通过我们的项目,我们尝试分析卫星图像以找出答案。

Tools used:

使用的工具:

The tools make the man, or so they say!

这些工具造就了男人,或者他们说!

I always tell my team to first start, by researching the available tools. Because the right tools can make or break a project!

我总是告诉我的团队首先研究可用的工具。 因为正确的工具可以建立或破坏项目!

The tools that were available for this project were:

该项目可用的工具有:

  1. Sentinel-Hub EO Browser

    Sentinel-Hub EO浏览器

  2. Sentinel-Hub API access

    Sentinel-Hub API访问

  3. Picterra’s AI platform

    Picterra的AI平台

  4. euroData Cube

    euroData多维数据集

We first used Sentinel-5P data to plot NO2 levels. This was done to identify any anomalies (sudden changes) in the data. This was then collaborated with VHR imagery (Very high resolution imagery)

我们首先使用Sentinel-5P数据绘制NO2水平。 这样做是为了识别数据中的任何异常(突然变化)。 然后与VHR影像(非常高分辨率的影像)合作

Statistical analysis of this data was used to show a significant difference in countries like Germany (where the lockdown was strictly implemented) vs countries like Italy.

通过对该数据进行统计分析,可以发现德国(严格执行锁定)等国家与意大利等国家之间存在显着差异。

The plot of NO2 levels for Germany and Italy. Post the lock-down, pollution levels in Germany drop significantly.
Plot of NO2 levels for Germany & Italy (note the presence of missing values) Source: Sentinel-5P processed data
德国和意大利的NO2水平图(注意存在遗漏值)来源:Sentinel-5P处理的数据

I have uploaded the notebook used for plotting the above plot on euroData Cube’s Contribution page. you can check it via the link given below:

我已经将用于绘制上述图表的笔记本上载到euroData Cube的“贡献”页面。 您可以通过以下链接进行检查:

https://eurodatacube.com/marketplace/notebooks/contributions/NO2_Analysis_Covid19_Lockdowns.ipynb

https://eurodatacube.com/marketplace/notebooks/contributions/NO2_Analysis_Covid19_Lockdowns.ipynb

Image for post

NO2 is produced by vehicular traffic and as un-burnt residue from chemical processes. This can be collaborated by counting cars from high resolution satellite imagery.

机动车交通产生的二氧化氮是化学过程中未燃烧的残留物。 可以通过计算高分辨率卫星图像中的汽车来进行协作。

We will now use Picterra’s machine learning platform to identify vehicles in VHR imagery.

现在,我们将使用Picterra的机器学习平台来识别VHR图像中的车辆。

We need to first login to Picterra’s geo-spatial imagery platform. They have a free trial version, which you can use (without providing any credit cards!)

我们需要先登录Picterra的地理空间图像平台。 他们有一个免费的试用版,您可以使用它( 无需提供任何信用卡! )

Once on the home page, you can Create a new project

进入主页后,您可以创建一个新项目

Image for post

Now you can upload images from your local drive (other options are Online map imagery OR the option to Buy satellite images). Once uploaded, you can then use it to train a detector.

现在,您可以从本地驱动器上载图像 (其他选项是“ 在线地图图像”或“ 购买卫星图像 ”选项)。 上传后,您可以使用它来训练探测器。

Image for post

Once the images are uploaded, we then go to the training section. Here we can use the platform to train a detector. However there are pre-built detectors which you can use. But for this demo, we will train a new one

图片上传后,我们将转到培训部分。 在这里,我们可以使用平台训练探测器。 但是,您可以使用预制的探测器。 但是对于这个演示,我们将训练一个新的

Image for post
Training mode!
训练模式!
Image for post
Available pre-trained models
可用的预训练模型

Click on the Train a new detector

单击训练新的检测器

There are some custom base models. We chose the Vehicles option

有一些自定义基本模型。 我们选择了车辆选项

Image for post

We want to detect cars

我们要检测汽车

There are two available detection type: i) Count and ii) Segmentation

有两种可用的检测类型:i)计数和ii)分段

We select the default Count option. and then press the Create button

我们选择默认的“ 计数”选项。 然后按创建按钮

Image for post

Then add the images that you had added to the project. and press the Start Training button

然后添加您已添加到项目中的图像。 然后按开始训练按钮

Image for post

When you do it for the first time, Picterra gives you a nice video tutorial that walks you through the training process.

第一次进行此操作时,Picterra会为您提供一个不错的视频教程,引导您完成培训过程。

The interface is very intuitive, and once you understand the controls, it becomes easy to navigate.

界面非常直观,一旦您了解了控件,就可以轻松浏览。

First select the Training button to the left. After that you can select the area of interest, as marked by the yellow square. Clicking on the selected AOI, will zoom into the image

首先选择左侧的训练按钮。 之后,您可以选择感兴趣的区域,以黄色正方形标记。 单击所选的AOI,将放大图像

Image for post

Now click on the Polygon button and select the Circle option

现在单击“ 多边形”按钮,然后选择“ 圆”选项

Image for post

You can now click on each of the parked cars within the area of interest and draw a circle on top. This is now your annotated train dataset. You could have selected the polygon option and drawn a box across the car outline, but I am too lazy for that!

现在,您可以单击感兴趣区域内的每个停放的汽车,并在顶部绘制一个圆圈。 现在这是您带注释的火车数据集。 您可以选择“多边形”选项,并在汽车轮廓上绘制一个框,但是我实在太懒了!

Image for post

Now select the Testing button on the left menu and click and mark the testing area on the image. You can annotate the testing dataset. But here I will skip that step — Just to check what happens!

现在,选择左侧菜单上的“ 测试”按钮,然后单击并在图像上标记测试区域。 您可以注释测试数据集。 但是在这里,我将跳过该步骤- 仅检查发生了什么!

Now click on the Train Detector button at the top of the dashboard.

现在,单击仪表板顶部的“ 火车检测器”按钮。

Image for post

Now you can go and have a coffee ( I prefer my masala chai!)

现在您可以去喝咖啡了( 我更喜欢我的咖喱柴! )

Image for post
https://en.wikipedia.org/wiki/Masala_chai#/media/File:Masala_Chai.JPG https://en.wikipedia.org/wiki/Masala_chai#/media/File:Masala_Chai.JPG

OR/AND

或/与

can check the educational resources provided. Do check the Picterra University. It has some good resources on end-to-end machine learning for geo-spatial images.

可以查看提供的教育资源。 请检查Picterra大学。 它在地理空间图像的端到端机器学习方面有一些不错的资源。

Since the training is now finished, let's go and check the performance of the detector.

由于培训现已结束,因此我们开始检查检测器的性能。

Image for post
Testing output
测试输出

The performance is good…but not great! At the bottom right, it has mis-identified the roof of the warehouse as a car.

表现不错…但不是很好! 在右下角,它错误地将仓库的屋顶标识为汽车。

For a detector its important to know what it should not consider as an object. In machine learning terms - false positives should be low.

对于检测器来说,重要的是要知道它不应该考虑什么。 用机器学习的术语来说,误报率应该很低。

So we will annotate some more vehicles for our training set. We select a larger area near our previous training set.

因此,我们将为训练集注释更多的车辆。 我们在之前的训练集附近选择了一个较大的区域。

Image for post

Post training, I get a warning: it seems I have some overlapping annotations in the training set. which is true. This can cause mergers while running the inference jobs and give an incorrect count.

训练后,我得到一个警告:看来我在训练集中有一些重叠的注释。 没错 这可能会在运行推理作业时导致合并,并且计数不正确。

So let’s correct that -

所以让我们更正-

Use the Select button on the left to select any of the annotations & modify the marker (green circle).

使用左侧的“选择”按钮选择任何注释并修改标记( 绿色圆圈 )。

Image for post
Modifying the training data to avoid merged annotations
修改训练数据以避免合并注释

Retraining the detector, we get the following output.

重新训练检测器,我们得到以下输出。

Image for post
Testing area after re-training
重新训练后的测试区域

Seems good. We have missed one large white vehicle at the left, but now the misclassification from the roof is missing. And it has got the car to the extreme left corner.

看起来不错。 我们错过了左侧的一辆大型白色车辆,但是现在缺少了从车顶分类错误的信息。 它已将汽车推到了最左端。

The detector can be trained with more data. Let’s now run the detector on the entire image to see the evaluation performance. We will also evaluate it on a new image.

可以用更多数据训练检测器。 现在让我们在整个图像上运行检测器以查看评估性能。 我们还将在新图像上对其进行评估。

Image for post
Added new un-seen images & the trained detector
添加了新的看不见的图像和训练有素的探测器

Press the Run Detector button in front of the image. A prompt informs you about the number of processing quota required for running the data. Since we are running on a free-quota, we press Start Detection.

按下图像前面的“运行检测器”按钮。 提示会通知您有关运行数据所需的处理配额数量。 由于我们使用的是免费配额,因此请按开始检测。

Image for post
Prompt for the Processing quota for the detector
提示检测器的处理配额
Image for post

Viewing the results shows us the output of the detector

查看结果可向我们显示检测器的输出

Image for post
Detector output from unseen images
来自看不见图像的检测器输出

We can also use this powerful platform, for other object detection activities, like solar-arrays, ships, trash, military vehicles etc.!

我们还可以使用这个功能强大的平台进行其他物体检测活动,例如太阳能电池板,轮船,垃圾箱,军用车辆等!

Please check Picterra’s blog for their recent success stories:

请查看Picterra的博客,了解他们最近的成功案例:

Note on image licensees:

关于图片被许可人的注意事项:

Unless mentioned otherwise, the author owns the licenses to the images.

除非另有说明,否则作者拥有这些图像的许可证。

Indian mosiac (NO2 levels) was created by the author using Sentinel-Hub Platform

作者使用Sentinel-Hub平台创建了印度洋霜(NO2含量)

Time series plots for No2 levels in Germany & Italy were created by the author using code specified above

作者使用上面指定的代码创建了德国和意大利2级水平的时间序列图

Screenshots are from Picterra’s geo-spatial platform

屏幕截图来自Picterra的地理空间平台

翻译自: https://towardsdatascience.com/how-i-won-sentinel-hub-covid-19-custom-script-hackathon-be882ed05186

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值