相关疑难解决方法(0)

动态编辑用于 Tensorflow 对象检测的管道配置

我正在使用 tensorflow 对象检测 API,并且我希望能够在 python 中动态编辑配置文件,如下所示。我想过在 python 中使用协议缓冲区库,但我不知道如何去做。

model {
ssd {
num_classes: 1
image_resizer {
  fixed_shape_resizer {
    height: 300
    width: 300
  }
}
feature_extractor {
  type: "ssd_inception_v2"
  depth_multiplier: 1.0
  min_depth: 16
  conv_hyperparams {
    regularizer {
      l2_regularizer {
        weight: 3.99999989895e-05
      }
    }
    initializer {
      truncated_normal_initializer {
        mean: 0.0
        stddev: 0.0299999993294
      }
    }
    activation: RELU_6
    batch_norm {
      decay: 0.999700009823
      center: true
      scale: true
      epsilon: 0.0010000000475
      train: true
    }
  }
 ...
 ...
Run Code Online (Sandbox Code Playgroud)

}

是否有一种简单/简单的方法可以将 image_resizer -> fixed_shape_resizer 中的高度等字段的特定值从 300 更改为 500?并用修改后的值写回文件而不更改任何其他内容?

编辑:虽然@DmytroPrylipko …

python protocol-buffers tensorflow object-detection-api

5
推荐指数
1
解决办法
3020
查看次数