This is not clearly mentioned in the film. But director Aashish Nair has stated that Shyam never saw himself in the real world. He did see himself in a coma at the hospital, but that was just a projection of his mind, just like he ends up in his house. Man in Black says his mind is very powerful. This may have allowed Shyam create an exact projection of the real world. Remember that Shyam didn't realize he was inside his mind when he woke up at the house, until Man in Black told him. In short, what Shyam saw as the hospital was just a level in his mind, which projected the real world.