TensorFlow Object Detection API 跑代码过程
谷歌在其开源博客上发表了一篇名为《Supercharge your Computer Vision models with the TensorFlow Object Detection API》的文章,通过 TensorFlow Object Detection API 将谷歌内部使用的物体识别系统(2016 年 10 月,该系统在 COCO 识别挑战中名列第一)开源给更大的社区,帮助打造更好的计算机视觉模型。
这个代码库是一个建立在 TensorFlow 顶部的开源框架,方便其构建、训练和部署目标检测模型。我们设计这一系统的目的是支持当前最佳的模型,同时允许快速探索和研究。我们的第一个版本包含:
● 一个可训练性检测模型的集合,包括:
● 带有 MobileNets 的 SSD(Single Shot Multibox Detector)
● 带有 Inception V2 的 SSD
● 带有 Resnet 101 的 R-FCN(Region-Based Fully Convolutional Networks)
● 带有 Resnet 101 的 Faster RCNN
● 带有 Inception Resnet v2 的 Faster RCNN
● 上述每一个模型的冻结权重(在 COCO 数据集上训练)可被用于开箱即用推理。
● 一个 Jupyter notebook 可通过我们的模型之一执行开箱即用的推理
● 借助谷歌云实现便捷的本地训练脚本以及分布式训练和评估管道
除了yolo,剩下的基本上都提供了。特别还提供了轻量化的 MobileNet,这意味着它们可以轻而易举地在移动设备中实时使用。
SSD 模型使用了轻量化的 MobileNet,这意味着它们可以轻而易举地在移动设备中实时使用。在赢得 2016 年 COCO 挑战的研究中,谷歌使用了 Fast RCNN 模型,它需要更多计算资源,但结果更为准确。
参阅谷歌发表在 CVPR 2017 上的论文:https://arxiv.org/abs/1611.10012
进入https://github.com/tensorflow/models/tree/master/object_detection
installation
Dependencies
Tensorflow Object Detection API depends on the following libraries:
● Protobuf 2.6
● Pillow 1.0
● lxml
● tf Slim (which is included in the “tensorflow/models” checkout)
● Jupyter notebook
● Matplotlib
● Tensorflow
For detailed steps to install Tensorflow, follow the Tensorflow installation instructions. A typically user can install Tensorflow using one of the following commands:
For CPU
pip install tensorflow
For GPU
pip install tensorflow-gpu
The remaining libraries can be installed on Ubuntu 16.04 using via apt-get:
sudo apt-get install protobuf-compiler python-pil python-lxml
sudo pip install jupyter
sudo pip install matplotlib
Alternatively, users can install dependencies using pip:
sudo pip install pillow
sudo pip install lxml
sudo pip install jupyter ??
(调试1st:sudo -H pip install jupyter 失败
调试2st:手动下载notebook-5.0.0-py2.py3-none-any.whl
sudo pip install notebook-5.0.0-py2.py3-none-any.whl 失败
调试3st:设置超时时间 pip –default-timeout=100 install -U Pillow失败
)
sudo pip install matplotlib