How it works...

First we created a Table Storage output binding for storing details about all the men in the photos. Then, we created another Table Storage output binding to store the details about all the women in the photo.

While we do use all the default code that the Azure Functions template provides to store all the face coordinates in a single table, we made a small change to check whether the person in the photo is male or female, and stored the data based on the result that was received.

Note that the APIs aren't 100% accurate in identifying the correct gender. So, in your production environments, you should have a fallback mechanism to handle such situations.