vision-camera-object-detection
v0.1.6
Published
VisionCamera Frame Processor Plugin to detect objects using MLKit Vision
Downloads
2
Readme
vision-camera-object-detection
A VisionCamera Frame Processor Plugin to label images using MLKit Vision Object Detection.
Installation
npm install vision-camera-object-detection
cd ios && pod install
Add the plugin to your babel.config.js
:
module.exports = {
plugins: [
[
'react-native-reanimated/plugin',
{
globals: ['detectObject'],
},
],
// ...
Note: You have to restart metro-bundler for changes in the
babel.config.js
file to take effect.
Usage
import { detectObject } from "vision-camera-object-detection";
// ...
const frameProcessor = useFrameProcessor((frame) => {
'worklet';
const labels = detectObject(frame);
}, []);
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT