Google Earth Engine(GEE)——TensorFlow支持深度学习等高级机器学习方法(非免费项目)

简介: Google Earth Engine(GEE)——TensorFlow支持深度学习等高级机器学习方法(非免费项目)

TensorFlow 和地球引擎

TensorFlow是一个开源机器学习平台,支持深度学习等高级机器学习方法。本页面介绍了 Earth Engine 中的 TensorFlow 特定功能。尽管 TensorFlow 模型是在 Earth Engine 之外开发和训练的,但 Earth Engine API 提供了以 TFRecord 格式导出训练和测试数据以及以 TFRecord 格式导入/导出图像的方法。有关如何开发管道以将 TensorFlow 与 Earth Engine 中的数据结合使用的更多信息,请参阅 TensorFlow 示例页面。请参阅 TFRecord 页面以了解有关 Earth Engine 如何将数据写入 TFRecord 文件的更多信息。


ee.Model

该ee.Model包处理与 TensorFlow 支持的机器学习模型的交互。


与 AI Platform 上托管的模型交互

ee.Model.fromAiPlatformPredictor(projectName, projectId, modelName, version, region, inputProperties, inputTypeOverride, inputShapes, proj, fixInputProj, inputTileSize, inputOverlapSize, outputTileSize, outputBands, outputProperties, outputMultiplier)

Returns an ee.Model from a description of an AI Platform prediction model. (See https://cloud.google.com/ml-engine/).


Arguments:

projectName (Object, default: null):

The Google Cloud project that owns the model. Deprecated: use "projectId" instead.

projectId (String, default: null):

The ID of the Google Cloud project that owns the model.

modelName (String, default: null):

The name of the model.

version (String, default: null):

The model version. Defaults to the AI Platform default model version.

region (String, default: null):

The model deployment region. Defaults to "us-central1".

inputProperties (List, default: null):

Properties passed with each prediction instance. Image predictions are tiled, so these properties will be replicated into each image tile instance. Defaults to no properties.

inputTypeOverride (Dictionary, default: null):

Types to which model inputs will be coerced if specified. Both Image bands and Image/Feature properties are valid.

inputShapes (Dictionary, default: null):

The fixed shape of input array bands. For each array band not specified, the fixed array shape will be automatically deduced from a non-masked pixel.

proj (Projection, default: null):

The input projection at which to sample all bands. Defaults to the default projection of an image's first band.

fixInputProj (Boolean, default: null):

If true, pixels will be sampled in a fixed projection specified by 'proj'. The output projection is used otherwise. Defaults to false.

inputTileSize (List, default: null):

Rectangular dimensions of pixel tiles passed in to prediction instances. Required for image predictions.

inputOverlapSize (List, default: null):

Amount of adjacent-tile overlap in X/Y along each edge of pixel tiles passed in to prediction instances. Defaults to [0, 0].

outputTileSize (List, default: null):

Rectangular dimensions of pixel tiles returned from AI Platform. Defaults to the value in 'inputTileSize'.

outputBands (Dictionary, default: null):

A map from output band names to a dictionary of output band info. Valid band info fields are 'type' and 'dimensions'. 'type' should be a ee.PixelType describing the output band, and 'dimensions' is an optional integer with the number of dimensions in that band e.g.: "outputBands: {'p': {'type': ee.PixelType.int8(), 'dimensions': 1}}". Required for image predictions.

outputProperties (Dictionary, default: null):

A map from output property names to a dictionary of output property info. Valid property info fields are 'type' and 'dimensions'. 'type' should be a ee.PixelType describing the output property, and 'dimensions' is an optional integer with the number of dimensions for that property if it is an array e.g.: "outputBands: {'p': {'type': ee.PixelType.int8(), 'dimensions': 1}}". Required for predictions from FeatureCollections.

outputMultiplier (Float, default: null):

An approximation to the increase in data volume for the model outputs over the model inputs. If specified this must be >= 1. This is only needed if the model produces more data than it consumes, e.g. a model that takes 5 bands and produces 10 outputs per pixel.


Returns: Model

ee.Model可以创建 一个新实例 ee.Model.fromAiPlatformPredictor()。这是一个ee.Model将 Earth Engine 数据打包成张量的对象,将它们作为预测请求转发到 Google AI Platform,然后自动将响应重新组合为 Earth Engine 数据类型。请注意,根据模型及其输入的大小和复杂性,您可能希望 调整AI Platform 模型的最小节点大小以适应大量预测。

Earth Engine 要求 AI Platform 模型使用 TensorFlow 的 SavedModel 格式。在托管模型可以与地球引擎交互之前,其输入/输出需要与 TensorProto 交换格式兼容,特别是在 base64 中序列化的 TensorProtos。为model prepare简化此操作,Earth Engine CLI 具有 将现有 SavedModel 包装在所需操作中以转换输入/输出格式的命令。

要将模型与 一起使用ee.Model.fromAiPlatformPredictor(),您必须具有足够的权限才能使用该模型。具体来说,您(或使用该模型的任何人)至少需要 ML Engine Model User 角色。您可以从Cloud Console的模型页面检查和设置模型权限 。


地区

您应该为模型使用区域端点,在模型创建、版本创建和ee.Model.fromAiPlatformPredictor(). 任何区域都可以工作(不要使用全局),但us-central1首选。不要指定 REGIONS参数。如果您是从Cloud Console创建模型 ,请确保选中区域框。


费用

警告!这些指南使用 Google Cloud 的计费组件,包括:

您可以使用 定价计算器根据您的预计使用情况生成成本估算。


图像预测

predictImage(image)

Make predictions from pixel tiles of an image. The predictions are merged as bands with the input image.

The model will receive 0s in place of masked pixels. The masks of predicted output bands are the minimum of the masks of the inputs.


Arguments:

this:model (Model)

image (Image):

The input image.


Returns: Image

用于model.predictImage()对ee.Image 使用托管模型进行预测。的返回类型predictImage()是 an ee.Image,可以添加到地图、用于其他计算、导出等。Earth Engine 将自动平铺输入波段并根据需要调整输出投影以进行比例更改和覆盖。(有关平铺工作原理的更多信息,请参阅 TFRecord 文档)。请注意,即使带是标量(最后一个维度将为 1),地球引擎也会始终将 3D 张量转发到您的模型。

几乎所有的卷积模型都有一个固定的输入投影(模型训练的数据的投影)。在这种情况下,请在调用 时将fixInputProj参数设置为trueee.Model.fromAiPlatformPredictor()。在可视化预测时,在缩小具有固定输入投影的模型时要小心。这与此处描述的原因相同。具体而言,缩放到较大的空间范围可能会导致请求过多数据,并可能表现为 AI Platform 速度减慢或拒绝。


相关文章
|
机器学习/深度学习 人工智能 安全
探索AI的未来:从机器学习到深度学习
【10月更文挑战第28天】本文将带你走进AI的世界,从机器学习的基本概念到深度学习的复杂应用,我们将一起探索AI的未来。你将了解到AI如何改变我们的生活,以及它在未来可能带来的影响。无论你是AI专家还是初学者,这篇文章都将为你提供新的视角和思考。让我们一起探索AI的奥秘,看看它将如何塑造我们的未来。
610 3
|
机器学习/深度学习 人工智能 算法
猫狗宠物识别系统Python+TensorFlow+人工智能+深度学习+卷积网络算法
宠物识别系统使用Python和TensorFlow搭建卷积神经网络,基于37种常见猫狗数据集训练高精度模型,并保存为h5格式。通过Django框架搭建Web平台,用户上传宠物图片即可识别其名称,提供便捷的宠物识别服务。
1707 55
|
机器学习/深度学习 人工智能 供应链
从概念到商业价值:AI、机器学习与深度学习全景指南
在这个科技飞速发展的时代🚀,人工智能正以惊人的速度渗透到我们的生活和工作中👀。但面对铺天盖地的AI术语和概念,很多人感到困惑不已😣。"AI"、"机器学习"、"深度学习"和"神经网络"到底有什么区别?它们如何相互关联?如何利用这些技术提升工作效率和创造价值?
794 0
|
机器学习/深度学习 存储 监控
基于深度学习YOLO框架的城市道路损伤检测与评估项目系统【附完整源码+数据集】
本项目基于深度学习的YOLO框架,成功实现了城市道路损伤的自动检测与评估。通过YOLOv8模型,我们能够高效地识别和分类路面裂缝、井盖移位、坑洼路面等常见的道路损伤类型。系统的核心优势在于其高效性和实时性,能够实时监控城市道路,自动标注损伤类型,并生成损伤评估报告。
773 0
基于深度学习YOLO框架的城市道路损伤检测与评估项目系统【附完整源码+数据集】
|
机器学习/深度学习 自动驾驶 算法
基于深度学习的YOLO框架的7种交通场景识别项目系统【附完整源码+数据集】
在智慧交通和智能驾驶日益普及的今天,准确识别复杂交通场景中的关键元素已成为自动驾驶系统的核心能力之一。传统的图像处理技术难以适应高动态、复杂天气、多目标密集的交通环境,而基于深度学习的目标检测算法,尤其是YOLO(You Only Look Once)系列,因其检测速度快、精度高、可部署性强等特点,在交通场景识别中占据了重要地位。
1392 0
基于深度学习的YOLO框架的7种交通场景识别项目系统【附完整源码+数据集】
|
机器学习/深度学习 人工智能 自然语言处理
ModelScope深度学习项目低代码开发
低代码开发平台通过丰富的预训练模型库、高度灵活的预训练模型和强大的微调训练功能,简化深度学习项目开发。以阿里魔搭为例,提供大量预训练模型,支持快速迭代与实时反馈,减少从头训练的时间和资源消耗。开发者可轻松调整模型参数,适应特定任务和数据集,提升模型性能。ModelScope平台进一步增强这些功能,提供模型搜索、体验、管理与部署、丰富的模型和数据资源、多模态任务推理及社区协作,助力高效、环保的AI开发。
955 65
|
机器学习/深度学习 人工智能 算法
探索机器学习:从线性回归到深度学习
本文将带领读者从基础的线性回归模型开始,逐步深入到复杂的深度学习网络。我们将通过代码示例,展示如何实现这些算法,并解释其背后的数学原理。无论你是初学者还是有经验的开发者,这篇文章都将为你提供有价值的见解和知识。让我们一起踏上这段激动人心的旅程吧!
402 3
|
机器学习/深度学习 数据采集 数据可视化
TensorFlow,一款由谷歌开发的开源深度学习框架,详细讲解了使用 TensorFlow 构建深度学习模型的步骤
本文介绍了 TensorFlow,一款由谷歌开发的开源深度学习框架,详细讲解了使用 TensorFlow 构建深度学习模型的步骤,包括数据准备、模型定义、损失函数与优化器选择、模型训练与评估、模型保存与部署,并展示了构建全连接神经网络的具体示例。此外,还探讨了 TensorFlow 的高级特性,如自动微分、模型可视化和分布式训练,以及其在未来的发展前景。
1276 5
|
机器学习/深度学习 人工智能 TensorFlow
基于TensorFlow的深度学习模型训练与优化实战
基于TensorFlow的深度学习模型训练与优化实战
903 3
|
机器学习/深度学习 TensorFlow API
机器学习实战:TensorFlow在图像识别中的应用探索
【10月更文挑战第28天】随着深度学习技术的发展,图像识别取得了显著进步。TensorFlow作为Google开源的机器学习框架,凭借其强大的功能和灵活的API,在图像识别任务中广泛应用。本文通过实战案例,探讨TensorFlow在图像识别中的优势与挑战,展示如何使用TensorFlow构建和训练卷积神经网络(CNN),并评估模型的性能。尽管面临学习曲线和资源消耗等挑战,TensorFlow仍展现出广阔的应用前景。
611 5

热门文章

最新文章

推荐镜像

更多