exporting_models.md 783 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Exporting a trained model for inference

After your model has been trained, you should export it to a Tensorflow
graph proto. A checkpoint will typically consist of three files:

* model.ckpt-${CHECKPOINT_NUMBER}.data-00000-of-00001,
* model.ckpt-${CHECKPOINT_NUMBER}.index
* model.ckpt-${CHECKPOINT_NUMBER}.meta

After you've identified a candidate checkpoint to export, run the following
command from tensorflow/models/object_detection:

``` bash
# From tensorflow/models
JongYoon Lim's avatar
JongYoon Lim committed
15
python object_detection/export_inference_graph.py \
16
17
    --input_type image_tensor \
    --pipeline_config_path ${PIPELINE_CONFIG_PATH} \
18
19
    --trained_checkpoint_prefix ${TRAIN_PATH} \
    --output_directory output_inference_graph.pb
20
21
22
```

Afterwards, you should see a graph named output_inference_graph.pb.