Google on-device MLKit object detection for React Native
npm install rn-mlkit-object-detection
yarn add rn-mlkit-object-detection
import RNMLKitObjectDetection, { ObjectDetectorMode } from 'rn-mlkit-object-detection';
const result = await RNMLKitObjectDetection.detectFromUri(uri, {
detectorMode: ObjectDetectorMode.SINGLE_IMAGE,
shouldEnableClassification: true,
shouldEnableMultipleObjects: true,
});
// OR detect with default config
const result = await RNMLKitObjectDetection.detectFromUri(uri);
- Android examples
- IOS examples
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT