Slashdot Mirror


Algorithm Seamlessly Patches Holes In Images

Beetle B. writes in with research from Carnegie Mellon demonstrating a new way to replace arbitrarily shaped blank areas in an image with portions of images from a huge catalog in a totally seamless manner. From the abstract: "In this paper we present a new image completion algorithm powered by a huge database of photographs gathered from the Web. The algorithm patches up holes in images by finding similar image regions in the database that are not only seamless but also semantically valid. Our chief insight is that while the space of images is effectively infinite, the space of semantically differentiable scenes is actually not that large. For many image completion tasks we are able to find similar scenes which contain image fragments that will convincingly complete the image. Our algorithm is entirely data-driven, requiring no annotations or labelling by the user."

45 of 198 comments (clear)

  1. Finally... by setirw · · Score: 5, Funny

    Uncensored Japanese pornography!

    --
    This message printed on 100% post-consumer recycled electrons.
    1. Re:Finally... by mwvdlee · · Score: 3, Insightful

      The algorithm requires images of similar content which can be used to fill the holes.
      Where are you going to find such images?

      --
      Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
    2. Re:Finally... by funkatron · · Score: 3, Funny

      The entire internet outside slashdot

      --
      "Welcome to our world. We are the wasted youth. And we are the future too." Yes, I know these are stupid lyrics.
    3. Re:Finally... by pla · · Score: 5, Interesting

      Finally... Uncensored Japanese pornography!

      More seriously, I can see this applied to "fixing" pictures of just about anyone you want to see naked.

      Fake celeb slips will of course come first, but why stop there? That cute girl at the coffee shop? Snap her with the camera phone, erase all those pesky clothes, and let this algorithm do its thing.

      Of course, I could also see this used for more nefarious (even "sick") purposes... Ex-GF cheated and you don't have any nude pics to release to the web? You do now. And if you "repaired" a fully-clothed original of someone underage, would it still count as child porn?

      And I don't even want to think about how the furries would use this... Ugh.

    4. Re:Finally... by SnarfQuest · · Score: 3, Funny

      Take one of those celebrity nude photos with pixelated parts, cut out the pixelated parts, then run this on them.

      You get photos of the celebrities, wearing japanese clothing!

      --
      Who would win this election: Andrew Weiner vs Andrew Weiner's weiner.
    5. Re:Finally... by voxel · · Score: 5, Funny

      I'd go more like this:

      You take a picture of that cute girl at the coffee shop. Snap her with the camera phone, erase all those pesky clothes, and let the algorithm do its thing.

      You wait for the algorithm to finish, it says "Done", you get all excited and click the button to see the result, and.... * DOH *, it put all her clothes back on, albeit a different color and style.

      --
      Modesty is one of life's greatest attributes
    6. Re:Finally... by mikael · · Score: 3, Funny

      Nothing for you to see here - please move along!

      ?

      --
      Vintage computer adverts: http://www.vintageadbrowser.com/computers-and-software-ads
    7. Re:Finally... by maxwell+demon · · Score: 2, Funny

      It was cut out and a text version of this program automatically replaced it by a "make people nude" comment.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    8. Re:Finally... by sbate · · Score: 2, Insightful

      I got this in my head the other day and obsessed about it. I thought this is it. The end of posting any pictures of my kids on line. I thought soon I will want those button sized anti-camera diodes pinned to their shirts like little Orthodox crosses. Of course I thought it through and well what are you going to do? The best thing I can think of is to actually ask the cute girl if she has any pictures of herself naked she may just have some you never know till you ask....

      --
      Added Pressly: "Oh, and by the way, milk is nothing but liquid meat."
    9. Re:Finally... by stuktongue · · Score: 2, Funny

      ... content which can be used to fill the holes.

      I got your content right here!

  2. Immediate Application by ObsessiveMathsFreak · · Score: 5, Interesting

    Broken or flaky video files. Nothing is more irritating than an mpeg, etc error that causes an entire block to go black and smear itself all over the place until the next keyframe. I don't expect realtime correction, but it would be nice if I could patch the file rather than do another six hour encode.

    --
    May the Maths Be with you!
    1. Re:Immediate Application by CaptainPatent · · Score: 4, Insightful

      Unfortunately, I think this particular algorithm would need a base set of data to begin working. While I'm sure portions of this algorithm could be implemented for such an application, it seems a base set is needed in a single image, therefore a full blank screen from a dropped frame or damaged images showing bad colors would not be successfully mended.
      If, on the other hand, you were a movie producer and needed to get rid of the frame change holes after loosing the master print of a film, you perhaps would be able to use such a program to mend those holes in the upper corner.

      --
      Well, back to rejecting software patent applications.
  3. w00t! by morgan_greywolf · · Score: 5, Funny

    It was as if a million fake celebrity pr0n websites cried and were suddenly silenced...

  4. Dead by Spad · · Score: 4, Informative

    Slashdotted already.

    BBC News coverage of the story is here: http://news.bbc.co.uk/1/hi/technology/6936444.stm

  5. ehhh.... by way2slo · · Score: 3, Interesting

    ...call me when they make this into a plugin for Photoshop.

  6. GREYCstoration by BlackPignouf · · Score: 5, Interesting

    And if you dont have any pictures database, there's always GREYCstoration:
    http://www.greyc.ensicaen.fr/~dtschump/greycstorat ion/index.html
    It's pretty impressive:
    http://www.greyc.ensicaen.fr/~dtschump/greycstorat ion/demonstration.html
    and works with the gimp.

    1. Re:GREYCstoration by cluke · · Score: 2, Insightful

      Are you kidding me? Removing stuff like fences and overlaid captions from photographic stills and making a damn decent fist at filling in what would be underneath? You are a hard man to impress!

  7. What will it do if... by iknownuttin · · Score: 5, Funny

    I take a picture of a hole?

    --
    I prefer Flambe as apposed flamebait.
    1. Re:What will it do if... by Anonymous Coward · · Score: 2, Funny

      It will insert two hands, gripping the sides.

  8. DO NOT use it on your Porn-Collection! by Opportunist · · Score: 5, Funny

    You never know what that "kinda-like" picture used to patch contains. You might get the opposite of what you want.

    --
    We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
  9. Image compression? by grimJester · · Score: 4, Insightful

    If any hole in the image can be filled with a part of another pic, can't you compress an image by replacing one piece at a time with a reference to a patch? Also, how about replacing with patches of higher resolution than the original? I realize it would all be technically lossy as hell, but the compression artifacts should not be very noticable to the human eye, right? Additionally, how about using this for movie compression? Filling in based on info from previous and next frame.

    I may have to actually RTFA this time.

    1. Re:Image compression? by Anonymous Coward · · Score: 5, Informative

      If any hole in the image can be filled with a part of another pic, can't you compress an image by replacing one piece at a time with a reference to a patch?

      That only works if your patch addressing space takes less space than the bits you're replacing - and of course when you reload the image, you'll still get say a cat instead of an iguana in that window...

      Also, how about replacing with patches of higher resolution than the original? I realize it would all be technically lossy as hell, but the compression artifacts should not be very noticable to the human eye, right?

      I'm not sure you really understand the concepts here. Replacing a patch with a higher res would be possible (but you'd have to resample the image first, basically) - and would either be incredibly lossy or perfectly unlossy, depending on your viewpoint.

      From a compression standpoint there's no reason to consider a high res replace as more lossy as anything else. From a recognition standpoint, whether you're doing it high res or not, this would be a method that throws out image details for others... but that doesn't have anything to do with the resolution. So this is a lossy image manipulation, but not really a compression...

      And of course, none of that would cause any compression artifacts, so yeah the human eye wouldn't notice (assuming this software works as claimed)

      So to go back over the concepts:

      Lossy - a compression or manipulation to an image or other digital file from which you cannot reconstruct the original bits perfectly

      Compression Artifact - a noticeable image tearing or other visual defect allowing one to differentiate between a lossy-compressed file and it's original

      Additionally, how about using this for movie compression? Filling in based on info from previous and next frame.

      That's how movie compression came about. The first moving-file format that was widely available was animated GIF - which quickly got onto the trick of using transparent pixels for non-changing parts of a scene.

      MPEG (1) one upped it; one part of the spec specifies which blocks are to be sent in each frame; you can leave out any blocks you don't want... (they also smartly seperated the chrominance and luminance channels, and subsampled the chrominance channel - not only is it a smart compression as the human eye perceives luminosity at greater fidelity than chorminance, but it also ups the chances that you don't have to transmit some blocks)

      Fast Forward to MPEG-4 (non-H.263) - same basic block structure, same ability to not draw blocks, and now you can even specify offsets for blocks - you have probably heard this technology referred to as motion compression - basically if something is moving on the screen but remains relatively the same pixel values regardless of motion, the movie file will record the motion without recording every pixel - the difference between a good MP4 compressor and a bad compressor mostly has to do with how well it identifies candidates for motion compression, is my understanding...

  10. pfft by Shadow+Wrought · · Score: 5, Funny

    CSI Miami and NY have had infinite zoom capability with photos for years, and you excited about this? Bah.

    --
    If brevity is the soul of wit, then how does one explain Twitter?
    1. Re:pfft by Anonymous Coward · · Score: 2, Interesting

      Blowing up pictures a really huge number of times is nothing new.
      The film 'Blow Up' Starring David Hemmings was made in the 1960's (AFAICR, As far as I can remember...) It used this as the core of the film plot.

      Now, as a photographer I am not overly worried by this until these doctored images find their way onto sites like Wikipedia and people start using them as the 'Real Thing'.

      There are laws in some countries that stop advertisers using 'doctored' images in things like holiday Brochures. Once we start getting lots of these who (unless they visit the place and record the image in a non digital manner) can tell which is the real thing. I forsee many law suits resulting from the over eager use of this technology.

      Many of my colleagues already suspect every picture they see unless it is one of their own. They regard every one as a doctored image.
      Think about the doubts that juries will start placing on crime scene photos?

      I for one hope that this is one 'invention' that never makes it into general use.

  11. What does "semantically" mean? by mosel-saar-ruwer · · Score: 3, Interesting


    Our chief insight is that while the space of images is effectively infinite, the space of semantically differentiable scenes is actually not that large. For many image completion tasks we are able to find similar scenes which contain image fragments that will convincingly complete the image. Our algorithm is entirely data-driven, requiring no annotations or labelling by the user.

    What are the "semantics" here?

    Is this like google images, where the nearby HTML text determines the classification of the image [i.e ASCII-text as meta-data for images]?

    Or is this a great big neural net of wavelet data which classifies the images mathematically?

    PS: I have the same question about that infamous Photosynth/Sea Dragon demonstration:

    http://www.ted.com/index.php/talks/view/id/129

    1. Re:What does "semantically" mean? by gurps_npc · · Score: 2, Informative
      I think by Semantically different they meant real/meaningfull/non-pointless differences.

      Effectively that means that just as you personally can recognize a bunch of pictures as all being "japanese porn" or all being "pictures of boats", or all being "pictures of men in suits", so can the computer.

      And that number of different categories that humans take pictures of is not that large, probably less than 200,000 different categorizable subjects.

      So with 1 million pictures, you have 5 of any category and can cut/paste pieces in without making it look obviously cut/paste.

      --
      excitingthingstodo.blogspot.com
    2. Re:What does "semantically" mean? by dookiesan · · Score: 2, Informative

      The paper is published on Efros's website; I don't think neural nets were used, but I only glanced at a it a while ago. A program called 'gist' summarizes all of the images in the database and based on similar summaries they narrow down to a couple hundred images. Then they pick one image and look for a cut line slightly surrounding the missing area which minimizes some criterion. You don't see the seam because they fill in more than just what was missing.

    3. Re:What does "semantically" mean? by Venik · · Score: 2, Insightful

      I think this type of classification would be pointless. Even if the computer could somehow differentiate between photos of boats and photos of men in suites floating face down in the bay, this would not help with seamlessly patching holes in images. But the truth is, while software can recognize particular elements of a photo, there is no understanding of of the subject or its context. Thus a missing mountain range in the background can be replaced by an ocean or a parking lot. Whatever categories this method uses, these are not categories humans use. It is based on mathematical analysis of the image data. "Semantic" is just a word developers like to use, just "AI", or "knowledge-based computing".

  12. doesn't generate new info by 192939495969798999 · · Score: 3, Insightful

    It takes an existing image and finds a very similar image in a huge catalog, then adds in a similarly-shaped piece to the existing image where applicable. So it's more like a puzzle solver than an image completion engine. If you don't have a huge, huge catalog of images, it won't really work for any given image as well as their samples.

    --
    stuff |
  13. Dear entrants of the Fark Photoshop contest: by circletimessquare · · Score: 3, Funny

    Due to recent advances at Carengie Mellon, you have all been made redundant by a computer algorithm. Sorry, progress is a biatch.

    Yours,
    some code and a database

    --
    intellectual property law is philosophically incoherent. it is your moral duty to ignore it or sabotage it
  14. Everyday science by CustomDesigned · · Score: 2, Informative

    Actually, laser printers and supermarket scanners often use holograms of optics rather than actual glass optics (mirrors and lenses). The holograms are usually CGI - making equivalent real glass optics would be fabulously expensive and heavy, or even physically impossible.

  15. Howabout... by SimonGhent · · Score: 2, Interesting

    .. a picture of yourself, with your face blanked out... whose face would you get?

    --
    simon
    1. Re:Howabout... by Opportunist · · Score: 2, Funny

      Depends, will they have access to all the pics the NSA gathers from people travelling in and out of the US?

      --
      We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
  16. Will it be as smart of MS Word? by elrous0 · · Score: 5, Funny

    Instead of "You appear to be writing a letter. Should I format it for you?" I guess we'll get "You appear to be viewing Japanese pornography. Should I de-pixelate it for you?"

    --
    SJW: Someone who has run out of real oppression, and has to fake it.
    1. Re:Will it be as smart of MS Word? by somersault · · Score: 5, Funny

      I'm going to have to take out trademark and patent on Clitty, your helpful little hentai fixing friend!

      --
      which is totally what she said
    2. Re:Will it be as smart of MS Word? by boyko.at.netqos · · Score: 3, Funny

      That is simultaneously the most brilliant and stupid thing I've read on Slashdot.

      --
      I used to work for NetQoS. I no longer do, but want to keep the excellent karma attached to this account.
  17. Replaced with by sjaguar · · Score: 3, Funny

    "this section has been intentionally left blank"

    --
    If at first you don't succeed, call it version 1.0.
  18. Not "Arbitrary" by doug141 · · Score: 4, Informative

    Although the summary says the method will fill arbitrary holes, at the link that claim is not made, and in their examples they delete specific picture elements.

  19. Similar to Microsoft's Photosynth by Scott+Tracy · · Score: 2, Interesting

    Reminds me of the recently announced Photosynth from Microsoft that seems to do something similar, but focuses on stitching images together rather than replacing parts of existing ones.

  20. New problem-solving paradigm? by Urban+Garlic · · Score: 4, Interesting

    I wonder if this is part of the beginning of a new, computationally-driven problem-solving paradigm. As more and more data is stored, and if search algorithms become more and more clever, the cost of "looking up" (computationally speaking) the answer to a problem might be lower than the cost of "remembering" (using local storage) or "figuring out" (using local CPU power) the answer.

    This is already happening informally in the personal sphere, because of things like Google, recently amplified by the iPhone and its inevitable successors in the ubiquitous rapid-access web-tool field. As they say, these days, if you have a web browser, you hardly have to wonder about anything anymore.

    Of course, problem solving by search isn't exactly a new paradigm, but it could be a newly-cheap paradigm.

    --
    2*3*3*3*3*11*251
  21. Now we need a patch for dead servers by objekt · · Score: 4, Funny

    We need a new way to replace slashdotted servers with portions of articles from a huge catalog in a totally seamless manner.

    --
    -- Boycott Shell
  22. Re:Faces by dintech · · Score: 2, Funny

    I want a picture of me with no face, and see what face it gives me! (c'mon clint eastwood)

    My bet is on Nicholas Cage or John Travolta.

  23. Re:Let me know when... by UbuntuDupe · · Score: 2, Insightful

    Very honoroble Locster:

    I agreeth with your merriment regaurding such tinkery. I myself saweth the play "InfoTrek" about the 21st century, in which a character, upon wishing to lern of a song he herd a few worrdes fromme, simple provided those words to his "computer" and shortly thereafter, generated an image sequence of a bande performing that song! I neerly interrupted the play with my laughter!

  24. Is this how the brain fills in the blind spot? by dpbsmith · · Score: 5, Interesting

    This is very cool, and I wonder how similar it is to what the brain does with respect to blind spots?

    For those who don't know: each eye has a surprisingly large blind spot at the place where the optic nerve enters the eye. At reading distance, in the right eye, it's about four or five inches to the right of the spot at which you are gaving, and many textbooks and "fun with optical illusions"-type books will have a diagram... like the one on this web page... and directions for finding it. The blind spot is much larger than the dot on that web page, incidentally. If you explore, you'll find that... at the distance at which the dot disappears... the blind spot is nearly an inch wide and an inch-and-a-half high.

    Even allowing for the fact that each eye has the blind spot in a different place so they fill in for each other, once you discover how big the blind spot is... and how relatively close to your position of gaze it is... you'll be astonished that almost nobody notices it until it is pointed out.

    The brain does something more or less like filling in the blind spot. I say "more or less like" because it is very hard to answer the question "what do you see in the blind spot." For example, if you hold a computer keyboard at the right distance so that you're looking at the "G" key and the "K" key is in your blind spot, what do you see? Certainly not a black spot, certainly not a white spot, certainly not a "hole" or emptiness. Probably you have an impression of computer keys. Do you see a letter K? Certainly not, yet somehow you don't see a blank key, either.

    Incidentally, I used to suffer from migraine headaches, and one of the symptoms for some people is the formation of blind spots which can be even larger than the "normal" blind spot, and can appear in central vision. One one memorable occasion, I was looking at the cover of a hardbound book, and I can tell you that when I looked at the title, my perception was the stamped, printed title disappeared, yet I would have sworn in a court of law that I still saw the cloth texture extending across the blind spot.

    Although he does not specifically refer to it as a migraine illusion, I believe Lewis Carroll was known to be a migraineur, and in Chapter V of Through the Looking-Glass, "Wool and Water," Alice notices that "The shop seemed to be full of all manner of curious things -- but the oddest part of it all was that, whenever she looked hard at any shelf, to make out exactly what it had on it, that particular shelf was always quite, empty, though the others round it were crowded as full as they could hold." Any migraineur who experiences central blind spots will recognize this description.

    Hays and Efros' system--relatively-simple algorithm operating on a large database of previously-seen images--seems to me to be the sorta-kinda way in which one could imagine the brain working.

    I wonder if there's any way to test this?

  25. Grassy Knoll by waterlogged · · Score: 2, Interesting

    Does that mean that if I erase part of the grassy knoll it will draw in the second gunman? Or more importantly if I erase the goatse hole will it draw in a hole?

    --
    I couldn't fail to disagree with you any less.