Keep your head down.
I go along with your sense of caution, though it's a bit difficult to keep your eyes peeled and your head down at the same time It often means "Make yourself inconspicuous," or "Make sure don't do anything to draw attention to yourself."
For example, the boss comes storming in, clearly in a foul mood. Word goes around, "Keep your head down, he's looking for someone to yell at."
Keep your head up?
I think I am confusing this with "Keep your chin up."
It doesn't have any of the sense of keep your head down, though.
Keep your self-respect, your dignity, despite ... whatever the difficult circumstances might be that would cause you to hang your head.
I'm not sure "keep your head up" is idiomatic for any particular meaning. It's easily understood-- that's why you're getting a range of answers that all mean, basically, be alert and pay attention, watch out for danger.
"Heads up!" is an idiomatic expression in AE, also "keep your eyes out." The first has become a noun, so you can give someone a heads-up, meaning a warning.
As for showing pride or keeping your dignity, the expression I think that's being mixed in here is "hold your head up."
To keep something up basically means to take care of it or maintain it-- if it's a lawn (for example) you keep it fertilized, weeded, watered and mowed. "Keep your head up" to me conjures images of hygiene and grooming and taking hallucinogens. Whoa wait a minute, that last one was "feed your head."
"Keep your head down" is a military truism, and the figurative use of it is widespread and idiomatic. You are correct about the meaning. It's true you're not supposed to jerk your head up during a golf swing, but that's a very specialized application.