Dog Breed Classification and adding a Not-Dog Category
I have a CNN that predicts around 120 breeds. Right now as output I get an array of 120 probabilities from which I select the most probable breed. This works well; however, I want the model to also be able to predict whether there is a dog in the picture or not as well. So if someone decided to upload a scenic picture they would get an output of Not Dog rather than a dog breed.
So I was thinking I had two options: First I could just add a category with a bunch of not dog pictures so it will predict 121 categories (120 dog breeds and the 1 dog/notdog) and then retrain. Or I could set some probability threshold and if np.max(120 breeds) is less than this threshold then predict not dog.
What are your thoughts?
maybe, first pass the image through a separate CNN that is trained to recognize Dog or Not-Dog. IF it IS Dog, pass the image to the 120 breed CNN...
Might get better results training to separate networks if you can't get good performance from adding the additional category 121 "NotDog" to your original CNN.
I'm curious if you've solved this problem?