关于Tensorflow Object Detection API注意事项

本文总结了Tensorflow Object Detection API中Faster R-CNN、R-FCN和SSD模型的性能特点。Faster R-CNN在精度上优于R-FCN和SSD,但速度较慢;SSD速度快但对小目标检测效果不佳;输入图像分辨率和特征提取器选择显著影响准确性。使用Inception ResNet和300个提案的Faster R-CNN是最精确的单一模型,而MobileNet-SSD在速度和准确性之间取得良好平衡。
摘要由CSDN通过智能技术生成

Lessons learned(经验教训)

Some key findings from the Google Research paper: 谷歌研究报告的一些重要发现:

  • R-FCN and SSD models are faster on average but cannot beat the Faster R-CNN in accuracy if speed is not a concern.
  • 一般而言,R-FCN和ssd的速度更快,但如果不考虑速度的话,其精度无法超过Faster R-CNN。
    Faster R-CNN requires at least 100 ms per image.
  • Faster R-CNN每张图像至少要100毫秒。
  • Use only low-resolution feature maps for detections hurts accuracy badly.
  • 仅使用低分辨率特征图会严重降低准确度。
  • Input image resolution impacts accuracy significantly. Reduce image size by half in width and height lowers accuracy by 15.88% on average but also reduces inference time by 27.4% on average.
  • 输入图像的分辨率对准确度影响很大。将图像的宽度和高度减少一半,平均降低了15.88%的准确度,同时也平均减少了27.4%的推理时间。
  • Choice of feature extractors impacts detection accuracy for Faster R-CNN and R-FCN but less reliant for SSD.
  • 对于Faster R-CNN和R-FCN,特征提取器的选择会影响检测准确度,但SSD对此依赖性较小。
  • Post processing includes non-max suppression (which only run on CPU) takes up the bulk of the running time for the fastest models at about 40 ms which caps speed to 25 FPS.
  • 后期处理包括非极大值抑制(仅在CPU上运行)占最快模型推理时间的大部分,约为40毫秒,速度上限为25 FPS。
    If mAP is calculated with one single IoU only, use mAP@IoU=0.75.
  • 如果mAP仅使用一个IoU计算,则使用mAP@IoU=0.75。
  • With an Inception ResNet network as a feature extractor, the use of stride 8 instead of 16 improves the mAP by a factor of 5%, but increased running time by a factor of 63%.
  • 使用Inception ResNet网络作为特征提取器,使用步长8而不是16将地图提高了5%,但将运行时间提高了63%。
    Most accurate 最准确
  • The most accurate single model use Faster R-CNN using Inception ResNet with 300 proposals. It runs at 1 second per image.
  • 最精确的单一模型使用Faster R-CNN,使用Inception ResNet和300个候选框。它以每张图像1秒的速度运行。
  • The most accurate model is an ensemble model with multi-crop inference. It achieves state-of-the-art detection on 2016 COCO challenge in accuracy. It uses the vector of average precision to select five most different models.
  • 最精确的模型是具有多截断推断的集成模型。它在2016年COCO挑战赛上实现了最先进的检测。它使用平均精度向量来选择五种最不同的模型。
  • Fastest 最快的
  • SSD with MobileNet provides the best accuracy tradeoff within the fastest detectors.
  • 带MobileNet的SSD在最快的检测器内提供最佳的精度权衡。
     
  • SSD is fast but performs worse for small objects comparing with others.SSD速度很快,但对小对象的性能比其他对象差。
  • For large objects, SSD can outperform Faster R-CNN and R-FCN in accuracy with lighter and faster extractors.
  • 对于大型对象,SSD在精度上优于更快的R-CNN和R-FCN,具有更轻和更快的提取器。
     

Good balance between accuracy and speed 准确度和速度之间的良好平衡

  • Faster R-CNN can match the speed of R-FCN and SSD at 32mAP if we reduce the number of proposal to 50.
  • 如果我们将提案数量减少到50个,更快的R-CNN可以在32mAP上与R-FCN和SSD的速度相匹配。

TensorFlow Object Detection API 是一个开源项目,它提供了一系列基于 TensorFlow 的工具和库,用于实现目标检测任务。对于 macOS 系统,我们可以通过以下步骤来使用 TensorFlow Object Detection API: 1. 安装 TensorFlow:在 macOS 上安装 TensorFlow 是使用 TensorFlow Object Detection API 的前提。你可以通过 pip 命令进行安装,例如在终端中执行 `pip install tensorflow`。 2. 下载 TensorFlow Object Detection API:打开终端并导航到适合你的工作目录中,然后使用 git 命令来克隆 TensorFlow Object Detection API 的 GitHub 仓库,例如执行 `git clone https://github.com/tensorflow/models.git`。 3. 安装依赖项:进入克隆的模型目录中,找到 research 文件夹并进入。然后运行 `pip install -r object_detection/requirements.txt` 命令来安装所需的依赖项。 4. 下载预训练模型:在 TensorFlow Object Detection API 中,我们可以使用预训练的模型来进行目标检测。你可以从 TensorFlow Model Zoo 中下载适合你任务的模型,并将其解压到你的工作目录中。 5. 运行实例代码:在 research/object_detection 目录中,你可以找到一些示例代码,用于训练、评估和使用目标检测模型。可以通过阅读这些示例代码并根据自己的需求进行修改。例如,你可以使用 `python object_detection/builders/model_builder_tf2_test.py` 命令来运行一个模型的测试。 以上是在 macOS 上使用 TensorFlow Object Detection API 的基本步骤,你可以根据你的具体需求进行更多的深入研究和调整。希望这些信息能帮助到你!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值