I would not expect my dog to determine children from adults. I would expect myself to determine what situation, person or activity is going to make my dog bark or be uncomfortable and to make adjustments to keep our GSD calm. It may be leaving, putting a distance between us, or seeing if Molly will tolerate it by giving her treats and me talking in a calm voice.
A lot of it depends on what your dog is exposed to.And I think much of it has to do with movement rather than age. Molly sees kids as dangerous aliens( I have no children in my household). They are unpredictable, have quick jerky movements, arms flaying, screaming, little toddlers riding their bicycles into her. When Molly was younger, a senior who walked abnormally slow would alarm her. We recently had a drunk in our neighborhood and she recognized his gait was off from half a block away.