Answers.Body: <p>So you have a network pretrained on 80 classes. I also assume that one of these classes are human (or else this is just not the way to go*) I suspect that the final layer contains 80 labels, correct? Then you then 'rescale' this layer to 1 label and then train on some data you possess? Then you're basically trying to teach the network that it shouldn't care about the 79 other classes, which is just nonsense I think.</p>
  
  <p>What you <em>could</em> do, and I do not recommend this, but if you feel like you <em>have</em> to use this <em>exact</em> network, you just keep the 80 outputs and only look at the label correspondning to the human.</p>
  
  <p>You shouldn't do this because the network is WAY bigger than it needs to be to only classify human/non human, which will make it slower than it needs to be.</p>
  
  <p>What you rather want to do is either to train your own network (If you have lots of training data, I suspect this wouldn't be be the hardest thing to train) or obtain a CNN that is pretrained on human classification.</p>
  
  <p>(*I've heard rumours that you can do pretty well on retraining a class on a pretrained network. I just don't know if the rumours are true or how to go about it.)</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-29T01:57:11.990Z
Answers.Text: Yes, one way is to reuse the network with 80 classes, but it will be very expensive since i just want to care about the presence of human only. In general, if i want to detect human only, i have also to give it data of non-human right?
Answers.UserDisplayName: Earthgod
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-29T07:51:14.627Z
Answers.Text: As I say in the answer, yes it would be expensive, but about the same as your approach. If you want to train it yourself, you need to give it human and non-human data.
Answers.UserDisplayName: Andreas Storvik Strauman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-29T08:43:35.937Z
Answers.Text: What do you think about the ratio between human/non-human data?
Answers.UserDisplayName: Earthgod
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-29T08:53:01.907Z
Answers.Text: Hard to say. Depends on the data. Use all of what you have :)
Answers.UserDisplayName: Andreas Storvik Strauman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-28T10:04:24.317Z
Answers.LastActivityDate: 2018-03-31T09:24:56.200Z
Answers.LastEditDate: 2018-03-31T09:24:56.200Z
Answers.UserDisplayName: Andreas Storvik Strauman
Body: <p>I am new to deep learning and computer vision. I have a problem where I use <a href="https://pjreddie.com/" rel="nofollow noreferrer">the YOLO</a> to detect objects.</p>
  <p>For my problem, I just want to recognize 1 human only. So, I changed the final YOLO's layer (which contained 80 neurons) to only 1 neuron, and do the training process with transfer learning techniques. Of course, I do not use the final layer's weights, and these weights are randomly initialized for my problem. I feed only the human data to the model.</p>
  <p>However, I realize that after longer training, the model becomes worse. It starts to recognize other objects as a human.</p>
  <p>Should I also feed non-human data to the model?</p>
  
Tags: <convolutional-neural-networks><image-recognition><transfer-learning><yolo><binary-classification>
Title: Why is my fine-tuned YOLO model detecting other objects as a human?
UserDisplayName: Earthgod
ThreadText: # Why is my fine-tuned YOLO model detecting other objects as a human?
  
  (Asked by: username_0 on 2018-03-28)
  
  I am new to deep learning and computer vision. I have a problem where I use [the YOLO](https://pjreddie.com/) to detect objects.
  
  For my problem, I just want to recognize 1 human only. So, I changed the final YOLO's layer (which contained 80 neurons) to only 1 neuron, and do the training process with transfer learning techniques. Of course, I do not use the final layer's weights, and these weights are randomly initialized for my problem. I feed only the human data to the model.
  
  However, I realize that after longer training, the model becomes worse. It starts to recognize other objects as a human.
  
  Should I also feed non-human data to the model?
  
  **Tags:** convolutional-neural-networks, image-recognition, transfer-learning, yolo, binary-classification
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-03-28. Score: 1
  
  So you have a network pretrained on 80 classes. I also assume that one of these classes are human (or else this is just not the way to go\*) I suspect that the final layer contains 80 labels, correct? Then you then 'rescale' this layer to 1 label and then train on some data you possess? Then you're basically trying to teach the network that it shouldn't care about the 79 other classes, which is just nonsense I think.
  
  What you *could* do, and I do not recommend this, but if you feel like you *have* to use this *exact* network, you just keep the 80 outputs and only look at the label correspondning to the human.
  
  You shouldn't do this because the network is WAY bigger than it needs to be to only classify human/non human, which will make it slower than it needs to be.
  
  What you rather want to do is either to train your own network (If you have lots of training data, I suspect this wouldn't be be the hardest thing to train) or obtain a CNN that is pretrained on human classification.
  
  (\*I've heard rumours that you can do pretty well on retraining a class on a pretrained network. I just don't know if the rumours are true or how to go about it.)
  
  > **Comments:**
  > **username_0**: Yes, one way is to reuse the network with 80 classes, but it will be very expensive since i just want to care about the presence of human only. In general, if i want to detect human only, i have also to give it data of non-human right?  
  > **username_1**: As I say in the answer, yes it would be expensive, but about the same as your approach. If you want to train it yourself, you need to give it human and non-human data.  
  > **username_0**: What do you think about the ratio between human/non-human data?  
  > **username_1**: Hard to say. Depends on the data. Use all of what you have :)  
  
  ---
  
  