Tuesday, May 31, 2011

Visual perception solved?

"Visual perception is the ability to interpret information and surroundings from the effects of visible light reaching the eye. The resulting perception is also known as eyesight, sight, or vision (adjectival form: visual, optical, or ocular)." 
Visual perception, Wikipedia

We have had optical character recognition (OCR) for years now. Reading can be perceived as an important ability of our visual perception and we have more or less cracked it. What we don't have is the ability to acquire 3D models from a simple 2D camera, just like our eyes can. Or at least I thought so.

An article that I read recently has pushed me to google for such type of software. Interestingly enough just a few weeks ago I was thinking about such a system and its (big) importance to AI development. Google provided an article immediately, and it dated from 2009! Creating 3D models with a simple webcam (w/ Video) described a system just like the one that I envisioned and provided a nice video. Here are also some videos on YouTube: video1 (ProFORMA: Probabilistic Feature-based On-line Rapid Model Acquisition ), video2 (Interactive Model Reconstruction with User Guidance (ProFORMA)).

"GTA in your own city !!!"
Cuervaud, 1 year ago

This was one of the comments on YouTube and it just gives one idea of what this technology can do. We might be limited in our capabilities to see and remember but a computer can store and process a video of a flight over a city, thus we can easily end up with a good 3D model of an area.

There is surely a lot of material on the subject and I think I'm only scratching the surface. Only the future will tell what the best applications of such a technology will be but I know that this is one step further, and it is a big one.

Edit 01.06.2011: And the commercial applications appear... Sony Sets Its Sights on Augmented Reality :) What are the odds?

Tuesday, May 24, 2011

The Transcendent Man finds the real question, again

I just watched the movie Transcendent Man. In general it was a good documentary packing Ray Kurzweil's reflections on the exponential growth of evolution. Apart from talking about scientific predictions, there were a lot of human desires that were portrayed. Like Ray's obsession with  resurrecting some part of his father.

At the end of the movie, as a conclusion, Ray was speaking about the explosion of intelligence in the Universe. I stayed for a couple of minutes, reiterating on what I have thought before and synchronizing it with what I saw in the film. I stopped at the idea of AGI (Artificial General Intelligence) and its relevance to the Universe.

All that evolution (or the Universe) has created up until now, we are gradually trying to compact it in our brains so that we can make predictions on what will happen next. We are, to our knowledge, the most flexible form of existence in our Universe. Being a bit limited though, we're looking for help to be able to do our job even better. So here comes AGI. Upgrading our genes (genetics) in my view will be a gradual upgrade but AGI (combined with nanotechnology) on the other hand gives the possibility for that explosion of intelligence we just might need.

So far so good, but here comes the grand question. We happen to know a lot about us, our bodies, our structure. If... when we figure out how our brain works, what's next? I'm willing to argue that we would've mostly answered the question of our existence... the meaning of life. My guess is that there will be only one question left: What is the Universe?

Figuring out the structure and mechanics of everything around us, we will become focused on those tiny waves that are rocking the boat. The idea of evolution is basically to find a stable form of existence and to build on top of it. If we take AGI for granted, meaning our intelligence is solved, ... meaning arts, mathematics, physics, all the sciences are unified and the big picture is there, what will figuring all this give us? Divide and conquer, right?

Leaving behind all the human desires, in my view, the scientific prediction is one: we'll drill through the Universe until we answer even the smallest question. Knowing our environment (information) will give us even more power. Maybe we can make remarkable progress on our home Earth (with LHC),  but even if we need to probe the Universe's hidden secrets in distant galaxies, we will think of a way. We have the framework of science and it has not been used to its fullest potential.

I'm thinking again of writing my imaginary story of the scientist who fixed the bug in the Universe :)

Edit 25.05.2011:
I think that a reference to Isaac Asimov's science fiction short story The Last Question is due.

And here is an article that provokes some questions about our intellect and asking the question Will Biology Solve the Universe?

Wednesday, May 18, 2011


Rendering of the introduction of the Taare Zameen Par's Wikipedia article as a graph (click to enlarge):

Wednesday, May 11, 2011

AdsBot BadBot

Recently it was brought to my attention that the user agent string of the mobile version of Google AdsBot caused problems on a .NET site running Sitecore CMS. The exception is:

     Stack trace:    at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
   at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
   at System.Web.Configuration.HttpCapabilitiesBase.get_MajorVersion()
   at Sitecore.UIUtil.SupportsInlineEditing()
   at Sitecore.Sites.SiteContext.SetDisableWebEditEditing(String value)
   at Sitecore.Sites.SiteContext.ProcessQueryString()
   at Sitecore.Sites.SiteContext..ctor(SiteInfo info, Boolean processQueryString)
   at Sitecore.Sites.SiteContextFactory.GetSiteContext(String hostName, String fullPath, Int32 portNumber)
   at Sitecore.Pipelines.HttpRequest.SiteResolver.ResolveSiteContext(HttpRequestArgs args)
   at Sitecore.Pipelines.HttpRequest.SiteResolver.Process(HttpRequestArgs args)
   at (Object , Object[] )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Nexus.Web.HttpModule.?(Object sender, EventArgs e)
   at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

I made a test project and after some time managed to get the same error from a plain ASP.NET site:

 [ArgumentNullException: Value cannot be null.
Parameter name: String]
   System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +7470778
   System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +119
   System.Web.Configuration.HttpCapabilitiesBase.get_MajorVersion() +113
   UserAgentTest._Default.Page_Load(Object sender, EventArgs e) in d:\Basho\Documents\Visual Studio 2010\Projects\UserAgentTest\UserAgentTest\Default.aspx.cs:14
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

The user agent string in question is the following:
AdsBot-Google-Mobile (+http://www.google.com/mobile/adsbot.html) Mozilla (iPhone; U; CPU iPhone OS 3 0 like Mac OS X) AppleWebKit (KHTML, like Gecko) Mobile Safari

Google thinks this is normal:

It turns out that Microsoft .NET Framework 3.5 disagrees with Google's choice of user agent string. The problem arises in the parsing of the majorversion/minorversion that is described in .NET's *.browser files. The browser is recognized as default/mozilla/gecko and the value of the two capabilities is finally null.

This problem is fixed in .NET Framework 4 and the browser is recognized as default/mozilla/safari with the two values equal to 0.

Now if you're stuck with .NET 3.5, you can follow the ideas described in this site (you might need the refresh hack):

The browser file you need goes something like:
  <browser id="AdsBot" parentID="Gecko">
      <userAgent match="AdsBot" />
      <capability name="browser" value="AdsBot" />
      <capability name="majorversion" value="0" />
      <capability name="minorversion" value="0" />
While researching the problem I didn't find any pages giving a solution or describing the problem so that's why I wrote this post. I also filed a report to Google, let's see what happens.