Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
1a392371
"vscode:/vscode.git/clone" did not exist on "8bac18dc43f99f4d5f5a866a23d2e12f48843647"
Commit
1a392371
authored
May 22, 2017
by
Neal Wu
Committed by
GitHub
May 22, 2017
Browse files
Minor changes
parent
8086621c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
attention_ocr/README.md
attention_ocr/README.md
+6
-6
No files found.
attention_ocr/README.md
View file @
1a392371
...
@@ -76,13 +76,13 @@ tar xf attention_ocr_2017_05_17.tar.gz
...
@@ -76,13 +76,13 @@ tar xf attention_ocr_2017_05_17.tar.gz
python train.py --checkpoint=model.ckpt-399731
python train.py --checkpoint=model.ckpt-399731
```
```
## How to use your own image data to train the
M
odel
?
## How to use your own image data to train the
m
odel
You need to define a new dataset. There are two options:
You need to define a new dataset. There are two options:
1.
Store data in the same format as the FSNS dataset and just reuse the
1.
Store data in the same format as the FSNS dataset and just reuse the
[
python/datasets/fsns.py
](
https://github.com/tensorflow/models/blob/master/attention_ocr/python/datasets/fsns.py
)
[
python/datasets/fsns.py
](
https://github.com/tensorflow/models/blob/master/attention_ocr/python/datasets/fsns.py
)
module. E.g. create a file datasets/newtextdataset.py
module. E.g.
,
create a file datasets/newtextdataset.py
:
```
```
import fsns
import fsns
...
@@ -140,7 +140,7 @@ dataset name in the command line.
...
@@ -140,7 +140,7 @@ dataset name in the command line.
python train.py --dataset_name=newtextdataset
python train.py --dataset_name=newtextdataset
```
```
Please note th
e
eval.py will also require the same flag.
Please note th
at
eval.py will also require the same flag.
2.
Define a new dataset format. The model needs the following data to train:
2.
Define a new dataset format. The model needs the following data to train:
...
@@ -148,14 +148,14 @@ Please note the eval.py will also require the same flag.
...
@@ -148,14 +148,14 @@ Please note the eval.py will also require the same flag.
-
labels: ground truth label ids, shape=[batch_size x seq_length];
-
labels: ground truth label ids, shape=[batch_size x seq_length];
-
labels_one_hot: labels in one-hot encoding, shape [batch_size x seq_length x num_char_classes];
-
labels_one_hot: labels in one-hot encoding, shape [batch_size x seq_length x num_char_classes];
Refer to
the
[
python/data_provider.py
](
https://github.com/tensorflow/models/blob/master/attention_ocr/python/data_provider.py#L33
)
Refer to
[
python/data_provider.py
](
https://github.com/tensorflow/models/blob/master/attention_ocr/python/data_provider.py#L33
)
for more details. You can use
the
[
python/datasets/fsns.py
](
https://github.com/tensorflow/models/blob/master/attention_ocr/python/datasets/fsns.py
)
for more details. You can use
[
python/datasets/fsns.py
](
https://github.com/tensorflow/models/blob/master/attention_ocr/python/datasets/fsns.py
)
as the example.
as the example.
## How to use a pre-trained model
## How to use a pre-trained model
The inference part was not released yet, but it is pretty straightforward to
The inference part was not released yet, but it is pretty straightforward to
implement one in
p
ython or C++.
implement one in
P
ython or C++.
The recommended way is to use the
[
Serving infrastructure
](
https://tensorflow.github.io/serving/serving_basic
)
.
The recommended way is to use the
[
Serving infrastructure
](
https://tensorflow.github.io/serving/serving_basic
)
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment