-
-
Save amankharwal/9b0568736e5b8dcb95fb1fc87a7f3a14 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ageProto = "age_deploy.prototxt" | |
ageModel = "age_net.caffemodel" | |
ageNet = cv.dnn.readNet(ageModel, ageProto) | |
ageList = ['(0 - 2)', '(4 - 6)', '(8 - 12)', '(15 - 20)', '(25 - 32)', '(38 - 43)', '(48 - 53)', '(60 - 100)'] | |
ageNet.setInput(blob) | |
agePreds = ageNet.forward() | |
age = ageList[agePreds[0].argmax()] | |
print("Gender Output : {}".format(agePreds)) | |
print("Gender : {}".format(age)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment