Dogs have some kind of facial recognition according to studies, for example
Faces play an important role in communication and identity recognition in social animals. Domestic dogs often respond to human facial cues, but their face processing is weakly understood. In this study, facial inversion effect (deficits in face processing when the image is turned upside down) and responses to personal familiarity were tested using eye movement tracking.
Another link seems to have pdf file with entire text
Nonetheless, faces were generally more attractive for pet dogs than for kennel dogs, which may be due to different emotional salience. Overall, in a free-viewing task, dogs seem to target their fixations at naturally salient and familiar items (conspecifics, upright eyes, familiar faces), which supports our previous proposal that dogs’ gazing preferences reflect their natural interests (Somppi et al. 2012). As an exception to these results, the accumulation of fixations at inverted human faces was probably not a sign of attraction but stemmed from the requirements for more
detailed visual processing because they were more demanding to encode compared with other stimuli.
In conclusion, the results underline the importance of the eyes for face perception in dogs and support the fact that face scanning of dogs is guided not only by the physical properties of images, but also by semantic factors. Dogs are likely to recognize conspecific and human faces in photographs, and their face perception expertise may extend beyond their own species. Living environment affected gazing behavior at the general level, but not species preference or responses to inversion and familiarity, suggesting that the basic mechanisms of face processing in dogs could be hardwired or might develop under limited exposure.
The present set of experiments investigated the ability of domestic dogs to discriminate between two familiar humans. One purpose of this work was to examine basic perceptual questions. Can dogs discriminate (familiar) humans on the basis of the visual features of their faces alone (Stages 2 and 3) or do they require more visual (rest of the body) or other sensory information, like olfaction (pre-training and Stage 1)?
This study seemed to hide the part of the face that would show a beard, or that factor was not controlled for.
But for dogs generally dislike only beards is very dubious. Seems that there is no study about this.