无法安装 Tensorflow 对象检测 API (Python) [英] Cant install Tensorflow object detection API (Python)

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

问题描述

我找到了有关安装的说明,但尽管设置了 sys 路径,它还是给我错误提示 No such file or directory: 'content/drive/MyDrive/TensorFlow/models/research'这是我从克隆存储库到设置路径的整个代码:

I have found instructions on installations but despite setting sys path it gives me error saying No such file or directory: 'content/drive/MyDrive/TensorFlow/models/research' This is my entire code from cloning repository to setting path:

%cd /content/drive/My Drive/Tensorflow
!git clone https://github.com/tensorflow/models.git

!apt-get install protobuf-compiler python-lxml python-pil
!pip install Cython pandas tf-slim lvis

%cd /content/drive/My Drive/Tensorflow/models/research
!protoc object_detection/protos/*.proto --python_out=.

import os
import sys


os.environ['PYTHONPATH']+=":/content/drive/MyDrive/TensorFlow/models"

sys.path.append("/content/drive/MyDrive/TensorFlow/models/research")
sys.path.append('/content/drive/MyDrive/TensorFlow/models/research/slim')
print("done")

推荐答案

通过安装所有必需的包来使用对象检测 API 的最佳方法是按照官方 repo 此处 适用于 2.x 版和 此处适用于 Tensorflow 1.x 版

The best way to use the object detection API by installing all the required packages is by following the instructions given in the official repo here for version 2.x and here for Tensorflow version 1.x

使用上述链接完成安装并成功运行所有测试后,您可以使用文档此处 了解如何使用它来训练或测试您自己的数据集

Once you finish installing and successfully run all tests using the above links(s), you can use the documentation here to learn how to use it to train or test on your own dataset

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

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