Class: BinaryClassification

SuperMap.BinaryClassification

二元分类类。

new SuperMap.BinaryClassification()

common/thirdparty/ai/BinaryClassification.js, line 4

Extends

Members

backendObject

模型分析方式( cpu 或 webgl)。

imagePixelData ImageData HTMLImageElement HTMLCanvasElement HTMLVideoElement ImageBitmap

图片对象

modelUrlstring

模型地址

Methods

inherited _loadModel(modelUrl){Promise.<tf.GraphModel>}

common/thirdparty/ai/MachineLearningBase.js, line 38

加载模型

Name Type Description
modelUrl string

模型地址。

Returns:
Type Description
Promise.<tf.GraphModel>

inherited dispose()

common/thirdparty/ai/MachineLearningBase.js, line 88

释放内存

inherited handleInputParams(image, width, height, dtype){Object}

common/thirdparty/ai/MachineLearningBase.js, line 56

处理输入张量

Name Type Description
image PixelData | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap

图片对象。

width number

图片宽度。

height number

图片高度。

dtype string

数据类型。

Returns:
Type Description
Object
  • 输入处理后的张量

handleResult(prediction){Object}

common/thirdparty/ai/BinaryClassification.js, line 15

对预测数据进行处理

Name Type Description
prediction Object

模型预测后的张量。

Returns:
Type Description
Object 处理返回的数据

inherited predict(){object}

common/thirdparty/ai/MachineLearningBase.js, line 70

对模型进行预测

Returns:
Type Description
object