Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rhzs/serverless-ktp-ocr
Serverless Indonesian Identity E-KTP OCR with Google Cloud Platform (GCP) - Cloud Functions, Cloud Storage, and Cloud PubSub
https://github.com/rhzs/serverless-ktp-ocr
cloud-functions cloud-pubsub cloud-storage gcp indonesia ktp nodejs serverless serverless-ktp-ocr
Last synced: 3 months ago
JSON representation
Serverless Indonesian Identity E-KTP OCR with Google Cloud Platform (GCP) - Cloud Functions, Cloud Storage, and Cloud PubSub
- Host: GitHub
- URL: https://github.com/rhzs/serverless-ktp-ocr
- Owner: rhzs
- Created: 2018-12-27T17:12:12.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-04-29T06:47:18.000Z (almost 3 years ago)
- Last Synced: 2023-02-28T08:16:07.742Z (almost 2 years ago)
- Topics: cloud-functions, cloud-pubsub, cloud-storage, gcp, indonesia, ktp, nodejs, serverless, serverless-ktp-ocr
- Language: JavaScript
- Homepage:
- Size: 419 KB
- Stars: 60
- Watchers: 1
- Forks: 20
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![CodeFactor](https://www.codefactor.io/repository/github/rhzs/serverless-ktp-ocr/badge/master)](https://www.codefactor.io/repository/github/rhzs/serverless-ktp-ocr/overview/master)
## Serverless Indonesian KTP OCR with GCP
This is reproducible work from [Ekstraksi Informasi e-KTP dengan Google Cloud Function dan Cloud Vision API](https://medium.com/@imrenagi/ekstraksi-informasi-e-ktp-dengan-google-cloud-function-dan-cloud-vision-api-4655db21d084). It also contains code fix to match with ES6 compliant module usages.
### KTP OCR Architecture
![Alt text](docs/arch.png?raw=true "E-KTP OCR with GCP")
### Pre-requisites
1. Google Cloud Account
2. `gcloud` CLI
3. Create New Google Cloud project `gcloud projects create ektp-ocr`
4. Enable Google Cloud Functions `gcloud services enable cloudfunctions.googleapis.com`
5. Enable Google Cloud Storage `gcloud services enable storage-api.googleapis.com` `gcloud services enable storage-component.googleapis.com`, create bucket name `uploaded_ktp`
6. Enable Google Cloud PubSub `gcloud services enable pubsub.googleapis.com`, create topic name `ektp-text-extracted`
7. Enable Google Cloud Vision [this link](console.cloud.google.com/flows/enableapi?apiid=vision.googleapis.com)### How to deploy
1. Deploy HTTP
```shell
$ cd http-ktp
$ npm i
$ gcloud functions deploy http-ktp --entry-point uploadKtp --trigger-http
```2. Deploy KTP Image Event Trigger
```shell
$ cd ktp-iamge-event-trigger
$ npm i
$ gcloud functions deploy processImageFromGCSEvent --trigger-resource uploaded_ektp --trigger-event google.storage.object.finalize
```3. Deploy Extraction Data
```shell
$ gcloud functions deploy extract_ktp --runtime python37 --trigger-topic ektp-text-extracted
```### Results
View Stackdriver logs from `extract-ktp` function.
### Love it?
Please support me by **stars* this Github repo. Thank you!