Humans can learn new things with a small set of examples. When presented with stimuli, humans seem to be able to understand new concepts quickly and then recognize variations of those concepts in the future. A child can learn to recognize a dog from a single picture, but a machine learning system needs a lot of examples to learn the features of a dog and recognize them in the future. Machine learning, as a field, has been highly successful at a variety of tasks, such as classification and web searching, as well as image and speech recognition. Often, however, these models do not perform well without a large amount of data (examples) to learn from. The primary motivation behind this book is to train a model with very few examples that is capable of generalizing to unfamiliar categories without extensive retraining.
Deep learning has played an important role in the advancement of machine learning, but it also requires large datasets. Different techniques, such as regularization, can reduce overfitting in low-data regimes, but do not solve the inherent problem that comes with fewer training examples. Furthermore, the large size of datasets leads to slow learning, requiring many weight updates using gradient descent. This is mostly due to the parametric aspect of an ML algorithm, in which training examples need to be slowly learned. In contrast, many known non-parametric models such as nearest neighbor do not require any training, but performance depends on a sometimes arbitrarily chosen distance metric such as the L2 distance. One-shot learning is an object categorization problem in computer vision. While most ML-based object categorization algorithms require hundreds or thousands of images and very large datasets to train on, one-shot learning aims to learn information about object categories from one, or only a few, training images. In this chapter, we will learn about the basics of one-shot learning and explore its real-world applications.
The following topics will be covered in this chapter:
- The human brain—overview
- Machine learning—history overview
- One-shot learning—overview
- Setting up your environment
- Coding exercise