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
ce8dd972
Commit
ce8dd972
authored
Apr 06, 2020
by
A. Unique TensorFlower
Browse files
Internal change
PiperOrigin-RevId: 305086206
parent
002034a8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
14 deletions
+16
-14
official/README.md
official/README.md
+1
-1
official/vision/detection/README.md
official/vision/detection/README.md
+15
-13
No files found.
official/README.md
View file @
ce8dd972
...
...
@@ -29,7 +29,7 @@ with the same or improved speed and performance with each new TensorFlow build.
|
[
MNIST
](
vision/image_classification
)
| A basic model to classify digits from the MNIST dataset |
[
Link
](
http://yann.lecun.com/exdb/mnist/
)
|
|
[
ResNet
](
vision/image_classification
)
| A deep residual network for image recognition |
[
arXiv:1512.03385
](
https://arxiv.org/abs/1512.03385
)
|
|
[
RetinaNet
](
vision/detection
)
| A fast and powerful object detector |
[
arXiv:1708.02002
](
https://arxiv.org/abs/1708.02002
)
|
|
[
Mask-
R
CNN
](
vision/detection
)
| An object detection and instance segmentation model |
[
arXiv:1703.06870
](
https://arxiv.org/abs/1703.06870
)
|
|
[
Mask
R
-CNN
](
vision/detection
)
| An object detection and instance segmentation model |
[
arXiv:1703.06870
](
https://arxiv.org/abs/1703.06870
)
|
### Other models
...
...
official/vision/detection/README.md
View file @
ce8dd972
# Object Detection Models on TensorFlow 2
**Note**
: Th
e
repo is still under construction.
More features and instructions
will be added soon.
**Note**
: Th
is
repo
sitory
is still under construction.
More features and instructions
will be added soon.
## Prerequsite
To get started, download the code from TensorFlow models
g
it
h
ub repository or
To get started, download the code from TensorFlow models
G
it
H
ub repository or
use the pre-installed Google Cloud VM.
```
bash
git clone https://github.com/tensorflow/models.git
```
Next, make sure to use Tensor
f
low 2.1+ on Google Cloud. Also here are
Next, make sure to use Tensor
F
low 2.1+ on Google Cloud. Also here are
a few package you need to install to get started:
```
bash
...
...
@@ -20,6 +20,7 @@ pip3 install -r ~/models/official/requirements.txt
```
## Train RetinaNet on TPU
### Train a vanilla ResNet-50 based RetinaNet.
```
bash
...
...
@@ -85,7 +86,6 @@ python3 ~/models/official/vision/detection/main.py \
--config_file
=
"my_retinanet.yaml"
```
```
bash
MODEL_DIR
=
"<path to the directory to store model files>"
python3 ~/models/official/vision/detection/main.py
\
...
...
@@ -122,8 +122,11 @@ use_tpu: False
"
```
## Train Mask-RCNN on TPU
### Train a vanilla ResNet-50 based Mask-RCNN.
---
## Train Mask R-CNN on TPU
### Train a vanilla ResNet-50 based Mask R-CNN.
```
bash
TPU_NAME
=
"<your GCP TPU name>"
...
...
@@ -141,11 +144,11 @@ python3 ~/models/official/vision/detection/main.py \
--params_override
=
"{train: { checkpoint: { path:
${
RESNET_CHECKPOINT
}
, prefix: resnet50/ }, train_file_pattern:
${
TRAIN_FILE_PATTERN
}
}, eval: { val_json_file:
${
VAL_JSON_FILE
}
, eval_file_pattern:
${
EVAL_FILE_PATTERN
}
} }"
```
### Train a custom Mask-
R
CNN using the config file.
### Train a custom Mask
R
-CNN using the config file.
First, create a YAML config file, e.g.
*my_maskrcnn.yaml*
.
This file specifies
the parameters to be overridden,
which should at least include the following
fields.
First, create a YAML config file, e.g.
*my_maskrcnn.yaml*
.
This file specifies
the parameters to be overridden,
which should at least include the following
fields.
```
YAML
# my_maskrcnn.yaml
...
...
@@ -171,7 +174,7 @@ python3 ~/models/official/vision/detection/main.py \
--config_file
=
"my_maskrcnn.yaml"
```
## Train Mask-
R
CNN on GPU
## Train Mask
R
-CNN on GPU
Training on GPU is similar to that on TPU. The major change is the strategy type
(use
...
...
@@ -193,7 +196,6 @@ python3 ~/models/official/vision/detection/main.py \
--config_file
=
"my_maskrcnn.yaml"
```
```
bash
MODEL_DIR
=
"<path to the directory to store model files>"
python3 ~/models/official/vision/detection/main.py
\
...
...
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