allanzelener / YAD2K

YAD2K: Yet Another Darknet 2 Keras
Other
2.71k stars 879 forks source link

Using darknet19 as a simple classifier #183

Closed karthiksprakash closed 4 years ago

karthiksprakash commented 4 years ago

I have some newbie questions. I used the darknet19 model to load the corresponding pre-trained weights from the Darknet website (ImageNet 1000 classes). I see the last softmax layer of this model is of shape (None, 8, 8, 1000).

  1. How do I use this for simple classification? The prediction of one of the sample images (eagle.jpg) is of shape - (1, 8, 8, 1000). How do I interpret this? Do I look for the max value of the 1000 elements across the 8x8 3D matrix?

  2. Could this be flattened into 1x1000 array? Would that require re-training?

  3. I want to retrain for a new dataset of 200 classes. Change I change the last softmax layer to shape 200 and train by freezing the other layers?