前段时间,谷歌开放了 TensorFlow Object Detection API 的源码,并将它集成到model中。这个代码库是一个建立在 TensorFlow 顶部的开源框架,方便其构建、训练和部署目标检测模型。设计这一系统的目的是支持当前最佳的模型,同时允许快速探索和研究。


在其官方文档说明书上面说明了提供的几个模型:

In addition to our base Tensorflow detection model definitions, this release includes:

  • A selection of trainable detection models, including:
    • Single Shot Multibox Detector (SSD) with MobileNet,
    • SSD with Inception V2,
    • Region-Based Fully Convolutional Networks (R-FCN) with Resnet 101,
    • Faster RCNN with Resnet 101,
    • Faster RCNN with Inception Resnet v2
如此可见,除了yolo,剩下的基本上都提供了。特别还提供了轻量化的 MobileNet,这意味着它们可以轻而易举地在移动设备中实时使用。


花了点时间对这个模型进行调试,里面还是有不少坑的,相信在编译过程中大家都会碰到这样那样的问题。


如问题一:proto文件的转换,这个可以见博客相关的操作http://blog.csdn.net/sparkexpert/article/details/73456767

问题二:NodeDef mentions attr 'data_format' not in Op等一串很长错误。

这个主要原因还是运行这个模型需要在tensorflow 1.2.0版本上,因此需要对tensorflow进行升级。

问题三:matplotlib的展示:见博客的操作http://blog.csdn.net/sparkexpert/article/details/73729145


因此,开始利用提供的demo进行了运行测试,效果如下所示:不得不先说的是,mobilenet效果在简单数据集上也可以,而且关键的一点是速度特别快。而faster-rcnn果然每张图片需要耗费一定的时间。


随便在网上找了几张示例图片:如https://i-blog.csdnimg.cn/blog_migrate/fd1160a3ede186ebb29346d9dbb18437.jpeg这个图片


其检测结果如下:



另外,为了测试不同模型的效果,分别对mobilenet和faster-rcnn进行了测试。故意选择了一张多场景的图片来进行测试。



选择moblienet的效果如下所示:


发现moblienet的精度效果一般,特别是对远距离的对象检测效果非常一般。


接下来测试了下faster-rcnn的效果。如下:


从图上可以看出,faster-rcnn效果比较好,不过也存在不足,就是对一张图像的检测速度明显偏慢。

GitHub 加速计划 / te / tensorflow
21
4
下载
一个面向所有人的开源机器学习框架
最近提交(Master分支:1 个月前 )
4f64a3d5 Instead, check for this case in `ResolveUsers` and `ResolveOperand`, by querying whether the `fused_expression_root` is part of the `HloFusionAdaptor`. This prevents us from stepping into nested fusions. PiperOrigin-RevId: 724311958 1 个月前
aa7e952e Fix a bug in handling negative strides, and add a test case that exposes it. We can have negative strides that are not just -1, e.g. with a combining reshape. PiperOrigin-RevId: 724293790 1 个月前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐