As someone else said, it can be a symptom of Asperger's Syndrome, or some other condition on the autism spectrum.
I don't have a problem recognizing people, usually. But if more than one person has the same hairstyle, or hair color, or something else is similar to other people, my mind mixes them up with one another. My mind groups people together, it seems. One guy with short dark hair who is a certain height will become another guy with short dark hair who is around that height, & so on, & so on. It's only after I get to know people & see them often that I can distinguish them from each other, unless there's something distinguishable about their look from the beginning. People who look like others are automatically grouped into the box in my mind with the others that look similar to them & it can take a long time for me to distinguish one single person from another. Usually, I never can pick one person apart & if I see someone I've seen before my mind goes "Oh, there's a short blonde lady." Even if I should probably know her, my mind hasn't allowed me to distinguish her from all the other short blonde ladies I've seen.
If any of that made sense lol.