【问题标题】:tensorflow shift image and interpolate张量流移位图像和插值
【发布时间】:2019-07-09 22:38:07
【问题描述】:

我正在尝试批量移动所有图像并进行“最近”插值。由于某种原因,生成的图像被黑色像素插值......这是一个错误吗?

 translations = [100,0] * len(img_batch_list)
 img_batch = tf.contrib.image.translate(img_batch,
                                        translations,
                                        interpolation='NEAREST',
                                        name="shift")

【问题讨论】:

    标签: python tensorflow image-processing data-augmentation


    【解决方案1】:

    不,这不是错误。根据https://www.tensorflow.org/api_docs/python/tf/contrib/image/translate 这是因为由于翻译导致的空白空间将被零填充。零将显示为黑色。

    【讨论】:

    • 那么 NEAREST 插值在哪里出现?
    • 我相信这是因为您的图片/翻译组合。我刚刚对随机图像进行了测试,根据翻译收到不同的结果,包括黑色像素
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-24
    • 2020-02-08
    • 2017-04-13
    • 1970-01-01
    相关资源
    最近更新 更多