Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Tool which allow you to detect and translate text.

NotificationsYou must be signed in to change notification settings

s3nh/text-detector

Repository files navigation

travis build

Text detection and recognition

This repository contains tool which allow to detect region with text and translate it one by one.

Description

Two pretrained neural networks are used. One of them is responsible for detecting places in whichtext appear and return its coordinates.Structure use for this operation is based on CRAFT architecture.

Second network take detected words and recognize words included inside it.Convolutional Recurrential neural networks (CRNN) are used for this operation.

Example

Under construction

Deployment

I decided to deploy it on heroku (temporarily solution), but the amount of memory available on this platformis not enough.You can check it onheroku app.I decided to add bootstrap template because whole solution become more intuitive.

Windows Installation

To install it locally, you can run from your virtual env

python-mpipinstallrequirements.txt

Linux installation

to install it properly on Linux OS you have to install additionaly

apt-get updateapt-get install -y libsm6 libxext6 libxrender-devpip install opencv-python

If problems with cv2 imports are still appearing then you should install

pip install opencv-contrib-python

Then you can run

```pythonpython -m pip install requirements.txt

Run

To run it locally, please activate your environment

> winvenv\Scripts\activate.bat>linuxsource venv\Scripts\activate

and run straight from project origin

python  app.py

If everything goes properly, you'll see on localhost:8000,screen just like one below.

screen

Updates

I decided to remove argparse, because as I mention earlier, it was less intuitive.Solution is not fast, is more like an toy example which shows how to use Pytorch modelon deployment environment.

Version which I use here contain torch-cpu which make preprocessing and detecting slightly slower.I test it on cuda and it was much faster.

If you have more information, drop me a lineIf you like it, give a star

Draft: Show how does it work on complex .tif example document.

Contact Info


[8]ページ先頭

©2009-2025 Movatter.jp