[英]How to predict the next pixel given all previous pixels in an image using tensorflow
Just as a project, I wanted to see if it would be possible to predict the next pixel in an image given all previous pixels. 就像一个项目一样,我想看看是否有可能在给定所有先前像素的情况下预测图像中的下一个像素。
For example: lets say I have an image with x pixels. 例如:假设我有一个x像素的图像。 Given the first y pixels, I want to be able to somewhat accurately predict the y+1th pixel. 给定第一个y像素,我希望能够在某种程度上准确地预测第y + 1个像素。 How should I go about solving this problem. 我应该如何解决这个问题。
You are looking for some kind of generative model. 您正在寻找某种生成模型。 RNNs are commonly used, and there's a great blog post here demonstrating character-by-character text generation. RNN是常用的,这里有一篇很棒的博客文章,展示了逐个字符的文本生成。
The same principle can be applied to any ordered sequence. 相同的原理可以应用于任何有序序列。 You talk about an image as being a sequence of pixels, but images have an intrinsic 2D structure (3 if you include color) that would be lost if you took the exact same approach as text generation. 您将图像称为像素序列,但是图像具有固有的2D结构(如果包含颜色,则为3),如果采用与生成文本完全相同的方法将会丢失。 A couple of ideas: 一些想法:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.