Skip to main content

TextTron is a simple light-weight image processing based text detector in document images.

Project description

TextTron-Lightweight-text-detector

1. Introduction

TextTron is a simple light-weight image processing based text detector in document images. TextTron detect text with the help of Contours applied on a preprossed image. This meant for fast text detection without using any machine learning or deep learning model. Though this will not work well in scene text detection, only meant for document images

2. Quick Start

1. Requirements: numpy & opencv-python

  • pip install numpy
  • pip install opencv-python

2. Install the package

$pip install TextTron

Code is developed under following library dependencies
OpenCV = 4.1.2
NumPy = 1.17

3. Usage

3.1 API

i. Import the neccessary libraries and read the image

import cv2
from TextTron import TextTron
img = cv2.imread(PATH)

ii. Pass the numpy or cv2 image to the TextTron

TT = TextTron(img) 
TT = TextTron(img, low=196,high=255,yThreshold=15,xThreshold=2) # Change this till you get good result

iii. Get the text bounding boxes

tbbox = TT.textBBox

iv. Get the ploted image (optional)

plotImg = TT.plotImg

v. If you want to set/decide best parameter for your case (optional)

TextTron.setParameters(img)

4. Contact

Ayan Gadpal : ayangadpal2 [at] gmail [dot] com

5. References

  1. Y. Liu, S. Goto, T. Ikenaga, "A Contour-Based Robust Algorithm for Text Detection in Color Images", IEICE TRANS. INF. & SYST., VOL.E89–D, NO.3 MARCH 2006
  2. Giotis, A., Gerogiannis, D., Nikou, C.: Word Spotting in Handwritten Text Using Contour-Based Models. In: Frontiers in Handwriting Recog. (ICFHR), 2014 14th Int. Conf. on. pp. 399{404 (Sept 2014), doi:10.1109/ICFHR.2014.73

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

TextTron-0.42.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

TextTron-0.42-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file TextTron-0.42.tar.gz.

File metadata

  • Download URL: TextTron-0.42.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/47.3.1.post20200622 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.7.7

File hashes

Hashes for TextTron-0.42.tar.gz
Algorithm Hash digest
SHA256 15671baeb862379f093668d7e96ade1657d7da3a770221ffbfcb8ba248f2260f
MD5 f65240be21cabb2f2aa6b0059a4ccfe8
BLAKE2b-256 81aa03c9184b4fab39be40e3704e1ba35875850fed01129e26b22bd65f7345b0

See more details on using hashes here.

File details

Details for the file TextTron-0.42-py3-none-any.whl.

File metadata

  • Download URL: TextTron-0.42-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/47.3.1.post20200622 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.7.7

File hashes

Hashes for TextTron-0.42-py3-none-any.whl
Algorithm Hash digest
SHA256 72b1a991ed62918d79c7b22f24399cdeba81ddd8c33a2cf3ee2a64038f1d74d9
MD5 828693b6d25b5decb84752f1bb53d29f
BLAKE2b-256 6113e78d42ebbaba5f326dbd2b29d24dd1e209d81f8d09ee011e388879c5b59d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page