Giter Site home page Giter Site logo

pytorch_textboxespp's Introduction

TextBoxes++ with PyTorch

The implementation of TextBoxes++ with PyTorch.

Requirement

pip install --upgrade git+https://github.com/jjjkkkjjj/pytorch_SSD.git
conda install lxml
conda install -c conda-forge shapely

Pre-train

  • First, download SynthText dataset from official.

  • Second, convert gt.mat into annotation xml files using synthtext_generator.py.

    python synthtext_generator.py {path} -id SynthText
    usage: synthtext_generator.py [-h] [-in IMAGE_DIRNAME] [-sm] [-e ENCODING]
                                  path
    
    Generate Synthtext's annotation xml file
    
    positional arguments:
      path                  directory path under 'SynthText'(, 'licence.txt')
    
    optional arguments:
      -h, --help            show this help message and exit
      -id IMAGE_DIRNAME, --image_dirname IMAGE_DIRNAME
                            image directory name including 'gt.mat'
      -sm, --skip_missing   Wheter to skip missing image
      -e ENCODING, --encoding ENCODING
                            encoding
  • Train. See demo/pre-train-SynthText.ipynb.

  • You can download pre-trained model from here.

  • Pre-trained model's output example;

pre-trained img

Train ICDAR2015

  • First, download dataset from official.

  • Second, place annotation .txt and .jpg like this;

    ├── Annotations (place .txt)
    └── Images (place .jpg)
  • Train. See demo/train-ICDAR2015.ipynb.

  • You can download pre-trained model from here.

  • ICDAR's model output example;

icdar-trained img

Convert png to jpg for Born Digital Images

$ python png2jpg ~/data/text/Born-Digital-Images/Images/ -d
Converting...	100.0%	[307/307]
finished

Reference

SynthText

COCO-text

COCO-text api

DDI-100

DDI-100 api

pytorch_textboxespp's People

Stargazers

LvTianlei avatar

Watchers

James Cloos avatar Junnosuke Kado avatar paper2code - bot avatar

pytorch_textboxespp's Issues

loc loss became inf

When ICDARFocusedSceneTextDataset and ICDARBornDigitalTextDataset' was trained, loc loss was inf.
The reason is that "localization height or width = 0"

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.