目录

com.huawei.hms.mlsdk.classification.MLRemoteClassificationAnalyzerSetting.Factoryclass info
com.huawei.hms.mlsdk.classification.MLRemoteClassificationAnalyzerSetting.Factory
Creates an instance of the on-cloud image classification configurator.

Public Method Summary

Return typeMethod name
MLRemoteClassificationAnalyzerSettingcreate()
MLRemoteClassificationAnalyzerSetting.FactorysetLargestNumOfReturns(int largestNum)
MLRemoteClassificationAnalyzerSetting.FactorysetMinAcceptablePossibility(float minAcceptablePossibility)

Public Methods

Method
public MLRemoteClassificationAnalyzerSetting create()
Creates an instance of the on-cloud image classification configurator.

Return

Typedesc
MLRemoteClassificationAnalyzerSettingReturns the instance of MLRemoteClassificationAnalyzerSetting.

Sample Code

  1. MLRemoteClassificationAnalyzerSetting setting = new MLRemoteClassificationAnalyzerSetting.Factory()
  2.   .setMinAcceptablePossibility(0.8f)
  3.   .setLargestNumOfReturns(0)
  4.   .create();
Method
public MLRemoteClassificationAnalyzerSetting.Factory setLargestNumOfReturns(int largestNum)
Sets the maximum number of classifications to be returned from the analyzer.

Parameters

Parameter nameParameter desc
largestNumMaximum number of classifications.

Return

Typedesc
MLRemoteClassificationAnalyzerSetting.FactoryReturns the instance of MLRemoteClassificationAnalyzerSetting.Factory.
Method
public MLRemoteClassificationAnalyzerSetting.Factory setMinAcceptablePossibility(float minAcceptablePossibility)
Sets the confidence threshold for the on-cloud image classification analyzer.

Parameters

Parameter nameParameter desc
minAcceptablePossibilityConfidence threshold. The value range is 0.0–1.0 (default value: 0.5). Classifications whose
confidence is lower than the threshold will be filtered out.

Return

Typedesc
MLRemoteClassificationAnalyzerSetting.FactoryReturns the instance of MLRemoteClassificationAnalyzerSetting.Factory.