This is reproducible work from Ekstraksi Informasi e-KTP dengan Google Cloud Function dan Cloud Vision API. It also contains code fix to match with ES6 compliant module usages.
- Google Cloud Account
gcloud
CLI- Create New Google Cloud project
gcloud projects create ektp-ocr
- Enable Google Cloud Functions
gcloud services enable cloudfunctions.googleapis.com
- Enable Google Cloud Storage
gcloud services enable storage-api.googleapis.com
gcloud services enable storage-component.googleapis.com
, create bucket nameuploaded_ktp
- Enable Google Cloud PubSub
gcloud services enable pubsub.googleapis.com
, create topic nameektp-text-extracted
- Enable Google Cloud Vision this link
- Deploy HTTP
$ cd http-ktp
$ npm i
$ gcloud functions deploy http-ktp --entry-point uploadKtp --trigger-http
- Deploy KTP Image Event Trigger
$ cd ktp-iamge-event-trigger
$ npm i
$ gcloud functions deploy processImageFromGCSEvent --trigger-resource uploaded_ektp --trigger-event google.storage.object.finalize
- Deploy Extraction Data
$ gcloud functions deploy extract_ktp --runtime python37 --trigger-topic ektp-text-extracted
View Stackdriver logs from extract-ktp
function.
Please support me by *stars this Github repo. Thank you!