Giter Club home page Giter Club logo

rnmlkit's Introduction

React Native ML Kit

Installation

// clone the project from the github
git clone https://github.com/saeedhassansolangi/rnmlkit

// move to the project directory
cd react-native-mlkit-tutorial

// install the project's necessary packages(dependencies and devDependepencies)
npm install

// run these two scripts in the two separate terminal side by side
npm start

npm run android

Project Files

1) App.tsx

  • this is the root file of the Project, contains only Navigations

2) screens/SelectImageScreen.tsx

  • this is the Initial Route or Home Screen of the App which contains three buttons
    • Named :
      • Take Image :- takes image using the Camera
      • Select Image :- select image from the device's Gallery
      • Process Image :- it just takes the image either from the Gallery or Camera and will send it to the ProcessImageScreen and this file is responsible for Extracting the text from the Image

3) src/screens/ProcessImageScreen.tsx

  • As I mentioned above, this file is responsible for Extracting Text from the Image and render desired output on this Screen.

  • It Basically, invoke the 'recognizeImage' function from the src/mlkit/index.ts file, takes its output and render it on the Screen.

4) src/mlkit/index.ts

  • this file uses the react-native's Core API named NativeModules and access it's Object TextRecognitionModule for recognizing the Text from the Image.
import {NativeModules} from 'react-native';

const {TextRecognitionModule} = NativeModules;

/// ...other typescript code

export const recognizeImage = (url: string): Promise<Response> => {
  return TextRecognitionModule.recognizeImage(url);
};

5) src/components/ui/*.tsx

  • these three files are responsible for creating some Reusable Components, nothing special

6) src/naivgation/*.tsx

  • these two files are responsbile for creating the Stack Navigation .

rnmlkit's People

Contributors

dimaportenko avatar saeedhassansolangi avatar

Stargazers

Roman 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.