8
VisionCamera Frame Processor Plugin to label images using MLKit Vision
source link: https://reactnativeexample.com/visioncamera-frame-processor-plugin-to-label-images-using-mlkit-vision/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
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.
Usage
import { labelImage } from "vision-camera-image-labeler";
// ...
const frameProcessor = useFrameProcessor((frame) => {
'worklet';
const labels = labelImage(frame);
}, []);
GitHub
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK