Skip to content

Latest commit

 

History

History
54 lines (39 loc) · 1.5 KB

README.md

File metadata and controls

54 lines (39 loc) · 1.5 KB

Weex-ML

Weex modules for machine learning based on CoreML and Vision framework in iOS.

Requirements

  • Xcode 9+
  • iOS 11.0+

Demo

  1. Install and setup CocoaPods, if it's not done yet
  2. Run pod install
  3. Open WeexMLExamples.xcworkspace in XCode and run the project.

Modules

imageRecognition

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);
})

digitDetect

Classifies handwritten digit.

let digitRecognition = weex.requireModule('digitDetect')
digitRecognition.predictWithCanvas(this.$refs.canvas.ref, (results)= {
  this.result = results[0];
})

faceDetect

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);
})