"...git@developer.sourcefind.cn:OpenDAS/mmdetection3d.git" did not exist on "f0e9bfef71916260c6235ffdbffe9ec7336676b9"
Commit ce8dd972 authored by A. Unique TensorFlower's avatar A. Unique TensorFlower
Browse files

Internal change

PiperOrigin-RevId: 305086206
parent 002034a8
...@@ -29,7 +29,7 @@ with the same or improved speed and performance with each new TensorFlow build. ...@@ -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/) | | [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) | | [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) | | [RetinaNet](vision/detection) | A fast and powerful object detector | [arXiv:1708.02002](https://arxiv.org/abs/1708.02002) |
| [Mask-RCNN](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 ### Other models
......
# Object Detection Models on TensorFlow 2 # Object Detection Models on TensorFlow 2
**Note**: The repo is still under construction. More features and instructions **Note**: This repository is still under construction.
will be added soon. More features and instructions will be added soon.
## Prerequsite ## Prerequsite
To get started, download the code from TensorFlow models github repository or To get started, download the code from TensorFlow models GitHub repository or
use the pre-installed Google Cloud VM. use the pre-installed Google Cloud VM.
```bash ```bash
git clone https://github.com/tensorflow/models.git git clone https://github.com/tensorflow/models.git
``` ```
Next, make sure to use Tensorflow 2.1+ on Google Cloud. Also here are Next, make sure to use TensorFlow 2.1+ on Google Cloud. Also here are
a few package you need to install to get started: a few package you need to install to get started:
```bash ```bash
...@@ -20,6 +20,7 @@ pip3 install -r ~/models/official/requirements.txt ...@@ -20,6 +20,7 @@ pip3 install -r ~/models/official/requirements.txt
``` ```
## Train RetinaNet on TPU ## Train RetinaNet on TPU
### Train a vanilla ResNet-50 based RetinaNet. ### Train a vanilla ResNet-50 based RetinaNet.
```bash ```bash
...@@ -85,7 +86,6 @@ python3 ~/models/official/vision/detection/main.py \ ...@@ -85,7 +86,6 @@ python3 ~/models/official/vision/detection/main.py \
--config_file="my_retinanet.yaml" --config_file="my_retinanet.yaml"
``` ```
```bash ```bash
MODEL_DIR="<path to the directory to store model files>" MODEL_DIR="<path to the directory to store model files>"
python3 ~/models/official/vision/detection/main.py \ python3 ~/models/official/vision/detection/main.py \
...@@ -122,8 +122,11 @@ use_tpu: False ...@@ -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 ```bash
TPU_NAME="<your GCP TPU name>" TPU_NAME="<your GCP TPU name>"
...@@ -141,11 +144,11 @@ python3 ~/models/official/vision/detection/main.py \ ...@@ -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} } }" --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-RCNN 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 First, create a YAML config file, e.g. *my_maskrcnn.yaml*.
the parameters to be overridden, which should at least include the following This file specifies the parameters to be overridden,
fields. which should at least include the following fields.
```YAML ```YAML
# my_maskrcnn.yaml # my_maskrcnn.yaml
...@@ -171,7 +174,7 @@ python3 ~/models/official/vision/detection/main.py \ ...@@ -171,7 +174,7 @@ python3 ~/models/official/vision/detection/main.py \
--config_file="my_maskrcnn.yaml" --config_file="my_maskrcnn.yaml"
``` ```
## Train Mask-RCNN on GPU ## Train Mask R-CNN on GPU
Training on GPU is similar to that on TPU. The major change is the strategy type Training on GPU is similar to that on TPU. The major change is the strategy type
(use (use
...@@ -193,7 +196,6 @@ python3 ~/models/official/vision/detection/main.py \ ...@@ -193,7 +196,6 @@ python3 ~/models/official/vision/detection/main.py \
--config_file="my_maskrcnn.yaml" --config_file="my_maskrcnn.yaml"
``` ```
```bash ```bash
MODEL_DIR="<path to the directory to store model files>" MODEL_DIR="<path to the directory to store model files>"
python3 ~/models/official/vision/detection/main.py \ python3 ~/models/official/vision/detection/main.py \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment