Tensorflow Object Detection APIには、Tensorflow Servingで見つかった古くなった例よりも洗練された独自のエクスポータスクリプトがあります。
サービングTensorflowを構築する際は、必ず最新のマスターがtensorflow/tensorflow(> R1.2)のコミット引くとtensorflow /モデル
はGPU
bazel build -c opt --config=cuda tensorflow_serving/...
のためのサービングTensorflowを構築します
クロスツールとncclに関するエラーが発生した場合は、https://github.com/tensorflow/serving/issues/186#issuecomment-251152755 https://github.com/tensorflow/serving/issues/327#issuecomment-305771708
使用
python tf_models/object_detection/export_inference_graph.py \ --pipeline_config_path=/path/to/ssd_inception_v2.config \ --trained_checkpoint_prefix=/path/to/trained/checkpoint/model.ckpt \ --output_directory /path/to/output/1 \ --export_as_saved_model \ --input_type=image_tensor
エクスポート時にすべての変数は定数に変換されているProtobufバイナリに焼いたことに注意してください。あなたはsaved_model /変数ディレクトリ
下のすべてのファイルがサーバーを起動するには見つからない場合Tensorflow下の例では、仕事だけでなく
にサービスを提供、クライアントのよう
bazel-bin/tensorflow_serving/model_servers/tensorflow_model_server --port=9000 --model_name=inception_v2 --model_base_path=/path/to/output --enable_batching=true
、パニックしないでください。
私はtensorflowのコード例とオブジェクト検出api jupyterノートに従ってエクスポートスクリプトを書いていますが、あなたの答えはより良いオプションです。 –
私は適切なpipeline_configファイルを作成しようとしていますが、書き方を知っていますか、どこで例を見つけることができますか? –
tensorflow [ここ](https://github.com/tensorflow/models/tree/master/object_detection/samples/configs)の下で利用可能なすべてのオブジェクト検出モデルのテンプレートパイプライン設定ファイルを見つけることができます。 – suryaprakaz