π¦ A Google ML Kit frame processor plugin for react-native-vision-camera.
This plugin provides a simple way to use various ML Kit Vision APIs in your React Native App's Frame processor.
β οΈ This plugin is still in development and not yet ready for iOS.
This roadmap provides an overview of the progress for implementing various ML Kit Vision APIs. Note that all completed items are currently only available for Android. iOS support is still in development.
# | APIs | Android | iOS |
---|---|---|---|
1 | Barcode scanning | ||
2 | Face detection | ||
3 | Face mesh detection | ||
4 | Text recognition v2 | ||
5 | Image labeling | ||
6 | Object detection and tracking | ||
7 | Digital ink recognition | ||
8 | Pose detection | ||
9 | Selfie segmentation | ||
10 | Subject segmentation | ||
11 | Document scanner |
π¬ Video and image analysis APIs to label images and detect barcodes, text, faces, and objects.
Scan and process barcodes. Supports most standard 1D and 2D formats.
Detect faces and facial landmarks.
Detect face mesh info on close-range images.
Recognize and extract text from images.
Identify objects, locations, activities, animal species, products, and more. Use a general-purpose base model or tailor to your use case with a custom TensorFlow Lite model.
Localize and track in real time one or more objects in the live camera feed.
Recognizes handwritten text and handdrawn shapes on a digital surface, such as a touch screen. Recognizes 300+ languages, emojis and basic shapes.
Detect the position of the human body in real time.
Separate the background from users within a scene and focus on what matters.
Separate subjects (people, pets, or objects) from the background in a picture.
Digitize physical documents from pictures.
Ensure you have installed the required packages before installing this plugin.
# | Package | Version |
---|---|---|
1 | react-native-vision-camera | >=4.0.1 |
2 | react-native-worklets-core | >=1.2.0 |
Follow the installation instructions for each package.
To install the plugin, run:
npm install react-native-vision-camera-mlkit
# or
yarn add react-native-vision-camera-mlkit
const { barcodeScanner } = useBarcodeScanner();
const frameProcessor = useFrameProcessor(
(frame) => {
'worklet';
runAsync(frame, () => {
'worklet';
const barcodes = barcodeScanner(frame);
console.log(barcodes);
});
},
[barcodeScanner]
);
const { imageLabeler } = useImageLabeler();
const frameProcessor = useFrameProcessor(
(frame) => {
'worklet';
runAsync(frame, () => {
'worklet';
const labels = imageLabeler(frame);
console.log(labels);
});
},
[imageLabeler]
);
const { objectDetector } = useObjectDetector();
const frameProcessor = useFrameProcessor(
(frame) => {
'worklet';
runAsync(frame, () => {
'worklet';
const objects = objectDetector(frame);
console.log(objects);
});
},
[objectDetector]
);
const { textRecognizer } = useTextRecognizer();
const frameProcessor = useFrameProcessor(
(frame) => {
'worklet';
runAsync(frame, () => {
'worklet';
const text = textRecognizer(frame);
console.log(text);
});
},
[textRecognizer]
);