GithubHelp home page GithubHelp logo

18520339 / dbnet-tf2 Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 2.15 MB

A TensorFlow 2 reimplementation of DBNet available as a Python package for Scene Text Detection, following ICDAR 2015 Dataset format and using TedEval as Evaluation metrics

Home Page: https://pypi.org/project/tfdbnet

License: MIT License

Python 98.69% Shell 1.31%
dbnet differentiable-binarization scene-text-detection tensorflow icdar ocr

dbnet-tf2's Introduction

TFDBNet

A TensorFlow 2 reimplementation of Real-time Scene Text Detection with Differentiable Binarization available as a Python package and using TedEval for evaluation metrics.

Data Preparation

Store images in imgs folder and groundtruths in gts folder. Then, prepare text files for training and validate data in the following format with '\t' as a separator:

  • Example for ICDAR 2015 train.txt:
./datasets/train/train_imgs/img_1.jpg	./datasets/train/train_gts/gt_img_1.txt
./datasets/train/train_imgs/img_2.jpg	./datasets/train/train_gts/gt_img_2.txt
  • Example for ICDAR 2015 validate.txt:
./datasets/validate/validate_imgs/img_1.jpg	./datasets/validate/validate_gts/gt_img_1.txt
./datasets/validate/validate_imgs/img_2.jpg	./datasets/validate/validate_gts/gt_img_2.txt

You can customize the script in dir2paths.sh to generate the above train.txt and validate.txt for your own dataset. And the groundtruths can be .txt files, with the following format:

x1,y1,x2,y2,x3,y3,x4,y4,annotation

Below is the content of ./datasets/train/train_gts/gt_img_1.txt:

377,117,463,117,465,130,378,130,Genaxis Theatre
493,115,519,115,519,131,493,131,[06]
374,155,409,155,409,170,374,170,###
492,151,551,151,551,170,492,170,62-03
376,198,422,198,422,212,376,212,Carpark
494,190,539,189,539,205,494,206,###
374,1,494,0,492,85,372,86,###

Quick Start

pip install tfdbnet

After installation, see the demo on ICDAR 2015 dataset to know how to use. You can download my example trained weights along with the 2 files train.txt and validate.txt mentioned above here.

Reference

dbnet-tf2's People

Contributors

18520339 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.