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 numpypip 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.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
- 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
- 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
Release files for TextTron 0.45
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| TextTron-0.45.tar.gz | 4.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| TextTron-0.45-py3-none-any.whl | Python 3 | none | any | Details |
Total release size:9.6 kB
Release files / TextTron-0.45.tar.gz
| Download URL | TextTron-0.45.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d47eff487019d88908e411a7eff0f677de0a21ca316fd9be6c45dd04f4b6bc58
|
|
BLAKE2b-256 checksum How to use checksums |
22df619a23457fb73a209869664fe34e4ac5968200d5d691cf94c1da4228fb55
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / TextTron-0.45-py3-none-any.whl
| Download URL | TextTron-0.45-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eb03a6e814112579135428371bc8d5f345a10709cba74579a340e7a85948e62b
|
|
BLAKE2b-256 checksum How to use checksums |
9950b097f8c0dce58b49252526460a32518d75ee43b586c9878b6e8ade4b5fdb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|