Part 3: How Machines See and Read (Computer Vision & NLP)
Part 3: How Machines See and Read (Computer Vision & NLP)
In parallel with the rise of Deep Learning, applications that interpret images and human language began to gain significant attention. Two important areas are Computer Vision (CV) and Natural Language Processing (NLP).
Computer Vision (CV): Machines Could Actually See
Computer Vision is a field of AI that enables machines to process and interpret visual information such as images and videos.
A major turning point in computer vision came with a dataset called ImageNet. It contains millions of labeled images organized into thousands of categories. The ImageNet project became especially influential because it provided researchers with a large dataset for training and evaluating image-recognition systems.
In 2012, Alex Krizhevsky and his team developed AlexNet, a deep convolutional neural network (CNN) trained on ImageNet. AlexNet achieved a breakthrough result in the ImageNet Large Scale Visual Recognition Challenge (ILSVRC), demonstrating how effectively deep neural networks could perform large-scale image classification.
This was a major milestone in the computer vision revolution. It significantly improved the ability of machines to identify and classify objects in images.
.png&w=3840&q=75)
As a result of advances in computer vision, we now see applications such as:
- Face unlock: Recognizing a user's face to unlock a device.
- Self-driving cars: Detecting roads, vehicles, pedestrians, traffic signs, and other objects.
- Medical image analysis: Helping identify patterns in X-rays, CT scans, and ultrasound images.
- Product identification: Recognizing products from images in shopping apps.
.png&w=3840&q=75)
Natural Language Processing (NLP)
Natural Language Processing (NLP) is a field of AI that helps computers process, analyze, and work with human language.
People sometimes assume that text is easier for computers to understand than images, audio, or video. But human language is full of ambiguity. The meaning of a sentence can change depending on context, word relationships, and how a sentence is structured.
This is not just a challenge for machines; even humans can interpret some sentences in different ways. Consider these examples:
- Example 1: "I saw a man with a telescope."
- Meaning A: I saw a man who was carrying a telescope.
- Meaning B: I used a telescope to see a man.
- Example 2: "The chicken is ready to eat."
- Meaning A: The chicken dish has been prepared and is ready for someone to eat.
- Meaning B: The chicken (the animal) is ready to eat its food.
- Example 3: "River bank and Bank of India."
- The word "bank" has different meanings depending on the context: the side of a river or a financial institution.
These examples show why understanding language requires more than simply identifying individual words. A system needs to consider how words relate to one another and the context in which they appear.
.png&w=3840&q=75)
The Early Attempt: Bag of Words
One early technique used to represent text for machine learning was called Bag of Words (BoW).
Bag of Words represents a sentence or document by counting how many times each word appears, without considering the order of the words.
Let's look at two simple sentences:
- Sentence 1: "I love AI"
- Sentence 2: "I love NLP"
Step 1: Create a vocabulary
Collect all the unique words from both sentences:
[I, love, AI, NLP]
Step 2: Count each word
- Sentence 1: I (1), love (1), AI (1), NLP (0)
- Sentence 2: I (1), love (1), AI (0), NLP (1)
Step 3: Create a vector representation
Using the vocabulary order [I, love, AI, NLP]:
- Sentence 1 →
[1, 1, 1, 0] - Sentence 2 →
[1, 1, 0, 1]
.png&w=3840&q=75)
Computers can use these numerical vectors as input for machine learning models. However, Bag of Words has an important limitation: it loses word order and much of the context.
For example:
- Sentence 1: "Dog bites man"
- Sentence 2: "Man bites dog"
Both sentences contain the same words, so a basic Bag of Words representation gives them the same vector, even though their meanings are different.
This makes Bag of Words useful for some simple text-processing tasks, but limited when a model needs to understand sentence structure, word relationships, or context.
What Comes Next?
Bag of Words was an important early step because it converted text into numbers that machine learning models could process. But counting words alone cannot capture the full meaning of language.
Later approaches introduced richer ways to represent words and their relationships, helping models use more context when processing text. These developments eventually led to modern deep-learning approaches for language, including transformer-based models.
Up Next: Recommended For You
Readers who finished this note also explored these next:
Part 1: The Evolution of AI and The Turing Test
Part 1: The Evolution of AI and The Turing Test
Part 2: The Leap to Machine Learning and Deep Learning
Part 2: The Leap to Machine Learning and Deep Learning