My dog barks at people in hats. She really can't work out hats at all! Barking stops if they take their hats off. Weird.
@brazenandstrange, what have you done in the way of training to address this?
While training can often lessen reactivity (ie barking at things the dog is unreasonably scared of, such as hat wearers) it's often not possible to completely resolve matters - the dog will often still have some nervousness around hat wearers.
Mine (who, as a side note, is a rescue) is reactive, and while we can normally walk down the road in a reasonably civilised fashion (thanks to much training, and input from a behaviourist), sometimes there will be a really scary example of his trigger that he won't cope with.
Today he coped with very little because my landlord has sent in builders. The trigger stacking from seeing strangers in the garden (they might have been burglars! Or axe murderers!) meant he was pretty much on a hair trigger. He barked at all sorts - even things that wouldn't normally worry him - because he was already in a bad place. It hasn't been a good day.
For many dogs, no matter how much training you put into them, complete normality just isn't achievable. Many well qualified behaviourists and trainers have (rescue) dogs with deep seated, unresolvable behaviour issues.
In such cases, suggesting training for that dog is like suggesting parenting classes will fix a child with ASD.