【问题标题】:How to reuse classification layers in Tensorflow Object Detection API如何在 TensorFlow 对象检测 API 中重用分类层
【发布时间】:2018-10-11 01:31:06
【问题描述】:

使用来自Tensorflow detection model zoo 的带有 SSD_inception_v2_coco 的 Tensorflow 对象检测 API,

我想保留预训练模型中分类器和特征提取器权重中的原始权重。

来自这个discussion

在 train.config 中添加 freeze_variables: ".*FeatureExtractor.*" 将在训练期间冻结特征提取器的权重。

这是否意味着我在预训练模型中具有相同的特征提取器权重?

来自这个discussion

如果类数与预训练模型不同,

分类器的权重将被初始化。

如果我使用来自 SSD-Inception-v2-coco 的相同标签映射,这是否意味着我可以在预训练模型中拥有相同的分类器权重?

我的第三个问题是关于配置文件中的 from_detection_checkpoint。

来自configuring_jobs.md

"from_detection_checkpoint 是一个布尔值。如果为 false,则假定检查点来自对象分类检查点。"

我猜检测检查点来自Tensorflow detection model zoo

分类检查点来自TensorFlow-Slim image classification model library

我说的对吗?

感谢您在我的问题上花费宝贵的时间。

【问题讨论】:

    标签: tensorflow machine-learning deep-learning object-detection object-detection-api


    【解决方案1】:

    1. So does it mean I have the same feature-extractors' weights in the pre-trained model?

    特征提取器和分类器是同一个东西。它们本质上都是来自 Inception V2 预训练权重的权重。如果您使用 Inception V2 权重作为 SSD 的特征提取器,则 Inception 中将 CNN 输出转换为类概率的最后一层将被忽略。因此,您可以使用在 Imagenet 上训练的特征提取器/分类器,比如说,在 SSD 中从 COCO 类列表中检测对象。

    2. Does it mean I can have the same classifiers' weights in the pre- traind model if I use the same label map from SSD-Inception-v2-coco?

    是的,检测和分类检查点来自您列出的页面。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-04-16
      • 2021-09-24
      • 1970-01-01
      • 2020-05-03
      • 1970-01-01
      • 2018-11-07
      • 1970-01-01
      • 2018-01-14
      相关资源
      最近更新 更多