Created
December 11, 2020 03:32
-
-
Save Rishit-dagli/4da4b360ec40a7d3193812506c25778e to your computer and use it in GitHub Desktop.
An example showing inference with MLKit in Android
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private val objectDetector = ObjectDetection.getClient(customObjectDetectorOptions) objectDetector.process(image) | |
.addOnFailureListener(Log.d(...)) | |
.addOnSuccessListener{ | |
graphicsOverlay.clear() | |
for (detectedObject in it){ | |
graphicsOverlay.add(ObjectGraphic(graphicsOverlay, detectedObject)) | |
} | |
graphicsOverlay.postInvalidate()} | |
.addOnCompleteListenerl imageProxy.close() } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment