Icon

CRAFTED_​textdetect_​GVision_​public

ADVNVAi_textdetect_GVision

This workflow will extract text from an image, using the Google vision API. The workflow builds upon the results from the workflow 'CRAFTED_get-data-MINT_public'.

Workflow components:

1. read data about the image from a MongoDB and loads the image
2. base65 encode the image
3. execute a request to Google Vision text extraction
5. write the result in W3C annotation format to a file
6. write the result in W3C annotation format to the MongoDB

Configuration:
- set mongoDB connection to read image metadata [see workflow 'CRAFTED_get-data-MINT_public]
- set CP name and dataset ID
- set API key in Post Request node
- set mongoDB connection to write results
- set path to annotations folder

Requirements:
- Knime (https://www.knime.com/)
- MongoDB Compass (see https://www.mongodb.com/products/compass)
- a Google Vision account and API_KEY (see https://cloud.google.com/vision; https://cloud.google.com/vision/docs/ocr)

Node 49send requestsee local file for keyNode 53make file pathget textmake URIOCR requestNode 358read dataset CPTESTERannotationIDjson template'und' languageif confidence<0.5Node 462Node 463set collectionNode 466Node 467json filenameNode 469base64 encode POST Request Loop End(deprecated) Chunk Loop Start String Manipulation JSON Path String Manipulation MongoDB Connector MongoDB Reader Variable Creator JSON Path Row Filter String Manipulation ConstantValue Column String to JSON JSON Transformer Tika LanguageDetector Rule Engine MongoDB Connector MongoDB Writer String Manipulation(Variable) Column Filter JSON Writer String Manipulation Missing Value Node 49send requestsee local file for keyNode 53make file pathget textmake URIOCR requestNode 358read dataset CPTESTERannotationIDjson template'und' languageif confidence<0.5Node 462Node 463set collectionNode 466Node 467json filenameNode 469base64 encode POST Request Loop End(deprecated) Chunk Loop Start String Manipulation JSON Path String Manipulation MongoDB Connector MongoDB Reader Variable Creator JSON Path Row Filter String Manipulation ConstantValue Column String to JSON JSON Transformer Tika LanguageDetector Rule Engine MongoDB Connector MongoDB Writer String Manipulation(Variable) Column Filter JSON Writer String Manipulation Missing Value

Nodes

Extensions

Links