0.1.6 • Published 4 years ago
vision-camera-object-detection v0.1.6
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 installAdd 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.jsfile 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
0.1.6
4 years ago