1 of 21

Lecture 31

Working with Images, Computer Vision

Summer 2023

2 of 21

Working with Image Data

3 of 21

Image Data

  • Images are just two-dimensional arrays
  • Each entry represents the value of that pixel
  • Values are between 0 and 255
    • 0 is completely black, 255 is completely white

(demo)

4 of 21

But what about color…?

5 of 21

Color Images

  • Each pixel has three color channels
    • Red, Green, Blue (RGB)
  • A value of 255 represents full intensity
  • We can create all other colors by mixing intensities of RGB values

6 of 21

Image Data

RGB (158, 99, 57)

RGB (170, 135, 114)

(demo)

7 of 21

Video Data

  • A video is just a sequence of images
  • Frames Per Second (FPS) measures how fast frames are processed

(demo)

8 of 21

Computer Vision

9 of 21

CV in the Real World

(self-driving cars)

(commerce)

(medical imaging)

10 of 21

A.I. For Tennis

11 of 21

SwingVision

12 of 21

Object Detection

  • Object detection models locate and classify objects in an image
  • A bounding box is used to locate the object
  • The model predicts an object class for each bounding box

13 of 21

Object Detection

person

person

person

person

ball

14 of 21

How do you build the model?

15 of 21

Step 1: Collect Data

16 of 21

Step 2: Label Data

  • Use Computer Vision Annotation Tool (CVAT)
  • Labeled by our data labelers!
  • Use models to automatically label data

17 of 21

Step 3: Train Model

  • “Show” the model an example video
  • Make a prediction
  • Calculate how bad the model’s predictions are
  • Update the model to learn from its mistakes
  • Repeat

Some of these (GPUs) might help, too

18 of 21

Step 4: Make Predictions

  • Use shot heatmap to show location predictions
  • Bounding boxes converted into a single location
  • Locations used to predict ball velocity

19 of 21

Cutting-edge Object Detection

20 of 21

YOLO v8

  • Stands for “You Only Look Once
  • Real-time Object Detection Model
  • Original YOLO: Joseph Redmon (2015)
  • YOLO v8: Ultralytics (2023)

(demo)

21 of 21

Thank you!