Use good judgement. Generally, stay on streets that are well travelled. If a street looks deserted, its probably not safe to walk. Stay with the crowd. If you're drinking, don't go stumbling about the French Quarter.
Locals know that the people who encounter trouble are usually the ones who have been drinking.
Unfortunately, Mardi Gras does attract some people who are out for more than a good time. When you walk the streets, don't bring your wallet. Take the cash you need and some sort of identification and put them in a pocket that no-one can slip their hand into. Don't wear expensive jewelry. Basically, don't take anything with you that you would have a hard time replacing if it gets lost.