what should be the target in this deep learning image classification problem

断了今生、忘了曾经 提交于 2020-05-17 07:07:02

问题


I am doing a image classification project using CNN in keras. I have a dataset of about 900 photos of about 70 people .Each person has multiple photos of his different age. My goal is to predict the correct ID of the person if any one of his photo is in the input. Here is the glimpse of the data. enter image description here

My questions are:

  1. What should be my target column ?Is Target 'AGE' or 'ID'? 2-Do I need to do hot-encoding of the target column? For example if I used ID as my target,then do I have to do one-hot-encoding of ID column?

  2. If I used ID as my target,then after one-hot-encoding, does it mean,I will be having 70 classes?

  3. I need information about the output layer. My goal is to find whether the photo belong to the same ID or not,so what should be the output layer? Shall I use softmax with 70 outputs ?
  4. Another question about the output layer is that can I use a softmax with 70 outputs and then feed it to a layer of sigmoid with single output ?

回答1:


  1. You are going to identify the same person using different age images. For example, in the dataset, you have 100 different images of khan and you trained a model. Now you provide the 101st image of khan, the model will detect it. So your target column should be ID.
  2. yes, there are 70 classes and you get one hot encoded vector of 900x70
  3. It should be a softmax layer because the sigmoid layer is used for binary class or multilabel problem. As you have to detect 70 different people from each other, you need a softmax class.
  4. I don't think so, in this way your model would not be capable of telling which person image is this (the one provided as a test)


来源:https://stackoverflow.com/questions/61740612/what-should-be-the-target-in-this-deep-learning-image-classification-problem

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!