Use the native iOS 11+ "CoreML" framework in Axway Titanium.
xcrun coremlcompiler compile path/to/model.mlmodel /path/to/output
)createRealtimeRecognitionView(args)
model
(String - Required)startRecognition()
stopRecognition()
isRecognizing()
(Boolean)classification
(Event.classifications
)isSupported()
(Boolean)var CoreML = require('ti.coreml');
var recognitionView = CoreML.createRealtimeRecognitionView({
top: 40,
height: 300,
model: 'Inceptionv3.mlmodelc'
});
recognitionView.addEventListener('classification', function(e) {
Ti.API.info(e);
});
var win = Ti.UI.createWindow({
backgroundColor: '#fff'
});
win.add(recognitionView);
var triggerButton = Ti.UI.createButton({
bottom: 40,
title: 'Start Real-Time Recognition'
});
triggerButton.addEventListener('click', function() {
recognitionView.startRecognition();
});
win.add(triggerButton);
win.open();
cd iphone
appc ti build -p ios --build-only
This module is Copyright (c) 2017-Present by Axway Appcelerator, Inc. All Rights Reserved. Usage of this module is subject to the Terms of Service agreement with Appcelerator, Inc.