{"id":13543574,"url":"https://github.com/burhanuday/invoice-scanner-react-native","last_synced_at":"2025-08-01T10:05:58.096Z","repository":{"id":38915262,"uuid":"245426332","full_name":"burhanuday/invoice-scanner-react-native","owner":"burhanuday","description":"Solution for Problem 1 by team codesquad for AIDL 2020. Uses ML Kit for OCR and OpenCV for image processing","archived":false,"fork":false,"pushed_at":"2023-07-18T21:14:52.000Z","size":97553,"stargazers_count":137,"open_issues_count":6,"forks_count":26,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-19T05:55:26.386Z","etag":null,"topics":["android","react-native"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/burhanuday.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-03-06T13:25:25.000Z","updated_at":"2025-02-28T03:53:37.000Z","dependencies_parsed_at":"2024-01-15T23:37:36.004Z","dependency_job_id":null,"html_url":"https://github.com/burhanuday/invoice-scanner-react-native","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burhanuday%2Finvoice-scanner-react-native","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burhanuday%2Finvoice-scanner-react-native/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burhanuday%2Finvoice-scanner-react-native/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burhanuday%2Finvoice-scanner-react-native/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/burhanuday","download_url":"https://codeload.github.com/burhanuday/invoice-scanner-react-native/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245377921,"owners_count":20605374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","react-native"],"created_at":"2024-08-01T11:00:33.272Z","updated_at":"2025-03-25T00:31:54.642Z","avatar_url":"https://github.com/burhanuday.png","language":"Java","funding_links":[],"categories":["Optical Character Recognition Engines and Frameworks"],"sub_categories":["CTPN [paper:2016](https://arxiv.org/pdf/1609.03605.pdf)"],"readme":"# CodeSquad PS1\nSolution for Problem Statement 1 for AIDL 2020 conducted by [@unifynd](https://github.com/unifynd) technologies.\n\n## Problem\nGiven images of bills/invoices, the task was to perform the following 3 operations:\n  * Edge detection, cropping, flattening, enhancement of cropped image and compression.\n  * Extracting text from the processed image.\n  * The confidence score for the image to text conversion.\n\n## Development\n\n1. Make sure you have `react-native cli` \u0026 the latest Android SDK installed on your system. To get started with React Native, [follow here](https://reactnative.dev/docs/getting-started)\n\n2. To install **OpenCV for Android**, [see here](https://github.com/davidmigloz/go-bees/wiki/Setup-OpenCV-3.1.0-in-Android-Studio-2.2)\n\n3. Clone the github repository and install the dependencies using `npm`\n```bash\n$ git clone https://github.com/burhanuday/codesquad-PS1\n$ cd codesquad-PS1\n$ npm install\n```\n4. Move the modified versions of the libraries from the `modified_open_source_libs` to the `node_modules` folder. Replace in destination when asked\n\n5. Run development build (Android SDK and adb tools are required to be installed)\n```bash\n$ npx react-native run-android --no-jetifier\n$ npx react-native run-ios\n```\n\n4. Run the `flask` server from the `flask-server` folder\n```bash\n$ python app.py\n```\n\n### For Mac\n1. Follow the instructions mentioned on [Getting Started](https://reactnative.dev/docs/getting-started) on React Native documentation\n\n2. Download the project zip from [here](https://drive.google.com/drive/folders/10gUGSfVYNPMP7aw4T8nfkrQkMXGxzV2m?usp=sharing)\n\n3. Edit the `sdk.dir` statement with the SDK path in the `\u003cextracted-folder\u003e/android/local.properties` file, for your machine.\n\n4. If getting this error `Could not compile settings file 'android\\settings.gradle`.\nFirst run `/usr/libexec/java_home -V` which will output something like the following:\n```bash\nMatching Java Virtual Machines (2):\n    13.0.1, x86_64:\t\"Java SE 13.0.1\"\t/Library/Java/JavaVirtualMachines/jdk-13.0.1.jdk/Contents/Home\n    1.8.0_242, x86_64:\t\"AdoptOpenJDK 8\"\t/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home\n\n/Library/Java/JavaVirtualMachines/jdk-13.0.1.jdk/Contents/Home\n\n```\nPick the version you want to be the default (1.8.0_242 the version of AdoptOpenJDK 8) then:\n```bash\nexport JAVA_HOME=`/usr/libexec/java_home -v 1.8.0_242`\n\n```\n\n\n\n5. Run the app with `npx react-native run-android --no-jetifier`\n## Screens\n\u003ca href=\"https://imgbb.com/\"\u003e\u003cimg width=\"200\" src=\"https://i.ibb.co/Bft09zp/photo6278161801069832522.jpg\" alt=\"photo6278161801069832522\" border=\"0\" /\u003e\u003c/a\u003e \u003ca href=\"https://imgbb.com/\"\u003e\u003cimg src=\"https://i.ibb.co/M8GGbP7/photo6278311635298920670.jpg\" width=\"200\" alt=\"photo6278311635298920670\" border=\"0\" /\u003e\u003c/a\u003e \u003ca href=\"https://imgbb.com/\"\u003e\u003cimg width=\"200\" src=\"https://i.ibb.co/w0mvNRr/photo6278311635298920671.jpg\" alt=\"photo6278311635298920671\" border=\"0\" /\u003e\u003c/a\u003e \u003ca href=\"https://imgbb.com/\"\u003e\u003cimg src=\"https://i.ibb.co/vj4PH8m/photo6278311635298920672.jpg\" width=\"200\" alt=\"photo6278311635298920672\" border=\"0\" /\u003e\u003c/a\u003e \u003ca href=\"https://imgbb.com/\"\u003e\u003cimg width=\"200\" src=\"https://i.ibb.co/ph8dvfT/photo6278311635298920673.jpg\" alt=\"photo6278311635298920673\" border=\"0\" /\u003e\u003c/a\u003e\n\n## Build\n1. Create and then copy a keystore file to android/app\n```bash\n$ keytool -genkey -v -keystore mykeystore.keystore -alias mykeyalias -keyalg RSA -keysize 2048 -validity 10000\n```\n2. Setup your gradle variables in android/gradle.properties\n```bash\nMYAPP_RELEASE_STORE_FILE=mykeystore.keystore\nMYAPP_RELEASE_KEY_ALIAS=mykeyalias\nMYAPP_RELEASE_STORE_PASSWORD=*****\nMYAPP_RELEASE_KEY_PASSWORD=*****\n```\n\n3. Add signing config to android/app/build.gradle\n```bash\nandroid {\nsigningConfigs {\nrelease {\nstoreFile file(MYAPP_RELEASE_STORE_FILE)\nstorePassword MYAPP_RELEASE_STORE_PASSWORD\nkeyAlias MYAPP_RELEASE_KEY_ALIAS\nkeyPassword MYAPP_RELEASE_KEY_PASSWORD\n}\n}\nbuildTypes {\nrelease {\nsigningConfig signingConfigs.release\n}\n}\n}\n```\n\n4. Setup your gradle variables in android/gradle.properties\n```bash\ncd android \u0026\u0026 ./gradlew assembleRelease\n```\nYour APK will get generated at: android/app/build/outputs/apk/app-release.apk\n\n## Credits\nSpecial thanks to [react-native-document-scanner](https://github.com/Woonivers/react-native-document-scanner#readme) \u0026 [react-native-perspective-image-cropper](https://github.com/Michaelvilleneuve/react-native-perspective-image-cropper)\n\n**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/`**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fburhanuday%2Finvoice-scanner-react-native","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fburhanuday%2Finvoice-scanner-react-native","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fburhanuday%2Finvoice-scanner-react-native/lists"}