Giter Site home page Giter Site logo

pedrol2b / react-native-vision-camera-mlkit Goto Github PK

View Code? Open in Web Editor NEW
11.0 1.0 1.0 1.51 MB

๐Ÿ“ฆ A Google ML Kit frame processor plugin for react-native-vision-camera

Home Page: https://www.npmjs.com/package/react-native-vision-camera-mlkit

License: MIT License

Kotlin 50.17% JavaScript 3.44% Ruby 6.58% Swift 0.11% C 0.16% Objective-C 3.69% Objective-C++ 2.60% TypeScript 33.25%
android ios react-native barcode google-ml-kit mlkit vision vision-camera frame-processor ocr

react-native-vision-camera-mlkit's Introduction

react-native-vision-camera-mlkit

Contributors Forks Stargazers Issues MIT License

๐Ÿ“ฆ 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.

๐Ÿงต Vision APIs

Video and image analysis APIs to label images and detect barcodes, text, faces, and objects.

  • Barcode scanning Scan and process barcodes. Supports most standard 1D and 2D formats.
  • Face detection Detect faces and facial landmarks.
  • Face mesh detection Detect face mesh info on close-range images.
  • Text recognition v2 Recognize and extract text from images.
  • Image labeling 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.
  • Object detection and tracking Localize and track in real time one or more objects in the live camera feed.
  • Digital ink recognition Recognizes handwritten text and handdrawn shapes on a digital surface, such as a touch screen. Recognizes 300+ languages, emojis and basic shapes.
  • Pose detection Detect the position of the human body in real time.
  • Selfie segmentation Separate the background from users within a scene and focus on what matters.
  • Subject segmentation Separate subjects (people, pets, or objects) from the background in a picture.
  • Document scanner Digitize physical documents from pictures.

๐Ÿš€ Getting Started

๐Ÿšจ Required Dependencies

Ensure you have installed the required packages before installing this plugin.

Package Version
react-native-vision-camera >=4.0.1
react-native-worklets-core >=1.2.0

Follow the installation instructions for each package.

๐Ÿ’ป Installation

To install the plugin, run:

npm install react-native-vision-camera-mlkit
# or
yarn add react-native-vision-camera-mlkit

๐Ÿช Hooks

useBarcodeScanner (Barcode scanning)

  const { barcodeScanner } = useBarcodeScanner();

  const frameProcessor = useFrameProcessor(
    (frame) => {
      'worklet';

      runAsync(frame, () => {
        'worklet';

        const barcodes = barcodeScanner(frame);
        console.log(barcodes);
      });
    },
    [barcodeScanner]
  );

useImageLabeler (Image labeling)

  const { imageLabeler } = useImageLabeler();

  const frameProcessor = useFrameProcessor(
    (frame) => {
      'worklet';

      runAsync(frame, () => {
        'worklet';

        const labels = imageLabeler(frame);
        console.log(labels);
      });
    },
    [imageLabeler]
  );

useObjectDetector (Object detection and tracking)

  const { objectDetector } = useObjectDetector();

  const frameProcessor = useFrameProcessor(
    (frame) => {
      'worklet';

      runAsync(frame, () => {
        'worklet';

        const objects = objectDetector(frame);
        console.log(objects);
      });
    },
    [objectDetector]
  );

useTextRecognizer (Text recognition v2)

  const { textRecognizer } = useTextRecognizer();

  const frameProcessor = useFrameProcessor(
    (frame) => {
      'worklet';

      runAsync(frame, () => {
        'worklet';

        const text = textRecognizer(frame);
        console.log(text);
      });
    },
    [textRecognizer]
  );

react-native-vision-camera-mlkit's People

Contributors

pedrol2b avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.