c++ - Tensorflow 对象检测 API 是否有 C++ 包装器?

标签 c++ tensorflow object-detection object-detection-api

我们已经使用提供的 Python 脚本成功地训练了我们的模型并测试了它们。但是,我们现在想将它部署在我们的网站上,并为第二轮测试运行一个网络服务。

是否有 C++ 包装器,以便我们可以像使用 Python 脚本一样运行/执行我们的模型?

最佳答案

我认为最简单的方法是使用 cppflow .它是 TensorFlow C API 的 C++ 包装器。它很简单但真的很容易使用,你不需要安装它,也不需要用 Bazel 编译。您只需下载 C API 并像这样使用它:

Model model("graph.pb");
model.restore("path/to/checkpoint");

auto input = new Tensor(model, "input");
auto output = new Tensor(model, "output");

model.run(input, output);

关于c++ - Tensorflow 对象检测 API 是否有 C++ 包装器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46703326/

相关文章:

python - Numpy 方法从卷积核生成线性运算矩阵

具有多线程的 OpenCV traincascade

java - 如何查看/监控我的 zeromq PUBlisher 的订阅者?

c++ - 使用 intel Intrinsics 进行赋值 - 水平添加

python - 弃用警告 : How to remove tf. keras 警告 "calling VarianceScaling.__init__ with dtype is deprecated..."

python - 用于高流量应用程序实时预测的生产环境中的 TensorFlow - 如何使用?

python - 如何使用 Blob 存储帐户在 azure-ml 中训练 YOLO-NAS 模型

python - Tensorflow无法训练模型

c++ - CMake编译时生成源码

boost 或其他任何 C++ crypt 库