Giter VIP home page Giter VIP logo

text-detection-psenet's Introduction

Shape Robust Text Detection with Progressive Scale Expansion Network

Requirements

  • Python 3.6
  • PyTorch v1.0
  • pyclipper
  • Polygon2
  • OpenCV 3+ (for c++ version pse)

Data Preparation

image
│   1.jpg
│   2.jpg   
│		...
label
│   gt_1.txt
│   gt_2.txt
|		...

注意:

1、label要和image对应,且命名加gt_

2、txt中标签格式为:x1,y1,x2,y2,x3,y3,x4,y4,label_name(可有可无),以左上角开始逆时针四个点坐标,最后name可有可无。

Training

step1:修改dataset/icdar2015_loader.py 中训练测试图像及label路径
step2:执行命令 CUDA_VISIBLE_DEVICES=0,1 python train_ic15.py 
注意训练命令参数可选:
--arch 默认resnt50,可选resnet18、resnet34、resnet50、resnet101、resnet152
--img_size 默认640
--n_epoch  迭代步数,默认600
--schedule 调整学习步数,默认200-400,输入int型
--batch_size 默认16
--lr 学习率,默认0.001
--checkpoint 模型保存路径,默认保存在checpoint下

Testing

step1:修改dataset/icdar2015_test_loader.py 中训练测试图像及label路径
step2:执行命令 CUDA_VISIBLE_DEVICES=0 python test_ic15.py --scale 1 --resume [path of model]
注意训练命令参数可选:
--arch 默认resnt50,可选resnet18、resnet34、resnet50、resnet101、resnet152
--resume 模型路径
--long_size 输入尺寸,默认2240

text-detection-psenet's People

Stargazers

tong_zhen avatar Bruce avatar  avatar splendid avatar stitch avatar 杨先生 avatar

Watchers

James Cloos avatar 杨先生 avatar  avatar

Forkers

fendaq ttyhu

text-detection-psenet's Issues

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.