I know a similar question has been asked and this is closely related to cognitive science. However, I want to know whether is there any mechanism or structure in the visual cortex which is proved to be flipping the images upside down.
Interesting question. But from a philosophical point of view - What does upside down mean on a flat cortical surface? The fact that the retinal input is flipped does not mean it has to be 'de-flipped' in the cortex. There are retinotopic projections to the cortex that code corresponding parts in the retina. It needs no flipping.