{"repo":"sshniro/line-segmentation-algorithm-to-gcp-vision","free":true,"listed":false,"github":"https://github.com/sshniro/line-segmentation-algorithm-to-gcp-vision","clone":"git clone https://github.com/sshniro/line-segmentation-algorithm-to-gcp-vision.git","description":"Line segmentation algorithm for Google Vision API.","language":"Kotlin","stars":96,"topics":["google-vision","proposed-algorithm","data-extraction","invoice","segmentation"],"license":"Apache-2.0","category":"media-processing","readme_excerpt":"Line Segmentation for Google Cloud Vision OCR A small library that post-processes Google Cloud Vision OCR output to reconstruct the correct line / reading order for sparse documents such as retail receipts and invoices. Implementations are provided for Node.js ( nodejs/ ) and Kotlin ( kotlin/ ). Introduction Google Vision provides 2 options for optical character recognition (OCR). The second option is suitable for data extraction from articles (Dense Text such as News Papers/Books). This option has an intelligent segmentation method to merge words which are nearby and form lines and paragraphs. This feature is not desirable for images with sparse text content such as retail invoices, where the data relevant to the same line resides in two corners (A huge gap/whitespace between the product name and price). For these images the OCR segments the lines in a different order. If the distance of two words in a single line is too far apart then google vision identifies them as two separate paragraphs/lines. The below images shows the sample output for a typical invoice from google vision. This behaviour creates a problem in information extraction scenarios. For example, to extract a price of a product from a retail invoice the system needs to find a way to match the words in the same line. The algorithm proposed below performs line segmentation based on characters polygon coordinates for data extraction. Background & motivation This library was written in January 2018 . At that time ","default_branch":null,"files":null,"tree":[],"storefront":"/r/sshniro","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/sshniro/line-segmentation-algorithm-to-gcp-vision/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}