mrousavy / vision-camera-image-labeler

VisionCamera Frame Processor Plugin to label images using MLKit Vision

Home Page:https://github.com/mrousavy/react-native-vision-camera

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vision-camera-image-labeler

A VisionCamera Frame Processor Plugin to label images using MLKit Vision Image Labeling.

Installation

npm install vision-camera-image-labeler
cd ios && pod install

Add 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.js file to take effect.

V2 vs V3

Note: Currently this plugin only works for VisionCamera V2 since I have not dedicated any time to upgrade it to V3 yet.

Usage

import { labelImage } from "vision-camera-image-labeler";

// ...

const frameProcessor = useFrameProcessor((frame) => {
  'worklet';
  const labels = labelImage(frame);
}, []);

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

About

VisionCamera Frame Processor Plugin to label images using MLKit Vision

https://github.com/mrousavy/react-native-vision-camera

License:MIT License


Languages

Language:Java 33.3%Language:Objective-C 24.0%Language:TypeScript 22.2%Language:JavaScript 11.9%Language:Ruby 7.4%Language:C 0.7%Language:Swift 0.5%