【问题标题】:How do I transform a grayscale image to RGB in Tensorflow?如何在 Tensorflow 中将灰度图像转换为 RGB?
【发布时间】:2021-07-27 17:45:32
【问题描述】:

我有一个在这个输入形状上训练的 CNN 模型

TensorShape([1, 128, 256, 3])

使用 skimage 处理我的图像后,我有以下形状

TensorShape([1, 128,256, 1])

这种情况我该怎么办?

【问题讨论】:

    标签: python tensorflow image-processing keras tensor


    【解决方案1】:

    我找到了这个解决方案:

    tf.image.grayscale_to_rgb(
        images, name=None
    )
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-02-26
      • 2014-12-22
      • 2012-08-25
      • 2016-09-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多