问题
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.
My questions are:
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?
If I used ID as my target,then after one-hot-encoding, does it mean,I will be having 70 classes?
- 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 ?
- 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:
- 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
. - yes, there are 70 classes and you get one hot encoded vector of
900x70
- 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.
- 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