First, let's define "up" and "down." If you define "up" to be opposite the gravitational field vector, then when you turn your head down, your eyeball is inverted. The image on your eyeball is inverted from where the top of your head was originally, so you interpret that as "up-side down." If you were to use a film camera and you took two pictures, one with the top of the camera up and another with the top of the camera down, you would find that the images on the film are, indeed, rotated 180 degrees from each other (along the axis perpendicular to the film plane), just like the image on the retina of your eye.
If you use a phone camera or even most digital cameras, they have inverting software that correct for rotations like that. Often you can turn them off. Given that, the actual pixels in the camera sensor which receive the light are flipped over, but that is hidden from you by the software.