All Projects → microsoft → genalog

microsoft / genalog

Licence: MIT license
Genalog is an open source, cross-platform python package allowing generation of synthetic document images with custom degradations and text alignment capabilities.

Programming Languages

Jupyter Notebook
11667 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to genalog

DeepEcho
Synthetic Data Generation for mixed-type, multivariate time series.
Stars: ✭ 44 (-81.2%)
Mutual labels:  data-generation, synthetic-data, synthetic-data-generation
synth
The Declarative Data Generator
Stars: ✭ 958 (+309.4%)
Mutual labels:  data-generation, synthetic-data
neuro-comma
🇷🇺 Punctuation restoration production-ready model for Russian language 🇷🇺
Stars: ✭ 46 (-80.34%)
Mutual labels:  ner
keras-crf-ner
keras+bi-lstm+crf,中文命名实体识别
Stars: ✭ 16 (-93.16%)
Mutual labels:  ner
datagrand bert
2019达观杯信息提取第5名代码
Stars: ✭ 20 (-91.45%)
Mutual labels:  ner
CrowdFlow
Optical Flow Dataset and Benchmark for Visual Crowd Analysis
Stars: ✭ 87 (-62.82%)
Mutual labels:  synthetic-images
video music book datasets
NLP NER datasets video/music/book bio
Stars: ✭ 73 (-68.8%)
Mutual labels:  ner
compv
Insanely fast Open Source Computer Vision library for ARM and x86 devices (Up to #50 times faster than OpenCV)
Stars: ✭ 155 (-33.76%)
Mutual labels:  ocr-recognition
SynLSTM-for-NER
Code and models for the paper titled "Better Feature Integration for Named Entity Recognition", NAACL 2021.
Stars: ✭ 26 (-88.89%)
Mutual labels:  ner
mtss-gan
MTSS-GAN: Multivariate Time Series Simulation with Generative Adversarial Networks (by @firmai)
Stars: ✭ 77 (-67.09%)
Mutual labels:  synthetic-data
crnn-pytorch
Convolutional Recurrent Neural Network (CRNN) for image-based sequence recognition using Pytorch
Stars: ✭ 162 (-30.77%)
Mutual labels:  ocr-recognition
deep-learning-for-document-dewarping
An application of high resolution GANs to dewarp images of perturbed documents
Stars: ✭ 100 (-57.26%)
Mutual labels:  ocr-recognition
neural name tagging
Code for "Reliability-aware Dynamic Feature Composition for Name Tagging" (ACL2019)
Stars: ✭ 39 (-83.33%)
Mutual labels:  ner
k6-example-data-generation
Example repository showing how to utilise k6 and faker to load test using generated data
Stars: ✭ 32 (-86.32%)
Mutual labels:  data-generation
PhoNER COVID19
COVID-19 Named Entity Recognition for Vietnamese (NAACL 2021)
Stars: ✭ 55 (-76.5%)
Mutual labels:  ner
ID-Card-Passport-Recognition-SDK-Android
On-Device ID Card & Passport & Driver License Recognition SDK for Android
Stars: ✭ 223 (-4.7%)
Mutual labels:  ocr-recognition
sequence tagging
Named Entity Recognition (LSTM + CRF + FastText) with models for [historic] German
Stars: ✭ 25 (-89.32%)
Mutual labels:  ner
ai explore
机器学习、深度学习基础知识. 推荐系统及nlp相关算法实现
Stars: ✭ 54 (-76.92%)
Mutual labels:  ner
NER-and-Linking-of-Ancient-and-Historic-Places
An NER tool for ancient place names based on Pleiades and Spacy.
Stars: ✭ 26 (-88.89%)
Mutual labels:  ner
scikitcrf NER
Python library for custom entity recognition using Sklearn CRF
Stars: ✭ 17 (-92.74%)
Mutual labels:  ner

Genalog - Synthetic Data Generator

Python Versions Supported OSs MIT license docs link arxiv link

Genalog is an open source, cross-platform python package for generating document images with synthetic noise that mimics scanned analog documents (thus the name genalog). You can also add various text degradations to these images. The purpose of this tool is to provide a fast and efficient way to generate synthetic documents from text data by leveraging layout from templates that you create in simple HTML format.

demo-gif

Overview

Genalog has various capabilities:

  1. Flexible format Image Generation
  2. Custom image degradation
  3. Extract Text from Images using Cognitive Search Pipeline
  4. Get OCR Performance Metrics

The aim of this project is to provide a complete solution for generating synthetic images from any text data rich in natural language and to imitate most of OCR noises founded in scanned text documents.

Please refer to our Genalog documentation for more tutorials.

Installation

See the Genalog install guide for more details.

To install the latest release:

pip install genalog

Extra Installation Steps in MacOs and Windows

We have a dependency on Weasyprint, which in turn has non-python dependencies including Pango, cairo and GDK-PixBuf that need to be installed separately.

So far, Pango, cairo and GDK-PixBuf libraries are available in Ubuntu-18.04 and later by default.

If you are running on Windows, MacOS, or other Linux distributions, please see installation instructions from WeasyPrint.

NOTE: If you encounter the errors like no library called "libcairo-2" was found, this is probably due to the three extra dependencies missing.

Getting Started

The following is a summary of the common applications scenarios of Genalog. Please refer the Jupyter notebook examples that make use of the core code base of Genalog and repository utilities.

TLDR

If you are interested in a full document generation and degration pipeline, please see the following notebook:

Description Indepth Jupyter Notebook Examples
1 Analog Document Generation Pipeline Demo Notebook

Else we have in-depth walkthroughs of each of the module in Genalog.

Steps Indepth Jupyter Notebook Examples Quick Start Guides
1 Create Template for Image Generation Demo Notebook Here is our guide to Document Generation
2 Degrade Prebuilt Images Demo Notebook Here is our guide to Image Degradation
3 Get Text From Images Using OCR Demo Notebook Here is our guide to Extracting Text
4 Align Text Produced from OCR with Ground Truth Text Demo Notebook Here is our guide to Text Alignment
5 NER Label Propagation from Ground Truth to OCR Tokens Demo Notebook Here is our guide to Label Propagation

We also provide notebooks for the complete end-to-end scenario of generating a synthetic dataset connecting all the components of genalog:

Scenario Indepth Jupyter Notebook
1 Synthetic Dataset Generation with LABELED NER Dataset Demo Notebook

Other Requirements:

  1. If you want to use the OCR Capabilities of Azure to Extract Text from the Images You'll require the following resources:

    1. Azure Cognitive Search Service Quickstart Guide Here
    2. Azure Blob Storage Quickstart Guide Here

    See Azure Docs for more information on Azure Cognitive Search.

Package Release

Please see RELEASE.md for more details on the release process.

Development with the Repo

We use tox to orchestrate most of the CI procedure. This will ensure the maximum environment parity between local dev boxes and remote CI pipelines.

  1. git clone https://github.com/microsoft/genalog.git
  2. pip install tox
  3. To run static analysis: tox -e flake8
  4. To run the test suites: tox -e -- -m "not azure"

Repo Structure

genalog
├────genalog
│       ├─── generation                      # generate text images
│       ├──── degradation                    # methods for image degradation
│       ├──── ocr                            # running the Azure Search Pipeline
│       └──── text                           # methods to Align OCR Output Text with 
├────devops                                  # CI/CD pipelines
├────docs                                    # containing online documentaions
├────examples                                # example Jupyter Notebooks for Various 
├────tests                                   # tests
├────tox.ini                                 # CI orchestration and configurations
├────README.md
└────LICENSE

Trademark Notice

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft’s Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party’s policies.

Microsoft Open Source Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Contribution Guidelines

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Citing genalog

If you find genalog helpful to your work, please consider citing our tool and paper using the following BibTeX entry:

@article{
  gupte2021genalog,
  title={Lights, Camera, Action! A Framework to Improve NLP Accuracy over OCR documents},
  author={Gupte, Amit and Romanov, Alexey and Mantravadi, Sahitya and Banda, Dalitso and Liu, Jianjie and Khan, Raza and Meenal, Lakshmanan Ramu and Han, Benjamin and Srinivasan, Soundar},
  journal={Document Intelligence Workshop at KDD 2021},
  year={2021}
}

Collaborators

Genalog was originally developed by the MAIDAP team at Microsoft Cambridge NERD in association with the Text Analytics Team in Redmond.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].