Weex modules for machine learning based on CoreML and Vision framework in iOS.
- Xcode 9+
- iOS 11.0+
- Install and setup CocoaPods, if it's not done yet
- Run
pod install
- Open
WeexMLExamples.xcworkspace
in XCode and run the project.
Detects an image from a set of 1000 categories such as trees, animals, food, vehicles, person etc, using Inceptionv3 model.
let imageRecognition = weex.requireModule('imageRecognition')
imageRecognition.predictWithImage(this.$refs.image.ref, (results)=>{
this.results = results.slice(0,5);
})
Classifies handwritten digit.
let digitRecognition = weex.requireModule('digitDetect')
digitRecognition.predictWithCanvas(this.$refs.canvas.ref, (results)= {
this.result = results[0];
})
An image analysis module that finds facial features (such as the eyes and mouth) in an image.
let faceDetect = weex.requireModule('faceDetect')
faceDetect.detectLandmarks(this.$refs.image.ref, (results)=>{
results.forEach(function(result) {
// face landmarks result
}, this);
})