Live data from Hacker News

PixelNN – Example-Based Image Synthesis

cs.cmu.edu

141–150 of 155 posts

Re: PixelNN – Example-Based Image Synthesis

#141
post #130

Earlier quoted context omitted.

> I don't think this method has anything to do with Markov Chains. Oh, it absolutely does. I think it's fair to say that Efros launched the field of nearest neighbor texture synthesis, and his abstract states: "The texture synthesis process grows a new image outward from an initial seed, one pixel at a time. A Markov random field model is assumed, and the conditional distribution of a pixel given all its neighbors sy…

Unless I horribly misread the paper, this is not based on the Efros' quilting method, which indeed uses Markov fields. The method linked here seems to interpolate every pixel independently from its surroundings (neighbor means a close-by pixel in the training set in the feature space, not a spatially close pixel). And I didn't mean that Markov processes are abstract in any "distant" sense, but that they are an abstra…

I was referring to Efros' "non-parametric sampling" paper, not the quilting one. Efros defined "non-parametric sampling" as another name for "Markov chain" -- almost (see my edit below). This paper (PixelNN) refers directly to "non-parametric sampling" in the same sense as Efros, and it states that they are using "nearest neighbor" to mean "non-parametric sampling". This is talking rather explicitly about a Markov chain -like process.

"To address these limitations, we appeal to a classic learning architecture that can naturally allow for multiple outputs and user-control: non-parametric models, or nearest-neighbors (NN). Though quite a classic approach [11, 15, 20, 24], it has largely been abandoned in recent history with the advent of deep architectures. Intuitively, NN works by requiring a large training set of pairs of (incomplete inputs, high-quality outputs), and works by simply matching the an incomplete query to the training set and returning the corresponding output. This trivially generalizes to multiple outputs through K-NN and allows for intuitive user control through on-the-fly modification of the training set..."

Note the first reference #11 is Efros' non-parametric sampling, and that the authors state this is the "classic approach" that they apply here.

What you call "interpolate every pixel independently from its surroundings" could be another way to describe a Markov chain, because 1: it is sampled according to the conditional probability distribution (which is what you get by using the K nearest matches.) and 2: the process is repeated - one pixel (or patch) is added using the best match, then it becomes part of the neighborhood in the search for the pixel/patch next door. The name for that is "Markov process", or in the discrete case, "Markov chain", if you take an unbiased random sample from the conditional distribution. If you always choose the best sample, then it's the same as a Markov chain, but biased.

> (neighbor means a close-by pixel in the training set in the feature space, not a spatially close pixel)

That's right, and that's why it's misleading to talk about nearest neighbor interpolation, because that phrase is a graphics phrase that means interpolate from spatially close pixels. Hardly anyone else calls it interpolation, they call it sampling, point sampling, and other terms.

*EDIT:

I'm going to relax a little bit on this. "Non-parametric sampling" is a tiny bit different from a Markov process in that a Markov process attempts to simulate a distribution in an unbiased way. By using the best match instead of a random sample from the conditional distribution, the output may produce a biased version of the original distribution. This is why it's called non-parametric sampling instead of calling it a Markov chain, but the distinction is pretty small and subtle -- texture synthesis using non parametric sampling is extremely similar to a Markov chain, but not necessarily exactly the same.

Side note, it's really unfortunate they used the abbreviation "NN" to talk about "nearest neighbor" in a paper that also builds on "neural networks".

Re: PixelNN – Example-Based Image Synthesis

#142
post #79

Earlier quoted context omitted.

> You fundamentally can't get back information that has been destroyed/or never captured in the first place. I love this cliché. I've seen it thousands of times, and probably written it myself a few times. We all repeat stuff like that ad nauseam, without ever thinking. Because it's fundamentally flawed, especially in the context that it has usually been applied to, namely criticising the CSI:XYZ trope of "enhancing…

> It's similar to that guy who used Photoshop's swirl effect to hide his face, not knowing that the effect is deterministic, and can easily be undone. The effect does not only need to be deterministic, but also invertible. A low-res image has multiple "inverses" (yikes), supposedly each with an associated probability (if you would model it that way). So it would be more honest if the algorithm shows them all.

Showing them all seems a bit impossible because the number would blow up really quickly, wouldn't it? Maybe it could categorise them, but that could be misleading, too... I don't know.

Re: PixelNN – Example-Based Image Synthesis

#143
post #117

Earlier quoted context omitted.

You never saw edges2cats I take it? https://affinelayer.com/pixsrv/ > I don't understand how the edges-to-faces can possibly work. The inputs seem to be black & white, and yet the output pictures have light skin tones. The step you're missing is that an edge detector is run on the entire database of training images to produce a database of edge images. The input edge image is run against that corpus of edge images in…

Thanks for that link, I'd never seen that before. In fact, the edges2shoes sample on that page exactly summarises the issue I have: You start with what effectively appears to be a rough line drawing sketch of a shoe, and the algorithm 'fills in' a realistic shoe to fit the sketch. The sketch never had any colour information and so the algorithm has to pick one for it. In their example output, the algorithm has picked…

> So in short, the algorithm can't determine colour.

That's right. But with the caveat that a large training set can determine plausible colors and rule out implausible ones. This is more true for faces than for shoes! The point is that there is some correlation between shape and color in real life. The color comes from the context in the training set. This is what @cbr meant nearby re: "skin color is relatively predictable from facial features (ex: nose width), it should be able to do reasonably well."

There are CNNs trained to color images, and they do pretty well from training context: http://richzhang.github.io/colorization/

> there is a very big line between 'reconstituting' or 'reconstructing' an image and 'synthesising' or 'creating' an image, and it appears many people are blurring the two together.

Yep, exactly! Synthesis != enhance.

Re: PixelNN – Example-Based Image Synthesis

#144

"Enhance" is real. When will this stuff trickle into lower level law enforcement?

Hopefully never. This does not enhance the image - it makes up a plausible imaginary image. EDIT: Furthermore the range of plausible imaginary images that match a given input is high (infinite?).

Why not? A recreation that leads to an identification should be enough for a warrant that could be used for a continued investigation.

Re: PixelNN – Example-Based Image Synthesis

#145
post #3

I used to roll my eyes at crime television shows, whenever they said "Enhance" for a low quality image. Now it seems the possibility of that becoming realistic are increasing with a steady clip, based on this paper and other enhancement techniques I've seen posted here.

It's still impossible. These algorithms find in gaps with their biases, not reality. If information is not there it is not there.

Re: PixelNN – Example-Based Image Synthesis

#146

Earlier quoted context omitted.

>we're interpolating or projecting information that is not there But that's not fully accurate either. Sometimes the information in total will really be a more accurate representation of reality than the blurred image. Maybe it could be described as an educated guess, sometimes wrong, sometimes invaluable. It would be interesting to see the results starting with higher quality images. With the camera quality increasi…

>> Maybe it could be described as an educated guess, sometimes wrong, sometimes invaluable. When is a guess invaluable?

When it identifies an established terrorist and prevents a mass casualty event.

Re: PixelNN – Example-Based Image Synthesis

#147
post #120
post #3

I used to roll my eyes at crime television shows, whenever they said "Enhance" for a low quality image. Now it seems the possibility of that becoming realistic are increasing with a steady clip, based on this paper and other enhancement techniques I've seen posted here.

This image from the article shows that the original image and the fantasy image are not alike at all. The faces look to have different ages. The computer even fantasized a beauty mark. http://www.cs.cmu.edu/~aayushb/pixelNN/freq_analysis.png The computer is fantasizing.

> This image from the article shows that the original image and the fantasy image are not alike at all.

This is another avenue that could be further explored, which I quite like. That is, a non-artist can doodle images and create a completely new photo-realistic image based on the line drawings.

I was modifying a few images (from link on another comment here: https://affinelayer.com/pixsrv/ ) and the end results were interesting.

Re: PixelNN – Example-Based Image Synthesis

#150

Earlier quoted context omitted.

Except, and this is really the fundamental catch, it's not so much "enhance" as it is "project a believable substitute/interpretation". You fundamentally can't get back information that has been destroyed/or never captured in the first place. What you can do is fill in the gaps/information with plausible values. I don't know whether this sounds like I'm splitting hairs, but it's really important that the general publ…

To give specific examples from their test data, it added stubble to people who didn't have stubble, gave them a different shape of glasses, changed the color of cats, changed the color and brand of sport shoe. And even then, I'm a little suspicious of how close some of the images got to original without being given color information. It appears that info was either hidden in the original in a way not apparent to huma…

Sounds similar to the problems with JBIG2 lossy compression.

https://en.wikipedia.org/wiki/JBIG2#Disadvantages

Post reply on HN