协作安装Tensorflow对象检测API [英] Colaboratory install Tensorflow Object Detection Api

查看:87
本文介绍了协作安装Tensorflow对象检测API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Google合作实验室成功地在Tensorflow中执行了一个训练模型和图像识别的笔记本.现在,我要使用对象检测API 启动一个新笔记本.当我执行代码时,出现以下错误:

  ModuleNotFoundError:没有名为"object_detection"的模块 

如何在Colaboratory中安装对象检测Api"?我遵循安装说明,但我可以不执行:

 #来自tensorflow/models/research/协议object_detection/protos/*.proto --python_out =. 

解决方案

以下是一个示例笔记本,其中显示了TensorFlow对象检测API的安装和配置:

https://colab.research.google.com/drive/1kHEQK2uk35xXZ_bzMUgLkoysJIWwznYr

与网站上的安装说明不同,包括直接修改 sys.path 和使用%run 执行 model_builder_test.py .这些差异的原因是,当在Colab中运行时,您已经在Python解释器中,因此您无需担心修改环境,以供将来 python 的shell调用.

I succesfully executed in Google Colaboratory a notebook of training model and image recognition in Tensorflow. Now I want to start a new notebook with Object Detection Api. When I execute my code I get following error:

ModuleNotFoundError: No module named 'object_detection'

How can I install Object Detection Api in Colaboratory? I follow the install instructions but I can't execute:

# From tensorflow/models/research/
protoc object_detection/protos/*.proto --python_out=.

解决方案

Here is an example notebook that shows the installation and configuration of the TensorFlow object detection API:

https://colab.research.google.com/drive/1kHEQK2uk35xXZ_bzMUgLkoysJIWwznYr

The departure from the install instructions on the site include modifying sys.path directly and executing model_builder_test.py using %run. The reason for these differences is that when running in Colab, you're already in a Python interpreter, so you don't need to worry about modifying the environment for a future shell invocation of python.

这篇关于协作安装Tensorflow对象检测API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆