当前位置: 首页>>代码示例 >>用法及示例精选 >>正文


Python ArcGIS Model.from_json用法及代码示例


本文简要介绍 python 语言中 arcgis.learn.Model.from_json 的用法。

用法:

from_json(model)

函数用于从模型定义 JSON 初始化模型对象

例子:

# Usage example

>>> model = Model()

>>> model.from_json({"Framework" :"TensorFlow",
                     "ModelConfiguration":"DeepLab",
                     "InferenceFunction":"``[functions]System\DeepLearning\ImageClassifier.py``",
                     "ModelFile":"``\\folder_path_of_pb_file\frozen_inference_graph.pb``",
                     "ExtractBands":[0,1,2],
                     "ImageWidth":513,
                     "ImageHeight":513,
                     "Classes": [ { "Value":0, "Name":"Evergreen Forest", "Color":[0, 51, 0] },
                                  { "Value":1, "Name":"Grassland/Herbaceous", "Color":[241, 185, 137] },
                                  { "Value":2, "Name":"Bare Land", "Color":[236, 236, 0] },
                                  { "Value":3, "Name":"Open Water", "Color":[0, 0, 117] },
                                  { "Value":4, "Name":"Scrub/Shrub", "Color":[102, 102, 0] },
                                  { "Value":5, "Name":"Impervious Surface", "Color":[236, 236, 236] } ] })

相关用法


注:本文由纯净天空筛选整理自arcgis.com大神的英文原创作品 arcgis.learn.Model.from_json。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。