caffe\tesorflow提供服務



caffe提供服務

Flask文件上傳(一):原生實現

Caffe+flask CNN算法服務器搭建

Caffe,PyCaffe上手實踐2 基於Flask的圖像分類服務


https://github.com/kendricktan/xraychecker

https://github.com/zzningxp/flask-image-retrieval


https://github.com/sugyan/inception-app-example


Tensorflow Serving with support for Caffe

https://github.com/rayglover-ibm/serving-caffe




tensorflow提供服務

https://www.tensorflow.org/serving/

https://github.com/tensorflow/serving/tree/master/tensorflow_serving/example

https://github.com/llSourcell/How-to-Deploy-a-Tensorflow-Model-in-Production

Tensorflow Serving 模型部署和服務

TensorFlow Serving,GPU版安裝

Bazel 安裝及遇到的問題

https://github.com/bazelbuild/bazel/releases

https://stackoverflow.com/questions/42519010/how-to-do-batching-in-tensorflow-serving


安裝tensorflow serving總結

TF_Serving 部署一個模型

TensorFlow Serving 嚐嚐鮮

tensorflow serving

Tensorflow serving(tf_serving) 安裝測試說明

Tensorflow serving的編譯

Tensorflow Serving初體驗

Centos7部署Tensorflow Serving

tensorflow serving for centos 7.2

tensorflow-serving源碼理解

flask快速搭建tensorflow http服務

Tensorflow Serving 模型部署和服務

http://www.cnblogs.com/YouXiangLiThon/tag/tensorflow%20serving/


模型導出

tf.train.Saver
用於保存和恢復Variable。它可以非常方便的保存當前模型的變量或者倒入之前訓練好的變量。一個最簡單的運用:
saver - tf.train.Saver()

Save the variables to disk.
saver.save(sess, “/tmp/test.ckpt”)


Restore variables from disk.
saver.restore(sess, “/tmp/test.ckpt”) 


tf.contrib.session_bundle.exporter.Exporter
導出模型還需要這個 Exporter 的協助。
Exporter 的基本使用方式是
1.傳入 saver 構造一個實例
2.調用 init 定義模型的 graph 和 input/output
3.使用 export 導出爲文件

import numpy as np
import tensorflow as tf
from tensorflow.contrib.session_bundle import exporter
model_path = 'snapshots'  # 'experiments/train_experiment/checkpoints'
# Tensorflow specific configuration
config = tf.ConfigProto(allow_soft_placement=True)
config.gpu_options.allow_growth = True
sess = tf.Session(config=config)
latest_checkpoint = tf.train.latest_checkpoint(model_path)
if latest_checkpoint:
        print("Loading model checkpoint {} ...\n".format(latest_checkpoint))
        metagraph_file = latest_checkpoint + '.meta'
        saver = tf.train.import_meta_graph(metagraph_file)
        saver.restore(sess, latest_checkpoint)
        print("Checkpoint loaded\n\n")
else:
        print("No checkpoints available!\n\n")
image_data = sess.graph.get_tensor_by_name('input/Placeholder:0')
softmax_tensor     = sess.graph.get_tensor_by_name('output/Softmax:0')
model_exporter = exporter.Exporter(saver)
model_exporter.init(sess.graph.as_graph_def(),
                        named_graph_signatures={
                        'inputs': exporter.generic_signature({'x': image_data}),
                        'outputs': exporter.generic_signature({'y': softmax_tensor})}
    )
model_exporter.export('model', tf.constant(1), sess)






https://github.com/triagemd/model-serving

https://github.com/songbinliu/inceptionServer

https://github.com/vishh/tf-serving-base



https://github.com/tanveer941/Object-detection-sever

https://github.com/peppaseven/object_detector_server

https://github.com/arixlin/server_object_detection

https://github.com/BlueLens/bl-detect

https://github.com/jsonw99/object_detect_serving


https://github.com/movchan74/tensorflow_serving_examples

https://github.com/TensorLab/tensorfx

https://github.com/aaxwaz/Serving-TensorFlow-Model

https://github.com/hetaoaoao/tensorflow_web_deploy

構建並用 TensorFlow Serving 部署 Wide & Deep 模型




keras提供服務

keras export model

基本思路是將keras模型導出爲tf model,然後利用tfserv

keras model to tensorflow model

keras模型導出到tensorflow,以及pb模型導出

https://github.com/alanswx/keras_to_tensorflow

https://github.com/amir-abdi/keras_to_tensorflow

https://github.com/krystianity/keras-serving

https://github.com/movchan74/tensorflow_serving_examples

https://github.com/bshao001/TF-Model-Deploy-Tutorial

https://stackoverflow.com/questions/42969779/keras-error-you-must-feed-a-value-for-placeholder-tensor-bidirectional-1-keras

https://github.com/keras-team/keras/issues/2310




object detect serving

https://github.com/rayglover-ibm/serving-caffe/blob/caffe/tensorflow_serving/example/obj_detector_pb2.py

https://github.com/tanveer941/Object-detection-sever




發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章