
Hi, my mother had a german shepherd dog when I was a teenager he was lovely with most people but there was the odd person he would take umbrage to usually males who had been drinking. Try to see if there is any similarity to the people you're dog dislikes and take it from there e.g. wearing hats or joggers.
My 13 year old border collie did not like people who wore baseball caps so we taught him slowly to accept them.
The one thing I can say that if you become aggitated or anxious when a situation arises this will make the dog worse.