This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
# Assuming object detection API is available for use | |
from object_detection.utils.config_util import create_pipeline_proto_from_configs | |
from object_detection.utils.config_util import get_configs_from_pipeline_file | |
import object_detection.exporter | |
# Configuration for model to be exported | |
config_pathname = ${Model_configuration} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_write_saved_model(saved_model_path, trained_checkpoint_prefix, | |
placeholder_tensor, outputs) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def _write_saved_model(saved_model_path, | |
trained_checkpoint_prefix, | |
inputs, | |
outputs): | |
"""Writes SavedModel to disk. | |
Args: | |
saved_model_path: Path to write SavedModel. | |
trained_checkpoint_prefix: path to trained_checkpoint_prefix. | |
inputs: The input image tensor to use for detection. | |
outputs: A tensor dictionary containing the outputs of a DetectionModel. |
NewerOlder