Analyzing the result captions

Let's take a few examples to check our model. When we execute football.jpeg, we get the following output:

Here we clearly have American football going on in the image, and a couple of men playing a game of football is a very good result. However, the first result, a couple of men playing a game of frisbee, is not the desired output, nor is a couple of men playing a game of soccer. So, in this case, the second caption is generally going to be the best, but it is not always going to be perfect, depending on the log probability.

Let's try one more example, giraffes.jpeg:

Clearly, we have an image of giraffes, and ...

Get Computer Vision Projects with OpenCV and Python 3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.