All Projects → zsajjad → React Native Text Detector

zsajjad / React Native Text Detector

Licence: mit
Text Detector from image for react native using firebase MLKit on android and Tesseract on iOS

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to React Native Text Detector

craft-text-detector
Packaged, Pytorch-based, easy to use, cross-platform version of the CRAFT text detector
Stars: ✭ 151 (-22.16%)
Mutual labels:  vision, text-detection
React Native Tesseract Ocr
Tesseract OCR wrapper for React Native
Stars: ✭ 384 (+97.94%)
Mutual labels:  text-detection, tesseract-ocr
Text Detection
Text detection with mainly MSER and SWT
Stars: ✭ 167 (-13.92%)
Mutual labels:  text-detection, tesseract-ocr
Tedeval
TedEval: A Fair Evaluation Metric for Scene Text Detectors
Stars: ✭ 143 (-26.29%)
Mutual labels:  text-detection
Tesseract4android
Fork of tess-two rewritten from scratch to support latest version of Tesseract OCR.
Stars: ✭ 148 (-23.71%)
Mutual labels:  tesseract-ocr
Apriltag ros
A ROS wrapper of the AprilTag 3 visual fiducial detector
Stars: ✭ 160 (-17.53%)
Mutual labels:  vision
Opticalflow visualization
Python optical flow visualization following Baker et al. (ICCV 2007) as used by the MPI-Sintel challenge
Stars: ✭ 183 (-5.67%)
Mutual labels:  vision
Pan pp.pytorch
Official implementations of PSENet, PAN and PAN++.
Stars: ✭ 141 (-27.32%)
Mutual labels:  text-detection
Attendance Using Face
Face-recognition using Siamese network
Stars: ✭ 174 (-10.31%)
Mutual labels:  vision
Arucogen
Online ArUco markers generator
Stars: ✭ 155 (-20.1%)
Mutual labels:  vision
East icpr
Forked from argman/EAST for the ICPR MTWI 2018 CHALLENGE
Stars: ✭ 154 (-20.62%)
Mutual labels:  text-detection
Robotcar Dataset Sdk
Software Development Kit for the Oxford Robotcar Dataset
Stars: ✭ 151 (-22.16%)
Mutual labels:  vision
Adelaidet
AdelaiDet is an open source toolbox for multiple instance-level detection and recognition tasks.
Stars: ✭ 2,565 (+1222.16%)
Mutual labels:  text-detection
Flowiz
Converts Optical Flow files to images and optionally compiles them to a video. Flow viewer GUI is also available. Check out mockup right from Github Pages:
Stars: ✭ 144 (-25.77%)
Mutual labels:  vision
Donkeycar
Open source hardware and software platform to build a small scale self driving car.
Stars: ✭ 2,192 (+1029.9%)
Mutual labels:  vision
Craft keras
Keras implementation of Character Region Awareness for Text Detection (CRAFT)
Stars: ✭ 143 (-26.29%)
Mutual labels:  text-detection
Textdetection
Vision Framework Demo on Text Detection
Stars: ✭ 173 (-10.82%)
Mutual labels:  text-detection
Derpn
A novel region proposal network for more general object detection ( including scene text detection ).
Stars: ✭ 155 (-20.1%)
Mutual labels:  text-detection
Craft Pytorch
Official implementation of Character Region Awareness for Text Detection (CRAFT)
Stars: ✭ 2,220 (+1044.33%)
Mutual labels:  text-detection
Tesseract
Bindings to Tesseract OCR engine for R
Stars: ✭ 192 (-1.03%)
Mutual labels:  tesseract-ocr

React Native Text Detector

npm

See it in action

Checkout these blog for

for example of this package.

Different libraries

Default branch uses Tesseract on iOS and Firebase ML Kit on android. Beside that we have 2 branches

For deciding between which one is better check this blog on Hearbeat by Fritz.ai

Getting started

$ npm install react-native-text-detector --save or yarn add react-native-text-detector

Manual installation

iOS

Attach Tesseract Languages you want to use in your app

Import your tessdata folder (you can download one for your language from Google's Repo OR if that gives an error use THIS REPO as referenced on stack overflow as solution into the root of your project AS A REFERENCED FOLDER (see below). It contains the Tesseract trained data files. You can add your own trained data files here too.

NOTE: This library currently requires the tessdata folder to be linked as a referenced folder instead of a symbolic group. If Tesseract can't find a language file in your own project, it's probably because you created the tessdata folder as a symbolic group instead of a referenced folder. It should look like this if you did it correctly:

alt text

Note how the tessdata folder has a blue icon, indicating it was imported as a referenced folder instead of a symbolic group.

Also add -lstdc++ if not already present
Using Pods (Recommended)
  1. Add following in ios/Podfile
    pod 'RNTextDetector', path: '../node_modules/react-native-text-detector/ios'
  1. Run following from project's root directory
    cd ios && pod install
  1. Use <your_project>.xcworkspace to run your app
Direct Linking
  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-text-detector and add RNTextDetector.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNTextDetector.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<

Android

This package uses Firebase ML Kit for text recognition on android please make sure you have integrated firebase in your app before started integration of this package. Here is the guide for Firebase integration.

  1. Open up android/app/src/main/java/[...]/MainApplication.java
  • Add import com.fetchsky.RNTextDetector.RNTextDetectorPackage; to the imports at the top of the file
  • Add new RNTextDetectorPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:

    include ':react-native-text-detector'
    project(':react-native-text-detector').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-text-detector/android')
    
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:

    ...
    dependencies {
        implementation 'com.google.firebase:firebase-core:16.0.1'
        implementation 'com.google.firebase:firebase-ml-vision:17.0.0'
    
        implementation (project(':react-native-text-detector')) {
            exclude group: 'com.google.firebase'
        }
    }
    
    // Place this line at the end of file
    
    apply plugin: 'com.google.gms.google-services'
    
    // Work around for onesignal-gradle-plugin compatibility
    com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true
    
  3. Insert the following lines inside the dependencies block in android/build.gradle:

    buildscript {
        repositories {
            google()
            ...
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:3.0.1'
            classpath 'com.google.gms:google-services:4.0.1' // google-services plugin
        }
    }
    

Usage

/**
 *
 * This Example uses react-native-camera for getting image
 *
 */

import RNTextDetector from "react-native-text-detector";

export class TextDetectionComponent extends PureComponent {
  ...

  detectText = async () => {
    try {
      const options = {
        quality: 0.8,
        base64: true,
        skipProcessing: true,
      };
      const { uri } = await this.camera.takePictureAsync(options);
      const visionResp = await RNTextDetector.detectFromUri(uri);
      console.log('visionResp', visionResp);
    } catch (e) {
      console.warn(e);
    }
  };

  ...
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].