安装Google Object Dectection API

安装Google Object Dectection API

官网:https://github.com/tensorflow/models/tree/master/research/object_detection

  • 安装python3.5
    下载
    检查
    确认安装的位置
  • 使用virtualenv创建基于python3.5的虚拟环境
    这里写图片描述
    这里写图片描述
  • 安装tensorflow
    这里写图片描述
  • 安装各种依赖
    此处完全按照官网操作即可
sudo apt-get install protobuf-compiler python-pil python-lxml python-tk
sudo pip install Cython
sudo pip install jupyter
sudo pip install matplotlib
sudo pip install Cython
sudo pip install pillow
sudo pip install lxml
sudo pip install jupyter
sudo pip install matplotlib

识别测试

运行例子
- 在服务器上,进入object dectection目录启动jupyter-book
这里写图片描述
- 在本机打开notebook
把上图的红框里的地址放到地址栏里(要把0.0.0.0换成你机器的IP)
这里写图片描述
- 找到object_dectection_tutorial.ipynb
这里写图片描述
- 打开
这里写图片描述
- 运行:Cell、Run All
这里写图片描述
- 等十秒左右,最下面出现对示例图片的识别
这里写图片描述

这里写图片描述

识别自己的图片
看刚刚运行的代码,找到test_images,这就是获取图片的位置
这里写图片描述
在服务器上找到test_images文件夹,会找到两张自带图片,把自己的图片拷贝进去,最好用相同的名字替代
这里写图片描述
-识别了几张自己的,效果如下
这里写图片描述
这里写图片描述

可见缺省模型对骷髅的识别还不行:)

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