# EAST: An Efficient and Accurate Scene Text Detector
### Introduction
This is a tensorflow re-implementation of [EAST: An Efficient and Accurate Scene Text Detector](https://arxiv.org/abs/1704.03155v2).
The features are summarized blow:
+ Online demo
+ http://east.zxytim.com/
+ Result example: http://east.zxytim.com/?r=48e5020a-7b7f-11e7-b776-f23c91e0703e
+ CAVEAT: There's only one cpu core on the demo server. Simultaneous access will degrade response time.
+ Only **RBOX** part is implemented.
+ A fast Locality-Aware NMS in C++ provided by the paper's author.
+ The pre-trained model provided achieves **80.83** F1-score on ICDAR 2015
Incidental Scene Text Detection Challenge using only training images from ICDAR 2015 and 2013.
see [here](http://rrc.cvc.uab.es/?ch=4&com=evaluation&view=method_samples&task=1&m=29855>v=1) for the detailed results.
+ Differences from original paper
+ Use ResNet-50 rather than PVANET
+ Use dice loss (optimize IoU of segmentation) rather than balanced cross entropy
+ Use linear learning rate decay rather than staged learning rate decay
+ Speed on 720p (resolution of 1280x720) images:
+ Now
+ Graphic card: GTX 1080 Ti
+ Network fprop: **~50 ms**
+ NMS (C++): **~6ms**
+ Overall: **~16 fps**
+ Then
+ Graphic card: K40
+ Network fprop: ~150 ms
+ NMS (python): ~300ms
+ Overall: ~2 fps
Thanks for the author's ([@zxytim](https://github.com/zxytim)) help!
Please cite his [paper](https://arxiv.org/abs/1704.03155v2) if you find this useful.
### Contents
1. [Installation](#installation)
2. [Download](#download)
2. [Demo](#demo)
3. [Test](#train)
4. [Train](#test)
5. [Examples](#examples)
### Installation
1. Any version of tensorflow version > 1.0 should be ok.
### Download
1. Models trained on ICDAR 2013 (training set) + ICDAR 2015 (training set): [BaiduYun link](http://pan.baidu.com/s/1jHWDrYQ) [GoogleDrive](https://drive.google.com/open?id=0B3APw5BZJ67ETHNPaU9xUkVoV0U)
2. Resnet V1 50 provided by tensorflow slim: [slim resnet v1 50](http://download.tensorflow.org/models/resnet_v1_50_2016_08_28.tar.gz)
### Train
If you want to train the model, you should provide the dataset path, in the dataset path, a separate gt text file should be provided for each image
and run
```
python multigpu_train.py --gpu_list=0 --input_size=512 --batch_size_per_gpu=14 --checkpoint_path=/tmp/east_icdar2015_resnet_v1_50_rbox/ \
--text_scale=512 --training_data_path=/data/ocr/icdar2015/ --geometry=RBOX --learning_rate=0.0001 --num_readers=24 \
--pretrained_model_path=/tmp/resnet_v1_50.ckpt
```
If you have more than one gpu, you can pass gpu ids to gpu_list(like --gpu_list=0,1,2,3)
**Note: you should change the gt text file of icdar2015's filename to img_\*.txt instead of gt_img_\*.txt(or you can change the code in icdar.py), and some extra characters should be removed from the file.
See the examples in training_samples/**
### Demo
If you've downloaded the pre-trained model, you can setup a demo server by
```
python3 run_demo_server.py --checkpoint-path /tmp/east_icdar2015_resnet_v1_50_rbox/
```
Then open http://localhost:8769 for the web demo. Notice that the URL will change after you submitted an image.
Something like `?r=49647854-7ac2-11e7-8bb7-80000210fe80` appends and that makes the URL persistent.
As long as you are not deleting data in `static/results`, you can share your results to your friends using
the same URL.
URL for example below: http://east.zxytim.com/?r=48e5020a-7b7f-11e7-b776-f23c91e0703e
![web-demo](demo_images/web-demo.png)
### Test
run
```
python eval.py --test_data_path=/tmp/images/ --gpu_list=0 --checkpoint_path=/tmp/east_icdar2015_resnet_v1_50_rbox/ \
--output_path=/tmp/
```
a text file will be then written to the output path.
### Examples
Here are some test examples on icdar2015, enjoy the beautiful text boxes!
![image_1](demo_images/img_2.jpg)
![image_2](demo_images/img_10.jpg)
![image_3](demo_images/img_14.jpg)
![image_4](demo_images/img_26.jpg)
![image_5](demo_images/img_75.jpg)
Please let me know if you encounter any issues(my email boostczc@gmail dot com).
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
EAST-master.zip (57个子文件)
EAST-master
deploy.sh 171B
run_demo_server.py 6KB
icdar.py 30KB
training_samples
img_2.txt 73B
img_2.jpg 49KB
img_1.jpg 45KB
img_1.txt 265B
data_util.py 4KB
model.py 5KB
locality_aware_nms.py 2KB
requirements.txt 120B
__init__.py 0B
nets
resnet_utils.py 11KB
__init__.py 0B
resnet_v1.py 15KB
LICENSE 34KB
eval.py 7KB
templates
index.html 5KB
.gitignore 1KB
readme.md 4KB
lanms
lanms.h 6KB
__init__.py 572B
__main__.py 245B
Makefile 365B
adaptor.cpp 2KB
.ycm_extra_conf.py 4KB
.gitignore 11B
include
pybind11
functional.h 3KB
eigen.h 29KB
embed.h 7KB
class_support.h 23KB
pytypes.h 50KB
attr.h 18KB
cast.h 85KB
complex.h 2KB
operators.h 8KB
chrono.h 6KB
buffer_info.h 4KB
stl.h 13KB
common.h 39KB
eval.h 4KB
pybind11.h 82KB
options.h 2KB
descr.h 8KB
stl_bind.h 20KB
numpy.h 64KB
typeid.h 1KB
clipper
clipper.cpp 139KB
clipper.hpp 15KB
multigpu_train.py 8KB
static
css
app.css 117B
demo_images
img_14.jpg 115KB
img_75.jpg 171KB
img_26.jpg 208KB
web-demo.png 712KB
img_2.jpg 225KB
img_10.jpg 330KB
共 57 条
- 1
资源评论
qq_20293531
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功