Learning Humanoid Locomotion with Perceptive Internal Model