CustomImageLabelerOptions
class CustomImageLabelerOptions : CommonImageLabelerOptions
自訂模型圖片標籤工具的設定。
-
要傳回的圖片標籤數量上限。必須為正數。如未設定或設定了無效的值,則會使用預設值
10
。聲明
Swift
var maxResultCount: Int { get set }
-
使用指定的
LocalModel
並將confidenceThreshold
屬性設為nil
來初始化CustomImageLabelerOptions
執行個體。如未設定,系統會使用模型中繼資料中包含的可信度門檻值 (如有)。如果沒有,系統會改用0.0
的值。聲明
Swift
init(localModel: MLKLocalModel)
參數
localModel
儲存在裝置本機的自訂圖片標籤模型。
傳回值
具有指定
LocalModel
的CustomImageLabelerOptions
新執行個體。 -
使用指定的
CustomRemoteModel
並將confidenceThreshold
屬性設為nil
來初始化CustomImageLabelerOptions
執行個體。如未設定,系統會使用模型中繼資料中包含的可信度門檻值 (如有)。如果沒有,系統會改用0.0
的值。聲明
Swift
init(remoteModel: MLKCustomRemoteModel)
參數
remoteModel
自訂圖片標籤模型,可從遠端儲存於伺服器並下載至裝置。
傳回值
具有指定
CustomRemoteModel
的CustomImageLabelerOptions
新執行個體。 -
無法使用,