Innate defensive responses such as freezing or escape are essential for animal survival. Mice show defensive behaviour to stimuli sweeping overhead, like a bird cruising the sky. Here, we tested this in young male mice and found that mice reduced their defensive freezing after sessions with a stimulus passing overhead repeatedly. This habituation is stimulus specific, as mice freeze again to a novel shape. Habituation occurs regardless of the visual field location of the repeated stimulus. The mice generalized over a range of sizes and shapes, but distinguished objects when they differed in both size and shape. Innate visual defensive responses are thus strongly influenced by previous experience as mice learn to ignore specific stimuli.