vision-camera-object-detection
TypeScript icon, indicating that this package has built-in type declarations

0.1.6 • Public • Published

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

Package Sidebar

Install

npm i vision-camera-object-detection

Weekly Downloads

2

Version

0.1.6

License

MIT

Unpacked Size

25.7 kB

Total Files

16

Last publish

Collaborators

  • willcray