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 速度减慢或拒绝。


相关文章
|
7月前
|
机器学习/深度学习 数据采集 算法
量子机器学习入门:三种数据编码方法对比与应用
在量子机器学习中,数据编码方式决定了量子模型如何理解和处理信息。本文详解角度编码、振幅编码与基础编码三种方法,分析其原理、实现及适用场景,帮助读者选择最适合的编码策略,提升量子模型性能。
589 8
|
机器学习/深度学习 存储 设计模式
特征时序化建模:基于特征缓慢变化维度历史追踪的机器学习模型性能优化方法
本文探讨了数据基础设施设计中常见的一个问题:数据仓库或数据湖仓中的表格缺乏构建高性能机器学习模型所需的历史记录,导致模型性能受限。为解决这一问题,文章介绍了缓慢变化维度(SCD)技术,特别是Type II类型的应用。通过SCD,可以有效追踪维度表的历史变更,确保模型训练数据包含完整的时序信息,从而提升预测准确性。文章还从数据工程师、数据科学家和产品经理的不同视角提供了实施建议,强调历史数据追踪对提升模型性能和业务洞察的重要性,并建议采用渐进式策略逐步引入SCD设计模式。
526 8
特征时序化建模:基于特征缓慢变化维度历史追踪的机器学习模型性能优化方法
|
机器学习/深度学习 算法 数据挖掘
K-means聚类算法是机器学习中常用的一种聚类方法,通过将数据集划分为K个簇来简化数据结构
K-means聚类算法是机器学习中常用的一种聚类方法,通过将数据集划分为K个簇来简化数据结构。本文介绍了K-means算法的基本原理,包括初始化、数据点分配与簇中心更新等步骤,以及如何在Python中实现该算法,最后讨论了其优缺点及应用场景。
1621 6
|
9月前
|
机器学习/深度学习 存储 监控
基于深度学习YOLO框架的城市道路损伤检测与评估项目系统【附完整源码+数据集】
本项目基于深度学习的YOLO框架,成功实现了城市道路损伤的自动检测与评估。通过YOLOv8模型,我们能够高效地识别和分类路面裂缝、井盖移位、坑洼路面等常见的道路损伤类型。系统的核心优势在于其高效性和实时性,能够实时监控城市道路,自动标注损伤类型,并生成损伤评估报告。
534 0
基于深度学习YOLO框架的城市道路损伤检测与评估项目系统【附完整源码+数据集】
|
9月前
|
机器学习/深度学习 自动驾驶 算法
基于深度学习的YOLO框架的7种交通场景识别项目系统【附完整源码+数据集】
在智慧交通和智能驾驶日益普及的今天,准确识别复杂交通场景中的关键元素已成为自动驾驶系统的核心能力之一。传统的图像处理技术难以适应高动态、复杂天气、多目标密集的交通环境,而基于深度学习的目标检测算法,尤其是YOLO(You Only Look Once)系列,因其检测速度快、精度高、可部署性强等特点,在交通场景识别中占据了重要地位。
1088 0
基于深度学习的YOLO框架的7种交通场景识别项目系统【附完整源码+数据集】
|
机器学习/深度学习 人工智能 自然语言处理
ModelScope深度学习项目低代码开发
低代码开发平台通过丰富的预训练模型库、高度灵活的预训练模型和强大的微调训练功能,简化深度学习项目开发。以阿里魔搭为例,提供大量预训练模型,支持快速迭代与实时反馈,减少从头训练的时间和资源消耗。开发者可轻松调整模型参数,适应特定任务和数据集,提升模型性能。ModelScope平台进一步增强这些功能,提供模型搜索、体验、管理与部署、丰富的模型和数据资源、多模态任务推理及社区协作,助力高效、环保的AI开发。
726 65
|
机器学习/深度学习 数据采集 算法
Java 大视界 -- Java 大数据机器学习模型在金融衍生品定价中的创新方法与实践(166)
本文围绕 Java 大数据机器学习模型在金融衍生品定价中的应用展开,分析定价现状与挑战,阐述技术原理与应用,结合真实案例与代码给出实操方案,助力提升金融衍生品定价的准确性与效率。
Java 大视界 -- Java 大数据机器学习模型在金融衍生品定价中的创新方法与实践(166)
|
机器学习/深度学习 人工智能 JSON
知识蒸馏方法探究:Google Distilling Step-by-Step 论文深度分析
大型语言模型(LLM)的发展迅速,从简单对话系统进化到能执行复杂任务的先进模型。然而,这些模型的规模和计算需求呈指数级增长,给学术界和工业界带来了挑战。为解决这一问题,知识蒸馏技术应运而生,旨在将大型模型的知识转移给更小、更易管理的学生模型。Google Research 提出的“Distilling Step-by-Step”方法不仅减小了模型规模,还通过提取推理过程使学生模型在某些任务上超越教师模型。该方法通过多任务学习框架,训练学生模型同时预测标签和生成推理过程,从而实现更高效、更智能的小型化模型。这为资源有限的研究者和开发者提供了新的解决方案,推动了AI技术的普及与应用。
759 19
知识蒸馏方法探究:Google Distilling Step-by-Step 论文深度分析
|
存储 人工智能 云栖大会
【云栖大会】阿里云设计中心 × 教育部协同育人项目成果展,PAI ArtLab助力高校AIGC教育新路径
【云栖大会】阿里云设计中心 × 教育部协同育人项目成果展,PAI ArtLab助力高校AIGC教育新路径
|
机器学习/深度学习 人工智能 算法
机器学习算法的优化与改进:提升模型性能的策略与方法
机器学习算法的优化与改进:提升模型性能的策略与方法
2477 13
机器学习算法的优化与改进:提升模型性能的策略与方法

热门文章

最新文章

推荐镜像

更多
下一篇
开通oss服务