Unit 4: AI Applications

Lesson 1: Computer Vision (1 hour)

Lesson content from Unit 4: AI Applications

Lesson 1: Computer Vision (1 hour)

Learning Objectives

  • Understand what computer vision is
  • Recognize how AI processes images
  • Identify computer vision applications
  • Use computer vision tools hands-on

Materials Needed

  • Internet-connected devices
  • Camera access (webcam or phone cameras)
  • Computer vision demos and APIs
  • Student notebooks
  • Examples of computer vision applications

Time Breakdown

  • Review neural networks (5 min)
  • Introduction to computer vision (15 min)
  • How computer vision works (15 min)
  • Hands-on: Computer vision tools (20 min)
  • Wrap-up (5 min)

Activities

1. Review Neural Networks (5 min)

  • What are CNNs good for? (Images!)
  • Bridge: "Today we'll see how AI actually sees and understands images"

2. Introduction to Computer Vision (15 min)

What is Computer Vision?

  • Teaching computers to understand and interpret visual information
  • Like giving computers "eyes" and "understanding"
  • Processing images and videos to extract meaningful information

Key Tasks:

  1. Image Classification: "What is this?" (cat, dog, car)
  2. Object Detection: "What objects are here and where?" (cat at position X, dog at position Y)
  3. Face Recognition: "Who is this person?"
  4. Scene Understanding: "What's happening in this scene?"
  5. Image Generation: Creating new images

Real-World Applications:

  • Social Media: Face recognition, filters, content moderation
  • Healthcare: Medical imaging (detecting diseases in X-rays)
  • Autonomous Vehicles: Recognizing road signs, pedestrians, obstacles
  • Security: Surveillance, facial recognition systems
  • Retail: Self-checkout, inventory management
  • Agriculture: Crop monitoring, disease detection
  • Entertainment: Photo filters, augmented reality

Why Computer Vision Matters:

  • Images are everywhere (billions uploaded daily)
  • Can automate tasks humans do visually
  • Can process images faster and more consistently than humans
  • Enables new applications (self-driving cars, AR)

3. How Computer Vision Works (15 min)

The Process:

  1. Input: Image (grid of pixels)
  2. Processing: Neural network analyzes image
  3. Feature Detection: Finds patterns (edges, shapes, objects)
  4. Classification/Recognition: Identifies what it sees
  5. Output: Labels, bounding boxes, descriptions

Key Concepts:

Pixels:

  • Images are made of pixels (tiny squares of color)
  • Each pixel has RGB values (Red, Green, Blue)
  • Computer sees numbers, not images

Feature Detection:

  • Early layers: Detect edges, lines, colors
  • Middle layers: Detect shapes, textures
  • Later layers: Detect objects, parts

Convolutional Neural Networks (CNNs):

  • Specialized for images
  • Can recognize patterns regardless of position
  • Learn hierarchical features

Example: Recognizing a Cat

  • Input: Image of cat (pixels)
  • Layer 1: Detects edges and lines
  • Layer 2: Detects shapes (circles, curves)
  • Layer 3: Detects parts (ears, eyes, nose)
  • Layer 4: Recognizes "cat face"
  • Output: "This is a cat" (with confidence score)

Challenges:

  • Different lighting conditions
  • Different angles and perspectives
  • Occlusion (objects hidden)
  • Similar objects (cat vs. dog)
  • Background clutter

4. Hands-On: Computer Vision Tools (20 min)

Activity 1: Image Classification (7 min)

  • Use Google Vision API demo or similar tool
  • Upload various images
  • See what AI recognizes
  • Try: Animals, objects, scenes, text in images
  • Observe: Accuracy, confidence scores, mistakes

Activity 2: Face Detection (7 min)

  • Use face detection tool or app
  • Try with different photos:
    • Clear face, front-facing
    • Side profile
    • Multiple faces
    • Different ages, expressions
  • Observe: What it detects, what it misses

Activity 3: Object Detection (6 min)

  • Use object detection demo
  • Upload image with multiple objects
  • See bounding boxes and labels
  • Try: Complex scenes, cluttered images
  • Observe: What it finds, accuracy, limitations

Reflection Questions:

  • What worked well? What didn't?
  • What surprised you about the AI's capabilities?
  • What are the limitations?
  • How could this be improved?

5. Wrap-Up (5 min)

  • Computer vision: AI understanding images
  • Uses CNNs to detect patterns and objects
  • Many real-world applications
  • Still has limitations
  • Preview: Next lesson - Natural language processing

Differentiation Strategies

  • Younger students: Focus on fun demos, simpler explanations, hands-on exploration
  • Older students: Explore how CNNs work in detail, research specific applications, analyze limitations
  • Struggling learners: Use guided exploration, simpler tools, more support
  • Advanced learners: Research specific CV techniques, explore image generation, analyze ethical concerns

Assessment

  • Participation in hands-on activities
  • Quality of observations
  • Understanding of computer vision concepts
  • Reflection journal entry