Course 1 : Week 2 - Part 7 - Test with your own image

Most likely the problem is just that the model we trained here does not generalize very well. That is for two reasons:

  1. Logistic Regression is just not powerful enough for this complex a recognition task: it can only do “linear separations” in the input space. We’ll get better results in Week 4 with real Neural Networks, but then we still don’t get a really general model because …

  2. The dataset here is tiny compared to what you would need to really get a general model for as complex a recognition task as this is. We have 209 training samples and 50 test samples. For one comparison, take a look at the Kaggle Dog and Cat dataset and it has 25k samples. The problem is that they are severely limited by the constraints of the online notebook environment of the course: we don’t have GPUs available to do the training, so we have to keep things small.

In fact, you can flip the question around and ask how they were able to get such good results on the test data here. It turns out that the datasets were “curated” pretty carefully to work this well. Here’s another thread that shows some experiments with the “balance” of the datasets.