computer vision technights, 4 april 2016 manages to find our … vision.pdf · 2016-04-08 ·...
TRANSCRIPT
![Page 1: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/1.jpg)
Computer Vision – TechNights, 4 April 2016
In this session we will learn about Computer Vision, a branch of Artificial Intelligence
that teaches computers to see the world. We look at how images are stored and processed
on computers, and how a computer sees the world. We will think about how our brain
manages to find our cat effortlessly, and we will look at how we can train a computer to
recognize cat images!
![Page 2: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/2.jpg)
A robot was asked to make a picture of a dog look more dog-like. This was the result.
![Page 3: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/3.jpg)
Computer VisionTech Nights April 4th
Speaker: Gunnar Sigurdsson
![Page 4: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/4.jpg)
What is Computer Vision?
![Page 5: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/5.jpg)
How can we use computer vision in real life?
![Page 6: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/6.jpg)
Why Images?
● 8 years of video is uploaded to YouTube every day!● 250 million photos are uploaded to Facebook every day!
![Page 7: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/7.jpg)
Why is this hard to do?
● But this is easy! We can see all these things!
● Our brain is very smart!
● Our brain does a lot of tricks we do not realize!
● We will look at why this is hard, and how our brain does it!
![Page 8: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/8.jpg)
30% of our brain is used to see!
![Page 9: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/9.jpg)
What color is the dress?
???
![Page 10: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/10.jpg)
![Page 11: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/11.jpg)
Do you believe me if I say A and B are the same?
![Page 12: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/12.jpg)
Do you believe me if I say A and B are the same?
![Page 13: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/13.jpg)
Can anyone guess what this is?
![Page 14: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/14.jpg)
What about now?
We sometimes need to look at the whole image!
![Page 15: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/15.jpg)
What about these things?
![Page 16: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/16.jpg)
What about these things?
They are actually the same image, just rotated!
![Page 17: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/17.jpg)
Our eyes are like cameras
![Page 18: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/18.jpg)
Can you guess what is in this image?
What a computer sees!
A table of numbers!
![Page 19: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/19.jpg)
How does a computer see images?
What we see. What a computer sees!
A table of numbers!
![Page 20: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/20.jpg)
What about color? How do we store color?
● Our eyes are sensitive to three colors! Red, green, and blue.● We use those to see the world!
![Page 21: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/21.jpg)
What about color? How do we store color?
● Our eyes are sensitive to three colors! Red, green, and blue.● We use those to see the world!
![Page 22: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/22.jpg)
We can combine R, G, and B to make all the colors
![Page 23: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/23.jpg)
How does a computer see color images?
What we see.
![Page 24: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/24.jpg)
How does a computer see color images?
What we see. What a computer sees!
Three tables of numbers! R, G, B
![Page 25: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/25.jpg)
What happens if we set R to zero?
What a computer sees!
![Page 26: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/26.jpg)
What happens if we set R to zero?
What we see. No red! (only G,B) What a computer sees!
![Page 27: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/27.jpg)
Pixels! (Picture element)
● One point of the image, a pixel, has three numbers R, G, B
![Page 28: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/28.jpg)
Where do we go from there?
![Page 29: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/29.jpg)
Color filtering images
● Let’s first talk about changing each pixel (picture element) in some way
● A pixel is three numbers R, G, B
● We can make a new image with r, g, b
● For example, r = 1 × R g = 2 × G b = 1 × B so each pixel becomes more green!
● This how many “image filters” on Snapchat/Instagram work!
![Page 30: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/30.jpg)
Functions and Variables in programming
● x = 5 This is a variable
● y = multiply_this_by_two(x)
○ the function multiply_this_by_two
○ takes the value of the variable x
○ and gives a new value the the variable y
○ What do you think y is?
● x could also be an image!
○ y = make_this_image_red(x)
○ What is y now?
x
y
5
multiply_this_by_two Made by me!
x
![Page 31: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/31.jpg)
Function to filter the image!
change_rgb(image, r='1*R' , g='2*G' , b='1*B' )
![Page 32: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/32.jpg)
change_rgb(image, r= '1*R-.5' , g='1*G-.5' , b='1*B-.5')
![Page 33: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/33.jpg)
Make the image darker
change_rgb(image, r='1*R-.5' , g='1*G-.5' , b='1*B-.5')
![Page 34: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/34.jpg)
change_rgb(image, r='1*R' , g='1*R' , b='1*R')
![Page 35: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/35.jpg)
Make the image gray
change_rgb(image, r='1*R ' , g='1*R' , b='1*R')
![Page 36: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/36.jpg)
Make the image gray
change_rgb(image, r='.44*R ' , g='.26*R' , b='.08*R')
![Page 37: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/37.jpg)
change_rgb(image, r='-1*R+1' , g='-1*G+1' , b='-1*B+1')
![Page 38: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/38.jpg)
Invert the image!
change_rgb(image, r='-1*R+1' , g='-1*G+1' , b='-1*B+1')
![Page 39: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/39.jpg)
Now you try!
● Double-click on color.bat!
● Edit as you like, and then press F5 to run the program!
● Can you make the image warmer? (blue is a cold color)
● What about colder?
● Can you make the image brighter?
● Can you make it purple?
● How crazy can you make the image?
![Page 40: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/40.jpg)
Now you try!
● Can you make the image warmer? (blue is a cold color)○ change_rgmb(image, r='2*R' , g='1*G' , b='0.5*B')
● What about colder?
○ change_rgb(image, r='0.5*R' , g='1*G' , b='2*B')
● Can you make the image brighter?
○ change_rgb(image, r='1*R+1' , g='1*G+1' , b='1*B+1')
● Can you make it purple?
○ change_rgb(image, r='1*R+1' , g='1*G' , b='1*B+1')
● How crazy can you make the image?
![Page 41: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/41.jpg)
1 1 1
1
111
1 1
Filtering images
● Let’s modify a pixel using the neighboring pixels
● We use a filter
○ Says how much each neighbor changes the pixel 1 1 11 1 11 1 1
![Page 42: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/42.jpg)
This kind of filter blurs the image
1 1 11 1 11 1 1
![Page 43: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/43.jpg)
This kind of filter finds the edges!
0 1 01 -4 10 1 0
![Page 44: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/44.jpg)
Now what?
![Page 45: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/45.jpg)
Image Classification
● Teach a robot the difference between Cats and Not cats!
???
![Page 46: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/46.jpg)
Why is this challenging?
● Can we just look at the color?
![Page 47: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/47.jpg)
Why is this hard for the robot?
● There are many kinds of cats!
![Page 48: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/48.jpg)
Why is this hard for the robot?
● And things that look like cats...
![Page 49: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/49.jpg)
What does the robot see?
● Can you help the robot?
![Page 50: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/50.jpg)
![Page 51: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/51.jpg)
![Page 52: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/52.jpg)
![Page 53: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/53.jpg)
![Page 54: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/54.jpg)
![Page 55: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/55.jpg)
![Page 56: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/56.jpg)
![Page 57: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/57.jpg)
![Page 58: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/58.jpg)
![Page 59: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/59.jpg)
![Page 60: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/60.jpg)
![Page 61: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/61.jpg)
![Page 62: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/62.jpg)
![Page 63: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/63.jpg)
![Page 64: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/64.jpg)
![Page 65: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/65.jpg)
![Page 66: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/66.jpg)
![Page 67: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/67.jpg)
![Page 68: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/68.jpg)
![Page 69: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/69.jpg)
![Page 70: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/70.jpg)
![Page 71: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/71.jpg)
![Page 72: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/72.jpg)
● Last week we sorted characters into Hogwarts houses! (With SVM!)
● This is the same idea!
Image Classification
![Page 73: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/73.jpg)
Classifying cat, or not cat.
● Last week we used Intelligence and Bravery to sort Hogwarts students!
● We can do the same with images!
○ First the computer does some filtering
○ Then the computer counts how many pixels have some properties!
![Page 74: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/74.jpg)
Classifying cat, or not cat.
● Last week we used Intelligence and Bravery to sort Hogwarts students!
● We can do the same with images!
○ First the computer does some filtering
○ Then the computer counts how many pixels have some properties!
■ Like white fluffy fur
■ Or pink nose
■ Or green grass
● Maybe then not a cat!
White fluffy fur: 0.9Pink nose: 0.3Green grass: 1.1
![Page 75: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/75.jpg)
Training a classifier
Images of cats Images of not cats
![Page 76: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/76.jpg)
Training a classifier
Images of cats Images of not cats
Cats
Not cats
![Page 77: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/77.jpg)
Testing a classifier
“It’s a cat!”
Cats
Not cats
![Page 78: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/78.jpg)
Try training your own!
● Double-click on classify.bat, then edit, and press F5 to run!
● Select the type of data (cats, dogs, flowers, or pandas!)
● What should they computer look for? Only color? or any texture?
● Select the number of dimensions!○ You can select 2, 10, or 100! (or any number you want)
● How strict should the boundary be? 100%? 50%?
images = get_images( data=cat )
features = features( images , type_=color , dim=200 )
classifier = train( features , strict=50% _)
test( classifier )
strict
Not strict
![Page 79: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/79.jpg)
Computer thinks these are cats! ..and thinks these are not!
Oops!
![Page 80: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/80.jpg)
Where are we now?
![Page 81: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/81.jpg)
The best classifiers today
![Page 82: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/82.jpg)
Convolutional Neural Networks (Deep learning)
Filtering Filtering Filtering Filtering Filtering
“It’s a Robot!”
![Page 83: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/83.jpg)
What is Computer Vision?
Sittable! Cat is walking this way!
3D Layout
Couch
Cat
TV
![Page 84: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/84.jpg)
● “Fixing” images with computers.
● Remove fog, fix out-of-focus, change pictures to make them pretty
Computational Photography
![Page 85: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/85.jpg)
3D from images
● Take lots of pictures, and make a 3D model
![Page 86: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/86.jpg)
Predicting motion
● Have a robot predict what a person will do next!
![Page 87: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/87.jpg)
What else might computer vision do?
![Page 88: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/88.jpg)
![Page 89: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/89.jpg)
![Page 90: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/90.jpg)
![Page 91: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/91.jpg)
Color Filters!
1. Can you make the image warmer? (blue is a cold color)
change_rgb(image, r=' ' , g=' ' , b=' ')
2. What about colder?
change_rgb(image, r=' ' , g=' ' , b=' ')
3. Can you make the image brighter?
change_rgb(image, r=' ' , g=' ' , b=' ')
4. Can you make it purple?
change_rgb(image, r=' ' , g=' ' , b=' ')
5. How crazy can you make the image?
change_rgb(image, r=' ' , g=' ' , b=' ')
![Page 92: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/92.jpg)
Help the robots identify the objects!
![Page 93: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/93.jpg)
![Page 94: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/94.jpg)
![Page 95: Computer Vision TechNights, 4 April 2016 manages to find our … Vision.pdf · 2016-04-08 · Computer Vision – TechNights, 4 April 2016 In this session we will learn about Computer](https://reader033.vdocuments.us/reader033/viewer/2022050607/5faeaf4798097c262b0f913e/html5/thumbnails/95.jpg)