Improved scene understanding through semantic reasoning and online learning