1 / 7

Gender and Age Detection Machine Learning Project

https://nixustechnologies.com/gender-and-age-detection-machine-learning-project/

Sudhanshi
Download Presentation

Gender and Age Detection Machine Learning Project

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. GENDER AND AGE DETECTION MACHINE LEARNING PROJECT nixustechnologies

  2. AGE AND GENDER SYSTEM A gender and age detection system is one that is used to detect the age and the gender of a user from a photo of the person. The algorithms used in these systems heavily depend on facial, hair, and light. This study will cover a number of important algorithms. Let’s first review those algorithms. In order to detect gender and age, it is important to detect a person’s face. Various algorithms that can be used to accomplish this task include Haar Cascade, Deep Neural Networks DNN, Histograms of Oriented Gradients HoG, and Convolutional Neural Networks CNN, all of which have various advantages and disadvantages. One of the main algorithms for deep learning is the convolutional neural network (CNN), which learns directly from images. In our case, the algorithm will be very useful since it assumes that the gender and age range predictions are classification problems with Men and Women for gender and multiple classes for ages.

  3. GENDER DETECTION WITH CNN Using OpenCV’s fisher faces implementation, it is quite popular to recognize gender. Using this example, I’ll take a different approach to gender recognition. This method was developed by Israeli researchers Gil Levi and Tal Hassner. This example uses CNNs trained by them. Using OpenCV’s dnn package, we will build deep neural networks. With the DNN package, you can populate neural networks using the Net OpenCV class. As well as supporting models from TensorFlow, Caffe, and torch, the packages also support importing models from other deep learning frameworks. Researchers mentioned above have published Caffe models. The model will therefore be imported using the CaffeImporter.

  4. AGE RECOGNITION WITH CNN A prototxt file and a caffe model file correspond to this procedure except that the prototxt file is “deploy_agenet.prototxt” and the caffe model file is “age_net.caffemodel”. CNN output layer (probability layer) contains eight values for eight age classes (0–2″, 4–6, 8–13″, 15–20″, 25–32″, 38– 43″, 48–53″ and 60-) A caffe model has two associated files, 1. prototxt –The definition of CNN. Inputs, outputs, and functions of each layer in the neural network are defined in this file. There are two files in our model which contains information about the trained neural networks. 2.

  5. ARCHITECTURE For face detection, we have a .pb file; this holds the graph definition and the trained weights of the model. This file contains the following: opencv_face_detector.pbtxt opencv_face_detector_uint8.pb age_deploy.prototxt age_net.caffemodel and a few pictures to try the project on. Protobufs are stored in binary format in .pb files, while text files are stored in .pbtxt files. TensorFlow files are shown here. Age and gender configuration is described by the .prototxt file, and its internal states are described by the .caffemodel file. By using the argparse library, we can parse arguments from the command prompt and retrieve images. To classify gender and age, we parse the argument containing the path to the image. The protocol buffer and model should be initialized for face, age, and gender.

  6. Make a list of the age ranges and genders you’d like to classify and set the mean values for the model. Using the readmit () method, you can now load the networks. A trained weight is stored in the first parameter, and a network configuration is stored in the second. If you want to classify webcam streams, let’s capture the video stream. The padding should be set to 20 pixels. The content of the stream is read and stored in the names hasFrame and frame until a key is pressed. A video can’t be rendered on the fly, so we need to call cv2’s waitKey(), and then break. To retrieve the facet and frame parameters, call highlightFace(), and store the output under the names resulting and faceBoxes. Faces are not detected if we receive 0 faceBoxes.

  7. SUMMARY In this Machine Learning project, we built an age and gender system that will turn the video camera on using OpenCV, draw a boundary around the face, and detect the person’s age and gender. We hope you learn something new from this project.

More Related