Úvod do CNN

Image Modeling with Keras

Ariel Rokem

Senior Data Scientist, University of Washington

Image Modeling with Keras

Image Modeling with Keras

Software a předpoklady

Image Modeling with Keras

Obrázky jako data

import matplotlib.pyplot as plt
data = plt.imread('stop_sign.jpg')
plt.imshow(data)
plt.show()

Image Modeling with Keras

Obrázky jako data

data.shape
(2832, 4256, 3)
Image Modeling with Keras

Obrázky jako data

data[1000, 1500]
array([0.73333333, 0.07843137, 0.14509804])

Image Modeling with Keras

Obrázky jako data

data[250, 3500]
array([0.25882353, 0.43921569, 0.77254902])

Image Modeling with Keras

Úprava obrazových dat

data[:, :, 1] = 0
data[:, :, 2] = 0
plt.imshow(data)
plt.show()

Image Modeling with Keras

Změna obrázku

data[200:1200, 200:1200, :] = [0, 1, 0]

plt.imshow(data) plt.show()

Image Modeling with Keras

Obrázky ve stupních šedi

Image Modeling with Keras

Obrázky ve stupních šedi

Image Modeling with Keras

Obrázky ve stupních šedi

tshirt[10:20, 15:25] = 1

plt.imshow(tshirt) plt.show()

Image Modeling with Keras

Pojďme si procvičit!

Image Modeling with Keras

Preparing Video For Download...