How to Identify Age from an Image in Go

Determining the user demographics of your website can be incredibly helpful for crafting targeted marketing materials and campaigns. These demographics can be gathered in a number of ways, but one that is particularly simple is analyzing images uploaded by users to provide age data on each human face in the photo. The API solution we will be discussing in this article can be used in Go to automatically perform the age identification — individuals in the image don’t even need to be facing the camera for this function to work, which means you can use it on just about any photo containing a human face.

Let’s go ahead and call the function by inputting the image and our API key into the following code:

package main

With this, you will receive data on the position of each face in the photo, along with an age approximation, age classification, and age confidence level. If you need to retrieve your API key, head over to the Cloudmersive website to register for a free account; this provides 800 monthly calls across all of our APIs.

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.