Thursday, February 10, 2011

Content aware images: Yes they exist!!

What is AI ?
               Turing Award winner Raj Reddy's Lecture, presented at ACM CS Conference, pretty much sums up what AI is and makes us realize that it is not something which is in future, but has already become a part of our lives. The lecture goes like this ...
                "Human and other forms of intelligence - Can a computer exhibit real intelligence? [Herbert] Simon provides an incisive answer: 'I know of only one operational meaning for "intelligence." A (mental) act or series of acts is intelligent if it accomplishes something that, if accomplished by a human being, would be called intelligent."
              He cites the example of the "Logic Theorist" written in 1956 which found a mathematical proof much elegant than the proof found by mathematician. This certainly raises question about difference between rote and intelligent, and makes us come back to the fundamental question "Can a machine simulate life?" Can machines be intelligent? And what they have to do so that we accept them to be intelligent? Mr. Reddy, in his lecture continues to stress the point that YES THEY ARE INTELLIGENT!! He goes on...
            "The trouble with those people who think that computer intelligence is in the future is that they have never done serious research on human intelligence. Shall we write a book on "What Humans Can't Do?"Computer intelligence has been a fact at least since the engineers at Westinghouse wrote a program that designed electric motors automatically. Let's stop using the future tense when talking about computer intelligence.' Can Artificial Intelligence equal human intelligence? - Some Philosophers and Physicists have made successful lifetime careers out of attempting to answer this question. The answer is AI can be both more and less than human intelligence. It doesn't take large tomes to prove that they cannot be 100% equivalent. There will be properties of human intelligence that may not be exhibited in an AI system (sometimes because we have no particular reason for doing so or because we have not yet gotten around to it). Conversely, there will be capabilities of an AI system that will be beyond the reach of human intelligence. Ultimately what AI will accomplish will depend more on what society needs and where AI may have a 'comparative advantage' rather than by philosophical considerations."

Content aware images : A fascinating example of AI
            Content aware images or rather content aware image editing attempts to something which we humans love to do and think that it is one of the qualities which makes us different from machines... IMAGINE! Imagine you resize an image, and to your surprise, it does not get visibly distorted! Imagine you delete some object in the image and the area behind it is constructed and rendered by the program! The content aware image manipulation software tries to do exactly that, and much more. The following video gives a flavor of what it has in store for us.
          Technicalities aside, the capability to imagine/predict what would be behind an object in a given scene is, as it seems, highly "human" activity. The following picture shows how the program can predict parts of images which are not captured at all, that is, creating a large part of image on its own!

Behind the scene :
           Although the algorithm Photoshop uses is proprietary and they have not disclosed it, a similar feature exists in another open source software, Gimp. The Gimp algorithm uses two concepts called seam carving and patch matching. Seam carving finds out which parts of image are less important (can be resized) and which are not (should retain shape). It is done by finding out the edge profile of the picture and creating energy map of the picture. The lower energy area is the one which can be distorted, while the higher energy area should retain its shape. Patch matching uses graph theory algorithms to do some nearest neighbor calculations combined with randomized sampling.


Is it really intelligent then?
         We can see that a lot of computation goes in to make images content aware. Compare this with our ability to imagine the missing part or image, etc. We do it seemingly effortlessly and obviously we don't employ the above mentioned methods to it. Here comes the question, if the program does it totally differently from how we humans do it, should we call it intelligent? Is it fakery?
         Obviously it is not simulation,(it does not mimic the process of imagination, but rather the result of the process) but the end result is that it certainly does what was thought could be done by only the animate. Finally how it does that is not as important as the fact that it does that. As with any AI technology, content aware images play a major role in redefining the boundary between the the machine and the animate. And in a sense, it is a program which can imagine!


References :
  1. To Dream The Possible Dream - Turing Award Lecture Presented at ACM CS Conference, by Raj Reddy
  2. Logic Theorist, The program which proves theorems
  3. PatchMatch, Content aware editing algorithm
  4. Seam carving, Content aware resize algorithm

No comments:

Post a Comment