Captioning sample images from popular sports

For the last part of our model test, we took several images from Flickr that focus on a wide variety of sports that are typically played around the world. We definitely got some interesting results since we did not focus on only one or two sports-based scenes. The code for generating this is exactly same as what we used in the previous section with only the source images changing. As always, detailed code is available in the notebooks for reference. Here are the results from our caption generators on the first batch of sports scenes:

In the preceding images, we can clearly see that the model that was trained with 50 epochs out-performs the model with 30 epochs in terms of visually describing the images in a more detailed way. This includes specific jersey and clothing colors such as white, blue, and red. We also see specific activities being mentioned in the captions, such as tacking in football, looking at the goal in hockey, or driving on a dirt track for racing. This definitely gives more depth and meaning to the generated captions. Our model with 30 epochs also makes some mistakes with regard to the exact sports being played in some of the images.

Let's now look at the final set of sports scenes to understand how our caption generators perform on several totally different sports activities from the previous set:

We can observe from the preceding output that both our models perform well, with the model trained on 30 epochs doing quite well in several scenarios, such as identifying children or boys playing soccer or even the color and accessories of the BMX bikers in a race. Overall, both models perform well and explain the scenery to an extent that is similar to how a human would describe these scenes.

The major area of success here is that  our model not only identified each activity correctly, but it was also able to generate captions that were meaningful and applicable. We encourage you to try building and testing your own caption generator on different scenes!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.243.4