A VisionCamera Frame Processor Plugin to label images using iNaturalist's computer vision model on device.
- 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"
}
}
- Install the plugin:
npm install
cd ios && pod install
- 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.
import { inatVision } from "vision-camera-plugin-inatvision";
// ...
const frameProcessor = useFrameProcessor((frame) => {
'worklet';
const labels = inatVision(frame);
}, []);
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Made with create-react-native-library