1. Home
  2. Explore
  3. Computer Science
  4. Introduction to Computer Vision

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Introduction to Computer Vision

Speaker 1Speaker 2

Introduction to Computer Vision

18:09
0:00-18:09
  1. Anna

    Welcome to CS231n. Let’s begin with the big question: what is computer vision? In this course, it means studying visual data and building algorithms that can usefully understand it. That matters because visual data has exploded as cameras have become widespread—many of us carry smartphones with multiple cameras, and the lecture notes that there may now be more cameras than people.

  2. Michael

    And the scale is enormous. A 2015 Cisco study estimated that by 2017, around 80 percent of internet traffic would be video alone, without counting images and other visual data. The lecture also gives a striking YouTube example: roughly five hours of video were being uploaded for every second of real-world time. No team of people could watch and annotate all of that, so automatic visual understanding is essential for tasks like finding relevant videos and organizing content.

  3. Anna

    The challenge is that visual data is abundant but hard for algorithms to interpret. The lecture compares it to dark matter: visual data makes up a huge share of the bits on the internet, yet its contents are not readily understandable to a computer. Computer vision is also interdisciplinary. It draws on physics to understand optics and image formation, biology and psychology to study how animals process vision, and computer science, mathematics, and engineering to build working systems.

  4. Michael

    That sets up the course’s central theme: learning how machines can make sense of images. But it also helps to know how humans and animals came to see. The historical story starts about 543 million years ago, when life in the oceans was relatively simple. Then, around 540 million years ago, animal species diversified rapidly in what evolutionary biologists call the Cambrian explosion, or evolution’s Big Bang.

  5. Anna

    One explanation proposed by zoologist Andrew Parker is that the development of eyes helped trigger that rapid change. Once animals could see, they could pursue prey or escape predators, creating an evolutionary arms race. Over hundreds of millions of years, vision became a major sensory system; in humans, the lecture says, nearly half of the neurons in the cortex are involved in visual processing.

  6. Michael

    Humans also developed tools for capturing images. One early camera was the camera obscura, dating to the 1600s. Its pinhole gathers light and projects an image onto a surface, a basic arrangement that the lecture compares with early animal eyes. Today, cameras are everywhere, giving us an enormous supply of visual data.

  7. Anna

    Meanwhile, researchers were asking how biological vision works. In the 1950s and 1960s, David Hubel and Torsten Wiesel used electrophysiology to study visual processing in cats, whose visual systems offered a model for understanding mammals. They found that cells in the primary visual cortex respond to particular visual patterns. Simple cells, for example, respond to oriented edges moving in certain directions.

  8. Michael

    The key idea is that visual processing can build complexity in stages. It begins with relatively simple structures such as edges, then combines information along the pathway until more complex visual scenes can be recognized. That biological perspective influenced computer vision, too.

  9. Anna

    Computer vision research took shape in the early 1960s. Larry Roberts’s work on the Block World is widely regarded as one of the first computer-vision PhD theses. It simplified the world into geometric shapes and asked computers to recognize and reconstruct them. Then came the 1966 MIT Summer Vision Project, an ambitious attempt to build a significant part of a visual system in one summer.

  10. Michael

    The project’s ambition makes a useful point: vision proved far harder than a summer’s work. Fifty years later, computer vision had grown into a large research field, but fundamental problems were still unsolved. David Marr’s influential work in the late 1970s offered a structured way to think about the task.

  11. Anna

    Marr described a progression from an image to a full three-dimensional representation. First is the primal sketch, which represents basic elements such as edges, bars, curves, and boundaries. Next is the two-and-a-half-D sketch, which begins to represent surfaces, depth, layers, and discontinuities. Eventually, those pieces could be assembled into a hierarchically organized 3D model of surfaces and volumes.

  12. Michael

    That staged account was influential for decades because it gave researchers and students an intuitive way to break vision into manageable pieces. In the 1970s, researchers also looked for ways to represent real-world objects using simpler parts. Work at Stanford and SRI explored ideas such as generalized cylinders and pictorial structures.

  13. Anna

    The shared strategy was to describe a complex object through simpler geometric components and how those components fit together. A person, for example, could be modeled from cylindrical shapes or from important body parts with flexible spatial relationships. In the 1980s, David Lowe also explored recognizing objects such as razors by combining lines and edges.

  14. Michael

    These approaches were imaginative, but early object recognition was extremely difficult. Many systems handled only toy examples or a small number of cases, rather than working reliably in the real world. One response was to study a related problem that might be more tractable: image segmentation.

  15. Anna

    Segmentation means grouping pixels into meaningful regions. A system may not know that a region is a person, but it can still separate the pixels belonging to that person from the background. The lecture highlights early work by Jitendra Malik and Jianbo Shi, who used graph theory for image segmentation.

  16. Michael

    Face detection also made notable progress. Around 1999 and 2000, statistical machine-learning methods—including support vector machines, boosting, graphical models, and an early wave of neural networks—were gaining momentum. In 2001, Paul Viola and Michael Jones used AdaBoost for near-real-time face detection, despite the limited speed of computers at the time.

  17. Anna

    That research moved quickly into everyday technology: Fujifilm released a digital camera with real-time face detection in 2006. It’s a clear example of basic research turning into a practical application within only a few years.

  18. Michael

    Another important direction was feature-based recognition. David Lowe’s SIFT features were designed to identify distinctive parts of an image that remain useful despite changes in viewpoint, lighting, camera angle, or partial obstruction. Matching a collection of diagnostic features between two images can be easier than matching the complete objects pixel by pixel.

  19. Anna

    The same general idea—extract useful features and combine them—was extended to scenes and people. Spatial Pyramid Matching gathered image features from different locations and resolutions, then used a support vector machine to classify scenes such as kitchens, highways, or landscapes. Human recognition work included histograms of gradients and deformable part models.

  20. Michael

    A major change during this period was that researchers increasingly had better images to study, thanks in part to the internet and improved digital cameras. The field also developed benchmarks so teams could measure progress on the same recognition tasks. One influential example was the PASCAL Visual Object Challenge.

  21. Anna

    PASCAL included 20 object classes—examples in the lecture include trains, airplanes, and people—with thousands of images per category. Researchers evaluated their systems on held-out test data. From 2007 to 2012, performance on detecting those objects steadily improved, giving the field a way to track progress rather than relying only on individual demonstrations.

  22. Michael

    But there was a deeper limitation: many machine-learning models overfit. Visual data is complex, and models may have many inputs and parameters; if there isn’t enough training data, they can fit the training examples without generalizing well. Researchers also wanted systems to recognize far more than a small set of object categories. Those goals motivated ImageNet.

  23. Anna

    ImageNet was designed as a very large dataset for training and benchmarking object recognition. The project organized images according to WordNet, a dictionary-like resource with tens of thousands of categories. The team downloaded billions of images from the internet and used Amazon Mechanical Turk to help sort, clean, and label them.

  24. Michael

    The resulting dataset contained nearly 15 million images across about 22,000 object and scene categories. Beginning in 2009, the ImageNet team also ran the ImageNet Large-Scale Visual Recognition Challenge. Its more focused test set contained about 1.4 million images across 1,000 object classes, allowing researchers to compare image-classification systems under a shared evaluation.

  25. Anna

    In the challenge’s top-five evaluation, an algorithm could propose five labels for an image; it counted as a success if the correct object appeared among those five. Error rates fell substantially from 2010 to 2015. By 2012, the reported performance was comparable to that of a Stanford PhD student spending weeks on the task.

  26. Michael

    The pivotal result came in 2012. Earlier challenge error rates had hovered around 25 percent, but that year the winning convolutional neural network, or CNN, brought the error rate down to about 16 percent. CNNs—and deep learning more broadly—became the focus of this course because that result showed how much progress these models could deliver.

  27. Anna

    CS231n focuses first on image classification: given an image, choose a category from a fixed set. That may sound narrow, but it applies to things like recognizing food, estimating food calories, identifying artworks, or recognizing products. The course also explores related tasks that reuse many of the same tools.

  28. Michael

    For object detection, the system must identify objects and locate them with bounding boxes—for example, a dog here, a cat there, and a car in the background. For image captioning, it must produce a natural-language sentence describing an image. These are different outputs, but techniques developed for classification can help with both.

  29. Anna

    The lecture traces the CNN breakthrough to a longer history. In 2011, a leading ImageNet approach used a hierarchy of feature computation and pooling before passing a descriptor to a linear support vector machine. It still relied on familiar ideas like edges and invariance. Then, in 2012, Alex Krizhevsky and Ilya Sutskever, working with Jeff Hinton’s group in Toronto, produced the seven-layer AlexNet, which performed exceptionally well.

  30. Michael

    After that, neural networks won the ImageNet challenge year after year, and architectures grew deeper. AlexNet had roughly seven or eight layers, depending on how they’re counted. In 2014, models such as GoogleNet and Oxford’s VGG became prominent, with VGG around 19 layers; in 2015, Microsoft Research Asia’s Residual Network reached 152 layers. The lecture notes that even deeper models were explored, though computation and memory became constraints.

  31. Anna

    CNNs weren’t invented in 2012. Yann LeCun and collaborators had built a convolutional network in the 1990s for recognizing handwritten digits, with possible applications such as reading checks or postal addresses. Like AlexNet, it processed raw pixels through convolution and subsampling, followed by fully connected layers.

  32. Michael

    So why did CNNs become so effective later? One reason was computation. Faster processors and graphics processing units made it practical to train larger models; GPUs are especially useful because their parallel processing suits these intensive calculations. More computing power let researchers experiment with bigger architectures.

  33. Anna

    The other major reason was data. Neural networks need many labeled examples, and such datasets were difficult to assemble in the 1990s. By the 2010s, collections such as PASCAL and ImageNet provided much larger, labeled datasets. More data helped high-capacity models train effectively and generalize to real-world problems.

  34. Michael

    Even with those advances, ordinary classification doesn’t capture everything people see. The lecture points to open problems such as semantic segmentation, where every pixel receives a meaning or label, and perceptual grouping, where we organize image elements into meaningful structures. Three-dimensional reconstruction remains challenging, as does recognizing activities in video.

  35. Anna

    The field can also represent scenes more richly than a list of object labels. Work on the Visual Genome dataset, for example, explores describing images as graphs of related concepts: not just object identities, but also relationships, attributes, and actions. That kind of representation aims to preserve more of the structure and meaning in a scene.

  36. Michael

    A long-term ambition is to understand an image as richly as a person does. The lecture describes an experiment in which people saw an image for only half a second and could still write substantial descriptions of what was happening. With more time, they could draw on prior knowledge and tell a much fuller story—something current vision systems are still far from doing.

  37. Anna

    Consider the humorous image of President Barack Obama stepping on another person’s scale. To understand why it’s funny, a viewer has to recognize the people and objects, know what a scale measures, infer that pushing it down changes the reading, and interpret the reactions of people in the background. The joke depends on relationships and social context, not just object labels.

  38. Michael

    That kind of deep understanding remains an open challenge, even after rapid progress. The lecture describes computer vision as useful for areas such as medical diagnosis, self-driving cars, and robotics, as well as a way to investigate human intelligence. New technologies, including augmented and virtual reality, will create further problems to solve.

  39. Anna

    That’s the intellectual picture of CS231n. Now, what does the course itself involve? It is taught by Professor Fei-Fei Li, with instructors Justin Johnson and Serena Yeung, and a teaching staff of 18 TAs. The lecture also notes that enrollment had grown from 150 students in the first offering to 350 the next year and about 730 in the third.

  40. Michael

    For communication, the course recommends Piazza, where students can ask public questions or send private and anonymous ones. Email to instructors is mainly for confidential or personal matters. The course also offers an optional deep-learning textbook by Ian Goodfellow, Yoshua Bengio, and Aaron Courville; the material is available free online, and the course content is self-contained.

  41. Anna

    The teaching philosophy is to understand the mechanics, not just use a ready-made tool. In assignments, students implement convolutional neural networks from scratch in Python, including the forward and backward passes. The course also introduces practical software frameworks such as TensorFlow and Torch or PyTorch, so students see tools used in real applications.

  42. Michael

    Because the field moves quickly, the material can include research developments that did not exist when the course was taught the previous year. There are also creative applications, including image captioning, DeepDream, which uses networks to generate unusual, hallucinatory images, and style transfer, which renders an image in the style of artists such as Picasso or Van Gogh.

  43. Anna

    The course structure includes three problem sets, an in-class written midterm, and a substantial final project. Students work on the project in teams of one to three. There are seven late days to allocate across assignments for things like minor illness, travel, or conferences; unusually serious circumstances can be discussed with the staff.

  44. Michael

    Collaboration must follow Stanford’s honor code, and the course takes that seriously. As for preparation, strong Python skills are especially important because the programming assignments use Python. Some familiarity with C or C++ helps when reading software source code, even though students are not expected to write those languages for the course.

  45. Anna

    Students should also know basic calculus, including derivatives, and linear algebra, including matrices and matrix multiplication. Some computer-vision background—perhaps at the level of CS131 or CS231a—and some machine-learning background, perhaps at the level of CS229, are helpful. They’re not strict prerequisites, and key machine-learning ideas will be introduced when needed, though some catching up may be useful.

  46. Michael

    To recap, the course moves from the history and motivation of vision to the methods that transformed recognition, especially CNNs. It begins with image classification, then applies those tools to detection, captioning, and other problems, while keeping sight of the bigger challenge: understanding the visual world in all its complexity.

  47. Anna

    And the course’s goal is both conceptual and practical: understand how these algorithms work, implement them, and learn how modern software supports them. The lecture closes by pointing students to the course website for the syllabus and links, with the first learning algorithm coming up in the next lecture.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent