Skip to content

Latest commit

 

History

History
58 lines (39 loc) · 1.2 KB

README.md

File metadata and controls

58 lines (39 loc) · 1.2 KB

vision-camera-plugin-inatvision

A VisionCamera Frame Processor Plugin to label images using iNaturalist's computer vision model on device.

Installation

  1. Add the plugin to your package.json file directly from GitHub, because it's not published to npm:
{
  "dependencies": {
    "vision-camera-plugin-inatvision": "github:inaturalist/vision-camera-plugin-inatvision"
  }
}
  1. Install the plugin:
npm install
cd ios && pod install
  1. Add the plugin to your babel.config.js:
module.exports = {
  plugins: [
    ['react-native-worklets-core/plugin'],

    // ...

Note: You have to restart metro-bundler for changes in the babel.config.js file to take effect.

Usage

import { inatVision } from "vision-camera-plugin-inatvision";

// ...

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

Contributing

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

License

MIT


Made with create-react-native-library