Chapter 6 Exercises: Computer Vision


Part A: Foundational (Understand)

A1. Pixel Basics A grayscale image is 100 pixels wide and 100 pixels tall. Each pixel has a single value between 0 and 255. (a) How many total pixel values are in this image? (b) A color image of the same size stores three values (red, green, blue) per pixel. How many total values does the color version contain? (c) Explain in your own words why a computer "seeing" these numbers is fundamentally different from a human seeing the same image.

A2. Vocabulary Check Match each term with its correct definition:

Term Definition
1. Pixel A. A neural network architecture that slides filters across images to detect patterns
2. CNN B. The smallest addressable element of a digital image
3. Object detection C. Assigning a label to every pixel in an image
4. Image segmentation D. Small, calculated changes to an image that fool AI classifiers
5. Face embedding E. Identifying what objects are in an image and where they are located
6. Adversarial example F. A numerical representation of a face's unique geometry

A3. The Vision Hierarchy Put these levels of visual recognition in order from simplest to most complex: (a) Object recognition (b) Edge detection (c) Scene understanding (d) Raw pixels (e) Shape and texture recognition (f) Part identification

A4. Classification vs. Detection Explain the difference between image classification and object detection. Give one real-world scenario where classification alone would be sufficient and one scenario where detection is necessary.

A5. Everyday Computer Vision List five examples of computer vision that you interact with in a typical week. For each, identify whether it primarily uses classification, detection, segmentation, or facial recognition. (Hint: think about your phone, social media, shopping, and transportation.)


Part B: Intermediate (Apply)

B1. CNN Intuition Building A CNN learns to recognize dogs by training on thousands of labeled photos. (a) Describe what the first layer of the CNN might learn to detect. (Think simple.) (b) Describe what a middle layer might learn to detect. (Think more complex.) (c) Describe what the final layers might learn to detect. (Think about complete objects.) (d) Why is this hierarchical approach more effective than trying to match entire images at once?

B2. Training Data Analysis You are building a computer vision system to detect potholes on roads for a city's department of transportation. (a) What images would you need in your training dataset? (b) List three ways your training dataset might be biased or incomplete. (c) Describe two edge cases that could cause your system to fail. (d) How would you test whether your system works equally well on different road surfaces (asphalt, concrete, cobblestone)?

B3. Facial Recognition Stakeholder Analysis Your local school district is considering installing facial recognition at all school entrances to improve safety. (a) Identify at least four stakeholder groups. (b) For each group, describe one potential benefit and one potential concern. (c) What information would you need to evaluate whether this proposal is a good idea? (d) Draft three conditions that should be met before the system is deployed.

B4. Deepfake Identification You receive a video on social media showing a public figure making a shocking statement. Describe five steps you would take to verify whether the video is authentic before sharing it. Be specific about what tools, methods, or sources you would use.

B5. The MedAssist Scenario MedAssist AI is being deployed at a rural community hospital that serves a predominantly Latino patient population. The system was trained primarily on data from urban teaching hospitals with predominantly white patient populations. (a) What types of accuracy problems might you predict? (b) What steps should the hospital take before deploying the system? (c) Should the hospital deploy the system if no alternative exists and there is a shortage of radiologists? Explain your reasoning.


Part C: Advanced (Analyze/Evaluate)

C1. The Adversarial Arms Race Read about adversarial examples in Section 6.6. (a) Why is it significant that adversarial perturbations can be imperceptible to humans but fool neural networks? What does this reveal about how CNNs process images versus how humans do? (b) If you were deploying a computer vision system for airport security screening, how would the existence of adversarial examples affect your approach? What safeguards would you implement? (c) Some researchers argue that adversarial vulnerability means CNNs will never be truly reliable for safety-critical applications. Others argue the vulnerability can be mitigated. Which position do you find more persuasive, and why?

C2. Comparative Regulation Research the facial recognition policies of two different countries or cities (suggestions: San Francisco's ban vs. London's deployment; the EU AI Act vs. China's approach). (a) Summarize each policy in 2-3 sentences. (b) What values and priorities does each policy reflect? (c) Evaluate which approach better balances security, privacy, and civil liberties. Defend your evaluation with specific arguments.

C3. The Liar's Dividend Section 6.5 introduces the "liar's dividend" — the idea that the existence of deepfakes makes it easier to dismiss real evidence as fake. (a) Give a specific example (real or hypothetical) of how the liar's dividend could undermine accountability. (b) How does the liar's dividend interact with existing problems of misinformation and political polarization? (c) Propose one technical and one social/institutional approach to counteracting the liar's dividend.

C4. Designing for Failure Choose one computer vision application: autonomous vehicles, medical imaging, or content moderation. (a) List the five most likely failure modes for your chosen application. (b) For each failure mode, rate the severity of consequences (low, medium, high, catastrophic). (c) For the two highest-severity failure modes, design a mitigation strategy that does not rely solely on improving the AI model. (d) Explain how the "human in the loop" fits into your mitigation strategy and what its limitations are.

C5. Research Extension The chapter discusses the Gender Shades study (Buolamwini and Gebru, 2018). (a) Search for follow-up research published after this study. Have the accuracy disparities improved? By how much? (b) Did the companies that were evaluated respond? How? (c) Write a 300-word reflection on what this case teaches about the role of independent research in AI accountability.


Part D: Synthesis and Reflection

D1. Letter to a Decision-Maker Write a 500-word letter to the mayor of a mid-sized city who is considering deploying facial recognition in public parks. Draw on evidence from this chapter and its case studies. Your letter should acknowledge the potential benefits, identify the key risks, and make a clear recommendation with specific conditions or safeguards.

D2. Vision System Audit Using the framework from the Project Checkpoint, conduct a mini-audit of one computer vision system you interact with regularly (phone camera features, a social media filter, a video call background feature, etc.). (a) What visual task does the system perform? (b) What training data was likely used? (c) Can you find any failure modes? Document them with screenshots if possible. (d) Who benefits from this system and who might be harmed? (e) What would you change about how it's designed or deployed?