1
$\begingroup$

I am new to deep learning and computer vision. I have a problem where I use the YOLO 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?

$\endgroup$

1 Answer 1

1
$\begingroup$

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.)

$\endgroup$
4
  • $\begingroup$ 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? $\endgroup$
    – Earthgod
    Mar 29, 2018 at 1:57
  • $\begingroup$ 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. $\endgroup$ Mar 29, 2018 at 7:51
  • $\begingroup$ What do you think about the ratio between human/non-human data? $\endgroup$
    – Earthgod
    Mar 29, 2018 at 8:43
  • $\begingroup$ Hard to say. Depends on the data. Use all of what you have :) $\endgroup$ Mar 29, 2018 at 8:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .