Skip to content

Commit

Permalink
adjust picture size
Browse files Browse the repository at this point in the history
  • Loading branch information
princewang1994 committed Dec 28, 2018
1 parent 8435879 commit b7303f4
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 18 deletions.
File renamed without changes.
45 changes: 27 additions & 18 deletions README.md
@@ -1,20 +1,27 @@
# TextSnake: A Flexible Representation for Detecting Text of Arbitrary Shapes

A PyTorch implement of **TextSnake: A Flexible Representation for Detecting Text of Arbitrary Shapes** (Face++ ECCV 2018)
A PyTorch implement of **TextSnake: A Flexible Representation for Detecting Text of Arbitrary Shapes** (ECCV 2018) by `Face++`

- Paper link: [arXiv:1807.01544](https://arxiv.org/abs/1807.01544)

- Github: [princewang1994/TextSnake.pytorch](https://github.com/princewang1994/TextSnake.pytorch)

![](http://princepicbed.oss-cn-beijing.aliyuncs.com/blog_20181228201251.png)
<div style="color:#0000FF" align="center">
<img src="http://princepicbed.oss-cn-beijing.aliyuncs.com/blog_20181228201251.png" width="630"/>
</div>


## Paper


![](http://princepicbed.oss-cn-beijing.aliyuncs.com/blog_20181228172334.png)

Comparison of different representations for text instances. (a) Axis-aligned rectangle. (b) Rotated rectangle. (c) Quadrangle. (d) TextSnake. Obviously, the proposed TextSnake representation is able to effectively and precisely describe the geometric properties, such as location, scale, and bending of curved text with perspective distortion, while the other representations (axis-aligned rectangle, rotated rectangle or quadrangle) struggle with giving accurate predictions in such cases.

![](http://princepicbed.oss-cn-beijing.aliyuncs.com/blog_20181228172346.png)
<div style="color:#0000FF" align="center">
<img src="http://princepicbed.oss-cn-beijing.aliyuncs.com/blog_20181228172346.png" width="530"/>
</div>


Text snake element:

Expand All @@ -40,32 +47,32 @@ This repo includes the training code and inference demo of TextSnake, training a

To run this repo successfully, it is highly recommanded with:

- Linux (Ubuntu 16.04)
- Python3.6
- Anaconda3
- NVIDIA GPU(with 8G or larger GPU memroy)
- **Linux (Ubuntu 16.04)**
- **Python3.6**
- **Anaconda3**
- **NVIDIA GPU(with 8G or larger GPU memroy)**

(I haven't test it on other Python version.)

1. clone this repository

```
```shell
git clone https://github.com/princewang1994/TextSnake.pytorch.git
```

2. python package can be installed with `pip`
```
cd $TEXTSNAKE
pip install -r requirements.txt
```shell
$ cd $TEXTSNAKE
$ pip install -r requirements.txt
```

## Training

Training model with given experiment name `$EXPNAME`

```shell
EXPNAME=example
CUDA_VISIBLE_DEVICES=$GPUID python train.py $EXPNAME --viz
$ EXPNAME=example
$ CUDA_VISIBLE_DEVICES=$GPUID python train.py $EXPNAME --viz
```

**options:**
Expand All @@ -80,8 +87,8 @@ other options can be show by run `python train.py -h`
Runing following command can generate demo on TotalText dataset (300 pictures), the result are save to `./vis` by default

```shell
EXPNAME=example
CUDA_VISIBLE_DEVICES=$GPUID python demo.py --checkepoch 190
$ EXPNAME=example
$ CUDA_VISIBLE_DEVICES=$GPUID python demo.py --checkepoch 190
```

**options:**
Expand All @@ -92,7 +99,9 @@ other options can be show by run `python train.py -h`

## Performance

left: prediction, middle: text region(TR), right: text center line(TCL)
- left: prediction
- middle: text region(TR)
- right: text center line(TCL)

![](demo/24_img650.jpg)

Expand All @@ -104,7 +113,7 @@ left: prediction, middle: text region(TR), right: text center line(TCL)

## What is comming

- [ ] more dataset suport: ICDAR15/[SynthText](https://github.com/ankush-me/SynthText)
- [ ] more dataset suport: [ICDAR15/[SynthText](https://github.com/ankush-me/SynthText)]
- [ ] Metric computing
- [ ] Cython/C++ accelerate core functions

Expand All @@ -114,4 +123,4 @@ This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md

## Acknowledgement

This project is writen by [Prince Wang](https://github.com/princewang1994), some code refer to [songdejia/EAST](https://github.com/songdejia/EAST)
This project is writen by [Prince Wang](https://github.com/princewang1994), part of codes refer to [songdejia/EAST](https://github.com/songdejia/EAST)

0 comments on commit b7303f4

Please sign in to comment.