A VisionCamera Frame Processor Plugin to label images using MLKit Vision Image Labeling.
npm install vision-camera-image-labeler
cd ios && pod installAdd the plugin to your babel.config.js:
module.exports = {
plugins: [
[
'react-native-reanimated/plugin',
{
globals: ['__labelImage'],
},
],
// ...Note: You have to restart metro-bundler for changes in the
babel.config.jsfile to take effect.
Note: Currently this plugin only works for VisionCamera V2 since I have not dedicated any time to upgrade it to V3 yet.
import { labelImage } from "vision-camera-image-labeler";
// ...
const frameProcessor = useFrameProcessor((frame) => {
'worklet';
const labels = labelImage(frame);
}, []);See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
