A tool combining EasyOCR and LaMa to automatically detect text and replace it with an inpainted background.

Overview

Example

EasyLaMa (WIP)

This is a tool combining EasyOCR and LaMa to automatically detect text and replace it with an inpainted background.

Installation

For GPU support install PyTorch with CUDA or ROCm support manually.

pip install git+https://github.com/kanttouchthis/EasyLaMa

Usage

For a list of supported languages see EasyOCR

from EasyLaMa import TextRemover

tr = TextRemover(languages=["en", "de"], device="cuda)
result, mask = tr("example.png", mask_edge=4, radius=0) # Can take filepath, url, PIL Image object as input. Returns result, mask as PIL Image object
result.save("result.png")
mask.save("mask.png")
usage: easylama [-h] [-e EDGE] [-r RADIUS] [-o OUTPUT] [-m MASK] [-d DEVICE] [-l LANGUAGES [LANGUAGES ...]] image

positional arguments:
  image                 Image to process. Required

optional arguments:
  -h, --help            show this help message and exit
  -e EDGE, --edge EDGE  Extra margin at the edges of detected boxes. Default: 1
  -r RADIUS, --radius RADIUS
                        Radius for rounded corners. 0 = no rounding. Default: 1
  -o OUTPUT, --output OUTPUT
                        Filename for storing result, Default: "result.jpg"
  -m MASK, --mask MASK  Filename for storing mask. Default: don't store mask
  -d DEVICE, --device DEVICE
                        Device to use (cuda, cuda:0, cpu...). Default: cuda
  -l LANGUAGES [LANGUAGES ...], --languages LANGUAGES [LANGUAGES ...]
                        Languages to detect. See https://www.jaided.ai/easyocr/ for supported languages and their
                        abbreviations. Default: en
You might also like...
Detect and fix skew in images containing text
Detect and fix skew in images containing text

Alyn Skew detection and correction in images containing text Image with skew Image after deskew Install and use via pip! Recommended way(using virtual

Detect text blocks and OCR poorly scanned PDFs in bulk. Python module available via pip.
Detect text blocks and OCR poorly scanned PDFs in bulk. Python module available via pip.

doc2text doc2text extracts higher quality text by fixing common scan errors Developing text corpora can be a massive pain in the butt. Much of the tex

Detect handwritten words in a text-line (classic image processing method).
Detect handwritten words in a text-line (classic image processing method).

Word segmentation Implementation of scale space technique for word segmentation as proposed by R. Manmatha and N. Srimal. Even though the paper is fro

PianoVisuals - Create background videos synced with piano music using opencv
PianoVisuals - Create background videos synced with piano music using opencv

Steps Record piano video Use Neural Network to do body segmentation (video matti

This is a project to detect gestures to zoom in or out, using the real-time distance between the index finger and the thumb. It's based on OpenCV and Mediapipe.

Pinch-zoom This is a python project based on real-time hand-gesture detection, to zoom in or out, using the distance between the index finger and the

Detect the mathematical formula from the given picture and the same formula is extracted and converted into the latex code
Detect the mathematical formula from the given picture and the same formula is extracted and converted into the latex code

Mathematical formulae extractor The goal of this project is to create a learning based system that takes an image of a math formula and returns corres

Turn images of tables into CSV data. Detect tables from images and run OCR on the cells.
Turn images of tables into CSV data. Detect tables from images and run OCR on the cells.

Table of Contents Overview Requirements Demo Modules Overview This python package contains modules to help with finding and extracting tabular data fr

Detect textlines in document images

Textline Detection Detect textlines in document images Introduction This tool performs border, region and textline detection from document image data

Owner
null
Convert PDF/Image to TXT using EasyOcr - the best OCR engine available!

PDFImage2TXT - DOWNLOAD INSTALLER HERE What can you do with it? Convert scanned PDFs to TXT. Convert scanned Documents to TXT. No coding required!! In

Hans Alemão 2 Feb 22, 2022
Comparison-of-OCR (KerasOCR, PyTesseract,EasyOCR)

Optical Character Recognition OCR (Optical Character Recognition) is a technology that enables the conversion of document types such as scanned paper

null 21 Dec 25, 2022
Deskew is a command line tool for deskewing scanned text documents. It uses Hough transform to detect "text lines" in the image. As an output, you get an image rotated so that the lines are horizontal.

Deskew by Marek Mauder https://galfar.vevb.net/deskew https://github.com/galfar/deskew v1.30 2019-06-07 Overview Deskew is a command line tool for des

Marek Mauder 127 Dec 3, 2022
huoyijie 1.2k Dec 29, 2022
text detection mainly based on ctpn model in tensorflow, id card detect, connectionist text proposal network

text-detection-ctpn Scene text detection based on ctpn (connectionist text proposal network). It is implemented in tensorflow. The origin paper can be

Shaohui Ruan 3.3k Dec 30, 2022
Tool which allow you to detect and translate text.

Text detection and recognition This repository contains tool which allow to detect region with text and translate it one by one. Description Two pretr

Damian Panek 176 Nov 28, 2022
Code for the ACL2021 paper "Combining Static Word Embedding and Contextual Representations for Bilingual Lexicon Induction"

CSCBLI Code for our ACL Findings 2021 paper, "Combining Static Word Embedding and Contextual Representations for Bilingual Lexicon Induction". Require

Jinpeng Zhang 12 Oct 8, 2022
With the virtual keyboard, you can write on the real time images by combining the thumb and index fingers on the letter you want.

Virtual Keyboard With the virtual keyboard, you can write on the real time images by combining the thumb and index fingers on the letter you want. At

Güldeniz Bektaş 5 Jan 23, 2022