• Stars
    star
    132
  • Rank 274,205 (Top 6 %)
  • Language
    Java
  • Created almost 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Solution for Problem 1 by team codesquad for AIDL 2020. Uses ML Kit for OCR and OpenCV for image processing

CodeSquad PS1

Solution for Problem Statement 1 for AIDL 2020 conducted by @unifynd technologies.

Problem

Given images of bills/invoices, the task was to perform the following 3 operations:

  • Edge detection, cropping, flattening, enhancement of cropped image and compression.
  • Extracting text from the processed image.
  • The confidence score for the image to text conversion.

Development

  1. Make sure you have react-native cli & the latest Android SDK installed on your system. To get started with React Native, follow here

  2. To install OpenCV for Android, see here

  3. Clone the github repository and install the dependencies using npm

$ git clone https://github.com/burhanuday/codesquad-PS1
$ cd codesquad-PS1
$ npm install
  1. Move the modified versions of the libraries from the modified_open_source_libs to the node_modules folder. Replace in destination when asked

  2. Run development build (Android SDK and adb tools are required to be installed)

$ npx react-native run-android --no-jetifier
$ npx react-native run-ios
  1. Run the flask server from the flask-server folder
$ python app.py

For Mac

  1. Follow the instructions mentioned on Getting Started on React Native documentation

  2. Download the project zip from here

  3. Edit the sdk.dir statement with the SDK path in the <extracted-folder>/android/local.properties file, for your machine.

  4. If getting this error Could not compile settings file 'android\settings.gradle. First run /usr/libexec/java_home -V which will output something like the following:

Matching Java Virtual Machines (2):
    13.0.1, x86_64:	"Java SE 13.0.1"	/Library/Java/JavaVirtualMachines/jdk-13.0.1.jdk/Contents/Home
    1.8.0_242, x86_64:	"AdoptOpenJDK 8"	/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home

/Library/Java/JavaVirtualMachines/jdk-13.0.1.jdk/Contents/Home

Pick the version you want to be the default (1.8.0_242 the version of AdoptOpenJDK 8) then:

export JAVA_HOME=`/usr/libexec/java_home -v 1.8.0_242`
  1. Run the app with npx react-native run-android --no-jetifier

Screens

photo6278161801069832522 photo6278311635298920670 photo6278311635298920671 photo6278311635298920672 photo6278311635298920673

Build

  1. Create and then copy a keystore file to android/app
$ keytool -genkey -v -keystore mykeystore.keystore -alias mykeyalias -keyalg RSA -keysize 2048 -validity 10000
  1. Setup your gradle variables in android/gradle.properties
MYAPP_RELEASE_STORE_FILE=mykeystore.keystore
MYAPP_RELEASE_KEY_ALIAS=mykeyalias
MYAPP_RELEASE_STORE_PASSWORD=*****
MYAPP_RELEASE_KEY_PASSWORD=*****
  1. Add signing config to android/app/build.gradle
android {
signingConfigs {
release {
storeFile file(MYAPP_RELEASE_STORE_FILE)
storePassword MYAPP_RELEASE_STORE_PASSWORD
keyAlias MYAPP_RELEASE_KEY_ALIAS
keyPassword MYAPP_RELEASE_KEY_PASSWORD
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
}
  1. Setup your gradle variables in android/gradle.properties
cd android && ./gradlew assembleRelease

Your APK will get generated at: android/app/build/outputs/apk/app-release.apk

Credits

Special thanks to react-native-document-scanner & react-native-perspective-image-cropper

NOTE: We are using heavily modified versions of both these libraries to support our usecase. You can find these modified libraries in the modified_open_source_libs/

More Repositories

1

react-transliterate

Transliteration component for React with support for over 30 langauges. Burhanuddin → बुरहानुद्दीन
TypeScript
174
star
2

SPAMit-WhatsApp-Spammer

SPAMit is an open source spammer for WhatsApp messenger that disguises itself as a keyboard allowing users to send hundreds of messages at the press of a button
Java
37
star
3

cors-proxy

JavaScript
24
star
4

razorsharp

Figma plugin to generate code from designs made in Blade
TypeScript
23
star
5

electron-react-boilerplate

Electron and Create React App boilerplate without any complex setup
JavaScript
22
star
6

miny

miny is a decluttered launcher for Android
Java
19
star
7

talk-easy

People face language barriers when it comes to the conference meetings around the globe. TalkEasy allows them to communicate in their own languages.
JavaScript
14
star
8

course-search

Find courses from multiple sources available to download in torrent form
JavaScript
11
star
9

Spam-em

Open source text spammer for Android
Java
8
star
10

topical

A topic based cross platform chat application built with React Native and Firebase
JavaScript
7
star
11

ML-DL-Algorithms

Repository containing notes, cheatsheets, datasets and usage of different ML and DL algorithms and libraries. These files can be used as base templates for your next project
Python
7
star
12

WordPress-Blog-App-Using-RxJava-Retrofit-Butterknife

A Medium themed example front end for the blog AndroidHive. Simply change the URL to make your own Android app for your wordpress site
Java
5
star
13

flutter-ecommerce

Dart
5
star
14

help-flare

Help Flare is a project aimed at reducing problems created by the COVID-19 lock-down. Report areas on a map that need help.
TypeScript
4
star
15

text-shorten

JavaScript
3
star
16

indic-type-chrome-extension

Chrome extension to type in 30+ languages using a standard keyboard
JavaScript
3
star
17

WhatsApp-Crasher

Crash WhatsApp messenger using a string which when clicked crashes the app
Java
3
star
18

burhanuday

2
star
19

csi-registration-app

Java
2
star
20

Blockchain-Bootcamp

JavaScript
2
star
21

github-jobs

Show jobs from Github using the Jobs API. Built with React, Typescript and styled-components
TypeScript
2
star
22

web-tidbits

CSS
2
star
23

ruby-rails

My notes while learning Ruby and RoR
Ruby
2
star
24

expo-boilerplate

A highly opinionated boilerplate for React Native Expo apps. Aimed at to be used in quickly prototyping projects without having to setup new codebases everytime!
JavaScript
2
star
25

renaissance-19-android-workshop

Java
2
star
26

network-builder

Cross platform app to get links to invitations for communities on WhatsApp, Discord, Telegram, Slack, Reddit and many others!
TypeScript
2
star
27

Blank-Message-for-WhatsApp

Send a blank message on WhatsApp Messenger
1
star
28

yarn-workspaces-monorepo

TypeScript
1
star
29

react-library-parcel

React library boilerplate bundled with Parcel v2
TypeScript
1
star
30

stylish

A clone of styled-components for a blog post. Not for actual use
JavaScript
1
star
31

theatre-booking-system

PHP
1
star
32

react-animations

JavaScript
1
star
33

Burger-App-With-React

JavaScript
1
star
34

Data-Structures-And-Algorithms-in-Javascript

JavaScript
1
star
35

Pothole-GO

Java
1
star
36

agrishare

JavaScript
1
star
37

Cemently-Cement-Reminder-App

An Android to-do reminder app that uses Alarm Manager and shows notification. Also uses SQLite to store data in the backend
Java
1
star
38

blog-app-with-microservices

A basic blog app to grasp the basics of micro-services by making my own implementation of the event bus
JavaScript
1
star
39

myntra-store

JavaScript
1
star
40

Car-Parking-Slot-Tracker

Kotlin
1
star
41

images

static hosting for images used for my blog
1
star
42

instagram-redesign-react-native

Redesigning Instagram in React Native
JavaScript
1
star
43

complaint-system

Python
1
star
44

ticketing-app

Ticketing app built with a microservice architecture. Uses Typescript, React, NextJS, Node, MongoDB, Jest, Docker and Kubernetes
TypeScript
1
star
45

optimal-page-replacement-algorithm-visualisation

JavaScript
1
star