ee.Model.fromAiPlatformPredictor
Returns an ee.Model from a description of an AI Platform prediction model. (See https://cloud.google.com/ml-engine/).
Usage | Returns |
---|
ee.Model.fromAiPlatformPredictor(projectName, projectId, modelName, version, region, inputProperties, inputTypeOverride, inputShapes, proj, fixInputProj, inputTileSize, inputOverlapSize, outputTileSize, outputBands, outputProperties, outputMultiplier) | Model |
Argument | Type | Details |
---|
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. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-13 UTC.
[null,null,["Last updated 2024-07-13 UTC."],[[["Accesses and uses AI Platform prediction models within Earth Engine."],["Requires specifying the project and model details for retrieval."],["Allows customization of input and output data formats and properties."],["Enables image predictions with tiling options for efficient processing."],["Supports defining output band and property types and dimensions."]]],["This document describes the `ee.Model.fromAiPlatformPredictor` function, which retrieves an `ee.Model` from an AI Platform prediction model. Key parameters include `projectId`, `modelName`, `version`, and `region` to locate the model. Input and output specifications are defined by `inputProperties`, `inputTypeOverride`, `inputShapes`, `outputBands`, and `outputProperties`. Image predictions require `inputTileSize`, and optional tile overlap can be specified using `inputOverlapSize`. The output tile size can be adjusted using `outputTileSize`, and the `outputMultiplier` can be specified for models that increase data size.\n"]]