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. We found no evidence for head-centred stimulus location-specific habituation. 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.