Machine Learning

Hi. I’m a student and wanted to explore more about machine learning. I am trying to make a neural network model that classify child-adult. My process is by first detecting their body then their head/face to get the ratio of the head over body. What I’m confused about is how many dataset should I make. Like do I have to make a separate dataset for head? body? or child? adult? I hope someone can help me with this problem. Thank you in advance and have a great day.

Hey!
Well I would say that the ratio hea/body is not significant (correct me if I’m wrong) but I would say kids and adults are proportional. However the face is clearly related to the age.

The pipeline you can follow is:

  1. Download images from google by tagging child/adult (use one folder for each)
  2. Run a face detector over the images. Here you have two options:
    2a. Face detection with OpenCV and deep learning - PyImageSearch A complete tutorial
    2b. If you feel confident about python you can directly go for http://dlib.net/ and use its face detector.
    To follow this option you should know or learn to open images and to work with numpy arrays.
    Basically the face detector will return you 4 points corresponding to a box around the face.
  3. Crop the images within the box and saves them in two new different folders like child_cropped, adult_cropped or something similar.
  4. Now you should have all the data you need! You just need to use a 2D convolutional neural network. This works with images basically. I recommend you to use an already-existing one. This way you ensure it’s well done.
  5. Then you just need to slightly modify the network predicting a binary numer (0 child, 1 adult) or viceversa. Since you have them in different folders you already know the solution.
  6. Train the network and that’s all!.

Depending on your experience this may take you a while, let me know if i can further help u