Skip to content

Commit ba7adbb

Browse files
author
xieyufei
committed
update
1 parent ac5f599 commit ba7adbb

File tree

114 files changed

+35996
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+35996
-2
lines changed

.DS_Store

10 KB
Binary file not shown.

README.md

+38-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,38 @@
1-
# FOTS
2-
An Implementation of the FOTS: Fast Oriented Text Spotting with a Unified Network
1+
# FOTS: Fast Oriented Text Spotting with a Unified Network
2+
3+
### Introduction
4+
This is a pytorch re-implementation of [FOTS: Fast Oriented Text Spotting with a Unified Network](http://openaccess.thecvf.com/content_cvpr_2018/CameraReady/1699.pdf).
5+
The features are summarized blow:
6+
7+
+ Only **detection** part is implemented.
8+
9+
### Contents
10+
1. [Installation](#installation)
11+
2. [Download](#download)
12+
3. [Train](#train)
13+
4. [Test](#test)
14+
15+
16+
### Installation
17+
1. Any version of torch version >= 0.3.1 should be ok.
18+
19+
### Download
20+
1. Models trained on ICDAR 2015 (training set) + ICDAR 2017 (training set)
21+
22+
### Train
23+
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
24+
and run
25+
26+
```
27+
python main_train.py
28+
29+
```
30+
31+
### Test
32+
run
33+
```
34+
python eval.py
35+
```
36+
37+
a text file will be then written to the output path.
38+

__pycache__/config.cpython-35.pyc

1.72 KB
Binary file not shown.

__pycache__/config.cpython-36.pyc

1.6 KB
Binary file not shown.
2.02 KB
Binary file not shown.
1.82 KB
Binary file not shown.

__pycache__/loss.cpython-35.pyc

3.71 KB
Binary file not shown.

__pycache__/loss.cpython-36.pyc

3.51 KB
Binary file not shown.

config.py

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
import warnings
2+
class DefaultConfig(object):
3+
4+
initial_epoch = 0
5+
epoch_num = 30000
6+
lr = 1e-3
7+
decay = 5e-4
8+
use_gpu = True
9+
batch_size = 64
10+
num_workers = 10
11+
optmizer = 'RMSprop' # RMSprop,Adam # SGD, SGD
12+
betas = (0.5,0.999)
13+
epsilon = 1e-4
14+
shrink_side_ratio = 0.6
15+
shrink_ratio = 0.2
16+
model = 'FOTS'
17+
18+
patience = 2
19+
load_weights = False
20+
lambda_inside_score_loss = 4.0
21+
lambda_side_vertex_code_loss = 1.0
22+
lambda_side_vertex_coord_loss = 1.0
23+
24+
load_model_path = "checkpoints/model.pth"
25+
save_path = "save_model/"
26+
27+
28+
total_img = 16243
29+
30+
validation_split_ratio = 0.1
31+
max_train_img_size = 736
32+
max_predict_img_size = 2400
33+
34+
assert max_train_img_size in [256, 384, 512, 640, 736], 'max_train_img_size must in [256~736]'
35+
36+
37+
38+
39+
def parse(self,kwargs):
40+
'''
41+
update the config params
42+
:param self:
43+
:param kwargs:
44+
:return:
45+
'''
46+
for k,v in kwargs.items():
47+
if not hasattr(self,k):
48+
warnings.warn("Warning:opt has not attribute ^s" %k)
49+
50+
setattr(self,k,v)
51+
52+
print('use config:')
53+
for k,v in self.__class__.__dict__.items():
54+
if not k.startswith('__'):
55+
print(k,getattr(self,k))
56+
print("end the parse!!!")
57+
58+
59+
DefaultConfig.parse=parse
60+
opt=DefaultConfig()

config.pyc

1.97 KB
Binary file not shown.

data/.DS_Store

6 KB
Binary file not shown.

data/__init__.py

Whitespace-only changes.
138 Bytes
Binary file not shown.
138 Bytes
Binary file not shown.
20.4 KB
Binary file not shown.
17.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)