I did some research on Microsoft's Face API. Apparently it works by taking a photo (either one it has snapped or one you provide) and analyzing it. It seems that it is not very accurate in its gender and age detections though.
If I were trying to use RealSense to detect gender, I would analyze the facial landmark points, since females have a distinctive bone structure in their face that shapes the face in a certain way.
The site below may be useful in understanding the bone differences so that you could program face landmark analysis to detect them.
And this link has links to the RealSense documentation for targeting specific sets of facial landmark points, including a chart of the points.
Regarding age detection: this link discusses detecting age through wrinkle analysis, including the possibility of using a technique called 'edge detection' to do so.
RealSense can use Edge Detection to analyze a 3D CAD model.
Alternatively, some have used an edge detection method called Canny Edge Detection. Here are some useful links.