Home

Awesome

MLKit-ARCore

This simple project detects objects using Firebase ML Kit and tags them in with 3D labels in Augmented Reality. Using ARCore and Firebase RTDB, it also shares the labels between phones. This serves as a multiplayer image labeling game.

Based on: CoreML-in-ARKit

Demo gif

Demo Video

Language: Swift 4.0

Content Technology: SceneKit, Firebase ML Kit, ARCore, RTDB

Note: SceneKit can achieve a 60 FPS on iPhone7+ - though when it gets hot, it'll drop to 30 FPS.

Status

Status: Archived

This sample is no longer actively maintained and is left here for reference only.

Footnotes

Building Blocks (Overview)

Get ML Kit running in real time in ARKit

let pixbuff : CVPixelBuffer? = (sceneView.session.currentFrame?.capturedImage)
let dispatchQueueML = DispatchQueue(label: "dispatchqueueml")
...
loopMLKitUpdate() // on viewLoad
...
func loopMLKitUpdate() {
    dispatchQueueML.async {
        // 1. Run Update.
        self.updateMLKit()
        // 2. Loop this function.
        self.loopMLKitUpdate()
    }
}

Add 3D Text